Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

dialysisPrescriptionDialog.vue 134KB

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