dialysisPrescriptionDialog.vue 123KB

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