dialysisPrescriptionDialog.vue 167KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995
  1. <template>
  2. <div>
  3. <el-dialog
  4. title="透析处方"
  5. :visible.sync="isVisibility"
  6. width="1010px"
  7. :modal-append-to-body="false"
  8. :append-to-body="true"
  9. class="newDialog"
  10. >
  11. <el-button
  12. style="position: absolute;left: 12%;top: 2%"
  13. @click="handlePatientInfo"
  14. >{{ patient.name }}
  15. </el-button
  16. >
  17. <div class="warnTxt" v-if="showTxt != ''">{{ showTxt }}</div>
  18. <el-form
  19. ref="dialysisPrescription"
  20. :model="dialysisPrescription"
  21. label-width="148px"
  22. >
  23. <el-row :gutter="24">
  24. <el-col :span="8" v-if="isShows('透析模式')">
  25. <el-form-item label="透析模式">
  26. <el-select
  27. v-model="dialysisPrescription.mode_id"
  28. @change="changePrescription(dialysisPrescription.mode_id)"
  29. >
  30. <el-option :key="0" label="请选择" :value="0"></el-option>
  31. <el-option
  32. v-for="(item, index) in treatment_mode"
  33. :label="item.name"
  34. :value="item.id"
  35. :key="index + 'q'"
  36. ></el-option>
  37. </el-select>
  38. </el-form-item>
  39. </el-col>
  40. <el-col :span="8" v-if="isShows('透析时长')">
  41. <el-form-item label="透析时长(h): ">
  42. <el-input
  43. type="number"
  44. v-model="dialysisPrescription.dialysis_duration_hour"
  45. ></el-input>
  46. </el-form-item>
  47. </el-col>
  48. <el-col :span="8" v-if="isShows('透析时长')">
  49. <el-form-item label="透析时长(min): ">
  50. <el-input
  51. type="number"
  52. v-model="dialysisPrescription.dialysis_duration_minute"
  53. ></el-input>
  54. </el-form-item>
  55. </el-col>
  56. <!-- </el-row>
  57. <el-row :gutter="20"> -->
  58. <el-col :span="8" v-if="isShows('血流量')">
  59. <el-form-item label="血流量(ml/min):">
  60. <el-input
  61. type="number"
  62. v-model="dialysisPrescription.blood_flow_volume"
  63. ></el-input>
  64. </el-form-item>
  65. </el-col>
  66. <el-col :span="8"
  67. v-if="isShows('预冲量') && (this.$store.getters.xt_user.template_info.template_id == 17 || this.$store.getters.xt_user.template_info.template_id == 9 || this.$store.getters.xt_user.template_info.template_id == 20 || this.$store.getters.xt_user.template_info.template_id == 21 || this.$store.getters.xt_user.template_info.template_id == 22 || this.$store.getters.xt_user.template_info.template_id == 23 || this.$store.getters.xt_user.template_info.template_id == 36)">
  68. <el-form-item label="预冲量(ml):">
  69. <el-input
  70. type="number"
  71. v-model="dialysisPrescription.pre_impulse"
  72. ></el-input>
  73. </el-form-item>
  74. </el-col>
  75. <el-col :span="8"
  76. v-if="isShows('预冲量') && this.$store.getters.xt_user.template_info.template_id != 17 && this.$store.getters.xt_user.template_info.template_id != 9 && this.$store.getters.xt_user.template_info.template_id != 20 && this.$store.getters.xt_user.template_info.template_id != 21 && this.$store.getters.xt_user.template_info.template_id != 22 && this.$store.getters.xt_user.template_info.template_id !=23 && this.$store.getters.xt_user.template_info.template_id !=36">
  77. <el-form-item label="预冲量(L):">
  78. <el-input
  79. type="number"
  80. v-model="dialysisPrescription.pre_impulse"
  81. ></el-input>
  82. </el-form-item>
  83. </el-col>
  84. <el-col :span="8"
  85. v-if="isShows('目标超滤量') && (this.$store.getters.xt_user.template_info.template_id == 17 || this.$store.getters.xt_user.template_info.template_id == 9 || this.$store.getters.xt_user.template_info.template_id == 20 || this.$store.getters.xt_user.template_info.template_id == 21 || this.$store.getters.xt_user.template_info.template_id == 22 || this.$store.getters.xt_user.template_info.template_id == 23 || this.$store.getters.xt_user.template_info.template_id == 24 || this.$store.getters.xt_user.template_info.template_id == 26 || this.$store.getters.xt_user.template_info.template_id == 28 || this.$store.getters.xt_user.template_info.template_id == 27 || this.$store.getters.xt_user.template_info.template_id == 29 || this.$store.getters.xt_user.template_info.template_id == 30 || this.$store.getters.xt_user.template_info.template_id == 31 || this.$store.getters.xt_user.template_info.template_id == 32 || this.$store.getters.xt_user.template_info.template_id == 34 || this.$store.getters.xt_user.template_info.template_id == 38 || this.$store.getters.xt_user.template_info.template_id == 40 || this.$store.getters.xt_user.template_info.template_id == 43 || this.$store.getters.xt_user.template_info.template_id == 45 || this.$store.getters.xt_user.template_info.org_id == 9555 )">
  86. <el-form-item label="目标超滤量(ml):">
  87. <el-input
  88. type="number"
  89. v-model="dialysisPrescription.target_ultrafiltration"
  90. ></el-input>
  91. </el-form-item>
  92. </el-col>
  93. <el-col :span="8"
  94. v-if="isShows('目标超滤量') && this.$store.getters.xt_user.template_info.template_id != 17 && this.$store.getters.xt_user.template_info.template_id != 9 && this.$store.getters.xt_user.template_info.template_id != 20 && this.$store.getters.xt_user.template_info.template_id != 21 && this.$store.getters.xt_user.template_info.template_id != 22 && this.$store.getters.xt_user.template_info.template_id != 23 && this.$store.getters.xt_user.template_info.template_id != 24 && this.$store.getters.xt_user.template_info.template_id != 26 && this.$store.getters.xt_user.template_info.template_id != 28 && this.$store.getters.xt_user.template_info.template_id != 27 && this.$store.getters.xt_user.template_info.template_id != 29 && this.$store.getters.xt_user.template_info.template_id != 30 && this.$store.getters.xt_user.template_info.template_id != 31 && this.$store.getters.xt_user.template_info.template_id != 32 && this.$store.getters.xt_user.template_info.template_id != 34 && this.$store.getters.xt_user.template_info.template_id != 38 && this.$store.getters.xt_user.template_info.template_id != 40 && this.$store.getters.xt_user.template_info.template_id != 43 && this.$store.getters.xt_user.template_info.template_id != 45 && this.$store.getters.xt_user.template_info.org_id != 9555 ">
  95. <el-form-item label="目标超滤量(L):">
  96. <el-input
  97. type="number"
  98. v-model="dialysisPrescription.target_ultrafiltration"
  99. ></el-input>
  100. </el-form-item>
  101. </el-col>
  102. <el-col :span="8" v-if="isShows('单超时长')">
  103. <el-form-item label="单超时长(h):">
  104. <el-input v-model="dialysisPrescription.single_time"></el-input>
  105. </el-form-item>
  106. </el-col>
  107. <el-col :span="8" v-if="isShows('单超脱水')">
  108. <el-form-item label="单超脱水(L):">
  109. <el-input v-model="dialysisPrescription.single_water"></el-input>
  110. </el-form-item>
  111. </el-col>
  112. <el-col :span="8" v-if="isShows('透析液配方')">
  113. <el-form-item label="透析液配方:">
  114. <!-- <el-input type="number" v-model="dialysisPrescription.dialysate_formulation"></el-input> -->
  115. <el-select
  116. v-model="dialysisPrescription.dialysate_formulation"
  117. placeholder="请选择"
  118. >
  119. <el-option :key="0" label="请选择" :value="0"></el-option>
  120. <el-option
  121. v-for="(option, index) in dialysate_formulation_options"
  122. :key="index + 'w'"
  123. :label="option.name"
  124. :value="option.id"
  125. ></el-option>
  126. </el-select>
  127. </el-form-item>
  128. </el-col>
  129. <!-- </el-row>
  130. <el-row :gutter="20"> -->
  131. <el-col :span="8" v-if="isShows('抗凝剂')">
  132. <el-form-item label="抗凝剂:">
  133. <el-select v-model="dialysisPrescription.anticoagulant" placeholder="请选择"
  134. style="width:100%;"
  135. @change="changeThisAnticoagulant">
  136. <el-option :key="0" label="请选择" :value="0"></el-option>
  137. <el-option v-if="dialysisPrescription.anticoagulant ==3" :key="3" label="低分子肝素"
  138. :value="3"></el-option>
  139. <el-option v-for="(item, index) in anticoagulantsConfit" :label="item.name"
  140. :key="index + 'e'"
  141. :value="item.id"></el-option>
  142. </el-select>
  143. </el-form-item>
  144. </el-col>
  145. <el-col :span="8" v-if="isShows('抗凝剂商品名称')">
  146. <el-form-item label="抗凝剂商品名称:">
  147. <el-input
  148. v-model="dialysisPrescription.antioxidant_commodity_name"
  149. ></el-input>
  150. </el-form-item>
  151. </el-col>
  152. <el-col :span="8" v-if="isShows('肝素钠') && dialysisPrescription.anticoagulant ==10">
  153. <el-form-item label="肝素钠(mg/h):">
  154. <el-input
  155. v-model="dialysisPrescription.heparin_sodium"
  156. ></el-input>
  157. </el-form-item>
  158. </el-col>
  159. <el-col :span="8" v-if="isShows('鱼精蛋白') && dialysisPrescription.anticoagulant ==10">
  160. <el-form-item label="鱼精蛋白(mg/h):">
  161. <el-input
  162. v-model="dialysisPrescription.nucleoprotamine"
  163. ></el-input>
  164. </el-form-item>
  165. </el-col>
  166. <el-col :span="8" v-if="isShows('下机前推注鱼精蛋白') && dialysisPrescription.anticoagulant ==10">
  167. <el-form-item label="下机前推注鱼精蛋白(mg):">
  168. <el-input
  169. v-model="dialysisPrescription.push_the_protamine"
  170. ></el-input>
  171. </el-form-item>
  172. </el-col>
  173. <el-col :span="8" v-if="isShows('无肝素备注') && dialysisPrescription.anticoagulant ==1">
  174. <el-form-item label="无肝素备注:">
  175. <el-input
  176. v-model="dialysisPrescription.no_heparin_remarks"
  177. ></el-input>
  178. </el-form-item>
  179. </el-col>
  180. <el-col :span="8" v-if="anticoagulant.shouji != -1 && isShows('首剂')">
  181. <div v-if="this.$store.getters.xt_user.template_info.org_id != 10157">
  182. <div v-if="this.$store.getters.xt_user.template_info.org_id != 10101">
  183. <el-form-item
  184. v-if='this.$store.getters.xt_user.template_info.template_id != 21 && this.$store.getters.xt_user.template_info.template_id != 23 && this.$store.getters.xt_user.template_info.template_id != 38 && this.$store.getters.xt_user.template_info.org_id != 9987 '
  185. :label="'首剂(' + anticoagulant.shouji_unit + ') : '">
  186. <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
  187. v-model="dialysisPrescription.anticoagulant_shouji"></el-input>
  188. <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
  189. v-model="dialysisPrescription.no_anticoagulant_shouji"></el-input>
  190. </el-form-item>
  191. <el-form-item
  192. v-if='this.$store.getters.xt_user.template_info.template_id == 21 || this.$store.getters.xt_user.template_info.template_id == 23 || this.$store.getters.xt_user.template_info.template_id == 38 || this.$store.getters.xt_user.template_info.org_id == 9987'
  193. :label="'首剂(mg) : '">
  194. <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
  195. v-model="dialysisPrescription.anticoagulant_shouji"></el-input>
  196. <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
  197. v-model="dialysisPrescription.no_anticoagulant_shouji"></el-input>
  198. </el-form-item>
  199. </div>
  200. <div v-else>
  201. <el-form-item v-if="dialysisPrescription.anticoagulant == 2" :label="'首剂(mg) : '">
  202. <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
  203. v-model="dialysisPrescription.anticoagulant_shouji"></el-input>
  204. <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
  205. v-model="dialysisPrescription.no_anticoagulant_shouji"></el-input>
  206. </el-form-item>
  207. <el-form-item v-else :label="'首剂(iu) : '">
  208. <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
  209. v-model="dialysisPrescription.anticoagulant_shouji"></el-input>
  210. <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
  211. v-model="dialysisPrescription.no_anticoagulant_shouji"></el-input>
  212. </el-form-item>
  213. </div>
  214. </div>
  215. <div v-else>
  216. <el-form-item v-if="dialysisPrescription.anticoagulant == 2" :label="'首剂(mg) : '">
  217. <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
  218. v-model="dialysisPrescription.anticoagulant_shouji"></el-input>
  219. <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
  220. v-model="dialysisPrescription.no_anticoagulant_shouji"></el-input>
  221. </el-form-item>
  222. <el-form-item v-else :label="'首剂(' + anticoagulant.shouji_unit + ') : '">
  223. <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
  224. v-model="dialysisPrescription.anticoagulant_shouji"></el-input>
  225. <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
  226. v-model="dialysisPrescription.no_anticoagulant_shouji"></el-input>
  227. </el-form-item>
  228. </div>
  229. </el-col>
  230. <el-col :span="8" v-if="anticoagulant.weichi != -1 && isShows('维持')">
  231. <div v-if="this.$store.getters.xt_user.template_info.org_id != 10157">
  232. <div v-if="this.$store.getters.xt_user.template_info.org_id != 10101">
  233. <el-form-item :label="'维持(' + anticoagulant.weichi_unit + ') : '"
  234. v-if="anticoagulant.weichi != -1 && this.$store.getters.xt_user.template_info.template_id != 21 && this.$store.getters.xt_user.template_info.template_id != 23 && this.$store.getters.xt_user.template_info.template_id != 38 && this.$store.getters.xt_user.template_info.org_id != 9987">
  235. <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
  236. v-model="dialysisPrescription.anticoagulant_weichi"></el-input>
  237. <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
  238. v-model="dialysisPrescription.no_anticoagulant_weichi"></el-input>
  239. </el-form-item>
  240. <el-form-item :label="'维持(mg/h) : '"
  241. v-if="anticoagulant.weichi != -1 && this.$store.getters.xt_user.template_info.template_id == 21 || this.$store.getters.xt_user.template_info.template_id == 23 || this.$store.getters.xt_user.template_info.template_id == 38 || this.$store.getters.xt_user.template_info.org_id == 9987">
  242. <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
  243. v-model="dialysisPrescription.anticoagulant_weichi"></el-input>
  244. <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
  245. v-model="dialysisPrescription.no_anticoagulant_weichi"></el-input>
  246. </el-form-item>
  247. </div>
  248. <div v-else>
  249. <el-form-item :label="'维持(iu/h) : '"
  250. v-if="anticoagulant.weichi != -1 && dialysisPrescription.anticoagulant != 2">
  251. <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
  252. v-model="dialysisPrescription.anticoagulant_weichi"></el-input>
  253. <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
  254. v-model="dialysisPrescription.no_anticoagulant_weichi"></el-input>
  255. </el-form-item>
  256. <el-form-item :label="'维持(mg/h) : '"
  257. v-if="anticoagulant.weichi != -1 && dialysisPrescription.anticoagulant == 2">
  258. <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
  259. v-model="dialysisPrescription.anticoagulant_weichi"></el-input>
  260. <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
  261. v-model="dialysisPrescription.no_anticoagulant_weichi"></el-input>
  262. </el-form-item>
  263. </div>
  264. </div>
  265. <div v-else>
  266. <el-form-item v-if="dialysisPrescription.anticoagulant == 2" :label="'维持(mg/h) : '">
  267. <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
  268. v-model="dialysisPrescription.anticoagulant_weichi"></el-input>
  269. <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
  270. v-model="dialysisPrescription.no_anticoagulant_weichi"></el-input>
  271. </el-form-item>
  272. <el-form-item :label="'维持(' + anticoagulant.weichi_unit + ') : '" v-else>
  273. <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
  274. v-model="dialysisPrescription.anticoagulant_weichi"></el-input>
  275. <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
  276. v-model="dialysisPrescription.no_anticoagulant_weichi"></el-input>
  277. </el-form-item>
  278. </div>
  279. </el-col>
  280. <el-col :span="8" v-if="anticoagulant.zongliang != -1 && isShows('总量')">
  281. <div v-if="this.$store.getters.xt_user.template_info.org_id != 10157">
  282. <div v-if="this.$store.getters.xt_user.template_info.org_id != 10101">
  283. <el-form-item
  284. v-if='this.$store.getters.xt_user.template_info.template_id != 21 && this.$store.getters.xt_user.template_info.template_id != 23 && this.$store.getters.xt_user.template_info.template_id != 38 && this.$store.getters.xt_user.template_info.org_id != 9987'
  285. :label="'总量(' + anticoagulant.zongliang_unit + ') : '">
  286. <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
  287. v-model="dialysisPrescription.anticoagulant_zongliang"></el-input>
  288. <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
  289. v-model="dialysisPrescription.no_anticoagulant_zongliang"></el-input>
  290. </el-form-item>
  291. <el-form-item
  292. v-if='this.$store.getters.xt_user.template_info.template_id == 21 || this.$store.getters.xt_user.template_info.template_id == 23 || this.$store.getters.xt_user.template_info.template_id == 38 || this.$store.getters.xt_user.template_info.org_id == 9987'
  293. :label="'总量(mg) : '">
  294. <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
  295. v-model="dialysisPrescription.anticoagulant_zongliang"></el-input>
  296. <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
  297. v-model="dialysisPrescription.no_anticoagulant_zongliang"></el-input>
  298. </el-form-item>
  299. </div>
  300. <div v-else>
  301. <el-form-item
  302. v-if='dialysisPrescription.anticoagulant != 2'
  303. :label="'总量(iu) : '">
  304. <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
  305. v-model="dialysisPrescription.anticoagulant_zongliang"></el-input>
  306. <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
  307. v-model="dialysisPrescription.no_anticoagulant_zongliang"></el-input>
  308. </el-form-item>
  309. <el-form-item
  310. v-if='dialysisPrescription.anticoagulant == 2'
  311. :label="'总量(mg) : '">
  312. <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
  313. v-model="dialysisPrescription.anticoagulant_zongliang"></el-input>
  314. <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
  315. v-model="dialysisPrescription.no_anticoagulant_zongliang"></el-input>
  316. </el-form-item>
  317. </div>
  318. </div>
  319. <div v-else>
  320. <el-form-item v-if="dialysisPrescription.anticoagulant == 2" :label="'总量(mg) : '">
  321. <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
  322. v-model="dialysisPrescription.anticoagulant_zongliang"></el-input>
  323. <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
  324. v-model="dialysisPrescription.no_anticoagulant_zongliang"></el-input>
  325. </el-form-item>
  326. <el-form-item v-else :label="'总量(' + anticoagulant.zongliang_unit + ') : '">
  327. <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1"
  328. v-model="dialysisPrescription.anticoagulant_zongliang"></el-input>
  329. <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1"
  330. v-model="dialysisPrescription.no_anticoagulant_zongliang"></el-input>
  331. </el-form-item>
  332. </div>
  333. </el-col>
  334. <el-col :span="8"
  335. v-if="isShows('置换量') && (this.$store.getters.xt_user.template_info.template_id == 20 || this.$store.getters.xt_user.template_info.template_id == 28 || this.$store.getters.xt_user.template_info.template_id == 29)"
  336. v-show="zhiShow">
  337. <el-form-item label="置换量(ml):">
  338. <el-input
  339. type="number"
  340. v-model="dialysisPrescription.replacement_total"
  341. ></el-input>
  342. </el-form-item>
  343. </el-col>
  344. <el-col :span="8"
  345. v-if="isShows('置换量') && this.$store.getters.xt_user.template_info.template_id != 20 && this.$store.getters.xt_user.template_info.template_id != 28 && this.$store.getters.xt_user.template_info.template_id != 29 && this.$store.getters.xt_user.template_info.template_id != 40"
  346. v-show="zhiShow">
  347. <el-form-item label="置换量(L):">
  348. <el-input
  349. type="number"
  350. v-model="dialysisPrescription.replacement_total"
  351. ></el-input>
  352. </el-form-item>
  353. </el-col>
  354. <el-col :span="8" v-if="isShows('置换速度')" v-show="totalShow">
  355. <el-form-item label="置换速度(ml/min)">
  356. <el-input
  357. v-model="dialysisPrescription.displace_speed"
  358. ></el-input>
  359. </el-form-item>
  360. </el-col>
  361. <el-col
  362. :span="8"
  363. v-if="anticoagulant.gaimingcheng != -1 && isShows('钙名称')"
  364. >
  365. <el-form-item label="钙名称 : ">
  366. <el-input
  367. v-model="dialysisPrescription.anticoagulant_gaimingcheng"
  368. :disabled="anticoagulant.gaimingcheng == 1 ? false : true"
  369. placeholder="钙名称"
  370. ></el-input>
  371. </el-form-item>
  372. </el-col>
  373. <el-col
  374. :span="8"
  375. v-if="anticoagulant.gaijiliang != -1 && isShows('钙剂量')"
  376. >
  377. <el-form-item label="钙剂量(ml) : ">
  378. <el-input
  379. type="number"
  380. v-model="dialysisPrescription.anticoagulant_gaijiliang"
  381. :disabled="anticoagulant.gaijiliang == 1 ? false : true"
  382. placeholder="钙剂量"
  383. ></el-input>
  384. </el-form-item>
  385. </el-col>
  386. <el-col :span="8" v-if="isShows('钾')">
  387. <el-form-item label="钾(mmol/L): ">
  388. <el-input
  389. type="number"
  390. v-model="dialysisPrescription.kalium"
  391. ></el-input>
  392. </el-form-item>
  393. </el-col>
  394. <el-col :span="8" v-if="isShows('钠')">
  395. <el-form-item label="钠(mmol/L):">
  396. <el-input
  397. type="number"
  398. v-model="dialysisPrescription.sodium"
  399. ></el-input>
  400. </el-form-item>
  401. </el-col>
  402. <el-col :span="8" v-if="isShows('钙')">
  403. <el-form-item label="钙(mmol/L):">
  404. <el-input
  405. type="number"
  406. v-model="dialysisPrescription.calcium"
  407. ></el-input>
  408. </el-form-item>
  409. </el-col>
  410. <el-col :span="8" v-if="isShows('碳酸氢盐')">
  411. <el-form-item label="碳酸氢盐(mmol/L):">
  412. <el-input
  413. type="number"
  414. v-model="dialysisPrescription.bicarbonate"
  415. ></el-input>
  416. </el-form-item>
  417. </el-col>
  418. <!-- <el-col :span="8" v-if="isShows('葡萄糖')">
  419. <el-form-item label="葡萄糖(mmol/L):">
  420. <el-input
  421. type="number"
  422. v-model="dialysisPrescription.glucose"
  423. ></el-input>
  424. </el-form-item>
  425. </el-col> -->
  426. <el-col :span="8" v-if="isShows('透析液流量')">
  427. <el-form-item label="透析液流量(ml/min):">
  428. <el-input
  429. type="number"
  430. v-model="dialysisPrescription.dialysate_flow"
  431. ></el-input>
  432. </el-form-item>
  433. </el-col>
  434. <el-col :span="8" v-if="isShows('透析液温度')">
  435. <el-form-item label="透析液温度(°C):">
  436. <el-input
  437. type="number"
  438. v-model="dialysisPrescription.dialysate_temperature"
  439. ></el-input>
  440. </el-form-item>
  441. </el-col>
  442. <el-col :span="8" v-if="isShows('电导率')">
  443. <el-form-item label="电导率(mS/cm): ">
  444. <el-input
  445. type="number"
  446. v-model="dialysisPrescription.conductivity"
  447. ></el-input>
  448. </el-form-item>
  449. </el-col>
  450. <el-col :span="8" v-if="isShows('透析器/灌流器')">
  451. <el-form-item label="透析器/灌流器">
  452. <el-input v-model="dialysisPrescription.dialyzer_perfusion_apparatus"
  453. @focus="showInnerDialog('5')"></el-input>
  454. </el-form-item>
  455. </el-col>
  456. <el-col :span="8" v-if="isShows('透析器')">
  457. <el-form-item label="透析器:">
  458. <el-input v-model="dialysisPrescription.dialysis_dialyszers"
  459. @focus="showInnerDialog('7')"></el-input>
  460. </el-form-item>
  461. </el-col>
  462. <el-col :span="8" v-if="isShows('灌流器')">
  463. <el-form-item label="灌流器:">
  464. <el-input v-model="dialysisPrescription.dialysis_irrigation"
  465. @focus="showInnerDialog('8')"></el-input>
  466. </el-form-item>
  467. </el-col>
  468. <el-col :span="8" v-if="isShows('血浆分离器')">
  469. <el-form-item label="血浆分离器:">
  470. <el-input v-model="dialysisPrescription.plasma_separator"
  471. @focus="showInnerDialog('9')"></el-input>
  472. </el-form-item>
  473. </el-col>
  474. <el-col :span="8" v-if="isShows('胆红素吸附柱')">
  475. <el-form-item label="胆红素吸附柱:">
  476. <el-input v-model="dialysisPrescription.bilirubin_adsorption_column"
  477. @focus="showInnerDialog('10')"></el-input>
  478. </el-form-item>
  479. </el-col>
  480. <el-col :span="8" v-if="isShows('体液过多症状')">
  481. <el-form-item label="体液过多症状:">
  482. <el-select
  483. v-model="dialysisPrescription.body_fluid"
  484. placeholder="请选择"
  485. style="width:100%;"
  486. >
  487. <el-option :key="0" label="请选择" :value="0"></el-option>
  488. <el-option
  489. v-for="(item, index) in body_fluid_option"
  490. :label="item.name"
  491. :key="index + 't'"
  492. :value="item.id"
  493. ></el-option>
  494. </el-select>
  495. </el-form-item>
  496. </el-col>
  497. <el-col :span="8" v-if="isShows('体液过多其他症状')">
  498. <el-form-item label="体液过多其他症状">
  499. <el-input
  500. v-model="dialysisPrescription.body_fluid_other"
  501. ></el-input>
  502. </el-form-item>
  503. </el-col>
  504. <el-col :span="8" v-if="isShows('透析前使用特殊药物')">
  505. <el-form-item label="透析前使用特殊药物">
  506. <el-select
  507. v-model="dialysisPrescription.special_medicine"
  508. placeholder="请选择"
  509. style="width:100%;"
  510. >
  511. <el-option :key="0" label="请选择" :value="0"></el-option>
  512. <el-option
  513. v-for="(item, index) in special_medicine_option"
  514. :label="item.name"
  515. :key="index + 'y'"
  516. :value="item.id"
  517. ></el-option>
  518. </el-select>
  519. </el-form-item>
  520. </el-col>
  521. <el-col :span="8" v-if="isShows('透析前使用其他特殊药物')">
  522. <el-form-item label="透析前使用其他特殊药物">
  523. <el-input
  524. v-model="dialysisPrescription.special_medicine_other"
  525. ></el-input>
  526. </el-form-item>
  527. </el-col>
  528. <el-col :span="8">
  529. <el-form-item
  530. label="置换液:"
  531. v-if="isShows('置换液')"
  532. v-show="huShow"
  533. >
  534. <el-select
  535. v-model="dialysisPrescription.displace_liqui_part"
  536. placeholder="请选择"
  537. >
  538. <el-option :key="0" label="请选择" :value="0"></el-option>
  539. <el-option
  540. v-for="(option, index) in displace_liqui_part_option"
  541. :key="index + 'u'"
  542. :label="option.name"
  543. :value="option.id"
  544. ></el-option>
  545. </el-select>
  546. </el-form-item>
  547. </el-col>
  548. <el-col :span="8"
  549. v-if="isShows('置换液总量') && (this.$store.getters.xt_user.template_info.template_id == 21 || this.$store.getters.xt_user.template_info.template_id == 29 || this.$store.getters.xt_user.template_info.template_id ==24)"
  550. v-show="totalShow">
  551. <el-form-item label="置换液总量(ml)">
  552. <el-input
  553. v-model="dialysisPrescription.displace_liqui_value"
  554. ></el-input>
  555. </el-form-item>
  556. </el-col>
  557. <el-col :span="8"
  558. v-if="isShows('置换液总量') && this.$store.getters.xt_user.template_info.template_id != 21 && this.$store.getters.xt_user.template_info.template_id != 29 && this.$store.getters.xt_user.template_info.template_id !=24"
  559. v-show="totalShow">
  560. <el-form-item label="置换液总量(L)">
  561. <el-input
  562. v-model="dialysisPrescription.displace_liqui_value"
  563. ></el-input>
  564. </el-form-item>
  565. </el-col>
  566. <el-col :span="8" v-if="isShows('目标KT/V')">
  567. <el-form-item label="目标KT/V">
  568. <el-input v-model="dialysisPrescription.target_ktv"></el-input>
  569. </el-form-item>
  570. </el-col>
  571. <el-col :span="8" v-if="isShows('血管通路')">
  572. <el-form-item label="血管通路:">
  573. <el-select
  574. v-model="dialysisPrescription.blood_access"
  575. placeholder="请选择"
  576. >
  577. <el-option :key="0" label="请选择" :value="0"></el-option>
  578. <el-option
  579. v-for="(option, index) in blood_access_option"
  580. :key="index + 'i'"
  581. :label="option.name"
  582. :value="option.id"
  583. ></el-option>
  584. </el-select>
  585. </el-form-item>
  586. </el-col>
  587. <el-col :span="8" v-if="isShows('抗凝提前停止')">
  588. <el-form-item label="抗凝提前停止(h): ">
  589. <el-input
  590. type="number"
  591. v-model="dialysisPrescription.anticoagulant_stop_time_hour"
  592. ></el-input>
  593. </el-form-item>
  594. </el-col>
  595. <el-col :span="8" v-if="isShows('抗凝提前停止')">
  596. <el-form-item label="抗凝提前停止(min): ">
  597. <el-input
  598. type="number"
  599. v-model="dialysisPrescription.anticoagulant_stop_time_min"
  600. ></el-input>
  601. </el-form-item>
  602. </el-col>
  603. <el-col :span="8" v-if="isShows('抽血')">
  604. <el-form-item label="抽血:">
  605. <el-input v-model="dialysisPrescription.blood" @focus="showInnerDialog('6')"></el-input>
  606. </el-form-item>
  607. </el-col>
  608. <el-col :span="8" v-if="isShows('病情')">
  609. <el-form-item label="病情:">
  610. <el-select v-model="dialysisPrescription.illness" placeholder="请选择">
  611. <el-option :key="0" label="请选择" :value="0"></el-option>
  612. <el-option
  613. v-for="(item, index) in illnessList "
  614. :key="index"
  615. :label="item.name"
  616. :value="item.id"
  617. ></el-option>
  618. </el-select>
  619. </el-form-item>
  620. </el-col>
  621. <el-col :span="8" v-if="isShows('葡萄糖')">
  622. <el-form-item label="葡萄糖:">
  623. <el-input v-model="dialysisPrescription.amylaceum"></el-input>
  624. </el-form-item>
  625. </el-col>
  626. <el-col :span="8" v-if="isShows('置换流量')">
  627. <el-form-item label="置换流量(L/h):">
  628. <el-input v-model="dialysisPrescription.replacement_flow"></el-input>
  629. </el-form-item>
  630. </el-col>
  631. <el-col :span="8" v-if="isShows('吸氧')">
  632. <el-form-item label="吸氧:">
  633. <el-select v-model="dialysisPrescription.oxygen_uptake" placeholder="请选择"
  634. @change="changeOxygenList">
  635. <el-option :key="0" label="请选择" :value="0"></el-option>
  636. <el-option
  637. v-for="(item, index) in oxygenList "
  638. :key="index"
  639. :label="item.name"
  640. :value="item.id"
  641. ></el-option>
  642. </el-select>
  643. </el-form-item>
  644. </el-col>
  645. <el-col :span="8" v-if="isShows('吸氧') && oxygenShow == true">
  646. <el-form-item label="吸氧流量(L/分):">
  647. <el-input v-model="dialysisPrescription.oxygen_flow"></el-input>
  648. </el-form-item>
  649. </el-col>
  650. <el-col :span="8" v-if="isShows('吸氧') && oxygenShow == true">
  651. <el-form-item label="吸氧时长(h):">
  652. <el-input v-model="dialysisPrescription.oxygen_time"></el-input>
  653. </el-form-item>
  654. </el-col>
  655. <el-col :span="8" v-if="isShows('透析管路')">
  656. <el-form-item label="透析管路:">
  657. <el-select
  658. v-model="dialysisPrescription.hemodialysis_pipelines"
  659. placeholder="请选择"
  660. style="width:100%;"
  661. >
  662. <el-option :key="0" label="请选择" :value="0"></el-option>
  663. <el-option
  664. v-for="(item, index) in hemodialysisPipelinesOptions"
  665. :label="item.name"
  666. :key="index + 't'"
  667. :value="item.name"
  668. ></el-option>
  669. </el-select>
  670. </el-form-item>
  671. </el-col>
  672. <el-col :span="8" v-if="isShows('透析管路支数')">
  673. <el-form-item label="透析管路支数">
  674. <el-input oninput="value=value.replace(/\D|^0/g,'')" v-model="dialysisPrescription.hemodialysis_pipelines_count"
  675. ></el-input>
  676. </el-form-item>
  677. </el-col>
  678. <el-col :span="8" v-if="isShows('穿刺针')">
  679. <el-form-item label="穿刺针">
  680. <el-input v-model="dialysisPrescription.puncture_needle"
  681. @focus="showInnerDialog('11')"></el-input>
  682. </el-form-item>
  683. </el-col>
  684. <el-col :span="8" v-if="isShows('穿刺针支数')">
  685. <el-form-item label="穿刺针支数">
  686. <el-input oninput="value=value.replace(/\D|^0/g,'')" v-model="dialysisPrescription.puncture_needle_count"
  687. ></el-input>
  688. </el-form-item>
  689. </el-col>
  690. <el-col :span="8" v-if="isShows('促红素')">
  691. <el-form-item label="促红素:">
  692. <el-select
  693. v-model="dialysisPrescription.epo"
  694. placeholder="请选择"
  695. style="width:100%;"
  696. >
  697. <el-option :key="0" label="请选择" :value="0"></el-option>
  698. <el-option
  699. v-for="(item, index) in epoOptions"
  700. :label="item.name"
  701. :key="index + 't'"
  702. :value="item.name"
  703. ></el-option>
  704. </el-select>
  705. </el-form-item>
  706. </el-col>
  707. <el-col :span="8" v-if="isShows('促红素支数')">
  708. <el-form-item label="促红素支数">
  709. <el-input oninput="value=value.replace(/\D|^0/g,'')" v-model="dialysisPrescription.epo_count"></el-input>
  710. </el-form-item>
  711. </el-col>
  712. <el-col :span="8" v-if="isShows('最大超滤率')">
  713. <el-form-item label="最大超滤率(ml/h)">
  714. <el-input oninput="value=value.replace(/\D|^0/g,'')" v-model="dialysisPrescription.max_ultrafiltration_rate"></el-input>
  715. </el-form-item>
  716. </el-col>
  717. </el-row>
  718. <el-row :gutter="20">
  719. <el-col :span="24">
  720. <el-form-item label="备注: ">
  721. <el-input
  722. type="textarea"
  723. v-model="dialysisPrescription.remark"
  724. :rows="5"
  725. ></el-input>
  726. </el-form-item>
  727. </el-col>
  728. </el-row>
  729. </el-form>
  730. <span slot="footer" class="dialog-footer">
  731. <el-button @click="handleCancle">取 消</el-button>
  732. <!-- <el-button type="primary" @click="handleCommit" v-if="isPermission()">保 存</el-button> -->
  733. <el-button type="primary" @click="handleCommit" :loading="isLoading">保 存</el-button>
  734. <el-button type="primary" @click="handleSolution" :loading="isLoading"
  735. >保存为长期处方</el-button
  736. >
  737. </span>
  738. </el-dialog>
  739. <el-dialog
  740. title="长期医嘱推送"
  741. :visible.sync="isShowRemindAdvice"
  742. width="1010px"
  743. :modal-append-to-body="false"
  744. :append-to-body="true"
  745. >
  746. <div style='display:flex;align-items:center;'>
  747. <span style="font-weight: bold;color: #409eff;width:80px;">开始时间:</span>
  748. <el-date-picker
  749. type="datetime"
  750. format="yyyy-MM-dd HH:mm"
  751. value-format="yyyy-MM-dd HH:mm"
  752. placeholder="选择时间"
  753. v-model="start_time"
  754. ></el-date-picker>
  755. <!--<span style="display: inline-block;border: 1px solid #ccc;padding: 10px 20px;border-radius: 5px;" @click="changeStartTime">{{ advice_start_time }}</span>-->
  756. </div>
  757. <el-checkbox-group v-model="checkedCities">
  758. <el-checkbox
  759. style="display: flex;align-items: center"
  760. v-for="(advice, index) in targetAdvices"
  761. :label="advice.id"
  762. :key="index+'q'"
  763. :value="advice.id"
  764. :name="advice.id"
  765. >
  766. <div style="padding-top: 10px;padding-left: 10px">
  767. 开嘱医生&nbsp;{{ getDoctorName(advice.advice_doctor) }}
  768. </div>
  769. <br/>
  770. <div style="padding-left: 10px">
  771. 开嘱时间&nbsp;{{ getTime(advice.created_time) }}
  772. </div>
  773. <br/>
  774. <div style="padding-bottom: 10px;padding-left: 10px">
  775. 医嘱内容&nbsp;{{ getContent(advice) }}
  776. </div>
  777. <div
  778. style="padding-bottom: 10px;padding-left: 10px"
  779. v-if="advice.frequency_type == 1"
  780. >
  781. 推送频率 每次必推
  782. </div>
  783. <div
  784. style="padding-bottom: 10px;padding-left: 10px"
  785. v-if="advice.frequency_type == 2"
  786. >
  787. 推送频率&nbsp;{{ advice.day_count }}天/次
  788. </div>
  789. <div
  790. style="padding-bottom: 10px;padding-left: 10px"
  791. v-if="advice.frequency_type == 3"
  792. >
  793. 推送频率&nbsp;每周{{ advice.week_day }}
  794. </div>
  795. </el-checkbox>
  796. </el-checkbox-group>
  797. <span slot="footer" class="dialog-footer">
  798. <el-button @click="handleAdviceCancle">取 消</el-button>
  799. <el-button type="primary" @click="handleAdviceCommit" :loading="isLoading">保 存</el-button>
  800. </span>
  801. </el-dialog>
  802. <el-dialog
  803. :title="patient.name"
  804. :visible.sync="msgtip_visibility"
  805. :close-on-click-modal="false"
  806. :close-on-press-escape="false"
  807. :show-close="false"
  808. width="30%"
  809. >
  810. <div class="newLine">
  811. <span>本次透析日期</span>
  812. <span>{{ dialysis_date }}</span>
  813. </div>
  814. <div class="newLine">
  815. <span>透前称重(kg)</span>
  816. <span>{{ getBeforeWeight(predialysis) }}</span>
  817. </div>
  818. <div class="newLine">
  819. <span>干体重(kg)</span>
  820. <span>{{ getDryWeight() }}</span>
  821. </div>
  822. <div class="newLine">
  823. <span>衣物重(kg)</span>
  824. <span>{{ predialysis.additional_weight }}</span>
  825. </div>
  826. <div class="newLine">
  827. <span>体重增加(kg)</span>
  828. <span>{{ add_weight }}</span>
  829. </div>
  830. <div class="newLine">
  831. <span>透后称重(kg)</span>
  832. <span>{{ getAfterWeight(record) }}</span>
  833. </div>
  834. <div class="newLine">
  835. <span>体重减少(kg)</span>
  836. <span>{{ record.weight_loss }}</span>
  837. </div>
  838. <div class="newLine">
  839. <span>上次透后称重(kg)</span>
  840. <span>{{ getLastAfterWeight(last_record) }}</span>
  841. </div>
  842. <span slot="footer" class="dialog-footer">
  843. <el-button @click="cancleMsg()">取 消</el-button>
  844. <el-button type="primary" @click="cancleMsg()">确 定</el-button>
  845. </span>
  846. </el-dialog>
  847. <multi-select-box
  848. :propsForm="InnerDialogProps"
  849. v-on:dialog-comfirm="innerDialogComfirm"
  850. v-on:dialog-cancle="innerDialogCancle"
  851. ></multi-select-box>
  852. </div>
  853. </template>
  854. <script>
  855. import { CreateGroupAdvice, GetSolution, postPrescription, postSoulution } from '@/api/dialysis'
  856. import { getDataConfig } from '@/utils/data'
  857. import { calculateAnticoagulantZL, uParseTime } from '@/utils/tools'
  858. import store from '@/store'
  859. import MsgTip from './MsgTip'
  860. import request from '@/utils/request'
  861. import multiSelectBox from './MultiSelectBox'
  862. export default {
  863. name: 'dialysisPrescriptionDialog',
  864. components: { MsgTip, multiSelectBox },
  865. props: {
  866. mode_id: {
  867. type: Number
  868. },
  869. schedual: {
  870. type: Object
  871. },
  872. is_open: {
  873. type: Number,
  874. default: () => {
  875. return 0
  876. }
  877. },
  878. waitUploadAdvices: {
  879. type: Array,
  880. default: () => {
  881. return []
  882. }
  883. },
  884. targetAdvices: {
  885. type: Array,
  886. default: () => {
  887. return []
  888. }
  889. },
  890. admin_users: {
  891. type: Array,
  892. default: () => {
  893. return []
  894. }
  895. },
  896. niprocart_info: {
  897. type: Array,
  898. default: () => {
  899. return []
  900. }
  901. },
  902. jms_info: {
  903. type: Array,
  904. default: () => {
  905. return []
  906. }
  907. },
  908. fistula_needle_set_info: {
  909. type: Array,
  910. default: () => {
  911. return []
  912. }
  913. },
  914. fistula_needle_set_16_info: {
  915. type: Array,
  916. default: () => {
  917. return []
  918. }
  919. },
  920. hemoperfusion_info: {
  921. type: Array,
  922. default: () => {
  923. return []
  924. }
  925. },
  926. dialyser_sterilised_info: {
  927. type: Array,
  928. default: () => {
  929. return []
  930. }
  931. },
  932. filtryzer_info: {
  933. type: Array,
  934. default: () => {
  935. return []
  936. }
  937. },
  938. dialyzers_info: {
  939. type: Array,
  940. default: () => {
  941. return []
  942. }
  943. },
  944. injector_info: {
  945. type: Array,
  946. default: () => {
  947. return []
  948. }
  949. },
  950. bloodlines_info: {
  951. type: Array,
  952. default: () => {
  953. return []
  954. }
  955. },
  956. tubingHemodialysis_info: {
  957. type: Array,
  958. default: () => {
  959. return []
  960. }
  961. },
  962. safe_package_info: {
  963. type: Array,
  964. default: () => {
  965. return []
  966. }
  967. },
  968. aliquid_info: {
  969. type: Array,
  970. default: () => {
  971. return []
  972. }
  973. },
  974. config: {
  975. type: Object,
  976. default: () => {
  977. return { id: 0 }
  978. }
  979. },
  980. prescription: {
  981. // 透析处方
  982. type: Object,
  983. default: () => {
  984. return { id: 0 }
  985. }
  986. },
  987. solution: {
  988. // 长期处方
  989. type: Object,
  990. default: () => {
  991. return { id: 0 }
  992. }
  993. },
  994. dialysis_order: {
  995. // 透析记录
  996. type: Object,
  997. default: () => {
  998. return { id: 0 }
  999. }
  1000. },
  1001. patient: {
  1002. // 患者信息
  1003. type: Object,
  1004. default: () => {
  1005. return { id: 0 }
  1006. }
  1007. },
  1008. devices: {
  1009. type: Array,
  1010. default: function() {
  1011. return new Array()
  1012. }
  1013. },
  1014. predialysis: {
  1015. type: Object,
  1016. default: () => {
  1017. return { id: 0 }
  1018. }
  1019. },
  1020. last_predialysis: {
  1021. type: Object,
  1022. default: () => {
  1023. return { id: 0 }
  1024. }
  1025. },
  1026. record: {
  1027. type: Object,
  1028. default: () => {
  1029. return { id: 0 }
  1030. }
  1031. },
  1032. last_record: {
  1033. type: Object,
  1034. default: () => {
  1035. return { id: 0 }
  1036. }
  1037. },
  1038. dry_weight: {
  1039. type: Object,
  1040. default: () => {
  1041. return { id: 0 }
  1042. }
  1043. },
  1044. last_prescription: {
  1045. type: Object,
  1046. default: () => {
  1047. return { id: 0 }
  1048. }
  1049. },
  1050. scheudle_mode: Number,
  1051. stockType: {
  1052. type: Array,
  1053. default: () => {
  1054. return []
  1055. }
  1056. },
  1057. lastAssessment: {
  1058. type: Object,
  1059. default: () => {
  1060. return { id: 0 }
  1061. }
  1062. }
  1063. },
  1064. computed: {
  1065. dialysis_date: function() {
  1066. if (this.$route.query.date) {
  1067. return uParseTime(this.$route.query.date, '{y}/{m}/{d}')
  1068. } else {
  1069. return this.record_date
  1070. }
  1071. }
  1072. },
  1073. data() {
  1074. return {
  1075. InnerDialogProps: {
  1076. values: [],
  1077. visibility: false,
  1078. isShowTextArea: true,
  1079. customContent: '',
  1080. titles: '',
  1081. type: '' // 不同弹框类型,用来匹配数据
  1082. },
  1083. advice_start_time: '',
  1084. showTxt: '',
  1085. start_time: '',
  1086. hasPermission: true,
  1087. zhiShow: false,
  1088. totalShow: false,
  1089. huShow: false,
  1090. showName: '',
  1091. isShowRemindAdvice: false,
  1092. checkedCities: [],
  1093. isVisibility: false,
  1094. isShowTime: false,
  1095. isClose: false,
  1096. isShow: false,
  1097. record_date: '',
  1098. time: '',
  1099. treatment_mode: [],
  1100. timeValue: '',
  1101. deviceList: [],
  1102. replacement_ways: [],
  1103. anticoagulantsConfit: {},
  1104. dialysate_formulation_options: [],
  1105. add_weight: 0,
  1106. body_fluid_option: [],
  1107. special_medicine_option: [],
  1108. displace_liqui_part_option: [],
  1109. blood_access_option: [],
  1110. is_pre: 0,
  1111. msgtip_visibility: false,
  1112. dialysisPrescription: {
  1113. replacement_total: '',
  1114. mode_id: '',
  1115. dialysis_duration: '',
  1116. dialysis_duration_hour: '',
  1117. dialysis_duration_minute: '',
  1118. mode_name: '',
  1119. dialyzer: '',
  1120. perfusion_apparatus: '',
  1121. blood_flow_volume: '',
  1122. dewater_amount: '',
  1123. displace_liqui: '',
  1124. replacement_way: '',
  1125. anticoagulant: '',
  1126. anticoagulant_shouji: '',
  1127. anticoagulant_weichi: '',
  1128. anticoagulant_zongliang: '',
  1129. anticoagulant_gaimingcheng: '',
  1130. anticoagulant_gaijiliang: '',
  1131. kalium: '',
  1132. sodium: '',
  1133. calcium: '',
  1134. bicarbonate: '',
  1135. glucose: '',
  1136. dry_weight: '',
  1137. dialysate_flow: '',
  1138. dialysate_temperature: '',
  1139. target_ultrafiltration: '',
  1140. dialysate_formulation: '',
  1141. conductivity: '',
  1142. doctor: '',
  1143. remark: '',
  1144. dialyzer_perfusion_apparatus: '',
  1145. body_fluid: '',
  1146. body_fluid_other: '',
  1147. special_medicine: '',
  1148. special_medicine_other: '',
  1149. displace_liqui_part: '',
  1150. displace_liqui_value: '',
  1151. ultrafiltration: '',
  1152. blood_access: '',
  1153. niprocart: '',
  1154. jms: '',
  1155. fistula_needle_set: '',
  1156. fistula_needle_set_16: '',
  1157. hemoperfusion: '',
  1158. dialyser_sterilised: '',
  1159. filtryzer: '',
  1160. target_ktv: '',
  1161. dialyzers: '',
  1162. injector: '',
  1163. bloodlines: '',
  1164. tubing_hemodialysis: '',
  1165. package: '',
  1166. a_liquid: '',
  1167. no_anticoagulant_shouji: '0',
  1168. no_anticoagulant_weichi: '0',
  1169. no_anticoagulant_zongliang: '0',
  1170. creater: 0,
  1171. pre_impulse: 0, //预冲量
  1172. anticoagulant_stop_time_hour: '',
  1173. anticoagulant_stop_time_min: '',
  1174. push_the_protamine: '',//下机前推注鱼精蛋白
  1175. heparin_sodium: '', //肝素钠
  1176. nucleoprotamine: '',//鱼精蛋白
  1177. no_heparin_remarks: '',
  1178. blood: '',
  1179. dialysis_dialyszers: '',
  1180. dialysis_irrigation: '',
  1181. irrigation: '',
  1182. antioxidant_commodity_name: '',
  1183. displace_speed: '',
  1184. illness: '',
  1185. amylaceum: '',
  1186. single_time: '',
  1187. single_water: '',
  1188. replacement_flow: '',
  1189. plasma_separator: '',
  1190. bilirubin_adsorption_column: '',
  1191. oxygen_uptake: '',
  1192. oxygen_flow: '',
  1193. oxygen_time: '',
  1194. hemodialysis_pipelines: '',
  1195. hemodialysis_pipelines_count: '',
  1196. puncture_needle: '',
  1197. puncture_needle_count: '',
  1198. epo: '',
  1199. epo_count: '',
  1200. max_ultrafiltration_rate:'',
  1201. hemodialysisPipelinesOptions: [],
  1202. punctureNeedleOptions: [],
  1203. epoOptions: [],
  1204. impulse:0,
  1205. },
  1206. anticoagulant: {
  1207. id: 0,
  1208. name: '',
  1209. type: 1,
  1210. shouji: 1,
  1211. weichi: 1,
  1212. zongliang: 1,
  1213. gaimingcheng: -1,
  1214. gaijiliang: -1,
  1215. shouji_unit: 'mg',
  1216. weichi_unit: 'mg/h',
  1217. zongliang_unit: 'mg',
  1218. gaimingcheng_unit: '',
  1219. gaijiliang_unit: ''
  1220. },
  1221. doctorAdvices: [],
  1222. dialyzerPerfusionApparatus: [],
  1223. bloods: [],
  1224. irrigations: [],
  1225. dialyzers: [],
  1226. illnessList: [],
  1227. plasmaSeparatorList: [],
  1228. bilirubinAdsorptionColumn: [],
  1229. oxygenList: [
  1230. { id: 1, name: '需' },
  1231. { id: 2, name: '无' }
  1232. ],
  1233. oxygenShow: false,
  1234. hemodialysisPipelinesOptions: [],
  1235. epoOptions: [],
  1236. isLoading: false
  1237. }
  1238. },
  1239. methods: {
  1240. changeOxygenList(val) {
  1241. if (val == 1) {
  1242. this.oxygenShow = true
  1243. }
  1244. if (val == 2) {
  1245. this.oxygenShow = false
  1246. this.prescription.oxygen_flow = ''
  1247. this.prescription.oxygen_time = ''
  1248. }
  1249. },
  1250. changeTime: function(val) {
  1251. this.advice_start_time = val
  1252. },
  1253. showInnerDialog: function(val) {
  1254. this.InnerDialogProps.visibility = true
  1255. switch (val) {
  1256. case '5': // 透析器/灌流器
  1257. this.InnerDialogProps.values = this.dialyzerPerfusionApparatus
  1258. this.InnerDialogProps.titles = '透析器/灌流器'
  1259. this.InnerDialogProps.type = 'dialyzer_perfusion_apparatus'
  1260. this.InnerDialogProps.selected = this.dialysisPrescription.dialyzer_perfusion_apparatus
  1261. this.InnerDialogProps.isShowTextArea = false
  1262. break
  1263. case '6': // 透析器/灌流器
  1264. this.InnerDialogProps.values = this.bloods
  1265. this.InnerDialogProps.titles = '抽血'
  1266. this.InnerDialogProps.type = 'blood'
  1267. this.InnerDialogProps.selected = this.dialysisPrescription.blood
  1268. this.InnerDialogProps.isShowTextArea = false
  1269. case '7': // 透析器
  1270. for (let i = 0; i < this.dialyzers.length; i++) {
  1271. this.dialyzers[i].name = this.dialyzers[i].specification_name
  1272. }
  1273. this.InnerDialogProps.values = this.dialyzers
  1274. this.InnerDialogProps.titles = '透析器'
  1275. this.InnerDialogProps.type = 'dialyzers'
  1276. this.InnerDialogProps.selected = this.dialysisPrescription.dialysis_dialyszers
  1277. this.InnerDialogProps.isShowTextArea = false
  1278. break
  1279. case '8':
  1280. for (let i = 0; i < this.irrigations.length; i++) {
  1281. this.irrigations[i].name = this.irrigations[i].specification_name
  1282. }
  1283. this.InnerDialogProps.values = this.irrigations
  1284. this.InnerDialogProps.titles = '透析器'
  1285. this.InnerDialogProps.type = 'irrigations'
  1286. this.InnerDialogProps.selected = this.dialysisPrescription.dialysis_irrigation
  1287. this.InnerDialogProps.isShowTextArea = false
  1288. break
  1289. case '9': // 血浆灌流器
  1290. this.InnerDialogProps.values = this.plasmaSeparatorList
  1291. this.InnerDialogProps.titles = '血浆灌流器'
  1292. this.InnerDialogProps.type = 'plasma_separator'
  1293. this.InnerDialogProps.selected = this.dialysisPrescription.plasma_separator
  1294. this.InnerDialogProps.isShowTextArea = false
  1295. break
  1296. case '10': // 胆红素吸附柱
  1297. this.InnerDialogProps.values = this.bilirubinAdsorptionColumn
  1298. this.InnerDialogProps.titles = '胆红素吸附柱'
  1299. this.InnerDialogProps.type = 'bilirubin_adsorption_column'
  1300. this.InnerDialogProps.selected = this.dialysisPrescription.bilirubin_adsorption_column
  1301. this.InnerDialogProps.isShowTextArea = false
  1302. break
  1303. case '11': //穿刺针
  1304. this.InnerDialogProps.values = this.punctureNeedleOptions
  1305. this.InnerDialogProps.titles = '穿刺针'
  1306. this.InnerDialogProps.type = 'puncture_needle'
  1307. this.InnerDialogProps.selected = this.dialysisPrescription.puncture_needle
  1308. this.InnerDialogProps.isShowTextArea = false
  1309. break
  1310. }
  1311. },
  1312. innerDialogComfirm: function(val) {
  1313. this.InnerDialogProps.visibility = false
  1314. switch (val.type) {
  1315. case 'dialyzer_perfusion_apparatus':
  1316. this.dialysisPrescription.dialyzer_perfusion_apparatus = val.value.join(',')
  1317. break
  1318. case 'blood':
  1319. this.dialysisPrescription.blood = val.value.join(',')
  1320. break
  1321. case 'dialyzers':
  1322. this.dialysisPrescription.dialysis_dialyszers = val.value.join(',')
  1323. break
  1324. case 'irrigations':
  1325. this.dialysisPrescription.dialysis_irrigation = val.value.join(',')
  1326. break
  1327. case 'plasma_separator':
  1328. this.dialysisPrescription.plasma_separator = val.value.join(',')
  1329. break
  1330. case 'bilirubin_adsorption_column':
  1331. this.dialysisPrescription.bilirubin_adsorption_column = val.value.join(',')
  1332. break
  1333. case 'puncture_needle':
  1334. this.dialysisPrescription.puncture_needle = val.value.join(',')
  1335. break
  1336. }
  1337. },
  1338. innerDialogCancle: function() {
  1339. this.InnerDialogProps.visibility = false
  1340. },
  1341. getDryWeight() {
  1342. if (this.dry_weight != null && this.dry_weight.id > 0) {
  1343. return this.dry_weight.dry_weight
  1344. } else {
  1345. if (this.last_predialysis != null && this.last_predialysis.id > 0) {
  1346. return this.last_predialysis.dry_weight
  1347. } else {
  1348. return ''
  1349. }
  1350. }
  1351. },
  1352. getLastAfterWeight(record) {
  1353. if (record != null && record.id > 0) {
  1354. if (record.weight_after > 0) {
  1355. let additional_weight = 0
  1356. if (this.predialysis.additional_weight != undefined) {
  1357. additional_weight = this.predialysis.additional_weight
  1358. }
  1359. return parseFloat(record.weight_after - additional_weight).toFixed(1)
  1360. } else {
  1361. return ''
  1362. }
  1363. }
  1364. },
  1365. getBeforeWeight(predialysis) {
  1366. if (predialysis.id > 0) {
  1367. if (predialysis.weight_before > 0) {
  1368. return parseFloat(predialysis.weight_before - predialysis.additional_weight).toFixed(1)
  1369. } else {
  1370. return ''
  1371. }
  1372. }
  1373. },
  1374. getAfterWeight(record) {
  1375. if (record.id > 0) {
  1376. if (record.weight_after > 0) {
  1377. return parseFloat(record.weight_after - this.predialysis.additional_weight).toFixed(1)
  1378. } else {
  1379. return ''
  1380. }
  1381. }
  1382. },
  1383. setLastRecord: function(schedual, lastAssessmentAfterDislysis, lastPredialysisEvaluation, lastDialysisPrescribe, lastDryWeightDislysis, system_prescribe) {
  1384. this.treatment_mode = this.$store.getters.treatment_mode
  1385. // console.log("99999",this.treatment_mode)
  1386. this.perfusion_apparatus = getDataConfig(
  1387. 'hemodialysis',
  1388. 'perfusion_apparatus'
  1389. )
  1390. this.replacement_ways = getDataConfig('hemodialysis', 'replacement_ways')
  1391. this.dialysate_formulation_options = getDataConfig(
  1392. 'hemodialysis',
  1393. 'dialysate_formulation'
  1394. )
  1395. // this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit
  1396. var anticoagulantsConfitOne = this.$store.getters.anticoagulants_confit
  1397. // for (let i = 0; i < anticoagulantsConfitOne.length; i++) {
  1398. // console.log('anticoagulantsConfitOne', anticoagulantsConfitOne[i].name)
  1399. // }
  1400. // var anticoagulantsConfit = getDataConfig('hemodialysis', 'anticoagulant')
  1401. // const arr = []
  1402. // anticoagulantsConfit.map((item, index) => {
  1403. // const objChild = { ...item }
  1404. // arr.push(objChild)
  1405. // })
  1406. // var arrthree = {}
  1407. // arrthree = { ...arr }
  1408. // console.log('arrthree', arrthree)
  1409. const arrFour = []
  1410. Object.keys(anticoagulantsConfitOne).map((item, index) => {
  1411. if (index != 2) {
  1412. arrFour.push(anticoagulantsConfitOne[item])
  1413. }
  1414. })
  1415. this.anticoagulantsConfit = arrFour
  1416. this.dialysisList = this.devices
  1417. this.body_fluid_option = this.$store.getters.body_fluid
  1418. this.special_medicine_option = this.$store.getters.special_medicine
  1419. this.displace_liqui_part_option = this.$store.getters.displace_liqui
  1420. this.hemodialysisPipelinesOptions = getDataConfig('hemodialysis', 'hemodialysis_pipelines')
  1421. this.punctureNeedleOptions = getDataConfig('hemodialysis', 'puncture_needle')
  1422. this.epoOptions = getDataConfig('hemodialysis', 'epo')
  1423. // this.blood_access_option = this.$store.getters.blood_access_internal_fistula;
  1424. this.blood_access_option = getDataConfig(
  1425. 'hemodialysis',
  1426. 'vascular_access_desc'
  1427. )
  1428. // console.log('血管通路', this.blood_access_option)
  1429. this.dialyzerPerfusionApparatus = getDataConfig(
  1430. 'hemodialysis',
  1431. 'dialyzer_perfusion_apparatus'
  1432. )
  1433. // console.log('3333333', this.dialyzerPerfusionApparatus)
  1434. this.bloods = getDataConfig(
  1435. 'hemodialysis',
  1436. 'blood'
  1437. )
  1438. // dialyzerPerfusionApparatus.map(item => {
  1439. // item.name = item.name.toUpperCase()
  1440. // })
  1441. // //去重
  1442. // var arr = this.unique(dialyzerPerfusionApparatus)
  1443. // this.dialyzerPerfusionApparatus = arr
  1444. // console.log('灌流器', arr)
  1445. if (this.$route.query && this.$route.query.date) {
  1446. var date = this.$route.query && this.$route.query.date
  1447. this.record_date = uParseTime(date, '{y}-{m}-{d}')
  1448. } else {
  1449. var date = schedual.schedule_date
  1450. this.record_date = uParseTime(date, '{y}-{m}-{d}')
  1451. }
  1452. if (this.prescription != null && typeof this.prescription.id !== 'undefined' && this.prescription.id > 0) {
  1453. for (const key in this.prescription) {
  1454. this.dialysisPrescription[key] = this.prescription[key]
  1455. }
  1456. } else if (this.solution != null && typeof this.solution.id !== 'undefined' && this.solution.id > 0) {
  1457. for (const key in this.solution) {
  1458. if (key != 'target_ultrafiltration') {
  1459. this.dialysisPrescription[key] = this.solution[key]
  1460. }
  1461. }
  1462. } else if (lastDialysisPrescribe != null && typeof lastDialysisPrescribe.id !== 'undefined' && lastDialysisPrescribe.id > 0) {
  1463. for (const key in lastDialysisPrescribe) {
  1464. if (key != 'target_ultrafiltration') {
  1465. this.dialysisPrescription[key] = lastDialysisPrescribe[key]
  1466. }
  1467. }
  1468. } else if (system_prescribe != null && typeof system_prescribe.id !== 'undefined' && system_prescribe.id > 0) {
  1469. for (const key in system_prescribe) {
  1470. if (key != 'target_ultrafiltration') {
  1471. this.dialysisPrescription[key] = system_prescribe[key]
  1472. }
  1473. }
  1474. } else {
  1475. if (schedual.mode_id == 2 || schedual.mode_id == 5 || schedual.mode_id == 12) {
  1476. this.zhiShow = true
  1477. this.huShow = true
  1478. this.totalShow = true
  1479. } else {
  1480. this.zhiShow = false
  1481. this.huShow = false
  1482. this.totalShow = false
  1483. }
  1484. // this.dialysisPrescription.mode_id = schedual.mode_id
  1485. }
  1486. var thismode = parseInt(this.dialysisPrescription.anticoagulant)
  1487. if (isNaN(thismode) || thismode <= 0) {
  1488. return false
  1489. }
  1490. if (
  1491. typeof this.anticoagulantsConfit[thismode] === 'undefined' ||
  1492. this.anticoagulantsConfit[thismode] == null
  1493. ) {
  1494. return false
  1495. }
  1496. this.anticoagulant = this.$store.getters.anticoagulants_confit[thismode]
  1497. },
  1498. menuMsgTip: function() {
  1499. this.msgtip_visibility = false
  1500. this.isVisibility = true
  1501. },
  1502. handleAdviceCommit() {
  1503. //
  1504. let results = []
  1505. for (let i = 0; i < this.targetAdvices.length; i++) {
  1506. for (let a = 0; a < this.checkedCities.length; a++) {
  1507. if (this.targetAdvices[i].id == this.checkedCities[a]) {
  1508. results.push(this.targetAdvices[i])
  1509. }
  1510. }
  1511. }
  1512. var obj5 = {}
  1513. results = results.reduce((cur, next) => {
  1514. obj5[next.id] ? '' : (obj5[next.id] = true && cur.push(next))
  1515. return cur
  1516. }, [])
  1517. var date = new Date()
  1518. var hour = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
  1519. var minute =
  1520. date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
  1521. if (results.length > 0) {
  1522. if(!this.isLoading){
  1523. if (this.is_pre == 1) {
  1524. if (this.patient.id <= 0) {
  1525. this.$message.error('没有选择患者')
  1526. this.loading = false
  1527. return
  1528. }
  1529. var arr = this.dialysisPrescription
  1530. // console.log('arr', arr)
  1531. const ParamsQuery = arr
  1532. // console.log('医嘱推送2', ParamsQuery)
  1533. ParamsQuery['patient'] = this.patient.id
  1534. ParamsQuery['record_date'] = this.record_date
  1535. ParamsQuery['patient_id'] = this.$route.query.patient_id
  1536. if (this.prescription.creater <= 0) {
  1537. ParamsQuery['mode'] = '1'
  1538. } else {
  1539. ParamsQuery['mode'] = '2'
  1540. if (
  1541. this.$store.getters.xt_user.user.id !=
  1542. this.dialysisPrescription.creater
  1543. ) {
  1544. ParamsQuery['mode'] = '3'
  1545. }
  1546. }
  1547. this.isLoading = true
  1548. postPrescription(ParamsQuery).then(response => {
  1549. if (response.data.state == 0) {
  1550. this.$message.error(response.data.msg)
  1551. this.isLoading = false
  1552. return false
  1553. } else {
  1554. this.$notify({
  1555. title: '成功',
  1556. message: '提交成功',
  1557. type: 'success',
  1558. duration: 2000
  1559. })
  1560. var date = new Date()
  1561. // console.log(this.start_time)
  1562. const params = {
  1563. advices: results,
  1564. advice_date: this.start_time.split(' ')[0],
  1565. advice_doctor: results[0].advice_doctor,
  1566. advice_type: results[0].advice_type,
  1567. parent_id: this.patient_id,
  1568. start_time: this.start_time,
  1569. remark: ''
  1570. }
  1571. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(
  1572. rs => {
  1573. var resp = rs.data
  1574. if (resp.state == 1) {
  1575. this.doctorAdvices = resp.data.advices
  1576. this.$emit('advice')
  1577. this.isLoading = false
  1578. } else {
  1579. this.isLoading = false
  1580. }
  1581. }
  1582. )
  1583. const prescription_resp = response.data.data.prescription
  1584. var prescription = this.prescription
  1585. for (var index in prescription_resp) {
  1586. // prescription[index] = prescription_resp[index];
  1587. this.$set(prescription, index, prescription_resp[index])
  1588. }
  1589. this.hide()
  1590. }
  1591. })
  1592. } else if (this.is_pre == 2) {
  1593. if (this.patient.id <= 0) {
  1594. this.$message.error('没有选择患者')
  1595. this.loading = false
  1596. return
  1597. }
  1598. var arr = this.dialysisPrescription
  1599. // console.log('arr', arr)
  1600. const ParamsQuery = arr
  1601. // console.log('医嘱推送3', ParamsQuery)
  1602. ParamsQuery['patient'] = this.patient.id
  1603. ParamsQuery['record_date'] = this.record_date
  1604. ParamsQuery['mode'] = 1
  1605. postSoulution(ParamsQuery).then(response => {
  1606. if (response.data.state == 0) {
  1607. this.$message.error(response.data.msg)
  1608. this.isLoading = false
  1609. return false
  1610. } else {
  1611. this.$notify({
  1612. title: '成功',
  1613. message: '提交成功',
  1614. type: 'success',
  1615. duration: 2000
  1616. })
  1617. // console.log(hour + ':' + minute)
  1618. var date = new Date()
  1619. var hour =
  1620. date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
  1621. var minute =
  1622. date.getMinutes() < 10
  1623. ? '0' + date.getMinutes()
  1624. : date.getMinutes()
  1625. const params = {
  1626. advices: results,
  1627. advice_date: this.start_time.split(' ')[0],
  1628. advice_doctor: results[0].advice_doctor,
  1629. advice_type: results[0].advice_type,
  1630. parent_id: this.patient_id,
  1631. start_time: this.start_time,
  1632. remark: ''
  1633. }
  1634. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(
  1635. rs => {
  1636. var resp = rs.data
  1637. if (resp.state == 1) {
  1638. // this.doctorAdvices = resp.data.advices
  1639. this.$emit('advice')
  1640. this.isLoading = false
  1641. } else {
  1642. this.isLoading = false
  1643. }
  1644. }
  1645. )
  1646. const prescription_resp = response.data.data.prescription
  1647. const solution_resp = response.data.data.solution
  1648. var prescription = this.prescription
  1649. var solution = this.solution
  1650. for (var index in prescription_resp) {
  1651. // prescription[index] = prescription_resp[index];
  1652. this.$set(prescription, index, prescription_resp[index])
  1653. }
  1654. for (var index in solution_resp) {
  1655. // solution[index] = solution_resp[index];
  1656. this.$set(solution, index, solution_resp[index])
  1657. }
  1658. this.hide()
  1659. }
  1660. })
  1661. }
  1662. }
  1663. } else {
  1664. if (this.is_pre == 1) {
  1665. if (this.patient.id <= 0) {
  1666. this.$message.error('没有选择患者')
  1667. this.loading = false
  1668. return
  1669. }
  1670. var arr = this.dialysisPrescription
  1671. const ParamsQuery = arr
  1672. // console.log('医嘱推送4', ParamsQuery)
  1673. ParamsQuery['patient'] = this.patient.id
  1674. ParamsQuery['record_date'] = this.record_date
  1675. // console.log(this.prescription)
  1676. let mode = ''
  1677. if (this.prescription.creater <= 0) {
  1678. mode = 1
  1679. } else {
  1680. mode = 2
  1681. }
  1682. ParamsQuery['mode'] = mode
  1683. console.log("paramsquery",ParamsQuery)
  1684. postPrescription(ParamsQuery).then(response => {
  1685. if (response.data.state == 0) {
  1686. this.$message.error(response.data.msg)
  1687. return false
  1688. } else {
  1689. this.$notify({
  1690. title: '成功',
  1691. message: '提交成功',
  1692. type: 'success',
  1693. duration: 2000
  1694. })
  1695. const prescription_resp = response.data.data.prescription
  1696. var prescription = this.prescription
  1697. for (var index in prescription_resp) {
  1698. // prescription[index] = prescription_resp[index];
  1699. this.$set(prescription, index, prescription_resp[index])
  1700. }
  1701. this.hide()
  1702. }
  1703. })
  1704. } else if (this.is_pre == 2) {
  1705. if (this.patient.id <= 0) {
  1706. this.$message.error('没有选择患者')
  1707. this.loading = false
  1708. return
  1709. }
  1710. var arr = this.dialysisPrescription
  1711. const ParamsQuery = arr
  1712. ParamsQuery['patient'] = this.patient.id
  1713. ParamsQuery['record_date'] = this.record_date
  1714. ParamsQuery['mode'] = 1
  1715. postSoulution(ParamsQuery).then(response => {
  1716. if (response.data.state == 0) {
  1717. this.$message.error(response.data.msg)
  1718. return false
  1719. } else {
  1720. this.$notify({
  1721. title: '成功',
  1722. message: '提交成功',
  1723. type: 'success',
  1724. duration: 2000
  1725. })
  1726. const prescription_resp = response.data.data.prescription
  1727. const solution_resp = response.data.data.solution
  1728. var prescription = this.prescription
  1729. var solution = this.solution
  1730. for (var index in prescription_resp) {
  1731. // prescription[index] = prescription_resp[index];
  1732. this.$set(prescription, index, prescription_resp[index])
  1733. }
  1734. for (var index in solution_resp) {
  1735. // solution[index] = solution_resp[index];
  1736. this.$set(solution, index, solution_resp[index])
  1737. }
  1738. this.hide()
  1739. }
  1740. })
  1741. }
  1742. }
  1743. this.isShowRemindAdvice = false
  1744. this.isVisibility = true
  1745. },
  1746. handleAdviceCancle() {
  1747. this.isShowRemindAdvice = false
  1748. this.isVisibility = true
  1749. },
  1750. getTime(val) {
  1751. return uParseTime(val, '{y}-{m}-{d} {h}:{i}')
  1752. },
  1753. show(pre, schedual, last, his_is_open) {
  1754. if (pre != undefined) {
  1755. if (pre.oxygen_uptake == 1) {
  1756. this.oxygenShow = true
  1757. }
  1758. if (pre.oxygen_uptake == 2) {
  1759. this.oxygenShow = false
  1760. this.prescription.oxygen_flow = ''
  1761. this.prescription.oxygen_time = ''
  1762. }
  1763. }
  1764. if (his_is_open == 1) {
  1765. this.is_open = 0
  1766. }
  1767. if(this.$store.getters.xt_user.org.id == 10101){
  1768. if (this.predialysis.id > 0 && this.predialysis.created_time > 0) {
  1769. var date = new Date(this.predialysis.created_time * 1000)
  1770. var year = date.getFullYear()
  1771. var month = date.getMonth() + 1
  1772. var day = date.getDate()
  1773. var hours = date.getHours()
  1774. var minites = date.getMinutes()
  1775. if (month < 10) {
  1776. month = '0' + month
  1777. }
  1778. if (day < 10) {
  1779. day = '0' + day
  1780. }
  1781. if (hours < 10) {
  1782. hours = '0' + hours
  1783. }
  1784. if (minites < 10) {
  1785. minites = '0' + minites
  1786. }
  1787. this.start_time = year + '-' + month + '-' + day + ' ' + hours + ':' + minites
  1788. } else {
  1789. var date = new Date()
  1790. var year = date.getFullYear()
  1791. var month = date.getMonth() + 1
  1792. var day = date.getDate()
  1793. var hours = date.getHours()
  1794. var minites = date.getMinutes()
  1795. if (month < 10) {
  1796. month = '0' + month
  1797. }
  1798. if (day < 10) {
  1799. day = '0' + day
  1800. }
  1801. if (hours < 10) {
  1802. hours = '0' + hours
  1803. }
  1804. if (minites < 10) {
  1805. minites = '0' + minites
  1806. }
  1807. this.start_time = year + '-' + month + '-' + day + ' ' + hours + ':' + minites
  1808. }
  1809. }else{
  1810. var date = new Date()
  1811. var year = date.getFullYear()
  1812. var month = date.getMonth() + 1
  1813. var day = date.getDate()
  1814. var hours = date.getHours()
  1815. var minites = date.getMinutes()
  1816. if (month < 10) {
  1817. month = '0' + month
  1818. }
  1819. if (day < 10) {
  1820. day = '0' + day
  1821. }
  1822. if (hours < 10) {
  1823. hours = '0' + hours
  1824. }
  1825. if (minites < 10) {
  1826. minites = '0' + minites
  1827. }
  1828. if (this.$store.getters.xt_user.org.id == 10016 || this.$store.getters.xt_user.org.id == 10121 || this.$store.getters.xt_user.org.id == 4 || this.$store.getters.xt_user.org.id == 10013 || this.$store.getters.xt_user.org.id == 10014 ) {
  1829. this.start_time = year + '-' + month + '-' + day + ' ' + hours + ':' + minites
  1830. }else if(this.$store.getters.xt_user.org.id == 10234 || this.$store.getters.xt_user.org.id == 9671){
  1831. if (schedual.schedule_type == 1) {
  1832. this.start_time = year + '-' + month + '-' + day + ' ' + '06:00'
  1833. } else if (schedual.schedule_type == 2) {
  1834. this.start_time = year + '-' + month + '-' + day + ' ' + '11:00'
  1835. } else if (schedual.schedule_type == 3) {
  1836. this.start_time = year + '-' + month + '-' + day + ' ' + '18:00'
  1837. }
  1838. } else {
  1839. if (schedual.schedule_type == 1) {
  1840. this.start_time = year + '-' + month + '-' + day + ' ' + '07:00'
  1841. } else if (schedual.schedule_type == 2) {
  1842. this.start_time = year + '-' + month + '-' + day + ' ' + '12:00'
  1843. } else if (schedual.schedule_type == 3) {
  1844. this.start_time = year + '-' + month + '-' + day + ' ' + '18:00'
  1845. }
  1846. }
  1847. }
  1848. if (pre.anticoagulant == 3) {
  1849. this.dialysisPrescription.anticoagulant = '低分子肝素'
  1850. }
  1851. // 入口
  1852. var pre = pre
  1853. this.dialysisPrescription.mode_id = this.$route.query.mode_id ? this.$route.query.mode_id : this.mode_id
  1854. if (pre.id > 0) {
  1855. this.dialysisPrescription.mode_id = pre.mode_id
  1856. }
  1857. // console.log('this.dialysisPrescription.mode_id', this.dialysisPrescription.mode_id)
  1858. // console.log('this.schedual', schedual.mode_id)
  1859. if (pre.mode_id == 2 || pre.mode_id == 5 || pre.mode_id == 12 || schedual.mode_id == 2 || schedual.mode_id == 5 || schedual.mode_id == 12) {
  1860. this.zhiShow = true
  1861. this.huShow = true
  1862. this.totalShow = true
  1863. } else if (
  1864. pre.mode_id == 1 ||
  1865. pre.mode_id == 3 ||
  1866. pre.mode_id == 4 ||
  1867. pre.mode_id == 6 ||
  1868. pre.mode_id == 7 ||
  1869. pre.mode_id == 8 ||
  1870. pre.mode_id == 9 ||
  1871. pre.mode_id == 10 ||
  1872. pre.mode_id == 11 ||
  1873. pre.mode_id == 13 ||
  1874. pre.mode_id == 14 ||
  1875. pre.mode_id == 19
  1876. ) {
  1877. this.zhiShow = false
  1878. this.huShow = false
  1879. this.totalShow = false
  1880. }
  1881. this.pre = pre
  1882. // console.log("pre1", pre);
  1883. this.getPermission()
  1884. let last_weight_after = 0
  1885. let weight_before = 0
  1886. if (this.last_record == null) {
  1887. last_weight_after = 0
  1888. } else {
  1889. last_weight_after = this.last_record.weight_after
  1890. }
  1891. console.log("last2323232323232332",last)
  1892. if (this.predialysis == null || this.predialysis.id == 0) {
  1893. if (last != null) {
  1894. this.dialysisPrescription.niprocart = last.niprocart
  1895. this.dialysisPrescription.jms = last.jms
  1896. this.dialysisPrescription.fistula_needle_set = last.fistula_needle_set
  1897. this.dialysisPrescription.fistula_needle_set_16 = last.fistula_needle_set_16
  1898. this.dialysisPrescription.hemoperfusion = last.hemoperfusion
  1899. this.dialysisPrescription.dialyser_sterilised = last.dialyser_sterilised
  1900. this.dialysisPrescription.filtryzer = last.filtryzer
  1901. this.dialysisPrescription.target_ktv = last.target_ktv
  1902. this.dialysisPrescription.dialyzers = last.dialyzers
  1903. this.dialysisPrescription.injector = last.injector
  1904. this.dialysisPrescription.bloodlines = last.bloodlines
  1905. this.dialysisPrescription.tubing_hemodialysis = last.tubing_hemodialysis
  1906. this.dialysisPrescription.package = last.package
  1907. this.dialysisPrescription.a_liquid = last.a_liquid
  1908. weight_before = 0
  1909. }
  1910. } else {
  1911. weight_before = this.predialysis.weight_before
  1912. }
  1913. if (weight_before > 0 && last_weight_after > 0) {
  1914. this.add_weight = parseFloat(weight_before - last_weight_after).toFixed(
  1915. 2
  1916. )
  1917. // console.log('体重增加', this.add_weight)
  1918. }
  1919. this.isVisibility = true
  1920. this.checkedCities = []
  1921. for (let i = 0; i < this.targetAdvices.length; i++) {
  1922. if (this.targetAdvices[i].isCheck == 1) {
  1923. this.checkedCities.push(this.targetAdvices[i].id)
  1924. }
  1925. }
  1926. },
  1927. hide() {
  1928. this.isVisibility = false
  1929. },
  1930. changeThisAnticoagulant: function(val) {
  1931. console.log("val",val)
  1932. var thismode = val
  1933. if (isNaN(thismode) || thismode <= 0) {
  1934. return false
  1935. }
  1936. if (val <= 2) {
  1937. this.anticoagulant = this.anticoagulantsConfit[thismode - 1]
  1938. }
  1939. if (val > 2) {
  1940. this.anticoagulant = this.anticoagulantsConfit[thismode - 2]
  1941. }
  1942. if ((this.$store.getters.xt_user.template_info.template_id == 13 || this.$store.getters.xt_user.template_info.template_id == 41) && val == 2) {
  1943. if(val == 2){
  1944. this.anticoagulant.shouji_unit = 'mg'
  1945. }else{
  1946. this.anticoagulant.shouji_unit = 'iu'
  1947. }
  1948. this.anticoagulant.weichi_unit = 'mg/h'
  1949. this.anticoagulant.zongliang_unit = 'mg'
  1950. }
  1951. if (this.$store.getters.xt_user.template_info.template_id == 27 && val == 4) {
  1952. this.anticoagulant.shouji_unit = 'ml'
  1953. this.anticoagulant.weichi_unit = 'ml'
  1954. this.anticoagulant.zongliang_unit = 'ml'
  1955. }
  1956. if(this.$store.getters.xt_user.template_info.template_id == 41 && this.dialysisPrescription.anticoagulant == 2){
  1957. this.dialysisPrescription.anticoagulant_zongliang = ""
  1958. this.dialysisPrescription.anticoagulant_zongliang = parseInt(this.dialysisPrescription.anticoagulant_shouji) + parseInt(this.dialysisPrescription.anticoagulant_weichi)
  1959. }
  1960. },
  1961. handleCommit: function() {
  1962. console.log("触发了么2323323233223")
  1963. if(!this.isLoading){
  1964. if (this.dialysisPrescription.anticoagulant == '低分子肝素') {
  1965. this.dialysisPrescription.anticoagulant = 3
  1966. }
  1967. if (this.dialysisPrescription.anticoagulant == 1) {
  1968. this.dialysisPrescription.anticoagulant_weichi = '0'
  1969. this.dialysisPrescription.anticoagulant_shouji = '0'
  1970. this.dialysisPrescription.anticoagulant_zongliang = '0'
  1971. }
  1972. if (this.$store.getters.xt_user.template_info.template_id == 6) {
  1973. if (this.dialysisPrescription.mode_id == 2) {
  1974. if (
  1975. this.dialysisPrescription.displace_liqui_part == 0 ||
  1976. this.dialysisPrescription.displace_liqui_part == -2 ||
  1977. this.dialysisPrescription.displace_liqui_value == 0 ||
  1978. this.dialysisPrescription.displace_liqui_value == ''
  1979. ) {
  1980. this.$message.error('HDF模式下置换液和置换液总量不能为空!')
  1981. return
  1982. }
  1983. }
  1984. }
  1985. this.is_pre = 1
  1986. if (this.prescription.id == 0) {
  1987. if (this.is_open == 0) {
  1988. if (this.patient.id <= 0) {
  1989. this.$message.error('没有选择患者')
  1990. this.loading = false
  1991. return
  1992. }
  1993. var arr = this.dialysisPrescription
  1994. const ParamsQuery = arr
  1995. // console.log('night', ParamsQuery)
  1996. ParamsQuery['patient'] = this.patient.id
  1997. ParamsQuery['record_date'] = this.record_date
  1998. ParamsQuery['mode'] = '1'
  1999. ParamsQuery['patient_id'] = this.patient.id
  2000. console.log('第一', ParamsQuery)
  2001. postPrescription(ParamsQuery).then(response => {
  2002. if (response.data.state == 0) {
  2003. this.$message.error(response.data.msg)
  2004. return false
  2005. } else {
  2006. this.$notify({
  2007. title: '成功',
  2008. message: '提交成功',
  2009. type: 'success',
  2010. duration: 2000
  2011. })
  2012. const prescription_resp = response.data.data.prescription
  2013. var prescription = this.prescription
  2014. for (var index in prescription_resp) {
  2015. // prescription[index] = prescription_resp[index];
  2016. this.$set(prescription, index, prescription_resp[index])
  2017. }
  2018. this.hide()
  2019. }
  2020. })
  2021. } else if (this.is_open == 1) {
  2022. if (this.targetAdvices.length > 0) {
  2023. // 弹框推送提醒
  2024. this.isShowRemindAdvice = true
  2025. this.isVisibility = false
  2026. } else {
  2027. if (this.patient.id <= 0) {
  2028. this.$message.error('没有选择患者')
  2029. this.loading = false
  2030. return
  2031. }
  2032. var arr = this.dialysisPrescription
  2033. const ParamsQuery = arr
  2034. // console.log('ParamsQuerytwo', ParamsQuery)
  2035. ParamsQuery['patient'] = this.patient.id
  2036. ParamsQuery['record_date'] = this.record_date
  2037. ParamsQuery['mode'] = '1'
  2038. ParamsQuery['patient_id'] = this.patient.id
  2039. console.log('第二')
  2040. postPrescription(ParamsQuery).then(response => {
  2041. if (response.data.state == 0) {
  2042. this.$message.error(response.data.msg)
  2043. return false
  2044. } else {
  2045. this.$notify({
  2046. title: '成功',
  2047. message: '提交成功',
  2048. type: 'success',
  2049. duration: 2000
  2050. })
  2051. const prescription_resp = response.data.data.prescription
  2052. var prescription = this.prescription
  2053. for (var index in prescription_resp) {
  2054. // prescription[index] = prescription_resp[index];
  2055. this.$set(prescription, index, prescription_resp[index])
  2056. }
  2057. this.hide()
  2058. }
  2059. })
  2060. }
  2061. } else if (this.is_open == 2) {
  2062. var date = new Date()
  2063. var hour =
  2064. date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
  2065. var minute =
  2066. date.getMinutes() < 10
  2067. ? '0' + date.getMinutes()
  2068. : date.getMinutes()
  2069. if (this.waitUploadAdvices.length > 0) {
  2070. if (this.patient.id <= 0) {
  2071. this.$message.error('没有选择患者')
  2072. this.loading = false
  2073. return
  2074. }
  2075. var arr = this.dialysisPrescription
  2076. const ParamsQuery = arr
  2077. console.log('paramsquerythree', ParamsQuery)
  2078. ParamsQuery['patient'] = this.patient.id
  2079. ParamsQuery['record_date'] = this.record_date
  2080. ParamsQuery['mode'] = '1'
  2081. ParamsQuery['patient_id'] = this.patient.id
  2082. console.log('第三')
  2083. postPrescription(ParamsQuery).then(response => {
  2084. if (response.data.state == 0) {
  2085. this.$message.error(response.data.msg)
  2086. return false
  2087. } else {
  2088. this.$notify({
  2089. title: '成功',
  2090. message: '提交成功',
  2091. type: 'success',
  2092. duration: 2000
  2093. })
  2094. const params = {
  2095. advices: this.waitUploadAdvices,
  2096. advice_date: uParseTime(
  2097. this.$route.query.date,
  2098. '{y}-{m}-{d}'
  2099. ),
  2100. advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  2101. advice_type: this.waitUploadAdvices[0].advice_type,
  2102. parent_id: this.patient_id,
  2103. // start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
  2104. start_time:
  2105. uParseTime(this.$route.query.date, '{y}-{m}-{d}') +
  2106. ' ' +
  2107. this.advice_start_time,
  2108. remark: ''
  2109. }
  2110. console.log('params--------', params)
  2111. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(
  2112. rs => {
  2113. var resp = rs.data
  2114. if (resp.state == 1) {
  2115. // this.doctorAdvices = resp.data.advices
  2116. this.$emit('advice')
  2117. } else {
  2118. }
  2119. }
  2120. )
  2121. const prescription_resp = response.data.data.prescription
  2122. var prescription = this.prescription
  2123. for (var index in prescription_resp) {
  2124. // prescription[index] = prescription_resp[index];
  2125. this.$set(prescription, index, prescription_resp[index])
  2126. }
  2127. this.hide()
  2128. }
  2129. })
  2130. } else {
  2131. if (this.patient.id <= 0) {
  2132. this.$message.error('没有选择患者')
  2133. this.loading = false
  2134. return
  2135. }
  2136. var arr = this.dialysisPrescription
  2137. const ParamsQuery = arr
  2138. // console.log('paramsqueryfour', ParamsQuery)
  2139. // console.log('创建者', this.prescription.creater)
  2140. // if (this.prescription.creater <= 0) {
  2141. // mode = 1;
  2142. // } else {
  2143. // mode = 2;
  2144. // }
  2145. ParamsQuery['patient'] = this.patient.id
  2146. ParamsQuery['record_date'] = this.record_date
  2147. // console.log(this.prescription);
  2148. console.log('第四')
  2149. ParamsQuery['patient_id'] = this.patient.id
  2150. postPrescription(ParamsQuery).then(response => {
  2151. if (response.data.state == 0) {
  2152. this.$message.error(response.data.msg)
  2153. return false
  2154. } else {
  2155. this.$notify({
  2156. title: '成功',
  2157. message: '提交成功',
  2158. type: 'success',
  2159. duration: 2000
  2160. })
  2161. const prescription_resp = response.data.data.prescription
  2162. // console.log("aaaaaaa", prescription_resp);
  2163. var prescription = this.prescription
  2164. for (var index in prescription_resp) {
  2165. // prescription[index] = prescription_resp[index];
  2166. this.$set(prescription, index, prescription_resp[index])
  2167. }
  2168. this.hide()
  2169. }
  2170. })
  2171. }
  2172. }
  2173. } else {
  2174. if (this.prescription.creater == 0) {
  2175. if (this.is_open == 0) {
  2176. if (this.patient.id <= 0) {
  2177. this.$message.error('没有选择患者')
  2178. this.loading = false
  2179. return
  2180. }
  2181. var arr = this.dialysisPrescription
  2182. // console.log('arr', arr)
  2183. const ParamsQuery = arr
  2184. // console.log('paramsqueryfive', ParamsQuery)
  2185. ParamsQuery['patient'] = this.patient.id
  2186. ParamsQuery['record_date'] = this.record_date
  2187. ParamsQuery['mode'] = '1'
  2188. ParamsQuery['patient_id'] = this.patient.id
  2189. console.log('第五')
  2190. postPrescription(ParamsQuery).then(response => {
  2191. if (response.data.state == 0) {
  2192. this.$message.error(response.data.msg)
  2193. return false
  2194. } else {
  2195. this.$notify({
  2196. title: '成功',
  2197. message: '提交成功',
  2198. type: 'success',
  2199. duration: 2000
  2200. })
  2201. const prescription_resp = response.data.data.prescription
  2202. var prescription = this.prescription
  2203. for (var index in prescription_resp) {
  2204. // prescription[index] = prescription_resp[index];
  2205. this.$set(prescription, index, prescription_resp[index])
  2206. }
  2207. this.hide()
  2208. }
  2209. })
  2210. } else if (this.is_open == 1) {
  2211. if (this.targetAdvices.length > 0) {
  2212. // 弹框推送提醒
  2213. this.isShowRemindAdvice = true
  2214. this.isVisibility = false
  2215. } else {
  2216. if (this.patient.id <= 0) {
  2217. this.$message.error('没有选择患者')
  2218. this.loading = false
  2219. return
  2220. }
  2221. var arr = this.dialysisPrescription
  2222. // console.log('arr', arr)
  2223. const ParamsQuery = arr
  2224. // console.log('ParamsQuerysix', ParamsQuery)
  2225. ParamsQuery['patient'] = this.patient.id
  2226. ParamsQuery['record_date'] = this.record_date
  2227. ParamsQuery['mode'] = '1'
  2228. console.log('第6')
  2229. ParamsQuery['patient_id'] = this.patient.id
  2230. postPrescription(ParamsQuery).then(response => {
  2231. if (response.data.state == 0) {
  2232. this.$message.error(response.data.msg)
  2233. return false
  2234. } else {
  2235. this.$notify({
  2236. title: '成功',
  2237. message: '提交成功',
  2238. type: 'success',
  2239. duration: 2000
  2240. })
  2241. const prescription_resp = response.data.data.prescription
  2242. var prescription = this.prescription
  2243. for (var index in prescription_resp) {
  2244. // prescription[index] = prescription_resp[index];
  2245. this.$set(prescription, index, prescription_resp[index])
  2246. }
  2247. this.hide()
  2248. }
  2249. })
  2250. }
  2251. } else if (this.is_open == 2) {
  2252. var date = new Date()
  2253. var hour =
  2254. date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
  2255. var minute =
  2256. date.getMinutes() < 10
  2257. ? '0' + date.getMinutes()
  2258. : date.getMinutes()
  2259. if (this.waitUploadAdvices.length > 0) {
  2260. if (this.patient.id <= 0) {
  2261. this.$message.error('没有选择患者')
  2262. this.loading = false
  2263. return
  2264. }
  2265. var arr = this.dialysisPrescription
  2266. // console.log('arr', arr)
  2267. const ParamsQuery = arr
  2268. // console.log('parasmqueryseven', parasmqueryseven)
  2269. ParamsQuery['patient'] = this.patient.id
  2270. ParamsQuery['record_date'] = this.record_date
  2271. ParamsQuery['mode'] = '1'
  2272. console.log('第七')
  2273. ParamsQuery['patient_id'] = this.patient.id
  2274. postPrescription(ParamsQuery).then(response => {
  2275. if (response.data.state == 0) {
  2276. this.$message.error(response.data.msg)
  2277. return false
  2278. } else {
  2279. this.$notify({
  2280. title: '成功',
  2281. message: '提交成功',
  2282. type: 'success',
  2283. duration: 2000
  2284. })
  2285. const params = {
  2286. advices: this.waitUploadAdvices,
  2287. advice_date: uParseTime(
  2288. this.$route.query.date,
  2289. '{y}-{m}-{d}'
  2290. ),
  2291. advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  2292. advice_type: this.waitUploadAdvices[0].advice_type,
  2293. parent_id: this.patient_id,
  2294. // start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
  2295. start_time:
  2296. uParseTime(this.$route.query.date, '{y}-{m}-{d}') +
  2297. ' ' +
  2298. hour +
  2299. ':' +
  2300. minute,
  2301. remark: ''
  2302. }
  2303. CreateGroupAdvice(
  2304. this.$route.query.patient_id,
  2305. 0,
  2306. params
  2307. ).then(rs => {
  2308. var resp = rs.data
  2309. if (resp.state == 1) {
  2310. // this.doctorAdvices = resp.data.advices
  2311. this.$emit('advice')
  2312. } else {
  2313. }
  2314. })
  2315. const prescription_resp = response.data.data.prescription
  2316. var prescription = this.prescription
  2317. for (var index in prescription_resp) {
  2318. // prescription[index] = prescription_resp[index];
  2319. this.$set(prescription, index, prescription_resp[index])
  2320. }
  2321. this.hide()
  2322. }
  2323. })
  2324. } else {
  2325. if (this.patient.id <= 0) {
  2326. this.$message.error('没有选择患者')
  2327. this.loading = false
  2328. return
  2329. }
  2330. var arr = this.dialysisPrescription
  2331. // console.log('arr', arr)
  2332. const ParamsQuery = arr
  2333. // console.log('eight', ParamsQuery)
  2334. ParamsQuery['patient'] = this.patient.id
  2335. ParamsQuery['record_date'] = this.record_date
  2336. ParamsQuery['mode'] = '1'
  2337. ParamsQuery['patient_id'] = this.patient.id
  2338. console.log('第八')
  2339. postPrescription(ParamsQuery).then(response => {
  2340. if (response.data.state == 0) {
  2341. this.$message.error(response.data.msg)
  2342. return false
  2343. } else {
  2344. this.$notify({
  2345. title: '成功',
  2346. message: '提交成功',
  2347. type: 'success',
  2348. duration: 2000
  2349. })
  2350. const prescription_resp = response.data.data.prescription
  2351. var prescription = this.prescription
  2352. for (var index in prescription_resp) {
  2353. // prescription[index] = prescription_resp[index];
  2354. this.$set(prescription, index, prescription_resp[index])
  2355. }
  2356. this.hide()
  2357. }
  2358. })
  2359. }
  2360. }
  2361. } else {
  2362. if (this.patient.id <= 0) {
  2363. this.$message.error('没有选择患者')
  2364. this.loading = false
  2365. return
  2366. }
  2367. var arr = this.dialysisPrescription
  2368. // console.log('arr', arr)
  2369. const ParamsQuery = arr
  2370. // console.log('night', ParamsQuery)
  2371. ParamsQuery['patient'] = this.patient.id
  2372. ParamsQuery['record_date'] = this.record_date
  2373. ParamsQuery['mode'] = '2'
  2374. ParamsQuery['patient_id'] = this.patient.id
  2375. if (
  2376. this.$store.getters.xt_user.user.id !=
  2377. this.dialysisPrescription.creater
  2378. ) {
  2379. ParamsQuery['mode'] = '3'
  2380. }
  2381. console.log('第九',ParamsQuery)
  2382. postPrescription(ParamsQuery).then(response => {
  2383. if (response.data.state == 0) {
  2384. this.$message.error(response.data.msg)
  2385. return false
  2386. } else {
  2387. this.$notify({
  2388. title: '成功',
  2389. message: '提交成功',
  2390. type: 'success',
  2391. duration: 2000
  2392. })
  2393. const prescription_resp = response.data.data.prescription
  2394. var prescription = this.prescription
  2395. for (var index in prescription_resp) {
  2396. // prescription[index] = prescription_resp[index];
  2397. this.$set(prescription, index, prescription_resp[index])
  2398. }
  2399. this.hide()
  2400. }
  2401. })
  2402. }
  2403. }
  2404. }
  2405. },
  2406. handleCancle: function() {
  2407. this.hide()
  2408. },
  2409. handleSolution: function() {
  2410. if(!this.isLoading){
  2411. if (this.dialysisPrescription.anticoagulant == 1) {
  2412. this.dialysisPrescription.anticoagulant_weichi = '0'
  2413. this.dialysisPrescription.anticoagulant_shouji = '0'
  2414. this.dialysisPrescription.anticoagulant_zongliang = '0'
  2415. }
  2416. if (this.$store.getters.xt_user.template_info.template_id == 6) {
  2417. if (this.dialysisPrescription.mode_id == 2) {
  2418. if (
  2419. this.dialysisPrescription.displace_liqui_part == 0 ||
  2420. this.dialysisPrescription.displace_liqui_part == -2 ||
  2421. this.dialysisPrescription.displace_liqui_value == 0 ||
  2422. this.dialysisPrescription.displace_liqui_value == ''
  2423. ) {
  2424. this.$message.error('HDF模式下置换液和置换液总量不能为空!')
  2425. return
  2426. }
  2427. }
  2428. }
  2429. this.is_pre = 2
  2430. if (this.prescription.id == 0) {
  2431. if (this.is_open == 0) {
  2432. if (this.patient.id <= 0) {
  2433. this.$message.error('没有选择患者')
  2434. this.loading = false
  2435. return
  2436. }
  2437. console.log("预充了2",this.dialysisPrescription.pre_impulse)
  2438. this.dialysisPrescription.impulse = this.dialysisPrescription.pre_impulse
  2439. var arr = this.dialysisPrescription
  2440. const ParamsQuery = arr
  2441. ParamsQuery['patient'] = this.patient.id
  2442. ParamsQuery['record_date'] = this.record_date
  2443. ParamsQuery['mode'] = '1'
  2444. postSoulution(ParamsQuery).then(response => {
  2445. if (response.data.state == 0) {
  2446. this.$message.error(response.data.msg)
  2447. return false
  2448. } else {
  2449. this.$notify({
  2450. title: '成功',
  2451. message: '提交成功',
  2452. type: 'success',
  2453. duration: 2000
  2454. })
  2455. const prescription_resp = response.data.data.prescription
  2456. const solution_resp = response.data.data.solution
  2457. var prescription = this.prescription
  2458. var solution = this.solution
  2459. for (var index in prescription_resp) {
  2460. // prescription[index] = prescription_resp[index];
  2461. this.$set(prescription, index, prescription_resp[index])
  2462. }
  2463. for (var index in solution_resp) {
  2464. // solution[index] = solution_resp[index];
  2465. this.$set(solution, index, solution_resp[index])
  2466. }
  2467. this.hide()
  2468. }
  2469. })
  2470. } else if (this.is_open == 1) {
  2471. if (this.targetAdvices.length > 0) {
  2472. // 弹框推送提
  2473. this.isShowRemindAdvice = true
  2474. this.isVisibility = false
  2475. } else {
  2476. if (this.patient.id <= 0) {
  2477. this.$message.error('没有选择患者')
  2478. this.loading = false
  2479. return
  2480. }
  2481. console.log("预充了3",this.dialysisPrescription.pre_impulse)
  2482. this.dialysisPrescription.impulse = this.dialysisPrescription.pre_impulse
  2483. var arr = this.dialysisPrescription
  2484. console.log('arr3', arr)
  2485. const ParamsQuery = arr
  2486. // console.log('长期处方2', ParamsQuery)
  2487. ParamsQuery['patient'] = this.patient.id
  2488. ParamsQuery['record_date'] = this.record_date
  2489. ParamsQuery['mode'] = '1'
  2490. postSoulution(ParamsQuery).then(response => {
  2491. if (response.data.state == 0) {
  2492. this.$message.error(response.data.msg)
  2493. return false
  2494. } else {
  2495. this.$notify({
  2496. title: '成功',
  2497. message: '提交成功',
  2498. type: 'success',
  2499. duration: 2000
  2500. })
  2501. const prescription_resp = response.data.data.prescription
  2502. const solution_resp = response.data.data.solution
  2503. var prescription = this.prescription
  2504. var solution = this.solution
  2505. for (var index in prescription_resp) {
  2506. // prescription[index] = prescription_resp[index];
  2507. this.$set(prescription, index, prescription_resp[index])
  2508. }
  2509. for (var index in solution_resp) {
  2510. // solution[index] = solution_resp[index];
  2511. this.$set(solution, index, solution_resp[index])
  2512. }
  2513. this.hide()
  2514. }
  2515. })
  2516. }
  2517. } else if (this.is_open == 2) {
  2518. var date = new Date()
  2519. var hour =
  2520. date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
  2521. var minute =
  2522. date.getMinutes() < 10
  2523. ? '0' + date.getMinutes()
  2524. : date.getMinutes()
  2525. if (this.waitUploadAdvices.length > 0) {
  2526. // if (this.patient.id <= 0) {
  2527. // this.$message.error('没有选择患者')
  2528. // this.loading = false
  2529. // return
  2530. // }
  2531. this.dialysisPrescription.impulse = this.dialysisPrescription.pre_impulse
  2532. var arr = this.dialysisPrescription
  2533. const ParamsQuery = arr
  2534. // console.log('长期处方3', ParamsQuery)
  2535. ParamsQuery['patient'] = this.patient.id
  2536. ParamsQuery['record_date'] = this.record_date
  2537. // console.log(this.prescription)
  2538. ParamsQuery['mode'] = '1'
  2539. postPrescription(ParamsQuery).then(response => {
  2540. if (response.data.state == 0) {
  2541. this.$message.error(response.data.msg)
  2542. return false
  2543. } else {
  2544. this.$notify({
  2545. title: '成功',
  2546. message: '提交成功',
  2547. type: 'success',
  2548. duration: 2000
  2549. })
  2550. const params = {
  2551. advices: this.waitUploadAdvices,
  2552. advice_date: uParseTime(
  2553. this.$route.query.date,
  2554. '{y}-{m}-{d}'
  2555. ),
  2556. advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  2557. advice_type: this.waitUploadAdvices[0].advice_type,
  2558. parent_id: this.patient_id,
  2559. // start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
  2560. start_time:
  2561. uParseTime(this.$route.query.date, '{y}-{m}-{d}') +
  2562. ' ' +
  2563. hour +
  2564. ':' +
  2565. minute,
  2566. remark: ''
  2567. }
  2568. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(
  2569. rs => {
  2570. var resp = rs.data
  2571. if (resp.state == 1) {
  2572. // this.doctorAdvices = resp.data.advices
  2573. this.$emit('advice')
  2574. } else {
  2575. }
  2576. }
  2577. )
  2578. const prescription_resp = response.data.data.prescription
  2579. var prescription = this.prescription
  2580. for (var index in prescription_resp) {
  2581. // prescription[index] = prescription_resp[index];
  2582. this.$set(prescription, index, prescription_resp[index])
  2583. }
  2584. this.hide()
  2585. }
  2586. })
  2587. } else {
  2588. if (this.patient.id <= 0) {
  2589. this.$message.error('没有选择患者')
  2590. this.loading = false
  2591. return
  2592. }
  2593. console.log("预充了5",this.dialysisPrescription.pre_impulse)
  2594. this.dialysisPrescription.impulse = this.dialysisPrescription.pre_impulse
  2595. var arr = this.dialysisPrescription
  2596. console.log('arr5', arr)
  2597. const ParamsQuery = arr
  2598. // console.log('长期处方5', ParamsQuery)
  2599. ParamsQuery['patient'] = this.patient.id
  2600. ParamsQuery['record_date'] = this.record_date
  2601. ParamsQuery['mode'] = '1'
  2602. postSoulution(ParamsQuery).then(response => {
  2603. if (response.data.state == 0) {
  2604. this.$message.error(response.data.msg)
  2605. return false
  2606. } else {
  2607. this.$notify({
  2608. title: '成功',
  2609. message: '提交成功',
  2610. type: 'success',
  2611. duration: 2000
  2612. })
  2613. const prescription_resp = response.data.data.prescription
  2614. const solution_resp = response.data.data.solution
  2615. var prescription = this.prescription
  2616. var solution = this.solution
  2617. for (var index in prescription_resp) {
  2618. // prescription[index] = prescription_resp[index];
  2619. this.$set(prescription, index, prescription_resp[index])
  2620. }
  2621. for (var index in solution_resp) {
  2622. // solution[index] = solution_resp[index];
  2623. this.$set(solution, index, solution_resp[index])
  2624. }
  2625. this.hide()
  2626. }
  2627. })
  2628. }
  2629. }
  2630. } else {
  2631. if (this.prescription.creater == 0) {
  2632. if (this.is_open == 0) {
  2633. if (this.patient.id <= 0) {
  2634. this.$message.error('没有选择患者')
  2635. this.loading = false
  2636. return
  2637. }
  2638. this.dialysisPrescription.impulse = this.dialysisPrescription.pre_impulse
  2639. var arr = this.dialysisPrescription
  2640. console.log('arr', arr)
  2641. const ParamsQuery = arr
  2642. // console.log('长期处方6', ParamsQuery)
  2643. ParamsQuery['patient'] = this.patient.id
  2644. ParamsQuery['record_date'] = this.record_date
  2645. ParamsQuery['mode'] = '1'
  2646. postSoulution(ParamsQuery).then(response => {
  2647. if (response.data.state == 0) {
  2648. this.$message.error(response.data.msg)
  2649. return false
  2650. } else {
  2651. this.$notify({
  2652. title: '成功',
  2653. message: '提交成功',
  2654. type: 'success',
  2655. duration: 2000
  2656. })
  2657. const prescription_resp = response.data.data.prescription
  2658. const solution_resp = response.data.data.solution
  2659. var prescription = this.prescription
  2660. var solution = this.solution
  2661. for (var index in prescription_resp) {
  2662. // prescription[index] = prescription_resp[index];
  2663. this.$set(prescription, index, prescription_resp[index])
  2664. }
  2665. for (var index in solution_resp) {
  2666. // solution[index] = solution_resp[index];
  2667. this.$set(solution, index, solution_resp[index])
  2668. }
  2669. this.hide()
  2670. }
  2671. })
  2672. } else if (this.is_open == 1) {
  2673. if (this.targetAdvices.length > 0) {
  2674. // 弹框推送提醒
  2675. this.isShowRemindAdvice = true
  2676. this.isVisibility = false
  2677. } else {
  2678. if (this.patient.id <= 0) {
  2679. this.$message.error('没有选择患者')
  2680. this.loading = false
  2681. return
  2682. }
  2683. console.log("预充了7",this.dialysisPrescription.pre_impulse)
  2684. this.dialysisPrescription.impulse = this.dialysisPrescription.pre_impulse
  2685. var arr = this.dialysisPrescription
  2686. // console.log('arr', arr)
  2687. const ParamsQuery = arr
  2688. console.log('长期处方7', ParamsQuery)
  2689. ParamsQuery['patient'] = this.patient.id
  2690. ParamsQuery['record_date'] = this.record_date
  2691. ParamsQuery['mode'] = '1'
  2692. postSoulution(ParamsQuery).then(response => {
  2693. if (response.data.state == 0) {
  2694. this.$message.error(response.data.msg)
  2695. return false
  2696. } else {
  2697. this.$notify({
  2698. title: '成功',
  2699. message: '提交成功',
  2700. type: 'success',
  2701. duration: 2000
  2702. })
  2703. const prescription_resp = response.data.data.prescription
  2704. const solution_resp = response.data.data.solution
  2705. var prescription = this.prescription
  2706. var solution = this.solution
  2707. for (var index in prescription_resp) {
  2708. // prescription[index] = prescription_resp[index];
  2709. this.$set(prescription, index, prescription_resp[index])
  2710. }
  2711. for (var index in solution_resp) {
  2712. // solution[index] = solution_resp[index];
  2713. this.$set(solution, index, solution_resp[index])
  2714. }
  2715. this.hide()
  2716. }
  2717. })
  2718. }
  2719. } else if (this.is_open == 2) {
  2720. var date = new Date()
  2721. var hour =
  2722. date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
  2723. var minute =
  2724. date.getMinutes() < 10
  2725. ? '0' + date.getMinutes()
  2726. : date.getMinutes()
  2727. if (this.waitUploadAdvices.length > 0) {
  2728. if (this.patient.id <= 0) {
  2729. this.$message.error('没有选择患者')
  2730. this.loading = false
  2731. return
  2732. }
  2733. this.dialysisPrescription.impulse = this.dialysisPrescription.pre_impulse
  2734. var arr = this.dialysisPrescription
  2735. const ParamsQuery = arr
  2736. // console.log('长期处方8', ParamsQuery)
  2737. ParamsQuery['patient'] = this.patient.id
  2738. ParamsQuery['record_date'] = this.record_date
  2739. ParamsQuery['mode'] = '1'
  2740. postSoulution(ParamsQuery).then(response => {
  2741. if (response.data.state == 0) {
  2742. this.$message.error(response.data.msg)
  2743. return false
  2744. } else {
  2745. this.$notify({
  2746. title: '成功',
  2747. message: '提交成功',
  2748. type: 'success',
  2749. duration: 2000
  2750. })
  2751. const params = {
  2752. advices: this.waitUploadAdvices,
  2753. advice_date: uParseTime(
  2754. this.$route.query.date,
  2755. '{y}-{m}-{d}'
  2756. ),
  2757. advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  2758. advice_type: this.waitUploadAdvices[0].advice_type,
  2759. parent_id: this.patient_id,
  2760. // start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d} {h}{i}'),
  2761. start_time:
  2762. uParseTime(this.$route.query.date, '{y}-{m}-{d}') +
  2763. ' ' +
  2764. hour +
  2765. ':' +
  2766. minute,
  2767. remark: ''
  2768. }
  2769. CreateGroupAdvice(
  2770. this.$route.query.patient_id,
  2771. 0,
  2772. params
  2773. ).then(rs => {
  2774. var resp = rs.data
  2775. if (resp.state == 1) {
  2776. // this.doctorAdvices = resp.data.advices
  2777. this.$emit('advice')
  2778. } else {
  2779. }
  2780. })
  2781. const prescription_resp = response.data.data.prescription
  2782. const solution_resp = response.data.data.solution
  2783. var prescription = this.prescription
  2784. var solution = this.solution
  2785. for (var index in prescription_resp) {
  2786. // prescription[index] = prescription_resp[index];
  2787. this.$set(prescription, index, prescription_resp[index])
  2788. }
  2789. for (var index in solution_resp) {
  2790. // solution[index] = solution_resp[index];
  2791. this.$set(solution, index, solution_resp[index])
  2792. }
  2793. this.hide()
  2794. }
  2795. })
  2796. } else {
  2797. if (this.patient.id <= 0) {
  2798. this.$message.error('没有选择患者')
  2799. this.loading = false
  2800. return
  2801. }
  2802. console.log("预充了99999",this.dialysisPrescription.pre_impulse)
  2803. this.dialysisPrescription.impulse = this.dialysisPrescription.pre_impulse
  2804. var arr = this.dialysisPrescription
  2805. console.log('arr', arr)
  2806. const ParamsQuery = arr
  2807. // console.log('长期处方9', ParamsQuery)
  2808. ParamsQuery['patient'] = this.patient.id
  2809. ParamsQuery['record_date'] = this.record_date
  2810. ParamsQuery['mode'] = '1'
  2811. postSoulution(ParamsQuery).then(response => {
  2812. if (response.data.state == 0) {
  2813. this.$message.error(response.data.msg)
  2814. return false
  2815. } else {
  2816. this.$notify({
  2817. title: '成功',
  2818. message: '提交成功',
  2819. type: 'success',
  2820. duration: 2000
  2821. })
  2822. const prescription_resp = response.data.data.prescription
  2823. const solution_resp = response.data.data.solution
  2824. var prescription = this.prescription
  2825. var solution = this.solution
  2826. for (var index in prescription_resp) {
  2827. // prescription[index] = prescription_resp[index];
  2828. this.$set(prescription, index, prescription_resp[index])
  2829. }
  2830. for (var index in solution_resp) {
  2831. // solution[index] = solution_resp[index];
  2832. this.$set(solution, index, solution_resp[index])
  2833. }
  2834. this.hide()
  2835. }
  2836. })
  2837. }
  2838. }
  2839. } else {
  2840. if (this.patient.id <= 0) {
  2841. this.$message.error('没有选择患者')
  2842. this.loading = false
  2843. return
  2844. }
  2845. console.log("预充了1",this.dialysisPrescription.pre_impulse)
  2846. this.dialysisPrescription.impulse = this.dialysisPrescription.pre_impulse
  2847. var arr = this.dialysisPrescription
  2848. console.log('arr12333223', arr)
  2849. const ParamsQuery = arr
  2850. ParamsQuery['patient'] = this.patient.id
  2851. ParamsQuery['record_date'] = this.record_date
  2852. ParamsQuery['mode'] = '1'
  2853. console.log('长期处方10', ParamsQuery)
  2854. postSoulution(ParamsQuery).then(response => {
  2855. if (response.data.state == 0) {
  2856. this.$message.error(response.data.msg)
  2857. return false
  2858. } else {
  2859. this.$notify({
  2860. title: '成功',
  2861. message: '提交成功',
  2862. type: 'success',
  2863. duration: 2000
  2864. })
  2865. const prescription_resp = response.data.data.prescription
  2866. const solution_resp = response.data.data.solution
  2867. var prescription = this.prescription
  2868. var solution = this.solution
  2869. for (var index in prescription_resp) {
  2870. // prescription[index] = prescription_resp[index];
  2871. this.$set(prescription, index, prescription_resp[index])
  2872. }
  2873. for (var index in solution_resp) {
  2874. // solution[index] = solution_resp[index];
  2875. this.$set(solution, index, solution_resp[index])
  2876. }
  2877. this.hide()
  2878. }
  2879. })
  2880. }
  2881. }
  2882. }
  2883. },
  2884. isShows(name) {
  2885. var filedList = store.getters.xt_user.fileds
  2886. for (let i = 0; i < filedList.length; i++) {
  2887. if (filedList[i].module == 1 && filedList[i].filed_name_cn == name && filedList[i].is_show == 1) {
  2888. return true
  2889. }
  2890. }
  2891. return false
  2892. },
  2893. getDoctorName(doctor_id) {
  2894. for (let i = 0; i < this.admin_users.length; i++) {
  2895. if (this.admin_users[i].id == doctor_id) {
  2896. return this.admin_users[i].name
  2897. }
  2898. }
  2899. },
  2900. getContent(val) {
  2901. let prescribing_number = ''
  2902. let single_dose = ''
  2903. let advice_desc = ''
  2904. if (val.prescribing_number > 0) {
  2905. prescribing_number =
  2906. val.prescribing_number + val.prescribing_number_unit
  2907. }
  2908. if (val.single_dose > 0) {
  2909. single_dose = ' 单次用量 ' + val.single_dose + val.single_dose_unit
  2910. }
  2911. if (val.advice_desc > 0 || val.advice_desc.length > 0) {
  2912. advice_desc = val.advice_desc + val.drug_spec_unit
  2913. }
  2914. let name = ''
  2915. if (val.child.length > 0) {
  2916. for (let i = 0; i < val.child.length; i++) {
  2917. if (val.child[i].prescribing_number > 0) {
  2918. val.child[i]['presc'] =
  2919. val.child[i].prescribing_number +
  2920. val.child[i].prescribing_number_unit
  2921. } else {
  2922. val.child[i]['presc'] = ''
  2923. }
  2924. if (val.child[i].single_dose > 0) {
  2925. val.child[i]['single'] =
  2926. ' ' +
  2927. ' 单次用量 ' +
  2928. ' ' +
  2929. val.child[i].single_dose +
  2930. val.child[i].single_dose_unit
  2931. } else {
  2932. val.child[i]['single'] = ''
  2933. }
  2934. name =
  2935. name +
  2936. '▲' +
  2937. val.child[i].advice_name +
  2938. '' +
  2939. val.child[i].advice_desc +
  2940. val.child[i].drug_spec_unit +
  2941. val.child[i].presc +
  2942. val.child[i].single
  2943. }
  2944. return (
  2945. val.advice_name +
  2946. ' ' +
  2947. advice_desc +
  2948. ' ' +
  2949. val.drug_spec_unit +
  2950. prescribing_number +
  2951. ' ' +
  2952. single_dose +
  2953. ' ' +
  2954. ' ' +
  2955. val.delivery_way +
  2956. ' ' +
  2957. val.execution_frequency +
  2958. val.remark +
  2959. name
  2960. )
  2961. } else {
  2962. return (
  2963. val.advice_name +
  2964. ' ' +
  2965. advice_desc +
  2966. prescribing_number +
  2967. ' ' +
  2968. single_dose +
  2969. ' ' +
  2970. ' ' +
  2971. val.delivery_way +
  2972. ' ' +
  2973. val.execution_frequency +
  2974. val.remark
  2975. )
  2976. }
  2977. },
  2978. changePrescription(id) {
  2979. console.log("id233223232323232323",id)
  2980. if(id == 1){
  2981. this.dialysisPrescription.displace_liqui_value = ""
  2982. this.dialysisPrescription.displace_liqui_part = ""
  2983. }
  2984. const ParamsQuery = {}
  2985. ParamsQuery['patient_id'] = this.$route.query.patient_id
  2986. ParamsQuery['mode_id'] = id
  2987. GetSolution(ParamsQuery).then(response => {
  2988. if (response.data.state == 0) {
  2989. this.$message.error(response.data.msg)
  2990. return false
  2991. } else {
  2992. console.log('切换数据', response.data.data.solution)
  2993. this.$message.success('切换成功')
  2994. if (response.data.data.solution != null) {
  2995. for (const key in response.data.data.solution) {
  2996. // 长期处方不为空
  2997. if (key != 'target_ultrafiltration' && key != 'niprocart' && key != 'target_ultrafiltration' && key != 'jms' && key != 'fistula_needle_set' && key != 'fistula_needle_set_16'
  2998. && key != 'hemoperfusion' && key != 'dialyser_sterilised' && key != 'filtryzer' && key != 'target_ktv' && key != 'dialyzers'
  2999. && key != 'injector' && key != 'bloodlines' && key != 'tubing_hemodialysis' && key != 'package' && key != 'a_liquid') {
  3000. this.dialysisPrescription[key] =
  3001. response.data.data.solution[key]
  3002. }
  3003. }
  3004. } else {
  3005. if (response.data.data.prescription != null) {
  3006. // 临时处方不为空
  3007. for (const key in response.data.data.prescription) {
  3008. if (key != 'target_ultrafiltration' && key != 'niprocart' && key != 'target_ultrafiltration' && key != 'jms' && key != 'fistula_needle_set' && key != 'fistula_needle_set_16'
  3009. && key != 'hemoperfusion' && key != 'dialyser_sterilised' && key != 'filtryzer' && key != 'target_ktv' && key != 'dialyzers'
  3010. && key != 'injector' && key != 'bloodlines' && key != 'tubing_hemodialysis' && key != 'package' && key != 'a_liquid') {
  3011. this.dialysisPrescription[key] =
  3012. response.data.data.prescription[key]
  3013. }
  3014. }
  3015. } else if (response.data.data.system_prescription != null) {
  3016. // 系统处方不为空
  3017. for (const key in response.data.data.system_prescription) {
  3018. if (key != 'target_ultrafiltration' && key != 'niprocart' && key != 'target_ultrafiltration' && key != 'jms' && key != 'fistula_needle_set' && key != 'fistula_needle_set_16'
  3019. && key != 'hemoperfusion' && key != 'dialyser_sterilised' && key != 'filtryzer' && key != 'target_ktv' && key != 'dialyzers'
  3020. && key != 'injector' && key != 'bloodlines' && key != 'tubing_hemodialysis' && key != 'package' && key != 'a_liquid') {
  3021. this.dialysisPrescription[key] =
  3022. response.data.data.system_prescription[key]
  3023. }
  3024. }
  3025. } else {
  3026. for (const key in this.dialysisPrescription) {
  3027. // 临时处方为空
  3028. if (key != 'target_ultrafiltration' && key != 'niprocart' && key != 'target_ultrafiltration' && key != 'jms' && key != 'fistula_needle_set' && key != 'fistula_needle_set_16'
  3029. && key != 'hemoperfusion' && key != 'dialyser_sterilised' && key != 'filtryzer' && key != 'target_ktv' && key != 'dialyzers'
  3030. && key != 'injector' && key != 'bloodlines' && key != 'tubing_hemodialysis' && key != 'package' && key != 'a_liquid') {
  3031. this.dialysisPrescription[key] = ''
  3032. }
  3033. }
  3034. this.dialysisPrescription.mode_id = id
  3035. }
  3036. }
  3037. }
  3038. if (
  3039. this.dialysisPrescription.dialysis_duration_hour === '' ||
  3040. this.dialysisPrescription.dialysis_duration_minute === ''
  3041. ) {
  3042. this.timeValue = ''
  3043. this.time = '03:00'
  3044. } else {
  3045. this.timeValue =
  3046. this.dialysisPrescription.dialysis_duration_hour +
  3047. '小时' +
  3048. this.dialysisPrescription.dialysis_duration_minute +
  3049. '分钟'
  3050. this.time =
  3051. (this.dialysisPrescription.dialysis_duration_hour > 10
  3052. ? this.dialysisPrescription.dialysis_duration_hour
  3053. : '0' + this.dialysisPrescription.dialysis_duration_hour) +
  3054. ':' +
  3055. (this.dialysisPrescription.dialysis_duration_minute > 10
  3056. ? this.dialysisPrescription.dialysis_duration_minute
  3057. : '0' + this.dialysisPrescription.dialysis_duration_minute)
  3058. }
  3059. })
  3060. if (
  3061. id === 1 ||
  3062. id === 3 ||
  3063. id === 4 ||
  3064. id === 6 ||
  3065. id === 7 ||
  3066. id === 8 ||
  3067. id === 9 ||
  3068. id === 10 ||
  3069. id === 11 ||
  3070. id === 13 ||
  3071. id === 14 ||
  3072. id === 15 ||
  3073. id === 16 ||
  3074. id === 19
  3075. ) {
  3076. this.zhiShow = false
  3077. this.huShow = false
  3078. this.totalShow = false
  3079. } else {
  3080. this.zhiShow = true
  3081. this.huShow = true
  3082. this.totalShow = true
  3083. }
  3084. },
  3085. handlePatientInfo() {
  3086. this.isVisibility = false
  3087. this.msgtip_visibility = true
  3088. },
  3089. cancleMsg() {
  3090. this.isVisibility = true
  3091. this.msgtip_visibility = false
  3092. },
  3093. getPermission() {
  3094. request
  3095. .get('/api/func_per/get', {
  3096. params: {
  3097. create_url: '/api/dialysis/prescription?mode=1',
  3098. modify_url: '/api/dialysis/prescription?mode=2',
  3099. modify_other_url: '/api/dialysis/prescription?mode=3',
  3100. module: 1
  3101. }
  3102. })
  3103. .then(res => {
  3104. // console.log(res)
  3105. // console.log('predialysis.creater', this.pre.creater)
  3106. // console.log('admin.id', this.$store.getters.xt_user.user.id)
  3107. if (res.data.state == 0) {
  3108. this.hasPermission = false
  3109. } else if (res.data.state == 1) {
  3110. if (this.pre.id != '' && this.pre.creater != 0) {
  3111. // 有数据
  3112. if (this.pre.creater == this.$store.getters.xt_user.user.id) {
  3113. // 创建人是自己
  3114. if (res.data.data.is_has_modify == false) {
  3115. this.hasPermission = false
  3116. this.showTxt = '你没有修改透析处方权限'
  3117. }
  3118. } else {
  3119. // 创建人不是自己
  3120. if (res.data.data.is_has_modify_other == false) {
  3121. this.hasPermission = false
  3122. this.showTxt = '你没有修改他人透析处方权限'
  3123. }
  3124. }
  3125. } else if (this.pre.id == '' || this.pre.creater == 0) {
  3126. if (res.data.data.is_has_create == false) {
  3127. this.hasPermission = false
  3128. this.showTxt = '你没有新增透析处方权限'
  3129. }
  3130. }
  3131. }
  3132. })
  3133. },
  3134. unique(arr) {
  3135. const res = new Map()
  3136. return arr.filter((arr) => !res.has(arr.name) && res.set(arr.name, 1))
  3137. }
  3138. },
  3139. watch: {
  3140. 'dialysisPrescription.dialysis_duration_hour': function() {
  3141. let dialysis_duration_minute = 0
  3142. let dialysis_duration_hour = 0
  3143. let duration = 0
  3144. if (this.dialysisPrescription.dialysis_duration_minute == '') {
  3145. dialysis_duration_minute = 0
  3146. } else {
  3147. dialysis_duration_minute = this.dialysisPrescription
  3148. .dialysis_duration_minute
  3149. }
  3150. if (this.dialysisPrescription.dialysis_duration_hour == '') {
  3151. dialysis_duration_hour = 0
  3152. } else {
  3153. dialysis_duration_hour = this.dialysisPrescription
  3154. .dialysis_duration_hour
  3155. }
  3156. duration = parseFloat(dialysis_duration_hour) + parseFloat(dialysis_duration_minute) / 60
  3157. this.dialysisPrescription.anticoagulant_zongliang = calculateAnticoagulantZL(1, this.dialysisPrescription.anticoagulant_shouji, duration, this.dialysisPrescription.anticoagulant_weichi)
  3158. if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
  3159. this.dialysisPrescription.anticoagulant_zongliang = ''
  3160. }
  3161. },
  3162. 'dialysisPrescription.dialysis_duration_minute': function() {
  3163. let dialysis_duration_minute = 0
  3164. let dialysis_duration_hour = 0
  3165. let duration = 0
  3166. if (this.dialysisPrescription.dialysis_duration_minute == '') {
  3167. dialysis_duration_minute = 0
  3168. } else {
  3169. dialysis_duration_minute = this.dialysisPrescription.dialysis_duration_minute
  3170. }
  3171. if (this.dialysisPrescription.dialysis_duration_hour == '') {
  3172. dialysis_duration_hour = 0
  3173. } else {
  3174. dialysis_duration_hour = this.dialysisPrescription
  3175. .dialysis_duration_hour
  3176. }
  3177. duration =
  3178. parseFloat(dialysis_duration_hour) +
  3179. parseFloat(dialysis_duration_minute) / 60
  3180. this.dialysisPrescription.anticoagulant_zongliang = calculateAnticoagulantZL(1, this.dialysisPrescription.anticoagulant_shouji, duration,
  3181. this.dialysisPrescription.anticoagulant_weichi
  3182. )
  3183. if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
  3184. this.dialysisPrescription.anticoagulant_zongliang = ''
  3185. }
  3186. },
  3187. 'dialysisPrescription.anticoagulant_shouji': function() {
  3188. let dialysis_duration_minute = 0
  3189. let dialysis_duration_hour = 0
  3190. let duration = 0
  3191. if (this.dialysisPrescription.dialysis_duration_minute == '') {
  3192. dialysis_duration_minute = 0
  3193. } else {
  3194. dialysis_duration_minute = this.dialysisPrescription
  3195. .dialysis_duration_minute
  3196. }
  3197. if (this.dialysisPrescription.dialysis_duration_hour == '') {
  3198. dialysis_duration_hour = 0
  3199. } else {
  3200. dialysis_duration_hour = this.dialysisPrescription
  3201. .dialysis_duration_hour
  3202. }
  3203. duration =
  3204. parseFloat(dialysis_duration_hour) +
  3205. parseFloat(dialysis_duration_minute) / 60
  3206. this.dialysisPrescription.anticoagulant_zongliang = calculateAnticoagulantZL(
  3207. 1,
  3208. this.dialysisPrescription.anticoagulant_shouji,
  3209. duration,
  3210. this.dialysisPrescription.anticoagulant_weichi
  3211. )
  3212. if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
  3213. this.dialysisPrescription.anticoagulant_zongliang = ''
  3214. }
  3215. if(this.$store.getters.xt_user.template_info.template_id == 41 && this.dialysisPrescription.anticoagulant == 2){
  3216. this.dialysisPrescription.anticoagulant_zongliang = ""
  3217. this.dialysisPrescription.anticoagulant_zongliang = parseInt(this.dialysisPrescription.anticoagulant_shouji) + parseInt(this.dialysisPrescription.anticoagulant_weichi)
  3218. }
  3219. },
  3220. 'dialysisPrescription.anticoagulant_weichi': function() {
  3221. let dialysis_duration_minute = 0
  3222. let dialysis_duration_hour = 0
  3223. let duration = 0
  3224. if (this.dialysisPrescription.dialysis_duration_minute == '') {
  3225. dialysis_duration_minute = 0
  3226. } else {
  3227. dialysis_duration_minute = this.dialysisPrescription
  3228. .dialysis_duration_minute
  3229. }
  3230. if (this.dialysisPrescription.dialysis_duration_hour == '') {
  3231. dialysis_duration_hour = 0
  3232. } else {
  3233. dialysis_duration_hour = this.dialysisPrescription
  3234. .dialysis_duration_hour
  3235. }
  3236. duration = parseFloat(dialysis_duration_hour) + parseFloat(dialysis_duration_minute) / 60
  3237. this.dialysisPrescription.anticoagulant_zongliang = calculateAnticoagulantZL(1, this.dialysisPrescription.anticoagulant_shouji, duration, this.dialysisPrescription.anticoagulant_weichi)
  3238. if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
  3239. this.dialysisPrescription.anticoagulant_zongliang = ''
  3240. }
  3241. console.log('首季9999', this.dialysisPrescription.anticoagulant_zongliang)
  3242. console.log("收集",this.dialysisPrescription.anticoagulant_shouji)
  3243. console.log("weichi",this.dialysisPrescription.anticoagulant_weichi)
  3244. if(this.$store.getters.xt_user.template_info.template_id == 41 && this.dialysisPrescription.anticoagulant == 2){
  3245. this.dialysisPrescription.anticoagulant_zongliang = ""
  3246. this.dialysisPrescription.anticoagulant_zongliang = parseInt(this.dialysisPrescription.anticoagulant_shouji) + parseInt(this.dialysisPrescription.anticoagulant_weichi)
  3247. }
  3248. },
  3249. 'prescription.id': {
  3250. immediate: true,
  3251. deep: true,
  3252. handler(oldVal, newVal) {
  3253. if (oldVal == newVal) {
  3254. for (var index in this.dialysisPrescription) {
  3255. this.dialysisPrescription[index] = this.prescription[index]
  3256. }
  3257. if (this.prescription['dialysate_formulation'] == 0) {
  3258. this.dialysisPrescription['dialysate_formulation'] = ''
  3259. }
  3260. if (this.prescription['anticoagulant'] == 0) {
  3261. this.dialysisPrescription['anticoagulant'] = ''
  3262. }
  3263. if (this.prescription['dialysis_duration_hour'] == 0) {
  3264. this.dialysisPrescription['dialysis_duration_hour'] = ''
  3265. }
  3266. if (this.prescription['dialysis_duration_minute'] == 0) {
  3267. this.dialysisPrescription['dialysis_duration_minute'] = ''
  3268. }
  3269. if (this.prescription['blood_flow_volume'] == 0) {
  3270. this.dialysisPrescription['blood_flow_volume'] = ''
  3271. }
  3272. if (this.prescription['target_ultrafiltration'] == 0) {
  3273. this.dialysisPrescription['target_ultrafiltration'] = ''
  3274. }
  3275. if (this.prescription['dialysate_temperature'] == 0) {
  3276. this.dialysisPrescription['dialysate_temperature'] = ''
  3277. }
  3278. if (this.prescription['anticoagulant_shouji'] == 0) {
  3279. this.dialysisPrescription['anticoagulant_shouji'] = 0
  3280. }
  3281. if (this.prescription['anticoagulant_weichi'] == 0) {
  3282. this.dialysisPrescription['anticoagulant_weichi'] = 0
  3283. }
  3284. if (this.prescription['anticoagulant_zongliang'] == 0) {
  3285. this.dialysisPrescription['anticoagulant_zongliang'] = 0
  3286. }
  3287. if (this.prescription['anticoagulant_gaijiliang'] == 0) {
  3288. this.dialysisPrescription['anticoagulant_gaijiliang'] = ''
  3289. }
  3290. if (this.prescription['kalium'] == 0) {
  3291. this.dialysisPrescription['kalium'] = ''
  3292. }
  3293. if (this.prescription['sodium'] == 0) {
  3294. this.dialysisPrescription['sodium'] = ''
  3295. }
  3296. if (this.prescription['calcium'] == 0) {
  3297. this.dialysisPrescription['calcium'] = ''
  3298. }
  3299. if (this.prescription['bicarbonate'] == 0) {
  3300. this.dialysisPrescription['bicarbonate'] = ''
  3301. }
  3302. if (this.prescription['glucose'] == 0) {
  3303. this.dialysisPrescription['glucose'] = ''
  3304. }
  3305. if (this.prescription['dialysate_flow'] == 0) {
  3306. this.dialysisPrescription['dialysate_flow'] = ''
  3307. }
  3308. if (this.prescription['conductivity'] == 0) {
  3309. this.dialysisPrescription['conductivity'] = ''
  3310. }
  3311. if (this.prescription['replacement_total'] == 0) {
  3312. this.dialysisPrescription['replacement_total'] = ''
  3313. }
  3314. if (this.prescription['target_ktv'] == 0) {
  3315. this.dialysisPrescription['target_ktv'] = ''
  3316. }
  3317. }
  3318. if (this.prescription.id > 0) {
  3319. for (var index in this.dialysisPrescription) {
  3320. this.dialysisPrescription[index] = this.prescription[index]
  3321. }
  3322. if (this.prescription['dialysate_formulation'] == 0) {
  3323. this.dialysisPrescription['dialysate_formulation'] = ''
  3324. }
  3325. if (this.prescription['anticoagulant'] == 0) {
  3326. this.dialysisPrescription['anticoagulant'] = ''
  3327. }
  3328. if (this.prescription['dialysis_duration_hour'] == 0) {
  3329. this.dialysisPrescription['dialysis_duration_hour'] = ''
  3330. }
  3331. if (this.prescription['dialysis_duration_minute'] == 0) {
  3332. this.dialysisPrescription['dialysis_duration_minute'] = ''
  3333. }
  3334. if (this.prescription['blood_flow_volume'] == 0) {
  3335. this.dialysisPrescription['blood_flow_volume'] = ''
  3336. }
  3337. if (this.prescription['target_ultrafiltration'] == 0) {
  3338. this.dialysisPrescription['target_ultrafiltration'] = ''
  3339. }
  3340. if (this.prescription['dialysate_temperature'] == 0) {
  3341. this.dialysisPrescription['dialysate_temperature'] = ''
  3342. }
  3343. if (this.prescription['anticoagulant_shouji'] == 0) {
  3344. this.dialysisPrescription['anticoagulant_shouji'] = 0
  3345. }
  3346. if (this.prescription['anticoagulant_weichi'] == 0) {
  3347. this.dialysisPrescription['anticoagulant_weichi'] = 0
  3348. }
  3349. if (this.prescription['anticoagulant_zongliang'] == 0) {
  3350. this.dialysisPrescription['anticoagulant_zongliang'] = 0
  3351. }
  3352. if (this.prescription['anticoagulant_gaijiliang'] == 0) {
  3353. this.dialysisPrescription['anticoagulant_gaijiliang'] = ''
  3354. }
  3355. if (this.prescription['kalium'] == 0) {
  3356. this.dialysisPrescription['kalium'] = ''
  3357. }
  3358. if (this.prescription['sodium'] == 0) {
  3359. this.dialysisPrescription['sodium'] = ''
  3360. }
  3361. if (this.prescription['calcium'] == 0) {
  3362. this.dialysisPrescription['calcium'] = ''
  3363. }
  3364. if (this.prescription['bicarbonate'] == 0) {
  3365. this.dialysisPrescription['bicarbonate'] = ''
  3366. }
  3367. if (this.prescription['glucose'] == 0) {
  3368. this.dialysisPrescription['glucose'] = ''
  3369. }
  3370. if (this.prescription['dialysate_flow'] == 0) {
  3371. this.dialysisPrescription['dialysate_flow'] = ''
  3372. }
  3373. if (this.prescription['conductivity'] == 0) {
  3374. this.dialysisPrescription['conductivity'] = ''
  3375. }
  3376. if (this.prescription['replacement_total'] == 0) {
  3377. this.dialysisPrescription['replacement_total'] = ''
  3378. }
  3379. if (this.prescription['target_ktv'] == 0) {
  3380. this.dialysisPrescription['target_ktv'] = ''
  3381. }
  3382. } else if (this.prescription.id == 0) {
  3383. for (var index in this.dialysisPrescription) {
  3384. this.dialysisPrescription[index] = this.prescription[index]
  3385. }
  3386. if (this.prescription['dialysate_formulation'] == 0) {
  3387. this.dialysisPrescription['dialysate_formulation'] = ''
  3388. }
  3389. if (this.prescription['anticoagulant'] == 0) {
  3390. this.dialysisPrescription['anticoagulant'] = ''
  3391. }
  3392. if (this.prescription['dialysis_duration_hour'] == 0) {
  3393. this.dialysisPrescription['dialysis_duration_hour'] = ''
  3394. }
  3395. if (this.prescription['dialysis_duration_minute'] == 0) {
  3396. this.dialysisPrescription['dialysis_duration_minute'] = ''
  3397. }
  3398. if (this.prescription['blood_flow_volume'] == 0) {
  3399. this.dialysisPrescription['blood_flow_volume'] = ''
  3400. }
  3401. if (this.prescription['target_ultrafiltration'] == 0) {
  3402. this.dialysisPrescription['target_ultrafiltration'] = ''
  3403. }
  3404. if (this.prescription['dialysate_temperature'] == 0) {
  3405. this.dialysisPrescription['dialysate_temperature'] = ''
  3406. }
  3407. if (this.prescription['anticoagulant_shouji'] == 0) {
  3408. this.dialysisPrescription['anticoagulant_shouji'] = 0
  3409. }
  3410. if (this.prescription['anticoagulant_weichi'] == 0) {
  3411. this.dialysisPrescription['anticoagulant_weichi'] = 0
  3412. }
  3413. if (this.prescription['anticoagulant_zongliang'] == 0) {
  3414. this.dialysisPrescription['anticoagulant_zongliang'] = 0
  3415. }
  3416. if (this.prescription['anticoagulant_gaijiliang'] == 0) {
  3417. this.dialysisPrescription['anticoagulant_gaijiliang'] = ''
  3418. }
  3419. if (this.prescription['kalium'] == 0) {
  3420. this.dialysisPrescription['kalium'] = ''
  3421. }
  3422. if (this.prescription['sodium'] == 0) {
  3423. this.dialysisPrescription['sodium'] = ''
  3424. }
  3425. if (this.prescription['calcium'] == 0) {
  3426. this.dialysisPrescription['calcium'] = ''
  3427. }
  3428. if (this.prescription['bicarbonate'] == 0) {
  3429. this.dialysisPrescription['bicarbonate'] = ''
  3430. }
  3431. if (this.prescription['glucose'] == 0) {
  3432. this.dialysisPrescription['glucose'] = ''
  3433. }
  3434. if (this.prescription['dialysate_flow'] == 0) {
  3435. this.dialysisPrescription['dialysate_flow'] = ''
  3436. }
  3437. if (this.prescription['conductivity'] == 0) {
  3438. this.dialysisPrescription['conductivity'] = ''
  3439. }
  3440. if (this.prescription['replacement_total'] == 0) {
  3441. this.dialysisPrescription['replacement_total'] = ''
  3442. }
  3443. if (this.prescription['target_ktv'] == 0) {
  3444. this.dialysisPrescription['target_ktv'] = ''
  3445. }
  3446. }
  3447. }
  3448. },
  3449. 'solution.id': function() {
  3450. if (this.solution.id > 0) {
  3451. if (
  3452. this.prescription != null &&
  3453. typeof this.prescription.id !== 'undefined' &&
  3454. this.prescription.id > 0
  3455. ) {
  3456. for (const key in this.prescription) {
  3457. this.dialysisPrescription[key] = this.prescription[key]
  3458. }
  3459. if (this.prescription['dialysate_formulation'] == 0) {
  3460. this.dialysisPrescription['dialysate_formulation'] = ''
  3461. }
  3462. if (this.prescription['anticoagulant'] == 0) {
  3463. this.dialysisPrescription['anticoagulant'] = ''
  3464. }
  3465. if (this.prescription['dialysis_duration_hour'] == 0) {
  3466. this.dialysisPrescription['dialysis_duration_hour'] = ''
  3467. }
  3468. if (this.prescription['dialysis_duration_minute'] == 0) {
  3469. this.dialysisPrescription['dialysis_duration_minute'] = ''
  3470. }
  3471. if (this.prescription['blood_flow_volume'] == 0) {
  3472. this.dialysisPrescription['blood_flow_volume'] = ''
  3473. }
  3474. if (this.prescription['target_ultrafiltration'] == 0) {
  3475. this.dialysisPrescription['target_ultrafiltration'] = ''
  3476. }
  3477. if (this.prescription['dialysate_temperature'] == 0) {
  3478. this.dialysisPrescription['dialysate_temperature'] = ''
  3479. }
  3480. if (this.prescription['anticoagulant_shouji'] == 0) {
  3481. this.dialysisPrescription['anticoagulant_shouji'] = 0
  3482. }
  3483. if (this.prescription['anticoagulant_weichi'] == 0) {
  3484. this.dialysisPrescription['anticoagulant_weichi'] = 0
  3485. }
  3486. if (this.prescription['anticoagulant_zongliang'] == 0) {
  3487. this.dialysisPrescription['anticoagulant_zongliang'] = 0
  3488. }
  3489. if (this.prescription['anticoagulant_gaijiliang'] == 0) {
  3490. this.dialysisPrescription['anticoagulant_gaijiliang'] = ''
  3491. }
  3492. if (this.prescription['kalium'] == 0) {
  3493. this.dialysisPrescription['kalium'] = ''
  3494. }
  3495. if (this.prescription['sodium'] == 0) {
  3496. this.dialysisPrescription['sodium'] = ''
  3497. }
  3498. if (this.prescription['calcium'] == 0) {
  3499. this.dialysisPrescription['calcium'] = ''
  3500. }
  3501. if (this.prescription['bicarbonate'] == 0) {
  3502. this.dialysisPrescription['bicarbonate'] = ''
  3503. }
  3504. if (this.prescription['glucose'] == 0) {
  3505. this.dialysisPrescription['glucose'] = ''
  3506. }
  3507. if (this.prescription['dialysate_flow'] == 0) {
  3508. this.dialysisPrescription['dialysate_flow'] = ''
  3509. }
  3510. if (this.prescription['conductivity'] == 0) {
  3511. this.dialysisPrescription['conductivity'] = ''
  3512. }
  3513. if (this.prescription['replacement_total'] == 0) {
  3514. this.dialysisPrescription['replacement_total'] = ''
  3515. }
  3516. if (this.prescription['target_ktv'] == 0) {
  3517. this.dialysisPrescription['target_ktv'] = ''
  3518. }
  3519. } else if (
  3520. this.solution != null &&
  3521. typeof this.solution.id !== 'undefined' &&
  3522. this.solution.id
  3523. ) {
  3524. for (const key in this.solution) {
  3525. this.dialysisPrescription[key] = this.solution[key]
  3526. }
  3527. if (this.solution['dialysate_formulation'] == 0) {
  3528. this.dialysisPrescription['dialysate_formulation'] = ''
  3529. }
  3530. if (this.solution['anticoagulant'] == 0) {
  3531. this.dialysisPrescription['anticoagulant'] = ''
  3532. }
  3533. if (this.solution['dialysis_duration_hour'] == 0) {
  3534. this.dialysisPrescription['dialysis_duration_hour'] = ''
  3535. }
  3536. if (this.solution['dialysis_duration_minute'] == 0) {
  3537. this.dialysisPrescription['dialysis_duration_minute'] = ''
  3538. }
  3539. if (this.solution['blood_flow_volume'] == 0) {
  3540. this.dialysisPrescription['blood_flow_volume'] = ''
  3541. }
  3542. if (this.solution['target_ultrafiltration'] == 0) {
  3543. this.dialysisPrescription['target_ultrafiltration'] = ''
  3544. }
  3545. if (this.solution['dialysate_temperature'] == 0) {
  3546. this.dialysisPrescription['dialysate_temperature'] = ''
  3547. }
  3548. if (this.solution['anticoagulant_shouji'] == 0) {
  3549. this.dialysisPrescription['anticoagulant_shouji'] = 0
  3550. }
  3551. if (this.solution['anticoagulant_weichi'] == 0) {
  3552. this.dialysisPrescription['anticoagulant_weichi'] = 0
  3553. }
  3554. if (this.solution['anticoagulant_zongliang'] == 0) {
  3555. this.dialysisPrescription['anticoagulant_zongliang'] = 0
  3556. }
  3557. if (this.solution['anticoagulant_gaijiliang'] == 0) {
  3558. this.dialysisPrescription['anticoagulant_gaijiliang'] = ''
  3559. }
  3560. if (this.solution['kalium'] == 0) {
  3561. this.dialysisPrescription['kalium'] = ''
  3562. }
  3563. if (this.solution['sodium'] == 0) {
  3564. this.dialysisPrescription['sodium'] = ''
  3565. }
  3566. if (this.solution['calcium'] == 0) {
  3567. this.dialysisPrescription['calcium'] = ''
  3568. }
  3569. if (this.solution['bicarbonate'] == 0) {
  3570. this.dialysisPrescription['bicarbonate'] = ''
  3571. }
  3572. if (this.solution['glucose'] == 0) {
  3573. this.dialysisPrescription['glucose'] = ''
  3574. }
  3575. if (this.solution['dialysate_flow'] == 0) {
  3576. this.dialysisPrescription['dialysate_flow'] = ''
  3577. }
  3578. if (this.solution['conductivity'] == 0) {
  3579. this.dialysisPrescription['conductivity'] = ''
  3580. }
  3581. if (this.solution['replacement_total'] == 0) {
  3582. this.dialysisPrescription['replacement_total'] = ''
  3583. }
  3584. if (this.solution['target_ktv'] == 0) {
  3585. this.dialysisPrescription['target_ktv'] = ''
  3586. }
  3587. }
  3588. }
  3589. },
  3590. stockType: function() {
  3591. console.log('stockType', this.stockType)
  3592. var arr = []
  3593. var arrTwo = []
  3594. for (let i = 0; i < this.stockType.length; i++) {
  3595. if (this.stockType[i].stock_attribute == 2) {
  3596. arr.push(this.stockType[i])
  3597. }
  3598. if (this.stockType[i].stock_attribute == 3) {
  3599. arrTwo.push(this.stockType[i])
  3600. }
  3601. }
  3602. var dialyzator = []
  3603. var irrigation = []
  3604. for (let i = 0; i < arr.length; i++) {
  3605. for (let j = 0; j < arr[i].GoodInfo.length; j++) {
  3606. dialyzator.push(arr[i].GoodInfo[j])
  3607. }
  3608. }
  3609. this.dialyzers = dialyzator
  3610. for (let i = 0; i < arrTwo.length; i++) {
  3611. for (let j = 0; j < arrTwo[i].GoodInfo.length; j++) {
  3612. irrigation.push(arrTwo[i].GoodInfo[j])
  3613. }
  3614. }
  3615. this.irrigations = irrigation
  3616. console.log('透析器', this.dialyzers)
  3617. console.log('灌流器', this.irrigations)
  3618. }
  3619. },
  3620. created() {
  3621. this.illnessList = getDataConfig('hemodialysis', 'illness')
  3622. this.plasmaSeparatorList = getDataConfig('hemodialysis', 'plasma_separator')
  3623. this.bilirubinAdsorptionColumn = getDataConfig('hemodialysis', 'bilirubin_adsorption_column')
  3624. }
  3625. }
  3626. </script>
  3627. <style rel="stylesheet/scss" lang="scss" scoped>
  3628. .el-checkbox,
  3629. .el-checkbox__input {
  3630. vertical-align: middle;
  3631. }
  3632. .newLine {
  3633. display: flex;
  3634. justify-content: space-between;
  3635. height: 40px;
  3636. line-height: 40px;
  3637. border-bottom: 1px solid #ccc;
  3638. color: #303133;
  3639. }
  3640. .warnTxt {
  3641. text-align: center;
  3642. margin: 0 auto;
  3643. background: #faa331;
  3644. max-width: 240px;
  3645. padding: 10px 20px;
  3646. border-radius: 4px;
  3647. margin-bottom: 10px;
  3648. color: #fff;
  3649. }
  3650. </style>
  3651. <style lang="scss">
  3652. .newDialog {
  3653. .el-dialog__body {
  3654. padding: 10px 20px 30px;
  3655. }
  3656. }
  3657. </style>