血透系统PC前端

dialysisPrescriptionDialog.vue 92KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461
  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. >
  10. <el-button style="position: absolute;left: 12%;top: 2%" @click="handlePatientInfo">{{patient.name}}</el-button>
  11. <el-form ref="dialysisPrescription" :model="dialysisPrescription" label-width="148px">
  12. <el-row :gutter="24">
  13. <el-col :span="8" v-if="isShows('透析模式')">
  14. <el-form-item label="透析模式">
  15. <el-select v-model="dialysisPrescription.mode_id"
  16. @change="changePrescription(dialysisPrescription.mode_id)">
  17. <el-option :key="0" label="请选择" :value="0"></el-option>
  18. <el-option v-for="(item,index) in treatment_mode" :label="item.name" :value="item.id"
  19. :key="index+1"></el-option>
  20. </el-select>
  21. </el-form-item>
  22. </el-col>
  23. <el-col :span="8" v-if="isShows('透析时长')">
  24. <el-form-item label="透析时长(h): ">
  25. <el-input type="number" v-model="dialysisPrescription.dialysis_duration_hour"></el-input>
  26. </el-form-item>
  27. </el-col>
  28. <el-col :span="8" v-if="isShows('透析时长')">
  29. <el-form-item label="透析时长(min): ">
  30. <el-input type="number" v-model="dialysisPrescription.dialysis_duration_minute"></el-input>
  31. </el-form-item>
  32. </el-col>
  33. <!-- </el-row>
  34. <el-row :gutter="20"> -->
  35. <el-col :span="8" v-if="isShows('血流量')">
  36. <el-form-item label="血流量(ml/min):">
  37. <el-input type="number" v-model="dialysisPrescription.blood_flow_volume"></el-input>
  38. </el-form-item>
  39. </el-col>
  40. <el-col :span="8" v-if="isShows('目标超滤量')">
  41. <el-form-item label="目标超滤量(L):">
  42. <el-input type="number" v-model="dialysisPrescription.target_ultrafiltration"></el-input>
  43. </el-form-item>
  44. </el-col>
  45. <el-col :span="8" v-if="isShows('透析液配方')">
  46. <el-form-item label="透析液配方:">
  47. <!-- <el-input type="number" v-model="dialysisPrescription.dialysate_formulation"></el-input> -->
  48. <el-select v-model="dialysisPrescription.dialysate_formulation" placeholder="请选择">
  49. <el-option :key="0" label="请选择" :value="0"></el-option>
  50. <el-option v-for="(option, index) in dialysate_formulation_options" :key="index+1" :label="option.name"
  51. :value="option.id"></el-option>
  52. </el-select>
  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="抗凝剂:">
  59. <el-select v-model="dialysisPrescription.anticoagulant" placeholder="请选择" style="width:100%;"
  60. @change="changeThisAnticoagulant">
  61. <el-option :key="0" label="请选择" :value="0"></el-option>
  62. <el-option v-for="(item,index) in anticoagulantsConfit" :label="item.name" :key="index + 1"
  63. :value="item.id"></el-option>
  64. </el-select>
  65. </el-form-item>
  66. </el-col>
  67. <el-col :span="8" v-if="anticoagulant.shouji != -1&&isShows('首剂')">
  68. <el-form-item :label="'首剂('+anticoagulant.shouji_unit+') : '">
  69. <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1" v-model="dialysisPrescription.anticoagulant_shouji"></el-input>
  70. <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1" v-model="dialysisPrescription.no_anticoagulant_shouji"></el-input>
  71. </el-form-item>
  72. </el-col>
  73. <el-col :span="8" v-if="anticoagulant.weichi != -1&&isShows('维持')">
  74. <el-form-item :label="'维持('+anticoagulant.weichi_unit+') : '" v-if="anticoagulant.weichi != -1">
  75. <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1" v-model="dialysisPrescription.anticoagulant_weichi"></el-input>
  76. <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1" v-model="dialysisPrescription.no_anticoagulant_weichi"></el-input>
  77. </el-form-item>
  78. </el-col>
  79. <el-col :span="8" v-if="anticoagulant.zongliang != -1&&isShows('总量')">
  80. <el-form-item :label="'总量('+anticoagulant.zongliang_unit+') : '">
  81. <el-input type="number" v-if="dialysisPrescription.anticoagulant != 1" v-model="dialysisPrescription.anticoagulant_zongliang"></el-input>
  82. <el-input type="number" disabled v-if="dialysisPrescription.anticoagulant == 1" v-model="dialysisPrescription.no_anticoagulant_zongliang"></el-input>
  83. </el-form-item>
  84. </el-col>
  85. <el-col :span="8" v-if="isShows('置换量')" v-show="zhiShow">
  86. <el-form-item label="置换量(L):">
  87. <el-input type="number" v-model="dialysisPrescription.replacement_total"></el-input>
  88. </el-form-item>
  89. </el-col>
  90. <el-col :span="8" v-if="anticoagulant.gaimingcheng != -1&&isShows('钙名称')">
  91. <el-form-item label="钙名称 : ">
  92. <el-input v-model="dialysisPrescription.anticoagulant_gaimingcheng"
  93. :disabled="anticoagulant.gaimingcheng==1?false:true" placeholder="钙名称"></el-input>
  94. </el-form-item>
  95. </el-col>
  96. <el-col :span="8" v-if="anticoagulant.gaijiliang != -1&&isShows('钙剂量')">
  97. <el-form-item label="钙剂量(ml) : ">
  98. <el-input type="number" v-model="dialysisPrescription.anticoagulant_gaijiliang"
  99. :disabled="anticoagulant.gaijiliang==1?false:true" placeholder="钙剂量"></el-input>
  100. </el-form-item>
  101. </el-col>
  102. <el-col :span="8" v-if="isShows('钾')">
  103. <el-form-item label="钾(mmol/L): ">
  104. <el-input type="number" v-model="dialysisPrescription.kalium"></el-input>
  105. </el-form-item>
  106. </el-col>
  107. <el-col :span="8" v-if="isShows('钠')">
  108. <el-form-item label="钠(mmol/L):">
  109. <el-input type="number" v-model="dialysisPrescription.sodium"></el-input>
  110. </el-form-item>
  111. </el-col>
  112. <el-col :span="8" v-if="isShows('钙')">
  113. <el-form-item label="钙(mmol/L):">
  114. <el-input type="number" v-model="dialysisPrescription.calcium"></el-input>
  115. </el-form-item>
  116. </el-col>
  117. <el-col :span="8" v-if="isShows('碳酸氢盐')">
  118. <el-form-item label="碳酸氢盐(mmol/L):">
  119. <el-input type="number" v-model="dialysisPrescription.bicarbonate"></el-input>
  120. </el-form-item>
  121. </el-col>
  122. <el-col :span="8" v-if="isShows('葡萄糖')">
  123. <el-form-item label="葡萄糖(mmol/L):">
  124. <el-input type="number" v-model="dialysisPrescription.glucose"></el-input>
  125. </el-form-item>
  126. </el-col>
  127. <el-col :span="8" v-if="isShows('透析液流量')">
  128. <el-form-item label="透析液流量(ml/min):">
  129. <el-input type="number" v-model="dialysisPrescription.dialysate_flow"></el-input>
  130. </el-form-item>
  131. </el-col>
  132. <el-col :span="8" v-if="isShows('透析液温度')">
  133. <el-form-item label="透析液温度(°C):">
  134. <el-input type="number" v-model="dialysisPrescription.dialysate_temperature"></el-input>
  135. </el-form-item>
  136. </el-col>
  137. <el-col :span="8" v-if="isShows('电导度')">
  138. <el-form-item label="电导度(mS/m): ">
  139. <el-input type="number" v-model="dialysisPrescription.conductivity"></el-input>
  140. </el-form-item>
  141. </el-col>
  142. <el-col :span="8" v-if="isShows('透析器/灌流器')">
  143. <el-form-item label="透析器/灌流器:">
  144. <el-input v-model="dialysisPrescription.dialyzer_perfusion_apparatus"></el-input>
  145. </el-form-item>
  146. </el-col>
  147. <el-col :span="8" v-if="isShows('体液过多症状')">
  148. <el-form-item label="体液过多症状:">
  149. <el-select v-model="dialysisPrescription.body_fluid" placeholder="请选择" style="width:100%;"
  150. >
  151. <el-option :key="0" label="请选择" :value="0"></el-option>
  152. <el-option v-for="(item,index) in body_fluid_option" :label="item.name" :key="index+1"
  153. :value="item.id"></el-option>
  154. </el-select>
  155. </el-form-item>
  156. </el-col>
  157. <!-- </el-row>
  158. <el-row :gutter="20" > -->
  159. <el-col :span="8" v-if="isShows('体液过多其他症状')">
  160. <el-form-item label="体液过多其他症状">
  161. <el-input v-model="dialysisPrescription.body_fluid_other"></el-input>
  162. </el-form-item>
  163. </el-col>
  164. <el-col :span="8" v-if="isShows('透析前使用特殊药物')">
  165. <el-form-item label="透析前使用特殊药物">
  166. <el-select v-model="dialysisPrescription.special_medicine" placeholder="请选择" style="width:100%;"
  167. >
  168. <el-option :key="0" label="请选择" :value="0"></el-option>
  169. <el-option v-for="(item,index) in special_medicine_option" :label="item.name" :key="index+1"
  170. :value="item.id"></el-option>
  171. </el-select>
  172. </el-form-item>
  173. </el-col>
  174. <el-col :span="8" v-if="isShows('透析前使用其他特殊药物')">
  175. <el-form-item label="透析前使用其他特殊药物">
  176. <el-input v-model="dialysisPrescription.special_medicine_other"></el-input>
  177. </el-form-item>
  178. </el-col>
  179. <el-col :span="8" v-if="isShows('目标KT/V')">
  180. <el-form-item label="目标KT/V">
  181. <el-input v-model="dialysisPrescription.target_ktv"></el-input>
  182. </el-form-item>
  183. </el-col>
  184. <!-- </el-row>
  185. <el-row :gutter="20" > -->
  186. <el-col :span="8">
  187. <el-form-item label="置换液:" v-if="isShows('置换液')"
  188. v-show="huShow">
  189. <el-select v-model="dialysisPrescription.displace_liqui_part" placeholder="请选择">
  190. <el-option :key="0" label="请选择" :value="0"></el-option>
  191. <el-option v-for="(option, index) in displace_liqui_part_option" :key="index+1"
  192. :label="option.name" :value="option.id"></el-option>
  193. </el-select>
  194. </el-form-item>
  195. </el-col>
  196. <el-col :span="8" v-if="isShows('置换液总量')" v-show="totalShow">
  197. <el-form-item label="置换液总量(L)">
  198. <el-input v-model="dialysisPrescription.displace_liqui_value"></el-input>
  199. </el-form-item>
  200. </el-col>
  201. <el-col :span="8" v-if="isShows('血管通路')">
  202. <el-form-item label="血管通路:">
  203. <el-select v-model="dialysisPrescription.blood_access" placeholder="请选择">
  204. <el-option :key="0" label="请选择" :value="0"></el-option>
  205. <el-option v-for="(option, index) in blood_access_option" :key="index+1"
  206. :label="option.name" :value="option.id"></el-option>
  207. </el-select>
  208. </el-form-item>
  209. </el-col>
  210. <!-- </el-row>
  211. <el-row :gutter="20" > -->
  212. <el-col :span="8" v-if="isShows('实际超滤量')">
  213. <el-form-item label="实际超滤量(L)">
  214. <el-input v-model="dialysisPrescription.ultrafiltration"></el-input>
  215. </el-form-item>
  216. </el-col>
  217. <!--透析耗材-->
  218. <el-col :span="8" v-if="isShows('血液透析干粉')&&config.is_open == 1">
  219. <el-form-item label="血液透析干粉:">
  220. <el-select v-model="dialysisPrescription.niprocart" placeholder="请选择">
  221. <el-option :key="0" label="请选择" :value="0"></el-option>
  222. <el-option v-for="(option, index) in niprocart_info" :key="index+1"
  223. :label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>
  224. </el-select>
  225. </el-form-item>
  226. </el-col>
  227. <el-col :span="8" v-if="isShows('一次性使用动静脉穿刺针')&&config.is_open == 1">
  228. <el-form-item label="一次性使用动静脉穿刺针:">
  229. <el-select v-model="dialysisPrescription.jms" placeholder="请选择">
  230. <el-option :key="0" label="请选择" :value="0"></el-option>
  231. <el-option v-for="(option, index) in jms_info" :key="index+1"
  232. :label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>
  233. </el-select>
  234. </el-form-item>
  235. </el-col>
  236. <el-col :span="8" v-if="isShows('内瘘管翼状针')&&config.is_open == 1">
  237. <el-form-item label="内瘘管翼状针:">
  238. <el-select v-model="dialysisPrescription.fistula_needle_set" placeholder="请选择">
  239. <el-option :key="0" label="请选择" :value="0"></el-option>
  240. <el-option v-for="(option, index) in fistula_needle_set_info" :key="index+1"
  241. :label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>
  242. </el-select>
  243. </el-form-item>
  244. </el-col>
  245. <el-col :span="8" v-if="isShows('内瘘管翼状针16G')&&config.is_open == 1">
  246. <el-form-item label="内瘘管翼状针16G:">
  247. <el-select v-model="dialysisPrescription.fistula_needle_set_16" placeholder="请选择">
  248. <el-option :key="0" label="请选择" :value="0"></el-option>
  249. <el-option v-for="(option, index) in fistula_needle_set_16_info" :key="index+1"
  250. :label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>
  251. </el-select>
  252. </el-form-item>
  253. </el-col>
  254. <el-col :span="8" v-if="isShows('一次性使用血液灌流器')&&config.is_open == 1">
  255. <el-form-item label="一次性使用血液灌流器:">
  256. <el-select v-model="dialysisPrescription.hemoperfusion" placeholder="请选择">
  257. <el-option :key="0" label="请选择" :value="0"></el-option>
  258. <el-option v-for="(option, index) in hemoperfusion_info" :key="index+1"
  259. :label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>
  260. </el-select>
  261. </el-form-item>
  262. </el-col>
  263. <el-col :span="8" v-if="isShows('空心纤维血液透析器')&&config.is_open == 1">
  264. <el-form-item label="空心纤维血液透析器:">
  265. <el-select v-model="dialysisPrescription.dialyser_sterilised" placeholder="请选择">
  266. <el-option :key="0" label="请选择" :value="0"></el-option>
  267. <el-option v-for="(option, index) in dialyser_sterilised_info" :key="index+1"
  268. :label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>
  269. </el-select>
  270. </el-form-item>
  271. </el-col>
  272. <el-col :span="8" v-if="isShows('中空纤维透析器')&&config.is_open == 1">
  273. <el-form-item label="中空纤维透析器:">
  274. <el-select v-model="dialysisPrescription.filtryzer" placeholder="请选择">
  275. <el-option :key="0" label="请选择" :value="0"></el-option>
  276. <el-option v-for="(option, index) in filtryzer_info" :key="index+1"
  277. :label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>
  278. </el-select>
  279. </el-form-item>
  280. </el-col>
  281. <el-col :span="8" v-if="isShows('透析器')&&config.is_open == 1">
  282. <el-form-item label="透析器:">
  283. <el-select v-model="dialysisPrescription.dialyzers" placeholder="请选择">
  284. <el-option :key="0" label="请选择" :value="0"></el-option>
  285. <el-option v-for="(option, index) in dialyzers_info" :key="index+1"
  286. :label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>
  287. </el-select>
  288. </el-form-item>
  289. </el-col>
  290. <el-col :span="8" v-if="isShows('注射器')&&config.is_open == 1">
  291. <el-form-item label="注射器:">
  292. <el-select v-model="dialysisPrescription.injector" placeholder="请选择">
  293. <el-option :key="0" label="请选择" :value="0"></el-option>
  294. <el-option v-for="(option, index) in injector_info" :key="index+1"
  295. :label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>
  296. </el-select>
  297. </el-form-item>
  298. </el-col>
  299. <el-col :span="8" v-if="isShows('体外循环血路管')&&config.is_open == 1">
  300. <el-form-item label="体外循环血路管:">
  301. <el-select v-model="dialysisPrescription.bloodlines" placeholder="请选择">
  302. <el-option :key="0" label="请选择" :value="0"></el-option>
  303. <el-option v-for="(option, index) in bloodlines_info" :key="index+1"
  304. :label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>
  305. </el-select>
  306. </el-form-item>
  307. </el-col>
  308. <el-col :span="8" v-if="isShows('血液净化补液管路(置换管)')&&config.is_open == 1">
  309. <el-form-item label="血液净化补液管路(置换管):">
  310. <el-select v-model="dialysisPrescription.tubing_hemodialysis" placeholder="请选择">
  311. <el-option :key="0" label="请选择" :value="0"></el-option>
  312. <el-option v-for="(option, index) in tubingHemodialysis_info" :key="index+1"
  313. :label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>
  314. </el-select>
  315. </el-form-item>
  316. </el-col>
  317. <el-col :span="8" v-if="isShows('护理包')&&config.is_open == 1">
  318. <el-form-item label="护理包:">
  319. <el-select v-model="dialysisPrescription.package" placeholder="请选择">
  320. <el-option :key="0" label="请选择" :value="0"></el-option>
  321. <el-option v-for="(option, index) in safe_package_info" :key="index+1"
  322. :label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>
  323. </el-select>
  324. </el-form-item>
  325. </el-col>
  326. <el-col :span="8" v-if="isShows('A液')&&config.is_open == 1">
  327. <el-form-item label="A液:">
  328. <el-select v-model="dialysisPrescription.a_liquid" placeholder="请选择">
  329. <el-option :key="0" label="请选择" :value="0"></el-option>
  330. <el-option v-for="(option, index) in aliquid_info" :key="index+1"
  331. :label="option.GoodInfo.specification_name" :value="option.GoodInfo.id"></el-option>
  332. </el-select>
  333. </el-form-item>
  334. </el-col>
  335. </el-row>
  336. <el-row :gutter="20">
  337. <el-col :span="24">
  338. <el-form-item label="备注: ">
  339. <el-input type="textarea" v-model="dialysisPrescription.remark" :rows="5"></el-input>
  340. </el-form-item>
  341. </el-col>
  342. </el-row>
  343. </el-form>
  344. <span slot="footer" class="dialog-footer">
  345. <el-button @click="handleCancle">取 消</el-button>
  346. <el-button type="primary" @click="handleCommit" v-if="isPermission()">保 存</el-button>
  347. <el-button type="primary" @click="handleSolution" v-if="isPermission()">保存为长期处方</el-button>
  348. </span>
  349. </el-dialog>
  350. <el-dialog
  351. title="长期医嘱推送"
  352. :visible.sync="isShowRemindAdvice"
  353. width="1010px"
  354. :modal-append-to-body="false"
  355. :append-to-body="true"
  356. >
  357. <el-checkbox-group v-model="checkedCities">
  358. <el-checkbox style="display: flex;align-items: center" v-for="(advice, index) in targetAdvices"
  359. :label="advice.id"
  360. :key="index"
  361. :value="advice.id"
  362. :name="advice.id">
  363. <div style="padding-top: 10px;padding-left: 10px">开嘱医生&nbsp;{{ getDoctorName(advice.advice_doctor) }}</div>
  364. <br/>
  365. <div style="padding-left: 10px">开嘱时间&nbsp;{{ getTime(advice.created_time) }}</div>
  366. <br/>
  367. <div style="padding-bottom: 10px;padding-left: 10px"> 医嘱内容&nbsp;{{getContent(advice)}}</div>
  368. <div style="padding-bottom: 10px;padding-left: 10px" v-if="advice.frequency_type == 1"> 推送频率 每次必推</div>
  369. <div style="padding-bottom: 10px;padding-left: 10px" v-if="advice.frequency_type == 2"> 推送频率&nbsp;{{advice.day_count}}天/次</div>
  370. <div style="padding-bottom: 10px;padding-left: 10px" v-if="advice.frequency_type == 3"> 推送频率&nbsp;每周{{advice.week_day}}</div>
  371. </el-checkbox>
  372. </el-checkbox-group>
  373. <span slot="footer" class="dialog-footer">
  374. <el-button @click="handleAdviceCancle">取 消</el-button>
  375. <el-button type="primary" @click="handleAdviceCommit">保 存</el-button>
  376. </span>
  377. </el-dialog>
  378. <el-dialog
  379. :title="patient.name"
  380. :visible.sync="msgtip_visibility"
  381. :close-on-click-modal="false"
  382. :close-on-press-escape="false"
  383. :show-close="false"
  384. width="30%"
  385. >
  386. <div class="newLine">
  387. <span>本次透析日期</span>
  388. <span>{{dialysis_date}}</span>
  389. </div>
  390. <div class="newLine">
  391. <span>透前体重(kg)</span>
  392. <span>{{ getBeforeWeight(predialysis)}}</span>
  393. </div>
  394. <div class="newLine">
  395. <span>干体重(kg)</span>
  396. <span>{{ last_predialysis?last_predialysis.dry_weight:''}}</span>
  397. </div>
  398. <div class="newLine">
  399. <span>衣物重(kg)</span>
  400. <span>{{
  401. predialysis.additional_weight
  402. }}</span>
  403. </div>
  404. <div class="newLine">
  405. <span>体重增加(kg)</span>
  406. <span>{{ add_weight }}</span>
  407. </div>
  408. <div class="newLine">
  409. <span>透后体重(kg)</span>
  410. <span>{{ getAfterWeight(record) }}</span>
  411. </div>
  412. <div class="newLine">
  413. <span>体重减少(kg)</span>
  414. <span>{{ record.weight_loss }}</span>
  415. </div>
  416. <div class="newLine">
  417. <span>上次透后体重(kg)</span>
  418. <span>{{getLastAfterWeight(last_record)}}</span>
  419. </div>
  420. <span slot="footer" class="dialog-footer">
  421. <el-button @click="cancleMsg()">取 消</el-button>
  422. <el-button type="primary" @click="cancleMsg()">确 定</el-button>
  423. </span>
  424. </el-dialog>
  425. </div>
  426. </template>
  427. <script>
  428. import { CreateGroupAdvice, GetSolution, postPrescription, postSoulution } from '@/api/dialysis'
  429. import { getDataConfig } from '@/utils/data'
  430. import { uParseTime } from '@/utils/tools'
  431. import store from '@/store'
  432. import MsgTip from './MsgTip'
  433. import { calculateAnticoagulantZL} from '@/utils/tools'
  434. export default {
  435. name: 'dialysisPrescriptionDialog',
  436. components: { MsgTip },
  437. props: {
  438. schedual: {
  439. type: Object
  440. },
  441. is_open: {
  442. type: Number,
  443. default: () => {
  444. return 0
  445. }
  446. },
  447. waitUploadAdvices: {
  448. type: Array,
  449. default: () => {
  450. return []
  451. }
  452. },
  453. targetAdvices: {
  454. type: Array,
  455. default: () => {
  456. return []
  457. }
  458. },
  459. admin_users: {
  460. type: Array,
  461. default: () => {
  462. return []
  463. }
  464. },
  465. niprocart_info: {
  466. type: Array,
  467. default: () => {
  468. return []
  469. }
  470. },
  471. jms_info: {
  472. type: Array,
  473. default: () => {
  474. return []
  475. }
  476. },
  477. fistula_needle_set_info: {
  478. type: Array,
  479. default: () => {
  480. return []
  481. }
  482. },
  483. fistula_needle_set_16_info: {
  484. type: Array,
  485. default: () => {
  486. return []
  487. }
  488. },
  489. hemoperfusion_info: {
  490. type: Array,
  491. default: () => {
  492. return []
  493. }
  494. },
  495. dialyser_sterilised_info: {
  496. type: Array,
  497. default: () => {
  498. return []
  499. }
  500. },
  501. filtryzer_info: {
  502. type: Array,
  503. default: () => {
  504. return []
  505. }
  506. },
  507. dialyzers_info: {
  508. type: Array,
  509. default: () => {
  510. return []
  511. }
  512. },
  513. injector_info: {
  514. type: Array,
  515. default: () => {
  516. return []
  517. }
  518. },
  519. bloodlines_info: {
  520. type: Array,
  521. default: () => {
  522. return []
  523. }
  524. },
  525. tubingHemodialysis_info: {
  526. type: Array,
  527. default: () => {
  528. return []
  529. }
  530. },
  531. safe_package_info: {
  532. type: Array,
  533. default: () => {
  534. return []
  535. }
  536. },
  537. aliquid_info: {
  538. type: Array,
  539. default: () => {
  540. return []
  541. }
  542. },
  543. config: {
  544. type: Object,
  545. default: () => {
  546. return { id: 0 }
  547. }
  548. },
  549. prescription: { // 透析处方
  550. type: Object,
  551. default: () => {
  552. return { id: 0 }
  553. }
  554. },
  555. solution: { // 长期处方
  556. type: Object,
  557. default: () => {
  558. return { id: 0 }
  559. }
  560. },
  561. dialysis_order: { // 透析记录
  562. type: Object,
  563. default: () => {
  564. return { id: 0 }
  565. }
  566. },
  567. patient: { // 患者信息
  568. type: Object,
  569. default: () => {
  570. return { id: 0 }
  571. }
  572. },
  573. devices: {
  574. type: Array,
  575. default: function() {
  576. return new Array()
  577. }
  578. },
  579. predialysis: {
  580. type: Object,
  581. default: () => {
  582. return { id: 0 }
  583. }
  584. },
  585. last_predialysis: {
  586. type: Object,
  587. default: () => {
  588. return { id: 0 }
  589. }
  590. },
  591. record: {
  592. type: Object,
  593. default: () => {
  594. return { id: 0 }
  595. }
  596. },
  597. last_record: {
  598. type: Object,
  599. default: () => {
  600. return { id: 0 }
  601. }
  602. }, dry_weight: {
  603. type: Object,
  604. default: () => {
  605. return { id: 0 }
  606. }
  607. },last_prescription: {
  608. type: Object,
  609. default: () => {
  610. return { id: 0 }
  611. }
  612. },
  613. },
  614. computed: {
  615. dialysis_date: function() {
  616. return uParseTime(this.$route.query.date, '{y}/{m}/{d}')
  617. }
  618. },
  619. data() {
  620. return {
  621. zhiShow: false,
  622. totalShow: false,
  623. huShow: false,
  624. showName:'',
  625. isShowRemindAdvice: false,
  626. checkedCities: [],
  627. isVisibility: false,
  628. isShowTime: false,
  629. isClose: false,
  630. isShow: false,
  631. record_date: '',
  632. time: '',
  633. treatment_mode: [],
  634. timeValue: '',
  635. deviceList: [],
  636. replacement_ways: [],
  637. anticoagulantsConfit: {},
  638. dialysate_formulation_options: [],
  639. add_weight:0,
  640. body_fluid_option: [],
  641. special_medicine_option: [],
  642. displace_liqui_part_option: [],
  643. blood_access_option: [],
  644. is_pre: 0,
  645. msgtip_visibility: false,
  646. dialysisPrescription: {
  647. replacement_total: '',
  648. mode_id: '',
  649. dialysis_duration: '',
  650. dialysis_duration_hour: '',
  651. dialysis_duration_minute: '',
  652. mode_name: '',
  653. dialyzer: '',
  654. perfusion_apparatus: '',
  655. blood_flow_volume: '',
  656. dewater_amount: '',
  657. displace_liqui: '',
  658. replacement_way: '',
  659. anticoagulant: '',
  660. anticoagulant_shouji: '',
  661. anticoagulant_weichi: '',
  662. anticoagulant_zongliang: '',
  663. anticoagulant_gaimingcheng: '',
  664. anticoagulant_gaijiliang: '',
  665. kalium: '',
  666. sodium: '',
  667. calcium: '',
  668. bicarbonate: '',
  669. glucose: '',
  670. dry_weight: '',
  671. dialysate_flow: '',
  672. dialysate_temperature: '',
  673. target_ultrafiltration: '',
  674. dialysate_formulation: '',
  675. conductivity: '',
  676. doctor: '',
  677. remark: '',
  678. dialyzer_perfusion_apparatus: '',
  679. body_fluid: '',
  680. body_fluid_other: '',
  681. special_medicine: '',
  682. special_medicine_other: '',
  683. displace_liqui_part: '',
  684. displace_liqui_value: '',
  685. ultrafiltration: '',
  686. blood_access: '',
  687. niprocart: '',
  688. jms: '',
  689. fistula_needle_set: '',
  690. fistula_needle_set_16: '',
  691. hemoperfusion: '',
  692. dialyser_sterilised: '',
  693. filtryzer: '',
  694. target_ktv: '',
  695. dialyzers: '',
  696. injector: '',
  697. bloodlines: '',
  698. tubing_hemodialysis: '',
  699. package: '',
  700. a_liquid: '',
  701. no_anticoagulant_shouji: '0',
  702. no_anticoagulant_weichi: '0',
  703. no_anticoagulant_zongliang: '0',
  704. },
  705. anticoagulant: {
  706. id: 0,
  707. name: '',
  708. type: 1,
  709. shouji: 1,
  710. weichi: 1,
  711. zongliang: 1,
  712. gaimingcheng: -1,
  713. gaijiliang: -1,
  714. shouji_unit: 'mg',
  715. weichi_unit: 'mg/h',
  716. zongliang_unit: 'mg',
  717. gaimingcheng_unit: '',
  718. gaijiliang_unit: ''
  719. },
  720. doctorAdvices: []
  721. }
  722. },
  723. methods: {
  724. getLastAfterWeight(record){
  725. if(record != null&& record.id > 0){
  726. if(record.weight_after > 0) {
  727. let additional_weight = 0
  728. if(this.predialysis.additional_weight != undefined){
  729. additional_weight = this.predialysis.additional_weight
  730. }
  731. return parseFloat(record.weight_after - additional_weight).toFixed(1);
  732. }else{
  733. return ''
  734. }
  735. }
  736. },
  737. getBeforeWeight(predialysis){
  738. if(predialysis.id > 0){
  739. if(predialysis.weight_before > 0) {
  740. return predialysis.weight_before - predialysis.additional_weight
  741. }else{
  742. return ''
  743. }
  744. }
  745. }, getAfterWeight(record){
  746. if(record.id > 0){
  747. if(record.weight_after > 0) {
  748. return record.weight_after - this.predialysis.additional_weight
  749. }else{
  750. return ''
  751. }
  752. }
  753. },
  754. isPermission () {
  755. if (this.$store.getters.xt_user.user.user_type == 3 && ( this.$store.getters.xt_user.template_info.template_id == 2 || this.$store.getters.xt_user.template_info.template_id == 6)) {
  756. return false
  757. } else {
  758. return true
  759. }
  760. },
  761. setLastRecord:function(schedual,lastAssessmentAfterDislysis,lastPredialysisEvaluation,lastDialysisPrescribe,lastDryWeightDislysis){
  762. this.treatment_mode = this.$store.getters.treatment_mode
  763. this.perfusion_apparatus = getDataConfig('hemodialysis', 'perfusion_apparatus')
  764. this.replacement_ways = getDataConfig('hemodialysis', 'replacement_ways')
  765. this.dialysate_formulation_options = getDataConfig('hemodialysis', 'dialysate_formulation')
  766. this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit
  767. this.dialysisList = this.devices
  768. this.body_fluid_option = this.$store.getters.body_fluid
  769. this.special_medicine_option = this.$store.getters.special_medicine
  770. this.displace_liqui_part_option = this.$store.getters.displace_liqui
  771. this.blood_access_option = this.$store.getters.blood_access_internal_fistula
  772. var date = this.$route.query && this.$route.query.date
  773. this.record_date = uParseTime(date, '{y}-{m}-{d}')
  774. if (this.prescription != null && typeof (this.prescription.id) != 'undefined' && this.prescription.id > 0) {
  775. for (const key in this.prescription) {
  776. this.dialysisPrescription[key] = this.prescription[key]
  777. }
  778. } else if (this.solution != null && typeof this.solution.id != 'undefined' && this.solution.id > 0) {
  779. for (const key in this.solution) {
  780. this.dialysisPrescription[key] = this.solution[key]
  781. }
  782. } else if (lastDialysisPrescribe != null && typeof lastDialysisPrescribe.id != 'undefined' && lastDialysisPrescribe.id > 0) {
  783. for (const key in lastDialysisPrescribe) {
  784. this.dialysisPrescription[key] = lastDialysisPrescribe[key]
  785. }
  786. } else{
  787. this.dialysisPrescription.mode_id = schedual.mode_id
  788. }
  789. console.log(this.dialysisPrescription.anticoagulant)
  790. var thismode = parseInt(this.dialysisPrescription.anticoagulant)
  791. if (isNaN(thismode) || thismode <= 0) {
  792. return false
  793. }
  794. if (typeof (this.anticoagulantsConfit[thismode]) === 'undefined' || this.anticoagulantsConfit[thismode] == null) {
  795. return false
  796. }
  797. this.anticoagulant = this.anticoagulantsConfit[thismode]
  798. },
  799. menuMsgTip: function() {
  800. this.msgtip_visibility = false
  801. this.isVisibility = true
  802. },
  803. handleAdviceCommit() {
  804. let results = []
  805. for (let i = 0; i < this.targetAdvices.length; i++) {
  806. for (let a = 0; a < this.checkedCities.length; a++) {
  807. if (this.targetAdvices[i].id == this.checkedCities[a]) {
  808. results.push(this.targetAdvices[i])
  809. }
  810. }
  811. }
  812. var obj5 = {}
  813. results = results.reduce((cur, next) => {
  814. obj5[next.id] ? '' : obj5[next.id] = true && cur.push(next)
  815. return cur
  816. }, [])
  817. var date = new Date()
  818. var hour = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
  819. var minute = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
  820. if (results.length > 0) {
  821. if (this.is_pre == 1) {
  822. if (this.patient.id <= 0) {
  823. this.$message.error('没有选择患者')
  824. this.loading = false
  825. return
  826. }
  827. const ParamsQuery = this.dialysisPrescription
  828. ParamsQuery['patient'] = this.patient.id
  829. ParamsQuery['record_date'] = this.record_date
  830. postPrescription(ParamsQuery).then(response => {
  831. if (response.data.state == 0) {
  832. this.$message.error(response.data.msg)
  833. return false
  834. } else {
  835. this.$notify({
  836. title: '成功',
  837. message: '提交成功',
  838. type: 'success',
  839. duration: 2000
  840. })
  841. console.log(hour + ':' + minute)
  842. const params = {
  843. advices: results,
  844. advice_date: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
  845. advice_doctor: results[0].advice_doctor,
  846. advice_type: results[0].advice_type,
  847. parent_id: this.patient_id,
  848. start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}') + ' ' + hour + ':' + minute,
  849. remark: ''
  850. }
  851. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
  852. var resp = rs.data
  853. if (resp.state == 1) {
  854. this.doctorAdvices = resp.data.advices
  855. this.$emit('advice')
  856. } else {
  857. }
  858. })
  859. const prescription_resp = response.data.data.prescription
  860. var prescription = this.prescription
  861. for (var index in prescription_resp) {
  862. // prescription[index] = prescription_resp[index];
  863. this.$set(prescription, index, prescription_resp[index])
  864. }
  865. this.hide()
  866. }
  867. })
  868. } else if (this.is_pre == 2) {
  869. if (this.patient.id <= 0) {
  870. this.$message.error('没有选择患者')
  871. this.loading = false
  872. return
  873. }
  874. const ParamsQuery = this.dialysisPrescription
  875. ParamsQuery['patient'] = this.patient.id
  876. ParamsQuery['record_date'] = this.record_date
  877. postSoulution(ParamsQuery).then(response => {
  878. if (response.data.state == 0) {
  879. this.$message.error(response.data.msg)
  880. return false
  881. } else {
  882. this.$notify({
  883. title: '成功',
  884. message: '提交成功',
  885. type: 'success',
  886. duration: 2000
  887. })
  888. console.log(hour + ':' + minute)
  889. const params = {
  890. advices: results,
  891. advice_date: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
  892. advice_doctor: results[0].advice_doctor,
  893. advice_type: results[0].advice_type,
  894. parent_id: this.patient_id,
  895. start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}') + ' ' + hour + ':' + minute,
  896. remark: ''
  897. }
  898. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
  899. var resp = rs.data
  900. if (resp.state == 1) {
  901. // this.doctorAdvices = resp.data.advices
  902. this.$emit('advice')
  903. } else {
  904. }
  905. })
  906. const prescription_resp = response.data.data.prescription
  907. const solution_resp = response.data.data.solution
  908. var prescription = this.prescription
  909. var solution = this.solution
  910. for (var index in prescription_resp) {
  911. // prescription[index] = prescription_resp[index];
  912. this.$set(prescription, index, prescription_resp[index])
  913. }
  914. for (var index in solution_resp) {
  915. // solution[index] = solution_resp[index];
  916. this.$set(solution, index, solution_resp[index])
  917. }
  918. this.hide()
  919. }
  920. })
  921. }
  922. } else {
  923. if (this.is_pre == 1) {
  924. if (this.patient.id <= 0) {
  925. this.$message.error('没有选择患者')
  926. this.loading = false
  927. return
  928. }
  929. const ParamsQuery = this.dialysisPrescription
  930. ParamsQuery['patient'] = this.patient.id
  931. ParamsQuery['record_date'] = this.record_date
  932. postPrescription(ParamsQuery).then(response => {
  933. if (response.data.state == 0) {
  934. this.$message.error(response.data.msg)
  935. return false
  936. } else {
  937. this.$notify({
  938. title: '成功',
  939. message: '提交成功',
  940. type: 'success',
  941. duration: 2000
  942. })
  943. const prescription_resp = response.data.data.prescription
  944. var prescription = this.prescription
  945. for (var index in prescription_resp) {
  946. // prescription[index] = prescription_resp[index];
  947. this.$set(prescription, index, prescription_resp[index])
  948. }
  949. this.hide()
  950. }
  951. })
  952. } else if (this.is_pre == 2) {
  953. if (this.patient.id <= 0) {
  954. this.$message.error('没有选择患者')
  955. this.loading = false
  956. return
  957. }
  958. const ParamsQuery = this.dialysisPrescription
  959. ParamsQuery['patient'] = this.patient.id
  960. ParamsQuery['record_date'] = this.record_date
  961. postSoulution(ParamsQuery).then(response => {
  962. if (response.data.state == 0) {
  963. this.$message.error(response.data.msg)
  964. return false
  965. } else {
  966. this.$notify({
  967. title: '成功',
  968. message: '提交成功',
  969. type: 'success',
  970. duration: 2000
  971. })
  972. const prescription_resp = response.data.data.prescription
  973. const solution_resp = response.data.data.solution
  974. var prescription = this.prescription
  975. var solution = this.solution
  976. for (var index in prescription_resp) {
  977. // prescription[index] = prescription_resp[index];
  978. this.$set(prescription, index, prescription_resp[index])
  979. }
  980. for (var index in solution_resp) {
  981. // solution[index] = solution_resp[index];
  982. this.$set(solution, index, solution_resp[index])
  983. }
  984. this.hide()
  985. }
  986. })
  987. }
  988. }
  989. this.isShowRemindAdvice = false
  990. this.isVisibility = true
  991. },
  992. handleAdviceCancle() {
  993. this.isShowRemindAdvice = false
  994. this.isVisibility = true
  995. },
  996. getTime(val) {
  997. return uParseTime(val, '{y}-{m}-{d} {h}:{i}')
  998. },
  999. show() {
  1000. let last_weight_after = 0
  1001. let weight_before = 0
  1002. if(this.last_record == null){
  1003. last_weight_after = 0
  1004. }else{
  1005. last_weight_after = this.last_record.weight_after
  1006. }
  1007. if(this.predialysis == null || this.predialysis.id == 0 ){
  1008. weight_before = 0
  1009. }else{
  1010. weight_before = this.predialysis.weight_before
  1011. }
  1012. if(weight_before > 0 && last_weight_after > 0){
  1013. this.add_weight = parseFloat(weight_before - last_weight_after).toFixed(2)
  1014. }
  1015. this.isVisibility = true
  1016. this.checkedCities = []
  1017. for (let i = 0; i < this.targetAdvices.length; i++) {
  1018. if (this.targetAdvices[i].isCheck == 1) {
  1019. this.checkedCities.push(this.targetAdvices[i].id)
  1020. }
  1021. }
  1022. },
  1023. hide() {
  1024. this.isVisibility = false
  1025. },
  1026. changeThisAnticoagulant: function(val) {
  1027. var thismode = parseInt(val)
  1028. if (isNaN(thismode) || thismode <= 0) {
  1029. return false
  1030. }
  1031. if (typeof (this.anticoagulantsConfit[thismode]) === 'undefined' || this.anticoagulantsConfit[thismode] == null) {
  1032. return false
  1033. }
  1034. this.anticoagulant = this.anticoagulantsConfit[thismode]
  1035. }, handleCommit: function() {
  1036. if(this.dialysisPrescription.anticoagulant == 1){
  1037. this.dialysisPrescription.anticoagulant_weichi = '0'
  1038. this.dialysisPrescription.anticoagulant_shouji = '0'
  1039. this.dialysisPrescription.anticoagulant_zongliang = '0'
  1040. }
  1041. if (this.$store.getters.xt_user.template_info.template_id == 6) {
  1042. if (this.dialysisPrescription.mode_id == 2) {
  1043. if (this.dialysisPrescription.displace_liqui_part == 0 || this.dialysisPrescription.displace_liqui_part == -2 || this.dialysisPrescription.displace_liqui_value == 0 || this.dialysisPrescription.displace_liqui_value == '') {
  1044. this.$message.error('HDF模式下置换液和置换液总量不能为空!')
  1045. return
  1046. }
  1047. }
  1048. }
  1049. this.is_pre = 1
  1050. if (this.prescription.id == 0) {
  1051. if (this.is_open == 0) {
  1052. if (this.patient.id <= 0) {
  1053. this.$message.error('没有选择患者')
  1054. this.loading = false
  1055. return
  1056. }
  1057. const ParamsQuery = this.dialysisPrescription
  1058. ParamsQuery['patient'] = this.patient.id
  1059. ParamsQuery['record_date'] = this.record_date
  1060. postPrescription(ParamsQuery).then(response => {
  1061. if (response.data.state == 0) {
  1062. this.$message.error(response.data.msg)
  1063. return false
  1064. } else {
  1065. this.$notify({
  1066. title: '成功',
  1067. message: '提交成功',
  1068. type: 'success',
  1069. duration: 2000
  1070. })
  1071. const prescription_resp = response.data.data.prescription
  1072. var prescription = this.prescription
  1073. for (var index in prescription_resp) {
  1074. // prescription[index] = prescription_resp[index];
  1075. this.$set(prescription, index, prescription_resp[index])
  1076. }
  1077. this.hide()
  1078. }
  1079. })
  1080. } else if (this.is_open == 1) {
  1081. if (this.targetAdvices.length > 0) {
  1082. // 弹框推送提醒
  1083. this.isShowRemindAdvice = true
  1084. this.isVisibility = false
  1085. } else {
  1086. if (this.patient.id <= 0) {
  1087. this.$message.error('没有选择患者')
  1088. this.loading = false
  1089. return
  1090. }
  1091. const ParamsQuery = this.dialysisPrescription
  1092. ParamsQuery['patient'] = this.patient.id
  1093. ParamsQuery['record_date'] = this.record_date
  1094. postPrescription(ParamsQuery).then(response => {
  1095. if (response.data.state == 0) {
  1096. this.$message.error(response.data.msg)
  1097. return false
  1098. } else {
  1099. this.$notify({
  1100. title: '成功',
  1101. message: '提交成功',
  1102. type: 'success',
  1103. duration: 2000
  1104. })
  1105. const prescription_resp = response.data.data.prescription
  1106. var prescription = this.prescription
  1107. for (var index in prescription_resp) {
  1108. // prescription[index] = prescription_resp[index];
  1109. this.$set(prescription, index, prescription_resp[index])
  1110. }
  1111. this.hide()
  1112. }
  1113. })
  1114. }
  1115. } else if (this.is_open == 2) {
  1116. if (this.waitUploadAdvices.length > 0) {
  1117. const params = {
  1118. advices: this.waitUploadAdvices,
  1119. advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
  1120. advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  1121. advice_type: this.waitUploadAdvices[0].advice_type,
  1122. parent_id: this.patient_id,
  1123. start_time: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
  1124. remark: ''
  1125. }
  1126. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
  1127. var resp = rs.data
  1128. if (resp.state == 1) {
  1129. // this.doctorAdvices = resp.data.advices
  1130. this.$emit('advice')
  1131. } else {
  1132. }
  1133. })
  1134. if (this.patient.id <= 0) {
  1135. this.$message.error('没有选择患者')
  1136. this.loading = false
  1137. return
  1138. }
  1139. const ParamsQuery = this.dialysisPrescription
  1140. ParamsQuery['patient'] = this.patient.id
  1141. ParamsQuery['record_date'] = this.record_date
  1142. postPrescription(ParamsQuery).then(response => {
  1143. if (response.data.state == 0) {
  1144. this.$message.error(response.data.msg)
  1145. return false
  1146. } else {
  1147. this.$notify({
  1148. title: '成功',
  1149. message: '提交成功',
  1150. type: 'success',
  1151. duration: 2000
  1152. })
  1153. const prescription_resp = response.data.data.prescription
  1154. var prescription = this.prescription
  1155. for (var index in prescription_resp) {
  1156. // prescription[index] = prescription_resp[index];
  1157. this.$set(prescription, index, prescription_resp[index])
  1158. }
  1159. this.hide()
  1160. }
  1161. })
  1162. } else {
  1163. if (this.patient.id <= 0) {
  1164. this.$message.error('没有选择患者')
  1165. this.loading = false
  1166. return
  1167. }
  1168. const ParamsQuery = this.dialysisPrescription
  1169. ParamsQuery['patient'] = this.patient.id
  1170. ParamsQuery['record_date'] = this.record_date
  1171. postPrescription(ParamsQuery).then(response => {
  1172. if (response.data.state == 0) {
  1173. this.$message.error(response.data.msg)
  1174. return false
  1175. } else {
  1176. this.$notify({
  1177. title: '成功',
  1178. message: '提交成功',
  1179. type: 'success',
  1180. duration: 2000
  1181. })
  1182. const prescription_resp = response.data.data.prescription
  1183. var prescription = this.prescription
  1184. for (var index in prescription_resp) {
  1185. // prescription[index] = prescription_resp[index];
  1186. this.$set(prescription, index, prescription_resp[index])
  1187. }
  1188. this.hide()
  1189. }
  1190. })
  1191. }
  1192. }
  1193. } else {
  1194. if (this.prescription.creater == 0) {
  1195. if (this.is_open == 0) {
  1196. if (this.patient.id <= 0) {
  1197. this.$message.error('没有选择患者')
  1198. this.loading = false
  1199. return
  1200. }
  1201. const ParamsQuery = this.dialysisPrescription
  1202. ParamsQuery['patient'] = this.patient.id
  1203. ParamsQuery['record_date'] = this.record_date
  1204. postPrescription(ParamsQuery).then(response => {
  1205. if (response.data.state == 0) {
  1206. this.$message.error(response.data.msg)
  1207. return false
  1208. } else {
  1209. this.$notify({
  1210. title: '成功',
  1211. message: '提交成功',
  1212. type: 'success',
  1213. duration: 2000
  1214. })
  1215. const prescription_resp = response.data.data.prescription
  1216. var prescription = this.prescription
  1217. for (var index in prescription_resp) {
  1218. // prescription[index] = prescription_resp[index];
  1219. this.$set(prescription, index, prescription_resp[index])
  1220. }
  1221. this.hide()
  1222. }
  1223. })
  1224. } else if (this.is_open == 1) {
  1225. if (this.targetAdvices.length > 0) {
  1226. // 弹框推送提醒
  1227. this.isShowRemindAdvice = true
  1228. this.isVisibility = false
  1229. } else {
  1230. if (this.patient.id <= 0) {
  1231. this.$message.error('没有选择患者')
  1232. this.loading = false
  1233. return
  1234. }
  1235. const ParamsQuery = this.dialysisPrescription
  1236. ParamsQuery['patient'] = this.patient.id
  1237. ParamsQuery['record_date'] = this.record_date
  1238. postPrescription(ParamsQuery).then(response => {
  1239. if (response.data.state == 0) {
  1240. this.$message.error(response.data.msg)
  1241. return false
  1242. } else {
  1243. this.$notify({
  1244. title: '成功',
  1245. message: '提交成功',
  1246. type: 'success',
  1247. duration: 2000
  1248. })
  1249. const prescription_resp = response.data.data.prescription
  1250. var prescription = this.prescription
  1251. for (var index in prescription_resp) {
  1252. // prescription[index] = prescription_resp[index];
  1253. this.$set(prescription, index, prescription_resp[index])
  1254. }
  1255. this.hide()
  1256. }
  1257. })
  1258. }
  1259. } else if (this.is_open == 2) {
  1260. if (this.waitUploadAdvices.length > 0) {
  1261. const params = {
  1262. advices: this.waitUploadAdvices,
  1263. advice_date: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
  1264. advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  1265. advice_type: this.waitUploadAdvices[0].advice_type,
  1266. parent_id: this.patient_id,
  1267. start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
  1268. remark: ''
  1269. }
  1270. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
  1271. var resp = rs.data
  1272. if (resp.state == 1) {
  1273. // this.doctorAdvices = resp.data.advices
  1274. this.$emit('advice')
  1275. } else {
  1276. }
  1277. })
  1278. if (this.patient.id <= 0) {
  1279. this.$message.error('没有选择患者')
  1280. this.loading = false
  1281. return
  1282. }
  1283. const ParamsQuery = this.dialysisPrescription
  1284. ParamsQuery['patient'] = this.patient.id
  1285. ParamsQuery['record_date'] = this.record_date
  1286. postPrescription(ParamsQuery).then(response => {
  1287. if (response.data.state == 0) {
  1288. this.$message.error(response.data.msg)
  1289. return false
  1290. } else {
  1291. this.$notify({
  1292. title: '成功',
  1293. message: '提交成功',
  1294. type: 'success',
  1295. duration: 2000
  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 {
  1307. if (this.patient.id <= 0) {
  1308. this.$message.error('没有选择患者')
  1309. this.loading = false
  1310. return
  1311. }
  1312. const ParamsQuery = this.dialysisPrescription
  1313. ParamsQuery['patient'] = this.patient.id
  1314. ParamsQuery['record_date'] = this.record_date
  1315. postPrescription(ParamsQuery).then(response => {
  1316. if (response.data.state == 0) {
  1317. this.$message.error(response.data.msg)
  1318. return false
  1319. } else {
  1320. this.$notify({
  1321. title: '成功',
  1322. message: '提交成功',
  1323. type: 'success',
  1324. duration: 2000
  1325. })
  1326. const prescription_resp = response.data.data.prescription
  1327. var prescription = this.prescription
  1328. for (var index in prescription_resp) {
  1329. // prescription[index] = prescription_resp[index];
  1330. this.$set(prescription, index, prescription_resp[index])
  1331. }
  1332. this.hide()
  1333. }
  1334. })
  1335. }
  1336. }
  1337. } else {
  1338. if (this.patient.id <= 0) {
  1339. this.$message.error('没有选择患者')
  1340. this.loading = false
  1341. return
  1342. }
  1343. const ParamsQuery = this.dialysisPrescription
  1344. ParamsQuery['patient'] = this.patient.id
  1345. ParamsQuery['record_date'] = this.record_date
  1346. postPrescription(ParamsQuery).then(response => {
  1347. if (response.data.state == 0) {
  1348. this.$message.error(response.data.msg)
  1349. return false
  1350. } else {
  1351. this.$notify({
  1352. title: '成功',
  1353. message: '提交成功',
  1354. type: 'success',
  1355. duration: 2000
  1356. })
  1357. const prescription_resp = response.data.data.prescription
  1358. var prescription = this.prescription
  1359. for (var index in prescription_resp) {
  1360. // prescription[index] = prescription_resp[index];
  1361. this.$set(prescription, index, prescription_resp[index])
  1362. }
  1363. this.hide()
  1364. }
  1365. })
  1366. }
  1367. }
  1368. }, handleCancle: function() {
  1369. this.hide()
  1370. }, handleSolution: function() {
  1371. if(this.dialysisPrescription.anticoagulant == 1){
  1372. this.dialysisPrescription.anticoagulant_weichi = '0'
  1373. this.dialysisPrescription.anticoagulant_shouji = '0'
  1374. this.dialysisPrescription.anticoagulant_zongliang = '0'
  1375. }
  1376. if (this.$store.getters.xt_user.template_info.template_id == 6) {
  1377. if (this.dialysisPrescription.mode_id == 2) {
  1378. if (this.dialysisPrescription.displace_liqui_part == 0 || this.dialysisPrescription.displace_liqui_part == -2 || this.dialysisPrescription.displace_liqui_value == 0 || this.dialysisPrescription.displace_liqui_value == '') {
  1379. this.$message.error('HDF模式下置换液和置换液总量不能为空!')
  1380. return
  1381. }
  1382. }
  1383. }
  1384. this.is_pre = 2
  1385. if (this.prescription.id == 0) {
  1386. if (this.is_open == 0) {
  1387. if (this.patient.id <= 0) {
  1388. this.$message.error('没有选择患者')
  1389. this.loading = false
  1390. return
  1391. }
  1392. const ParamsQuery = this.dialysisPrescription
  1393. ParamsQuery['patient'] = this.patient.id
  1394. ParamsQuery['record_date'] = this.record_date
  1395. postSoulution(ParamsQuery).then(response => {
  1396. if (response.data.state == 0) {
  1397. this.$message.error(response.data.msg)
  1398. return false
  1399. } else {
  1400. this.$notify({
  1401. title: '成功',
  1402. message: '提交成功',
  1403. type: 'success',
  1404. duration: 2000
  1405. })
  1406. const prescription_resp = response.data.data.prescription
  1407. const solution_resp = response.data.data.solution
  1408. var prescription = this.prescription
  1409. var solution = this.solution
  1410. for (var index in prescription_resp) {
  1411. // prescription[index] = prescription_resp[index];
  1412. this.$set(prescription, index, prescription_resp[index])
  1413. }
  1414. for (var index in solution_resp) {
  1415. // solution[index] = solution_resp[index];
  1416. this.$set(solution, index, solution_resp[index])
  1417. }
  1418. this.hide()
  1419. }
  1420. })
  1421. } else if (this.is_open == 1) {
  1422. if (this.targetAdvices.length > 0) {
  1423. // 弹框推送提醒
  1424. this.isShowRemindAdvice = true
  1425. this.isVisibility = false
  1426. } else {
  1427. if (this.patient.id <= 0) {
  1428. this.$message.error('没有选择患者')
  1429. this.loading = false
  1430. return
  1431. }
  1432. const ParamsQuery = this.dialysisPrescription
  1433. ParamsQuery['patient'] = this.patient.id
  1434. ParamsQuery['record_date'] = this.record_date
  1435. postSoulution(ParamsQuery).then(response => {
  1436. if (response.data.state == 0) {
  1437. this.$message.error(response.data.msg)
  1438. return false
  1439. } else {
  1440. this.$notify({
  1441. title: '成功',
  1442. message: '提交成功',
  1443. type: 'success',
  1444. duration: 2000
  1445. })
  1446. const prescription_resp = response.data.data.prescription
  1447. const solution_resp = response.data.data.solution
  1448. var prescription = this.prescription
  1449. var solution = this.solution
  1450. for (var index in prescription_resp) {
  1451. // prescription[index] = prescription_resp[index];
  1452. this.$set(prescription, index, prescription_resp[index])
  1453. }
  1454. for (var index in solution_resp) {
  1455. // solution[index] = solution_resp[index];
  1456. this.$set(solution, index, solution_resp[index])
  1457. }
  1458. this.hide()
  1459. }
  1460. })
  1461. }
  1462. } else if (this.is_open == 2) {
  1463. if (this.waitUploadAdvices.length > 0) {
  1464. const params = {
  1465. advices: this.waitUploadAdvices,
  1466. advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
  1467. advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  1468. advice_type: this.waitUploadAdvices[0].advice_type,
  1469. parent_id: this.patient_id,
  1470. start_time: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
  1471. remark: ''
  1472. }
  1473. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
  1474. var resp = rs.data
  1475. if (resp.state == 1) {
  1476. // this.doctorAdvices = resp.data.advices
  1477. this.$emit('advice')
  1478. } else {
  1479. }
  1480. })
  1481. if (this.patient.id <= 0) {
  1482. this.$message.error('没有选择患者')
  1483. this.loading = false
  1484. return
  1485. }
  1486. const ParamsQuery = this.dialysisPrescription
  1487. ParamsQuery['patient'] = this.patient.id
  1488. ParamsQuery['record_date'] = this.record_date
  1489. postPrescription(ParamsQuery).then(response => {
  1490. if (response.data.state == 0) {
  1491. this.$message.error(response.data.msg)
  1492. return false
  1493. } else {
  1494. this.$notify({
  1495. title: '成功',
  1496. message: '提交成功',
  1497. type: 'success',
  1498. duration: 2000
  1499. })
  1500. const prescription_resp = response.data.data.prescription
  1501. var prescription = this.prescription
  1502. for (var index in prescription_resp) {
  1503. // prescription[index] = prescription_resp[index];
  1504. this.$set(prescription, index, prescription_resp[index])
  1505. }
  1506. this.hide()
  1507. }
  1508. })
  1509. } else {
  1510. if (this.patient.id <= 0) {
  1511. this.$message.error('没有选择患者')
  1512. this.loading = false
  1513. return
  1514. }
  1515. const ParamsQuery = this.dialysisPrescription
  1516. ParamsQuery['patient'] = this.patient.id
  1517. ParamsQuery['record_date'] = this.record_date
  1518. postSoulution(ParamsQuery).then(response => {
  1519. if (response.data.state == 0) {
  1520. this.$message.error(response.data.msg)
  1521. return false
  1522. } else {
  1523. this.$notify({
  1524. title: '成功',
  1525. message: '提交成功',
  1526. type: 'success',
  1527. duration: 2000
  1528. })
  1529. const prescription_resp = response.data.data.prescription
  1530. const solution_resp = response.data.data.solution
  1531. var prescription = this.prescription
  1532. var solution = this.solution
  1533. for (var index in prescription_resp) {
  1534. // prescription[index] = prescription_resp[index];
  1535. this.$set(prescription, index, prescription_resp[index])
  1536. }
  1537. for (var index in solution_resp) {
  1538. // solution[index] = solution_resp[index];
  1539. this.$set(solution, index, solution_resp[index])
  1540. }
  1541. this.hide()
  1542. }
  1543. })
  1544. }
  1545. }
  1546. } else {
  1547. if (this.prescription.creater == 0) {
  1548. if (this.is_open == 0) {
  1549. if (this.patient.id <= 0) {
  1550. this.$message.error('没有选择患者')
  1551. this.loading = false
  1552. return
  1553. }
  1554. const ParamsQuery = this.dialysisPrescription
  1555. ParamsQuery['patient'] = this.patient.id
  1556. ParamsQuery['record_date'] = this.record_date
  1557. postSoulution(ParamsQuery).then(response => {
  1558. if (response.data.state == 0) {
  1559. this.$message.error(response.data.msg)
  1560. return false
  1561. } else {
  1562. this.$notify({
  1563. title: '成功',
  1564. message: '提交成功',
  1565. type: 'success',
  1566. duration: 2000
  1567. })
  1568. const prescription_resp = response.data.data.prescription
  1569. const solution_resp = response.data.data.solution
  1570. var prescription = this.prescription
  1571. var solution = this.solution
  1572. for (var index in prescription_resp) {
  1573. // prescription[index] = prescription_resp[index];
  1574. this.$set(prescription, index, prescription_resp[index])
  1575. }
  1576. for (var index in solution_resp) {
  1577. // solution[index] = solution_resp[index];
  1578. this.$set(solution, index, solution_resp[index])
  1579. }
  1580. this.hide()
  1581. }
  1582. })
  1583. } else if (this.is_open == 1) {
  1584. if (this.targetAdvices.length > 0) {
  1585. // 弹框推送提醒
  1586. this.isShowRemindAdvice = true
  1587. this.isVisibility = false
  1588. } else {
  1589. if (this.patient.id <= 0) {
  1590. this.$message.error('没有选择患者')
  1591. this.loading = false
  1592. return
  1593. }
  1594. const ParamsQuery = this.dialysisPrescription
  1595. ParamsQuery['patient'] = this.patient.id
  1596. ParamsQuery['record_date'] = this.record_date
  1597. postSoulution(ParamsQuery).then(response => {
  1598. if (response.data.state == 0) {
  1599. this.$message.error(response.data.msg)
  1600. return false
  1601. } else {
  1602. this.$notify({
  1603. title: '成功',
  1604. message: '提交成功',
  1605. type: 'success',
  1606. duration: 2000
  1607. })
  1608. const prescription_resp = response.data.data.prescription
  1609. const solution_resp = response.data.data.solution
  1610. var prescription = this.prescription
  1611. var solution = this.solution
  1612. for (var index in prescription_resp) {
  1613. // prescription[index] = prescription_resp[index];
  1614. this.$set(prescription, index, prescription_resp[index])
  1615. }
  1616. for (var index in solution_resp) {
  1617. // solution[index] = solution_resp[index];
  1618. this.$set(solution, index, solution_resp[index])
  1619. }
  1620. this.hide()
  1621. }
  1622. })
  1623. }
  1624. } else if (this.is_open == 2) {
  1625. if (this.waitUploadAdvices.length > 0) {
  1626. const params = {
  1627. advices: this.waitUploadAdvices,
  1628. advice_date: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
  1629. advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  1630. advice_type: this.waitUploadAdvices[0].advice_type,
  1631. parent_id: this.patient_id,
  1632. start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
  1633. remark: ''
  1634. }
  1635. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
  1636. var resp = rs.data
  1637. if (resp.state == 1) {
  1638. // this.doctorAdvices = resp.data.advices
  1639. this.$emit('advice')
  1640. } else {
  1641. }
  1642. })
  1643. if (this.patient.id <= 0) {
  1644. this.$message.error('没有选择患者')
  1645. this.loading = false
  1646. return
  1647. }
  1648. const ParamsQuery = this.dialysisPrescription
  1649. ParamsQuery['patient'] = this.patient.id
  1650. ParamsQuery['record_date'] = this.record_date
  1651. postSoulution(ParamsQuery).then(response => {
  1652. if (response.data.state == 0) {
  1653. this.$message.error(response.data.msg)
  1654. return false
  1655. } else {
  1656. this.$notify({
  1657. title: '成功',
  1658. message: '提交成功',
  1659. type: 'success',
  1660. duration: 2000
  1661. })
  1662. const prescription_resp = response.data.data.prescription
  1663. const solution_resp = response.data.data.solution
  1664. var prescription = this.prescription
  1665. var solution = this.solution
  1666. for (var index in prescription_resp) {
  1667. // prescription[index] = prescription_resp[index];
  1668. this.$set(prescription, index, prescription_resp[index])
  1669. }
  1670. for (var index in solution_resp) {
  1671. // solution[index] = solution_resp[index];
  1672. this.$set(solution, index, solution_resp[index])
  1673. }
  1674. this.hide()
  1675. }
  1676. })
  1677. } else {
  1678. if (this.patient.id <= 0) {
  1679. this.$message.error('没有选择患者')
  1680. this.loading = false
  1681. return
  1682. }
  1683. const ParamsQuery = this.dialysisPrescription
  1684. ParamsQuery['patient'] = this.patient.id
  1685. ParamsQuery['record_date'] = this.record_date
  1686. postSoulution(ParamsQuery).then(response => {
  1687. if (response.data.state == 0) {
  1688. this.$message.error(response.data.msg)
  1689. return false
  1690. } else {
  1691. this.$notify({
  1692. title: '成功',
  1693. message: '提交成功',
  1694. type: 'success',
  1695. duration: 2000
  1696. })
  1697. const prescription_resp = response.data.data.prescription
  1698. const solution_resp = response.data.data.solution
  1699. var prescription = this.prescription
  1700. var solution = this.solution
  1701. for (var index in prescription_resp) {
  1702. // prescription[index] = prescription_resp[index];
  1703. this.$set(prescription, index, prescription_resp[index])
  1704. }
  1705. for (var index in solution_resp) {
  1706. // solution[index] = solution_resp[index];
  1707. this.$set(solution, index, solution_resp[index])
  1708. }
  1709. this.hide()
  1710. }
  1711. })
  1712. }
  1713. }
  1714. } else {
  1715. if (this.patient.id <= 0) {
  1716. this.$message.error('没有选择患者')
  1717. this.loading = false
  1718. return
  1719. }
  1720. const ParamsQuery = this.dialysisPrescription
  1721. ParamsQuery['patient'] = this.patient.id
  1722. ParamsQuery['record_date'] = this.record_date
  1723. postSoulution(ParamsQuery).then(response => {
  1724. if (response.data.state == 0) {
  1725. this.$message.error(response.data.msg)
  1726. return false
  1727. } else {
  1728. this.$notify({
  1729. title: '成功',
  1730. message: '提交成功',
  1731. type: 'success',
  1732. duration: 2000
  1733. })
  1734. const prescription_resp = response.data.data.prescription
  1735. const solution_resp = response.data.data.solution
  1736. var prescription = this.prescription
  1737. var solution = this.solution
  1738. for (var index in prescription_resp) {
  1739. // prescription[index] = prescription_resp[index];
  1740. this.$set(prescription, index, prescription_resp[index])
  1741. }
  1742. for (var index in solution_resp) {
  1743. // solution[index] = solution_resp[index];
  1744. this.$set(solution, index, solution_resp[index])
  1745. }
  1746. this.hide()
  1747. }
  1748. })
  1749. }
  1750. }
  1751. }, isShows(name) {
  1752. var filedList = store.getters.xt_user.fileds
  1753. for (let i = 0; i < filedList.length; i++) {
  1754. if (filedList[i].module == 1 && filedList[i].filed_name_cn == name && filedList[i].is_show == 1) {
  1755. return true
  1756. }
  1757. }
  1758. return false
  1759. }, getDoctorName(doctor_id) {
  1760. for (let i = 0; i < this.admin_users.length; i++) {
  1761. if (this.admin_users[i].id == doctor_id) {
  1762. return this.admin_users[i].name
  1763. }
  1764. }
  1765. }, getContent(val) {
  1766. let prescribing_number = ''
  1767. let single_dose = ''
  1768. let advice_desc = ''
  1769. if (val.prescribing_number > 0) {
  1770. prescribing_number = val.prescribing_number + val.prescribing_number_unit
  1771. }
  1772. if (val.single_dose > 0) {
  1773. single_dose = ' 单次用量 ' + val.single_dose + val.single_dose_unit
  1774. }
  1775. if (val.advice_desc > 0) {
  1776. advice_desc = val.advice_desc + val.drug_spec_unit
  1777. }
  1778. let name = ''
  1779. if (val.child.length > 0) {
  1780. for (let i = 0; i < val.child.length; i++) {
  1781. if (val.child[i].prescribing_number > 0) {
  1782. val.child[i]['presc'] = val.child[i].prescribing_number + val.child[i].prescribing_number_unit
  1783. } else {
  1784. val.child[i]['presc'] = ''
  1785. }
  1786. if (val.child[i].single_dose > 0) {
  1787. val.child[i]['single'] = ' ' + ' 单次用量 ' + ' ' + val.child[i].single_dose + val.child[i].single_dose_unit
  1788. } else {
  1789. val.child[i]['single'] = ''
  1790. }
  1791. name = name + '▲' + val.child[i].advice_name + '' +
  1792. val.child[i].advice_desc +
  1793. val.child[i].drug_spec_unit +
  1794. val.child[i].presc +
  1795. val.child[i].single
  1796. }
  1797. return val.advice_name + ' ' + advice_desc + ' ' +
  1798. val.drug_spec_unit +
  1799. prescribing_number +
  1800. ' ' + single_dose + ' ' + ' ' + val.delivery_way + ' ' + val.execution_frequency + val.remark + name
  1801. } else {
  1802. return val.advice_name + ' ' + advice_desc +
  1803. prescribing_number +
  1804. ' ' + single_dose + ' ' + ' ' + val.delivery_way + ' ' + val.execution_frequency + val.remark
  1805. }
  1806. },
  1807. changePrescription(id) {
  1808. let ParamsQuery = {}
  1809. ParamsQuery['patient_id'] = this.$route.query.patient_id
  1810. ParamsQuery['mode_id'] = id
  1811. GetSolution(ParamsQuery).then(response => {
  1812. if (response.data.state == 0) {
  1813. this.$message.error(response.data.msg)
  1814. return false
  1815. } else {
  1816. this.$message.success('切换成功')
  1817. if (response.data.data.solution != null) {
  1818. for (const key in response.data.data.solution) { //长期处方不为空
  1819. if (key != 'target_ultrafiltration') {
  1820. this.dialysisPrescription[key] = response.data.data.solution[key]
  1821. }
  1822. }
  1823. } else {
  1824. if (response.data.data.prescription != null) { //临时处方不为空
  1825. for (const key in response.data.data.prescription) {
  1826. if (key != 'target_ultrafiltration') {
  1827. this.dialysisPrescription[key] = response.data.data.prescription[key]
  1828. }
  1829. }
  1830. } else {
  1831. for (const key in this.dialysisPrescription) { //临时处方为空
  1832. if (key != 'target_ultrafiltration') {
  1833. this.dialysisPrescription[key] = ''
  1834. }
  1835. }
  1836. this.dialysisPrescription.mode_id = id
  1837. }
  1838. }
  1839. }
  1840. if (this.dialysisPrescription.dialysis_duration_hour === '' || this.dialysisPrescription.dialysis_duration_minute === '') {
  1841. this.timeValue = ''
  1842. this.time = '03:00'
  1843. } else {
  1844. this.timeValue = this.dialysisPrescription.dialysis_duration_hour + '小时' + this.dialysisPrescription.dialysis_duration_minute + '分钟'
  1845. this.time = (this.dialysisPrescription.dialysis_duration_hour > 10 ? this.dialysisPrescription.dialysis_duration_hour : '0' + this.dialysisPrescription.dialysis_duration_hour) + ':' + (this.dialysisPrescription.dialysis_duration_minute > 10 ? this.dialysisPrescription.dialysis_duration_minute : '0' + this.dialysisPrescription.dialysis_duration_minute)
  1846. }
  1847. })
  1848. if (id === 1 || id === 3 || id === 4 || id === 6 || id === 7 || id === 8 || id === 9 || id === 10 || id === 11 || id === 13 || id === 14 || id === 15 || id === 16) {
  1849. this.zhiShow = false
  1850. this.huShow = false
  1851. this.totalShow = false
  1852. } else {
  1853. this.zhiShow = true
  1854. this.huShow = true
  1855. this.totalShow = true
  1856. }
  1857. }, handlePatientInfo() {
  1858. this.isVisibility = false
  1859. this.msgtip_visibility = true
  1860. },cancleMsg(){
  1861. this.isVisibility = true
  1862. this.msgtip_visibility = false
  1863. }
  1864. },
  1865. watch: {
  1866. "dialysisPrescription.dialysis_duration_hour":function(){
  1867. let dialysis_duration_minute = 0
  1868. let dialysis_duration_hour = 0
  1869. let duration = 0
  1870. if (this.dialysisPrescription.dialysis_duration_minute == ''){
  1871. dialysis_duration_minute = 0
  1872. }else{
  1873. dialysis_duration_minute = this.dialysisPrescription.dialysis_duration_minute
  1874. }
  1875. if (this.dialysisPrescription.dialysis_duration_hour == ''){
  1876. dialysis_duration_hour = 0
  1877. }else{
  1878. dialysis_duration_hour = this.dialysisPrescription.dialysis_duration_hour
  1879. }
  1880. duration = parseFloat(dialysis_duration_hour) + parseFloat(dialysis_duration_minute) / 60
  1881. this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
  1882. this.dialysisPrescription.anticoagulant_shouji,
  1883. duration,
  1884. this.dialysisPrescription.anticoagulant_weichi
  1885. );
  1886. if(isNaN(this.dialysisPrescription.anticoagulant_zongliang)){
  1887. this.dialysisPrescription.anticoagulant_zongliang = ''
  1888. }
  1889. },
  1890. "dialysisPrescription.dialysis_duration_minute":function(){
  1891. let dialysis_duration_minute = 0
  1892. let dialysis_duration_hour = 0
  1893. let duration = 0
  1894. if (this.dialysisPrescription.dialysis_duration_minute == ''){
  1895. dialysis_duration_minute = 0
  1896. }else{
  1897. dialysis_duration_minute = this.dialysisPrescription.dialysis_duration_minute
  1898. }
  1899. if (this.dialysisPrescription.dialysis_duration_hour == ''){
  1900. dialysis_duration_hour = 0
  1901. }else{
  1902. dialysis_duration_hour = this.dialysisPrescription.dialysis_duration_hour
  1903. }
  1904. duration = parseFloat(dialysis_duration_hour) + parseFloat(dialysis_duration_minute) / 60
  1905. this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
  1906. this.dialysisPrescription.anticoagulant_shouji,
  1907. duration,
  1908. this.dialysisPrescription.anticoagulant_weichi
  1909. );
  1910. if(isNaN(this.dialysisPrescription.anticoagulant_zongliang)){
  1911. this.dialysisPrescription.anticoagulant_zongliang = ''
  1912. }
  1913. },
  1914. "dialysisPrescription.anticoagulant_shouji":function(){
  1915. let dialysis_duration_minute = 0
  1916. let dialysis_duration_hour = 0
  1917. let duration = 0
  1918. if (this.dialysisPrescription.dialysis_duration_minute == ''){
  1919. dialysis_duration_minute = 0
  1920. }else{
  1921. dialysis_duration_minute = this.dialysisPrescription.dialysis_duration_minute
  1922. }
  1923. if (this.dialysisPrescription.dialysis_duration_hour == ''){
  1924. dialysis_duration_hour = 0
  1925. }else{
  1926. dialysis_duration_hour = this.dialysisPrescription.dialysis_duration_hour
  1927. }
  1928. duration = parseFloat(dialysis_duration_hour) + parseFloat(dialysis_duration_minute) / 60
  1929. this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
  1930. this.dialysisPrescription.anticoagulant_shouji,
  1931. duration,
  1932. this.dialysisPrescription.anticoagulant_weichi
  1933. );
  1934. if(isNaN(this.dialysisPrescription.anticoagulant_zongliang)){
  1935. this.dialysisPrescription.anticoagulant_zongliang = ''
  1936. }
  1937. },
  1938. "dialysisPrescription.anticoagulant_weichi":function(){
  1939. let dialysis_duration_minute = 0
  1940. let dialysis_duration_hour = 0
  1941. let duration = 0
  1942. if (this.dialysisPrescription.dialysis_duration_minute == ''){
  1943. dialysis_duration_minute = 0
  1944. }else{
  1945. dialysis_duration_minute = this.dialysisPrescription.dialysis_duration_minute
  1946. }
  1947. if (this.dialysisPrescription.dialysis_duration_hour == ''){
  1948. dialysis_duration_hour = 0
  1949. }else{
  1950. dialysis_duration_hour = this.dialysisPrescription.dialysis_duration_hour
  1951. }
  1952. duration = parseFloat(dialysis_duration_hour) + parseFloat(dialysis_duration_minute) / 60
  1953. this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
  1954. this.dialysisPrescription.anticoagulant_shouji,
  1955. duration,
  1956. this.dialysisPrescription.anticoagulant_weichi
  1957. );
  1958. if(isNaN(this.dialysisPrescription.anticoagulant_zongliang)){
  1959. this.dialysisPrescription.anticoagulant_zongliang = ''
  1960. }
  1961. }, 'prescription.id': function() {
  1962. if (this.prescription.id > 0) {
  1963. for (var index in this.dialysisPrescription) {
  1964. this.dialysisPrescription[index] = this.prescription[index]
  1965. }
  1966. if (this.prescription['dialysate_formulation'] == 0) {
  1967. this.dialysisPrescription['dialysate_formulation'] = ''
  1968. }
  1969. if (this.prescription['anticoagulant'] == 0) {
  1970. this.dialysisPrescription['anticoagulant'] = ''
  1971. }
  1972. if (this.prescription['dialysis_duration_hour'] == 0) {
  1973. this.dialysisPrescription['dialysis_duration_hour'] = ''
  1974. }
  1975. if (this.prescription['dialysis_duration_minute'] == 0) {
  1976. this.dialysisPrescription['dialysis_duration_minute'] = ''
  1977. }
  1978. if (this.prescription['blood_flow_volume'] == 0) {
  1979. this.dialysisPrescription['blood_flow_volume'] = ''
  1980. }
  1981. if (this.prescription['target_ultrafiltration'] == 0) {
  1982. this.dialysisPrescription['target_ultrafiltration'] = ''
  1983. }
  1984. if (this.prescription['dialysate_temperature'] == 0) {
  1985. this.dialysisPrescription['dialysate_temperature'] = ''
  1986. }
  1987. if (this.prescription['anticoagulant_shouji'] == 0) {
  1988. this.dialysisPrescription['anticoagulant_shouji'] = ''
  1989. }
  1990. if (this.prescription['anticoagulant_weichi'] == 0) {
  1991. this.dialysisPrescription['anticoagulant_weichi'] = ''
  1992. }
  1993. if (this.prescription['anticoagulant_zongliang'] == 0) {
  1994. this.dialysisPrescription['anticoagulant_zongliang'] = ''
  1995. }
  1996. if (this.prescription['anticoagulant_gaijiliang'] == 0) {
  1997. this.dialysisPrescription['anticoagulant_gaijiliang'] = ''
  1998. }
  1999. if (this.prescription['kalium'] == 0) {
  2000. this.dialysisPrescription['kalium'] = ''
  2001. }
  2002. if (this.prescription['sodium'] == 0) {
  2003. this.dialysisPrescription['sodium'] = ''
  2004. }
  2005. if (this.prescription['calcium'] == 0) {
  2006. this.dialysisPrescription['calcium'] = ''
  2007. }
  2008. if (this.prescription['bicarbonate'] == 0) {
  2009. this.dialysisPrescription['bicarbonate'] = ''
  2010. }
  2011. if (this.prescription['glucose'] == 0) {
  2012. this.dialysisPrescription['glucose'] = ''
  2013. }
  2014. if (this.prescription['dialysate_flow'] == 0) {
  2015. this.dialysisPrescription['dialysate_flow'] = ''
  2016. }
  2017. if (this.prescription['conductivity'] == 0) {
  2018. this.dialysisPrescription['conductivity'] = ''
  2019. }
  2020. if (this.prescription['replacement_total'] == 0) {
  2021. this.dialysisPrescription['replacement_total'] = ''
  2022. }
  2023. if (this.prescription['target_ktv'] == 0) {
  2024. this.dialysisPrescription['target_ktv'] = ''
  2025. }
  2026. }
  2027. },
  2028. 'solution.id': function() {
  2029. if (this.solution.id > 0) {
  2030. if (this.prescription != null && typeof (this.prescription.id) !== 'undefined' && this.prescription.id > 0) {
  2031. for (const key in this.prescription) {
  2032. this.dialysisPrescription[key] = this.prescription[key]
  2033. }
  2034. if (this.prescription['dialysate_formulation'] == 0) {
  2035. this.dialysisPrescription['dialysate_formulation'] = ''
  2036. }
  2037. if (this.prescription['anticoagulant'] == 0) {
  2038. this.dialysisPrescription['anticoagulant'] = ''
  2039. }
  2040. if (this.prescription['dialysis_duration_hour'] == 0) {
  2041. this.dialysisPrescription['dialysis_duration_hour'] = ''
  2042. }
  2043. if (this.prescription['dialysis_duration_minute'] == 0) {
  2044. this.dialysisPrescription['dialysis_duration_minute'] = ''
  2045. }
  2046. if (this.prescription['blood_flow_volume'] == 0) {
  2047. this.dialysisPrescription['blood_flow_volume'] = ''
  2048. }
  2049. if (this.prescription['target_ultrafiltration'] == 0) {
  2050. this.dialysisPrescription['target_ultrafiltration'] = ''
  2051. }
  2052. if (this.prescription['dialysate_temperature'] == 0) {
  2053. this.dialysisPrescription['dialysate_temperature'] = ''
  2054. }
  2055. if (this.prescription['anticoagulant_shouji'] == 0) {
  2056. this.dialysisPrescription['anticoagulant_shouji'] = ''
  2057. }
  2058. if (this.prescription['anticoagulant_weichi'] == 0) {
  2059. this.dialysisPrescription['anticoagulant_weichi'] = ''
  2060. }
  2061. if (this.prescription['anticoagulant_zongliang'] == 0) {
  2062. this.dialysisPrescription['anticoagulant_zongliang'] = ''
  2063. }
  2064. if (this.prescription['anticoagulant_gaijiliang'] == 0) {
  2065. this.dialysisPrescription['anticoagulant_gaijiliang'] = ''
  2066. }
  2067. if (this.prescription['kalium'] == 0) {
  2068. this.dialysisPrescription['kalium'] = ''
  2069. }
  2070. if (this.prescription['sodium'] == 0) {
  2071. this.dialysisPrescription['sodium'] = ''
  2072. }
  2073. if (this.prescription['calcium'] == 0) {
  2074. this.dialysisPrescription['calcium'] = ''
  2075. }
  2076. if (this.prescription['bicarbonate'] == 0) {
  2077. this.dialysisPrescription['bicarbonate'] = ''
  2078. }
  2079. if (this.prescription['glucose'] == 0) {
  2080. this.dialysisPrescription['glucose'] = ''
  2081. }
  2082. if (this.prescription['dialysate_flow'] == 0) {
  2083. this.dialysisPrescription['dialysate_flow'] = ''
  2084. }
  2085. if (this.prescription['conductivity'] == 0) {
  2086. this.dialysisPrescription['conductivity'] = ''
  2087. }
  2088. if (this.prescription['replacement_total'] == 0) {
  2089. this.dialysisPrescription['replacement_total'] = ''
  2090. }
  2091. if (this.prescription['target_ktv'] == 0) {
  2092. this.dialysisPrescription['target_ktv'] = ''
  2093. }
  2094. } else if (this.solution != null && typeof this.solution.id !== 'undefined' && this.solution.id) {
  2095. for (const key in this.solution) {
  2096. this.dialysisPrescription[key] = this.solution[key]
  2097. }
  2098. if (this.solution['dialysate_formulation'] == 0) {
  2099. this.dialysisPrescription['dialysate_formulation'] = ''
  2100. }
  2101. if (this.solution['anticoagulant'] == 0) {
  2102. this.dialysisPrescription['anticoagulant'] = ''
  2103. }
  2104. if (this.solution['dialysis_duration_hour'] == 0) {
  2105. this.dialysisPrescription['dialysis_duration_hour'] = ''
  2106. }
  2107. if (this.solution['dialysis_duration_minute'] == 0) {
  2108. this.dialysisPrescription['dialysis_duration_minute'] = ''
  2109. }
  2110. if (this.solution['blood_flow_volume'] == 0) {
  2111. this.dialysisPrescription['blood_flow_volume'] = ''
  2112. }
  2113. if (this.solution['target_ultrafiltration'] == 0) {
  2114. this.dialysisPrescription['target_ultrafiltration'] = ''
  2115. }
  2116. if (this.solution['dialysate_temperature'] == 0) {
  2117. this.dialysisPrescription['dialysate_temperature'] = ''
  2118. }
  2119. if (this.solution['anticoagulant_shouji'] == 0) {
  2120. this.dialysisPrescription['anticoagulant_shouji'] = ''
  2121. }
  2122. if (this.solution['anticoagulant_weichi'] == 0) {
  2123. this.dialysisPrescription['anticoagulant_weichi'] = ''
  2124. }
  2125. if (this.solution['anticoagulant_zongliang'] == 0) {
  2126. this.dialysisPrescription['anticoagulant_zongliang'] = ''
  2127. }
  2128. if (this.solution['anticoagulant_gaijiliang'] == 0) {
  2129. this.dialysisPrescription['anticoagulant_gaijiliang'] = ''
  2130. }
  2131. if (this.solution['kalium'] == 0) {
  2132. this.dialysisPrescription['kalium'] = ''
  2133. }
  2134. if (this.solution['sodium'] == 0) {
  2135. this.dialysisPrescription['sodium'] = ''
  2136. }
  2137. if (this.solution['calcium'] == 0) {
  2138. this.dialysisPrescription['calcium'] = ''
  2139. }
  2140. if (this.solution['bicarbonate'] == 0) {
  2141. this.dialysisPrescription['bicarbonate'] = ''
  2142. }
  2143. if (this.solution['glucose'] == 0) {
  2144. this.dialysisPrescription['glucose'] = ''
  2145. }
  2146. if (this.solution['dialysate_flow'] == 0) {
  2147. this.dialysisPrescription['dialysate_flow'] = ''
  2148. }
  2149. if (this.solution['conductivity'] == 0) {
  2150. this.dialysisPrescription['conductivity'] = ''
  2151. }
  2152. if (this.solution['replacement_total'] == 0) {
  2153. this.dialysisPrescription['replacement_total'] = ''
  2154. }
  2155. if (this.solution['target_ktv'] == 0) {
  2156. this.dialysisPrescription['target_ktv'] = ''
  2157. }
  2158. }
  2159. }
  2160. }
  2161. }
  2162. }
  2163. </script>
  2164. <style rel="stylesheet/scss" lang="scss" scoped>
  2165. .el-checkbox, .el-checkbox__input {
  2166. vertical-align: middle;
  2167. }
  2168. .newLine {
  2169. display: flex;
  2170. justify-content: space-between;
  2171. height: 40px;
  2172. line-height: 40px;
  2173. border-bottom: 1px solid #ccc;
  2174. }
  2175. </style>