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

dialysisPrescriptionDialog.vue 119KB

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