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

dialysisPrescriptionDialog.vue 117KB

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