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

dialysisPrescriptionDialog.vue 132KB

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