dialysisPrescriptionDialog.vue 128KB

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