dialysisPrescriptionDialog.vue 124KB

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