dialysisPrescriptionDialog.vue 123KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634
  1. <template>
  2. <div>
  3. <el-dialog
  4. title="透析处方"
  5. :visible.sync="isVisibility"
  6. width="1010px"
  7. :modal-append-to-body="false"
  8. :append-to-body="true"
  9. class="newDialog"
  10. >
  11. <el-button
  12. style="position: absolute;left: 12%;top: 2%"
  13. @click="handlePatientInfo"
  14. >{{ patient.name }}</el-button
  15. >
  16. <div class="warnTxt" v-if="showTxt != ''">{{ showTxt }}</div>
  17. <el-form
  18. ref="dialysisPrescription"
  19. :model="dialysisPrescription"
  20. label-width="148px"
  21. >
  22. <el-row :gutter="24">
  23. <el-col :span="8" v-if="isShows('透析模式')">
  24. <el-form-item label="透析模式">
  25. <el-select
  26. v-model="dialysisPrescription.mode_id"
  27. @change="changePrescription(dialysisPrescription.mode_id)"
  28. >
  29. <el-option :key="0" label="请选择" :value="0"></el-option>
  30. <el-option
  31. v-for="(item, index) in treatment_mode"
  32. :label="item.name"
  33. :value="item.id"
  34. :key="index + 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. if(this.$route.query.date){
  904. return uParseTime(this.$route.query.date, '{y}/{m}/{d}')
  905. }else{
  906. return this.record_date
  907. }
  908. }
  909. },
  910. data() {
  911. return {
  912. showTxt: '',
  913. hasPermission: true,
  914. zhiShow: false,
  915. totalShow: false,
  916. huShow: false,
  917. showName: '',
  918. isShowRemindAdvice: false,
  919. checkedCities: [],
  920. isVisibility: false,
  921. isShowTime: false,
  922. isClose: false,
  923. isShow: false,
  924. record_date: '',
  925. time: '',
  926. treatment_mode: [],
  927. timeValue: '',
  928. deviceList: [],
  929. replacement_ways: [],
  930. anticoagulantsConfit: {},
  931. dialysate_formulation_options: [],
  932. add_weight: 0,
  933. body_fluid_option: [],
  934. special_medicine_option: [],
  935. displace_liqui_part_option: [],
  936. blood_access_option: [],
  937. is_pre: 0,
  938. msgtip_visibility: false,
  939. dialysisPrescription: {
  940. replacement_total: '',
  941. mode_id: '',
  942. dialysis_duration: '',
  943. dialysis_duration_hour: '',
  944. dialysis_duration_minute: '',
  945. mode_name: '',
  946. dialyzer: '',
  947. perfusion_apparatus: '',
  948. blood_flow_volume: '',
  949. dewater_amount: '',
  950. displace_liqui: '',
  951. replacement_way: '',
  952. anticoagulant: '',
  953. anticoagulant_shouji: '',
  954. anticoagulant_weichi: '',
  955. anticoagulant_zongliang: '',
  956. anticoagulant_gaimingcheng: '',
  957. anticoagulant_gaijiliang: '',
  958. kalium: '',
  959. sodium: '',
  960. calcium: '',
  961. bicarbonate: '',
  962. glucose: '',
  963. dry_weight: '',
  964. dialysate_flow: '',
  965. dialysate_temperature: '',
  966. target_ultrafiltration: '',
  967. dialysate_formulation: '',
  968. conductivity: '',
  969. doctor: '',
  970. remark: '',
  971. dialyzer_perfusion_apparatus: '',
  972. body_fluid: '',
  973. body_fluid_other: '',
  974. special_medicine: '',
  975. special_medicine_other: '',
  976. displace_liqui_part: '',
  977. displace_liqui_value: '',
  978. ultrafiltration: '',
  979. blood_access: '',
  980. niprocart: '',
  981. jms: '',
  982. fistula_needle_set: '',
  983. fistula_needle_set_16: '',
  984. hemoperfusion: '',
  985. dialyser_sterilised: '',
  986. filtryzer: '',
  987. target_ktv: '',
  988. dialyzers: '',
  989. injector: '',
  990. bloodlines: '',
  991. tubing_hemodialysis: '',
  992. package: '',
  993. a_liquid: '',
  994. no_anticoagulant_shouji: '0',
  995. no_anticoagulant_weichi: '0',
  996. no_anticoagulant_zongliang: '0',
  997. creater: 0
  998. },
  999. anticoagulant: {
  1000. id: 0,
  1001. name: '',
  1002. type: 1,
  1003. shouji: 1,
  1004. weichi: 1,
  1005. zongliang: 1,
  1006. gaimingcheng: -1,
  1007. gaijiliang: -1,
  1008. shouji_unit: 'mg',
  1009. weichi_unit: 'mg/h',
  1010. zongliang_unit: 'mg',
  1011. gaimingcheng_unit: '',
  1012. gaijiliang_unit: ''
  1013. },
  1014. doctorAdvices: [],
  1015. dialyzerPerfusionApparatus: []
  1016. }
  1017. },
  1018. methods: {
  1019. getDryWeight() {
  1020. if (this.dry_weight != null && this.dry_weight.id > 0) {
  1021. return this.dry_weight.dry_weight
  1022. } else {
  1023. if (this.last_predialysis != null && this.last_predialysis.id > 0) {
  1024. return this.last_predialysis.dry_weight
  1025. } else {
  1026. return ''
  1027. }
  1028. }
  1029. },
  1030. getLastAfterWeight(record) {
  1031. if (record != null && record.id > 0) {
  1032. if (record.weight_after > 0) {
  1033. let additional_weight = 0
  1034. if (this.predialysis.additional_weight != undefined) {
  1035. additional_weight = this.predialysis.additional_weight
  1036. }
  1037. return parseFloat(record.weight_after - additional_weight).toFixed(1)
  1038. } else {
  1039. return ''
  1040. }
  1041. }
  1042. },
  1043. getBeforeWeight(predialysis) {
  1044. if (predialysis.id > 0) {
  1045. if (predialysis.weight_before > 0) {
  1046. return predialysis.weight_before - predialysis.additional_weight
  1047. } else {
  1048. return ''
  1049. }
  1050. }
  1051. },
  1052. getAfterWeight(record) {
  1053. if (record.id > 0) {
  1054. if (record.weight_after > 0) {
  1055. return record.weight_after - this.predialysis.additional_weight
  1056. } else {
  1057. return ''
  1058. }
  1059. }
  1060. },
  1061. setLastRecord: function(
  1062. schedual,
  1063. lastAssessmentAfterDislysis,
  1064. lastPredialysisEvaluation,
  1065. lastDialysisPrescribe,
  1066. lastDryWeightDislysis,
  1067. system_prescribe
  1068. ) {
  1069. this.treatment_mode = this.$store.getters.treatment_mode
  1070. this.perfusion_apparatus = getDataConfig(
  1071. 'hemodialysis',
  1072. 'perfusion_apparatus'
  1073. )
  1074. this.replacement_ways = getDataConfig('hemodialysis', 'replacement_ways')
  1075. this.dialysate_formulation_options = getDataConfig(
  1076. 'hemodialysis',
  1077. 'dialysate_formulation'
  1078. )
  1079. // this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit
  1080. var anticoagulantsConfitOne = this.$store.getters.anticoagulants_confit
  1081. // for (let i = 0; i < anticoagulantsConfitOne.length; i++) {
  1082. // console.log('anticoagulantsConfitOne', anticoagulantsConfitOne[i].name)
  1083. // }
  1084. // var anticoagulantsConfit = getDataConfig('hemodialysis', 'anticoagulant')
  1085. // const arr = []
  1086. // anticoagulantsConfit.map((item, index) => {
  1087. // const objChild = { ...item }
  1088. // arr.push(objChild)
  1089. // })
  1090. // var arrthree = {}
  1091. // arrthree = { ...arr }
  1092. // console.log('arrthree', arrthree)
  1093. const arrFour = []
  1094. Object.keys(anticoagulantsConfitOne).map((item, index) => {
  1095. if (index != 2) {
  1096. arrFour.push(anticoagulantsConfitOne[item])
  1097. }
  1098. })
  1099. console.log('arrFour', arrFour)
  1100. this.anticoagulantsConfit = arrFour
  1101. this.dialysisList = this.devices
  1102. this.body_fluid_option = this.$store.getters.body_fluid
  1103. this.special_medicine_option = this.$store.getters.special_medicine
  1104. this.displace_liqui_part_option = this.$store.getters.displace_liqui
  1105. // this.blood_access_option = this.$store.getters.blood_access_internal_fistula;
  1106. this.blood_access_option = getDataConfig(
  1107. 'hemodialysis',
  1108. 'vascular_access_desc'
  1109. )
  1110. console.log('血管通路', this.blood_access_option)
  1111. this.dialyzerPerfusionApparatus = getDataConfig(
  1112. 'hemodialysis',
  1113. 'dialyzer_perfusion_apparatus'
  1114. )
  1115. console.log('灌流器', this.dialyzerPerfusionApparatus)
  1116. if (this.$route.query && this.$route.query.date) {
  1117. var date = this.$route.query && this.$route.query.date
  1118. this.record_date = uParseTime(date, '{y}-{m}-{d}')
  1119. } else {
  1120. var date = schedual.schedule_date
  1121. this.record_date = uParseTime(date, '{y}-{m}-{d}')
  1122. }
  1123. if (
  1124. this.prescription != null &&
  1125. typeof this.prescription.id !== 'undefined' &&
  1126. this.prescription.id > 0
  1127. ) {
  1128. for (const key in this.prescription) {
  1129. this.dialysisPrescription[key] = this.prescription[key]
  1130. }
  1131. } else if (
  1132. this.solution != null &&
  1133. typeof this.solution.id !== 'undefined' &&
  1134. this.solution.id > 0
  1135. ) {
  1136. for (const key in this.solution) {
  1137. if (key != 'target_ultrafiltration') {
  1138. this.dialysisPrescription[key] = this.solution[key]
  1139. }
  1140. }
  1141. } else if (
  1142. lastDialysisPrescribe != null &&
  1143. typeof lastDialysisPrescribe.id !== 'undefined' &&
  1144. lastDialysisPrescribe.id > 0
  1145. ) {
  1146. for (const key in lastDialysisPrescribe) {
  1147. if (key != 'target_ultrafiltration') {
  1148. this.dialysisPrescription[key] = lastDialysisPrescribe[key]
  1149. }
  1150. }
  1151. } else if (
  1152. system_prescribe != null &&
  1153. typeof system_prescribe.id !== 'undefined' &&
  1154. system_prescribe.id > 0
  1155. ) {
  1156. for (const key in system_prescribe) {
  1157. if (key != 'target_ultrafiltration') {
  1158. this.dialysisPrescription[key] = system_prescribe[key]
  1159. }
  1160. }
  1161. } else {
  1162. console.log('排班----------', schedual.mode_id)
  1163. if (
  1164. schedual.mode_id == 2 ||
  1165. schedual.mode_id == 5 ||
  1166. schedual.mode_id == 12
  1167. ) {
  1168. console.log('进来----')
  1169. this.zhiShow = true
  1170. this.huShow = true
  1171. this.totalShow = true
  1172. } else {
  1173. this.zhiShow = false
  1174. this.huShow = false
  1175. this.totalShow = false
  1176. }
  1177. this.dialysisPrescription.mode_id = schedual.mode_id
  1178. }
  1179. var thismode = parseInt(this.dialysisPrescription.anticoagulant)
  1180. if (isNaN(thismode) || thismode <= 0) {
  1181. return false
  1182. }
  1183. if (
  1184. typeof this.anticoagulantsConfit[thismode] === 'undefined' ||
  1185. this.anticoagulantsConfit[thismode] == null
  1186. ) {
  1187. return false
  1188. }
  1189. this.anticoagulant = this.$store.getters.anticoagulants_confit[thismode]
  1190. },
  1191. menuMsgTip: function() {
  1192. this.msgtip_visibility = false
  1193. this.isVisibility = true
  1194. },
  1195. handleAdviceCommit() {
  1196. let results = []
  1197. for (let i = 0; i < this.targetAdvices.length; i++) {
  1198. for (let a = 0; a < this.checkedCities.length; a++) {
  1199. if (this.targetAdvices[i].id == this.checkedCities[a]) {
  1200. results.push(this.targetAdvices[i])
  1201. }
  1202. }
  1203. }
  1204. var obj5 = {}
  1205. results = results.reduce((cur, next) => {
  1206. obj5[next.id] ? '' : (obj5[next.id] = true && cur.push(next))
  1207. return cur
  1208. }, [])
  1209. var date = new Date()
  1210. var hour = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
  1211. var minute =
  1212. date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
  1213. if (results.length > 0) {
  1214. if (this.is_pre == 1) {
  1215. if (this.patient.id <= 0) {
  1216. this.$message.error('没有选择患者')
  1217. this.loading = false
  1218. return
  1219. }
  1220. var arr = this.dialysisPrescription
  1221. console.log('arr', arr)
  1222. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  1223. if (
  1224. parseInt(arr.dialyzer_perfusion_apparatus) ==
  1225. this.dialyzerPerfusionApparatus[i].id
  1226. ) {
  1227. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  1228. i
  1229. ].name
  1230. }
  1231. }
  1232. const ParamsQuery = arr
  1233. console.log('医嘱推送2', ParamsQuery)
  1234. ParamsQuery['patient'] = this.patient.id
  1235. ParamsQuery['record_date'] = this.record_date
  1236. if (this.prescription.creater <= 0) {
  1237. ParamsQuery['mode'] = '1'
  1238. } else {
  1239. ParamsQuery['mode'] = '2'
  1240. if (
  1241. this.$store.getters.xt_user.user.id !=
  1242. this.dialysisPrescription.creater
  1243. ) {
  1244. ParamsQuery['mode'] = '3'
  1245. }
  1246. }
  1247. postPrescription(ParamsQuery).then(response => {
  1248. if (response.data.state == 0) {
  1249. this.$message.error(response.data.msg)
  1250. return false
  1251. } else {
  1252. this.$notify({
  1253. title: '成功',
  1254. message: '提交成功',
  1255. type: 'success',
  1256. duration: 2000
  1257. })
  1258. var date = new Date()
  1259. var hour =
  1260. date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
  1261. var minute =
  1262. date.getMinutes() < 10
  1263. ? '0' + date.getMinutes()
  1264. : date.getMinutes()
  1265. const params = {
  1266. advices: results,
  1267. advice_date: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
  1268. advice_doctor: results[0].advice_doctor,
  1269. advice_type: results[0].advice_type,
  1270. parent_id: this.patient_id,
  1271. start_time:
  1272. uParseTime(this.$route.query.date, '{y}-{m}-{d}') +
  1273. ' ' +
  1274. hour +
  1275. ':' +
  1276. minute,
  1277. remark: ''
  1278. }
  1279. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(
  1280. rs => {
  1281. var resp = rs.data
  1282. if (resp.state == 1) {
  1283. this.doctorAdvices = resp.data.advices
  1284. this.$emit('advice')
  1285. } else {
  1286. }
  1287. }
  1288. )
  1289. const prescription_resp = response.data.data.prescription
  1290. var prescription = this.prescription
  1291. for (var index in prescription_resp) {
  1292. // prescription[index] = prescription_resp[index];
  1293. this.$set(prescription, index, prescription_resp[index])
  1294. }
  1295. this.hide()
  1296. }
  1297. })
  1298. } else if (this.is_pre == 2) {
  1299. if (this.patient.id <= 0) {
  1300. this.$message.error('没有选择患者')
  1301. this.loading = false
  1302. return
  1303. }
  1304. var arr = this.dialysisPrescription
  1305. console.log('arr', arr)
  1306. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  1307. if (
  1308. parseInt(arr.dialyzer_perfusion_apparatus) ==
  1309. this.dialyzerPerfusionApparatus[i].id
  1310. ) {
  1311. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  1312. i
  1313. ].name
  1314. }
  1315. }
  1316. const ParamsQuery = arr
  1317. console.log('医嘱推送3', ParamsQuery)
  1318. ParamsQuery['patient'] = this.patient.id
  1319. ParamsQuery['record_date'] = this.record_date
  1320. ParamsQuery['mode'] = 1
  1321. postSoulution(ParamsQuery).then(response => {
  1322. if (response.data.state == 0) {
  1323. this.$message.error(response.data.msg)
  1324. return false
  1325. } else {
  1326. this.$notify({
  1327. title: '成功',
  1328. message: '提交成功',
  1329. type: 'success',
  1330. duration: 2000
  1331. })
  1332. console.log(hour + ':' + minute)
  1333. var date = new Date()
  1334. var hour =
  1335. date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
  1336. var minute =
  1337. date.getMinutes() < 10
  1338. ? '0' + date.getMinutes()
  1339. : date.getMinutes()
  1340. const params = {
  1341. advices: results,
  1342. advice_date: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
  1343. advice_doctor: results[0].advice_doctor,
  1344. advice_type: results[0].advice_type,
  1345. parent_id: this.patient_id,
  1346. start_time:
  1347. uParseTime(this.$route.query.date, '{y}-{m}-{d}') +
  1348. ' ' +
  1349. hour +
  1350. ':' +
  1351. minute,
  1352. remark: ''
  1353. }
  1354. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(
  1355. rs => {
  1356. var resp = rs.data
  1357. if (resp.state == 1) {
  1358. // this.doctorAdvices = resp.data.advices
  1359. this.$emit('advice')
  1360. } else {
  1361. }
  1362. }
  1363. )
  1364. const prescription_resp = response.data.data.prescription
  1365. const solution_resp = response.data.data.solution
  1366. var prescription = this.prescription
  1367. var solution = this.solution
  1368. for (var index in prescription_resp) {
  1369. // prescription[index] = prescription_resp[index];
  1370. this.$set(prescription, index, prescription_resp[index])
  1371. }
  1372. for (var index in solution_resp) {
  1373. // solution[index] = solution_resp[index];
  1374. this.$set(solution, index, solution_resp[index])
  1375. }
  1376. this.hide()
  1377. }
  1378. })
  1379. }
  1380. } else {
  1381. if (this.is_pre == 1) {
  1382. if (this.patient.id <= 0) {
  1383. this.$message.error('没有选择患者')
  1384. this.loading = false
  1385. return
  1386. }
  1387. var arr = this.dialysisPrescription
  1388. console.log('arr', arr)
  1389. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  1390. if (
  1391. parseInt(arr.dialyzer_perfusion_apparatus) ==
  1392. this.dialyzerPerfusionApparatus[i].id
  1393. ) {
  1394. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  1395. i
  1396. ].name
  1397. }
  1398. }
  1399. const ParamsQuery = arr
  1400. console.log('医嘱推送4', ParamsQuery)
  1401. ParamsQuery['patient'] = this.patient.id
  1402. ParamsQuery['record_date'] = this.record_date
  1403. console.log(this.prescription)
  1404. let mode = ''
  1405. if (this.prescription.creater <= 0) {
  1406. mode = 1
  1407. } else {
  1408. mode = 2
  1409. }
  1410. ParamsQuery['mode'] = mode
  1411. postPrescription(ParamsQuery).then(response => {
  1412. if (response.data.state == 0) {
  1413. this.$message.error(response.data.msg)
  1414. return false
  1415. } else {
  1416. this.$notify({
  1417. title: '成功',
  1418. message: '提交成功',
  1419. type: 'success',
  1420. duration: 2000
  1421. })
  1422. const prescription_resp = response.data.data.prescription
  1423. var prescription = this.prescription
  1424. for (var index in prescription_resp) {
  1425. // prescription[index] = prescription_resp[index];
  1426. this.$set(prescription, index, prescription_resp[index])
  1427. }
  1428. this.hide()
  1429. }
  1430. })
  1431. } else if (this.is_pre == 2) {
  1432. if (this.patient.id <= 0) {
  1433. this.$message.error('没有选择患者')
  1434. this.loading = false
  1435. return
  1436. }
  1437. var arr = this.dialysisPrescription
  1438. console.log('arr', arr)
  1439. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  1440. if (
  1441. parseInt(arr.dialyzer_perfusion_apparatus) ==
  1442. this.dialyzerPerfusionApparatus[i].id
  1443. ) {
  1444. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  1445. i
  1446. ].name
  1447. }
  1448. }
  1449. const ParamsQuery = arr
  1450. console.log('医嘱推送5', ParamsQuery)
  1451. ParamsQuery['patient'] = this.patient.id
  1452. ParamsQuery['record_date'] = this.record_date
  1453. ParamsQuery['mode'] = 1
  1454. postSoulution(ParamsQuery).then(response => {
  1455. if (response.data.state == 0) {
  1456. this.$message.error(response.data.msg)
  1457. return false
  1458. } else {
  1459. this.$notify({
  1460. title: '成功',
  1461. message: '提交成功',
  1462. type: 'success',
  1463. duration: 2000
  1464. })
  1465. const prescription_resp = response.data.data.prescription
  1466. const solution_resp = response.data.data.solution
  1467. var prescription = this.prescription
  1468. var solution = this.solution
  1469. for (var index in prescription_resp) {
  1470. // prescription[index] = prescription_resp[index];
  1471. this.$set(prescription, index, prescription_resp[index])
  1472. }
  1473. for (var index in solution_resp) {
  1474. // solution[index] = solution_resp[index];
  1475. this.$set(solution, index, solution_resp[index])
  1476. }
  1477. this.hide()
  1478. }
  1479. })
  1480. }
  1481. }
  1482. this.isShowRemindAdvice = false
  1483. this.isVisibility = true
  1484. },
  1485. handleAdviceCancle() {
  1486. this.isShowRemindAdvice = false
  1487. this.isVisibility = true
  1488. },
  1489. getTime(val) {
  1490. return uParseTime(val, '{y}-{m}-{d} {h}:{i}')
  1491. },
  1492. show(pre) {
  1493. if (pre.id == 0) {
  1494. this.dialysisPrescription.anticoagulant = '低分子肝素'
  1495. }
  1496. if (pre.anticoagulant == 3) {
  1497. this.dialysisPrescription.anticoagulant = '低分子肝素'
  1498. }
  1499. // 入口
  1500. var pre = pre
  1501. // console.log("pre是----", pre);
  1502. if (pre.mode_id == 2 || pre.mode_id == 5 || pre.mode_id == 12) {
  1503. this.zhiShow = true
  1504. this.huShow = true
  1505. this.totalShow = true
  1506. } else if (
  1507. pre.mode_id == 1 ||
  1508. pre.mode_id == 3 ||
  1509. pre.mode_id == 4 ||
  1510. pre.mode_id == 6 ||
  1511. pre.mode_id == 7 ||
  1512. pre.mode_id == 8 ||
  1513. pre.mode_id == 9 ||
  1514. pre.mode_id == 10 ||
  1515. pre.mode_id == 11 ||
  1516. pre.mode_id == 13 ||
  1517. pre.mode_id == 14 ||
  1518. pre.mode_id == 19
  1519. ) {
  1520. this.zhiShow = false
  1521. this.huShow = false
  1522. this.totalShow = false
  1523. }
  1524. this.pre = pre
  1525. // console.log("pre1", pre);
  1526. this.getPermission()
  1527. let last_weight_after = 0
  1528. let weight_before = 0
  1529. if (this.last_record == null) {
  1530. last_weight_after = 0
  1531. } else {
  1532. last_weight_after = this.last_record.weight_after
  1533. }
  1534. if (this.predialysis == null || this.predialysis.id == 0) {
  1535. weight_before = 0
  1536. } else {
  1537. weight_before = this.predialysis.weight_before
  1538. }
  1539. if (weight_before > 0 && last_weight_after > 0) {
  1540. this.add_weight = parseFloat(weight_before - last_weight_after).toFixed(
  1541. 2
  1542. )
  1543. console.log('体重增加', this.add_weight)
  1544. }
  1545. this.isVisibility = true
  1546. this.checkedCities = []
  1547. for (let i = 0; i < this.targetAdvices.length; i++) {
  1548. if (this.targetAdvices[i].isCheck == 1) {
  1549. this.checkedCities.push(this.targetAdvices[i].id)
  1550. }
  1551. }
  1552. },
  1553. hide() {
  1554. this.isVisibility = false
  1555. },
  1556. changeThisAnticoagulant: function(val) {
  1557. var thismode = val
  1558. if (isNaN(thismode) || thismode <= 0) {
  1559. return false
  1560. }
  1561. if (val <= 2) {
  1562. this.anticoagulant = this.anticoagulantsConfit[thismode - 1]
  1563. }
  1564. if (val > 2) {
  1565. this.anticoagulant = this.anticoagulantsConfit[thismode - 2]
  1566. }
  1567. if (this.$store.getters.xt_user.template_info.template_id == 13 && val == 2) {
  1568. this.anticoagulant.shouji_unit = 'mg'
  1569. this.anticoagulant.weichi_unit = 'mg/h'
  1570. this.anticoagulant.zongliang_unit = 'mg'
  1571. }
  1572. },
  1573. handleCommit: function() {
  1574. if (this.dialysisPrescription.anticoagulant == '低分子肝素') {
  1575. this.dialysisPrescription.anticoagulant = 3
  1576. }
  1577. if (this.dialysisPrescription.anticoagulant == 1) {
  1578. this.dialysisPrescription.anticoagulant_weichi = '0'
  1579. this.dialysisPrescription.anticoagulant_shouji = '0'
  1580. this.dialysisPrescription.anticoagulant_zongliang = '0'
  1581. }
  1582. if (this.$store.getters.xt_user.template_info.template_id == 6) {
  1583. if (this.dialysisPrescription.mode_id == 2) {
  1584. if (
  1585. this.dialysisPrescription.displace_liqui_part == 0 ||
  1586. this.dialysisPrescription.displace_liqui_part == -2 ||
  1587. this.dialysisPrescription.displace_liqui_value == 0 ||
  1588. this.dialysisPrescription.displace_liqui_value == ''
  1589. ) {
  1590. this.$message.error('HDF模式下置换液和置换液总量不能为空!')
  1591. return
  1592. }
  1593. }
  1594. }
  1595. this.is_pre = 1
  1596. if (this.prescription.id == 0) {
  1597. if (this.is_open == 0) {
  1598. if (this.patient.id <= 0) {
  1599. this.$message.error('没有选择患者')
  1600. this.loading = false
  1601. return
  1602. }
  1603. var arr = this.dialysisPrescription
  1604. console.log('arr', arr)
  1605. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  1606. if (
  1607. parseInt(arr.dialyzer_perfusion_apparatus) == this.dialyzerPerfusionApparatus[i].id) {
  1608. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[i].name
  1609. }
  1610. }
  1611. const ParamsQuery = arr
  1612. console.log('night', ParamsQuery)
  1613. ParamsQuery['patient'] = this.patient.id
  1614. ParamsQuery['record_date'] = this.record_date
  1615. ParamsQuery['mode'] = '1'
  1616. postPrescription(ParamsQuery).then(response => {
  1617. if (response.data.state == 0) {
  1618. this.$message.error(response.data.msg)
  1619. return false
  1620. } else {
  1621. this.$notify({
  1622. title: '成功',
  1623. message: '提交成功',
  1624. type: 'success',
  1625. duration: 2000
  1626. })
  1627. const prescription_resp = response.data.data.prescription
  1628. var prescription = this.prescription
  1629. for (var index in prescription_resp) {
  1630. // prescription[index] = prescription_resp[index];
  1631. this.$set(prescription, index, prescription_resp[index])
  1632. }
  1633. this.hide()
  1634. }
  1635. })
  1636. } else if (this.is_open == 1) {
  1637. if (this.targetAdvices.length > 0) {
  1638. // 弹框推送提醒
  1639. this.isShowRemindAdvice = true
  1640. this.isVisibility = false
  1641. } else {
  1642. if (this.patient.id <= 0) {
  1643. this.$message.error('没有选择患者')
  1644. this.loading = false
  1645. return
  1646. }
  1647. var arr = this.dialysisPrescription
  1648. console.log('arr', arr)
  1649. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  1650. if (
  1651. parseInt(arr.dialyzer_perfusion_apparatus) ==
  1652. this.dialyzerPerfusionApparatus[i].id
  1653. ) {
  1654. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  1655. i
  1656. ].name
  1657. }
  1658. }
  1659. const ParamsQuery = arr
  1660. console.log('ParamsQuerytwo', ParamsQuery)
  1661. ParamsQuery['patient'] = this.patient.id
  1662. ParamsQuery['record_date'] = this.record_date
  1663. ParamsQuery['mode'] = '1'
  1664. postPrescription(ParamsQuery).then(response => {
  1665. if (response.data.state == 0) {
  1666. this.$message.error(response.data.msg)
  1667. return false
  1668. } else {
  1669. this.$notify({
  1670. title: '成功',
  1671. message: '提交成功',
  1672. type: 'success',
  1673. duration: 2000
  1674. })
  1675. const prescription_resp = response.data.data.prescription
  1676. var prescription = this.prescription
  1677. for (var index in prescription_resp) {
  1678. // prescription[index] = prescription_resp[index];
  1679. this.$set(prescription, index, prescription_resp[index])
  1680. }
  1681. this.hide()
  1682. }
  1683. })
  1684. }
  1685. } else if (this.is_open == 2) {
  1686. var date = new Date()
  1687. var hour =
  1688. date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
  1689. var minute =
  1690. date.getMinutes() < 10
  1691. ? '0' + date.getMinutes()
  1692. : date.getMinutes()
  1693. if (this.waitUploadAdvices.length > 0) {
  1694. if (this.patient.id <= 0) {
  1695. this.$message.error('没有选择患者')
  1696. this.loading = false
  1697. return
  1698. }
  1699. var arr = this.dialysisPrescription
  1700. console.log('arr', arr)
  1701. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  1702. if (
  1703. parseInt(arr.dialyzer_perfusion_apparatus) ==
  1704. this.dialyzerPerfusionApparatus[i].id
  1705. ) {
  1706. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  1707. i
  1708. ].name
  1709. }
  1710. }
  1711. const ParamsQuery = arr
  1712. console.log('paramsquerythree', ParamsQuery)
  1713. ParamsQuery['patient'] = this.patient.id
  1714. ParamsQuery['record_date'] = this.record_date
  1715. ParamsQuery['mode'] = '1'
  1716. postPrescription(ParamsQuery).then(response => {
  1717. if (response.data.state == 0) {
  1718. this.$message.error(response.data.msg)
  1719. return false
  1720. } else {
  1721. this.$notify({
  1722. title: '成功',
  1723. message: '提交成功',
  1724. type: 'success',
  1725. duration: 2000
  1726. })
  1727. const params = {
  1728. advices: this.waitUploadAdvices,
  1729. advice_date: uParseTime(
  1730. this.$route.query.date,
  1731. '{y}-{m}-{d}'
  1732. ),
  1733. advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  1734. advice_type: this.waitUploadAdvices[0].advice_type,
  1735. parent_id: this.patient_id,
  1736. // start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
  1737. start_time:
  1738. uParseTime(this.$route.query.date, '{y}-{m}-{d}') +
  1739. ' ' +
  1740. hour +
  1741. ':' +
  1742. minute,
  1743. remark: ''
  1744. }
  1745. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(
  1746. rs => {
  1747. var resp = rs.data
  1748. if (resp.state == 1) {
  1749. // this.doctorAdvices = resp.data.advices
  1750. this.$emit('advice')
  1751. } else {
  1752. }
  1753. }
  1754. )
  1755. const prescription_resp = response.data.data.prescription
  1756. var prescription = this.prescription
  1757. for (var index in prescription_resp) {
  1758. // prescription[index] = prescription_resp[index];
  1759. this.$set(prescription, index, prescription_resp[index])
  1760. }
  1761. this.hide()
  1762. }
  1763. })
  1764. } else {
  1765. if (this.patient.id <= 0) {
  1766. this.$message.error('没有选择患者')
  1767. this.loading = false
  1768. return
  1769. }
  1770. var arr = this.dialysisPrescription
  1771. console.log('arr', arr)
  1772. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  1773. if (parseInt(arr.dialyzer_perfusion_apparatus) == this.dialyzerPerfusionApparatus[i].id) {
  1774. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[i].name
  1775. }
  1776. }
  1777. const ParamsQuery = arr
  1778. console.log('paramsqueryfour', ParamsQuery)
  1779. console.log('创建者', this.prescription.creater)
  1780. // if (this.prescription.creater <= 0) {
  1781. // mode = 1;
  1782. // } else {
  1783. // mode = 2;
  1784. // }
  1785. ParamsQuery['patient'] = this.patient.id
  1786. ParamsQuery['record_date'] = this.record_date
  1787. // console.log(this.prescription);
  1788. postPrescription(ParamsQuery).then(response => {
  1789. if (response.data.state == 0) {
  1790. this.$message.error(response.data.msg)
  1791. return false
  1792. } else {
  1793. this.$notify({
  1794. title: '成功',
  1795. message: '提交成功',
  1796. type: 'success',
  1797. duration: 2000
  1798. })
  1799. const prescription_resp = response.data.data.prescription
  1800. // console.log("aaaaaaa", prescription_resp);
  1801. var prescription = this.prescription
  1802. for (var index in prescription_resp) {
  1803. // prescription[index] = prescription_resp[index];
  1804. this.$set(prescription, index, prescription_resp[index])
  1805. }
  1806. this.hide()
  1807. }
  1808. })
  1809. }
  1810. }
  1811. } else {
  1812. if (this.prescription.creater == 0) {
  1813. if (this.is_open == 0) {
  1814. if (this.patient.id <= 0) {
  1815. this.$message.error('没有选择患者')
  1816. this.loading = false
  1817. return
  1818. }
  1819. var arr = this.dialysisPrescription
  1820. console.log('arr', arr)
  1821. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  1822. if (
  1823. parseInt(arr.dialyzer_perfusion_apparatus) ==
  1824. this.dialyzerPerfusionApparatus[i].id
  1825. ) {
  1826. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  1827. i
  1828. ].name
  1829. }
  1830. }
  1831. const ParamsQuery = arr
  1832. console.log('paramsqueryfive', ParamsQuery)
  1833. ParamsQuery['patient'] = this.patient.id
  1834. ParamsQuery['record_date'] = this.record_date
  1835. ParamsQuery['mode'] = '1'
  1836. postPrescription(ParamsQuery).then(response => {
  1837. if (response.data.state == 0) {
  1838. this.$message.error(response.data.msg)
  1839. return false
  1840. } else {
  1841. this.$notify({
  1842. title: '成功',
  1843. message: '提交成功',
  1844. type: 'success',
  1845. duration: 2000
  1846. })
  1847. const prescription_resp = response.data.data.prescription
  1848. var prescription = this.prescription
  1849. for (var index in prescription_resp) {
  1850. // prescription[index] = prescription_resp[index];
  1851. this.$set(prescription, index, prescription_resp[index])
  1852. }
  1853. this.hide()
  1854. }
  1855. })
  1856. } else if (this.is_open == 1) {
  1857. if (this.targetAdvices.length > 0) {
  1858. // 弹框推送提醒
  1859. this.isShowRemindAdvice = true
  1860. this.isVisibility = false
  1861. } else {
  1862. if (this.patient.id <= 0) {
  1863. this.$message.error('没有选择患者')
  1864. this.loading = false
  1865. return
  1866. }
  1867. var arr = this.dialysisPrescription
  1868. console.log('arr', arr)
  1869. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  1870. if (
  1871. parseInt(arr.dialyzer_perfusion_apparatus) ==
  1872. this.dialyzerPerfusionApparatus[i].id
  1873. ) {
  1874. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  1875. i
  1876. ].name
  1877. }
  1878. }
  1879. const ParamsQuery = arr
  1880. console.log('ParamsQuerysix', ParamsQuery)
  1881. ParamsQuery['patient'] = this.patient.id
  1882. ParamsQuery['record_date'] = this.record_date
  1883. ParamsQuery['mode'] = '1'
  1884. postPrescription(ParamsQuery).then(response => {
  1885. if (response.data.state == 0) {
  1886. this.$message.error(response.data.msg)
  1887. return false
  1888. } else {
  1889. this.$notify({
  1890. title: '成功',
  1891. message: '提交成功',
  1892. type: 'success',
  1893. duration: 2000
  1894. })
  1895. const prescription_resp = response.data.data.prescription
  1896. var prescription = this.prescription
  1897. for (var index in prescription_resp) {
  1898. // prescription[index] = prescription_resp[index];
  1899. this.$set(prescription, index, prescription_resp[index])
  1900. }
  1901. this.hide()
  1902. }
  1903. })
  1904. }
  1905. } else if (this.is_open == 2) {
  1906. var date = new Date()
  1907. var hour =
  1908. date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
  1909. var minute =
  1910. date.getMinutes() < 10
  1911. ? '0' + date.getMinutes()
  1912. : date.getMinutes()
  1913. if (this.waitUploadAdvices.length > 0) {
  1914. if (this.patient.id <= 0) {
  1915. this.$message.error('没有选择患者')
  1916. this.loading = false
  1917. return
  1918. }
  1919. var arr = this.dialysisPrescription
  1920. console.log('arr', arr)
  1921. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  1922. if (
  1923. parseInt(arr.dialyzer_perfusion_apparatus) ==
  1924. this.dialyzerPerfusionApparatus[i].id
  1925. ) {
  1926. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  1927. i
  1928. ].name
  1929. }
  1930. }
  1931. const ParamsQuery = arr
  1932. console.log('parasmqueryseven', parasmqueryseven)
  1933. ParamsQuery['patient'] = this.patient.id
  1934. ParamsQuery['record_date'] = this.record_date
  1935. ParamsQuery['mode'] = '1'
  1936. postPrescription(ParamsQuery).then(response => {
  1937. if (response.data.state == 0) {
  1938. this.$message.error(response.data.msg)
  1939. return false
  1940. } else {
  1941. this.$notify({
  1942. title: '成功',
  1943. message: '提交成功',
  1944. type: 'success',
  1945. duration: 2000
  1946. })
  1947. const params = {
  1948. advices: this.waitUploadAdvices,
  1949. advice_date: uParseTime(
  1950. this.$route.query.date,
  1951. '{y}-{m}-{d}'
  1952. ),
  1953. advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  1954. advice_type: this.waitUploadAdvices[0].advice_type,
  1955. parent_id: this.patient_id,
  1956. // start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
  1957. start_time:
  1958. uParseTime(this.$route.query.date, '{y}-{m}-{d}') +
  1959. ' ' +
  1960. hour +
  1961. ':' +
  1962. minute,
  1963. remark: ''
  1964. }
  1965. CreateGroupAdvice(
  1966. this.$route.query.patient_id,
  1967. 0,
  1968. params
  1969. ).then(rs => {
  1970. var resp = rs.data
  1971. if (resp.state == 1) {
  1972. // this.doctorAdvices = resp.data.advices
  1973. this.$emit('advice')
  1974. } else {
  1975. }
  1976. })
  1977. const prescription_resp = response.data.data.prescription
  1978. var prescription = this.prescription
  1979. for (var index in prescription_resp) {
  1980. // prescription[index] = prescription_resp[index];
  1981. this.$set(prescription, index, prescription_resp[index])
  1982. }
  1983. this.hide()
  1984. }
  1985. })
  1986. } else {
  1987. if (this.patient.id <= 0) {
  1988. this.$message.error('没有选择患者')
  1989. this.loading = false
  1990. return
  1991. }
  1992. var arr = this.dialysisPrescription
  1993. console.log('arr', arr)
  1994. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  1995. if (
  1996. parseInt(arr.dialyzer_perfusion_apparatus) ==
  1997. this.dialyzerPerfusionApparatus[i].id
  1998. ) {
  1999. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  2000. i
  2001. ].name
  2002. }
  2003. }
  2004. const ParamsQuery = arr
  2005. console.log('eight', ParamsQuery)
  2006. ParamsQuery['patient'] = this.patient.id
  2007. ParamsQuery['record_date'] = this.record_date
  2008. ParamsQuery['mode'] = '1'
  2009. postPrescription(ParamsQuery).then(response => {
  2010. if (response.data.state == 0) {
  2011. this.$message.error(response.data.msg)
  2012. return false
  2013. } else {
  2014. this.$notify({
  2015. title: '成功',
  2016. message: '提交成功',
  2017. type: 'success',
  2018. duration: 2000
  2019. })
  2020. const prescription_resp = response.data.data.prescription
  2021. var prescription = this.prescription
  2022. for (var index in prescription_resp) {
  2023. // prescription[index] = prescription_resp[index];
  2024. this.$set(prescription, index, prescription_resp[index])
  2025. }
  2026. this.hide()
  2027. }
  2028. })
  2029. }
  2030. }
  2031. } else {
  2032. if (this.patient.id <= 0) {
  2033. this.$message.error('没有选择患者')
  2034. this.loading = false
  2035. return
  2036. }
  2037. var arr = this.dialysisPrescription
  2038. console.log('arr', arr)
  2039. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  2040. if (
  2041. parseInt(arr.dialyzer_perfusion_apparatus) ==
  2042. this.dialyzerPerfusionApparatus[i].id
  2043. ) {
  2044. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  2045. i
  2046. ].name
  2047. }
  2048. }
  2049. const ParamsQuery = arr
  2050. console.log('night', ParamsQuery)
  2051. ParamsQuery['patient'] = this.patient.id
  2052. ParamsQuery['record_date'] = this.record_date
  2053. ParamsQuery['mode'] = '2'
  2054. if (
  2055. this.$store.getters.xt_user.user.id !=
  2056. this.dialysisPrescription.creater
  2057. ) {
  2058. ParamsQuery['mode'] = '3'
  2059. }
  2060. postPrescription(ParamsQuery).then(response => {
  2061. if (response.data.state == 0) {
  2062. this.$message.error(response.data.msg)
  2063. return false
  2064. } else {
  2065. this.$notify({
  2066. title: '成功',
  2067. message: '提交成功',
  2068. type: 'success',
  2069. duration: 2000
  2070. })
  2071. const prescription_resp = response.data.data.prescription
  2072. var prescription = this.prescription
  2073. for (var index in prescription_resp) {
  2074. // prescription[index] = prescription_resp[index];
  2075. this.$set(prescription, index, prescription_resp[index])
  2076. }
  2077. this.hide()
  2078. }
  2079. })
  2080. }
  2081. }
  2082. },
  2083. handleCancle: function() {
  2084. this.hide()
  2085. },
  2086. handleSolution: function() {
  2087. if (this.dialysisPrescription.anticoagulant == 1) {
  2088. this.dialysisPrescription.anticoagulant_weichi = '0'
  2089. this.dialysisPrescription.anticoagulant_shouji = '0'
  2090. this.dialysisPrescription.anticoagulant_zongliang = '0'
  2091. }
  2092. if (this.$store.getters.xt_user.template_info.template_id == 6) {
  2093. if (this.dialysisPrescription.mode_id == 2) {
  2094. if (
  2095. this.dialysisPrescription.displace_liqui_part == 0 ||
  2096. this.dialysisPrescription.displace_liqui_part == -2 ||
  2097. this.dialysisPrescription.displace_liqui_value == 0 ||
  2098. this.dialysisPrescription.displace_liqui_value == ''
  2099. ) {
  2100. this.$message.error('HDF模式下置换液和置换液总量不能为空!')
  2101. return
  2102. }
  2103. }
  2104. }
  2105. this.is_pre = 2
  2106. if (this.prescription.id == 0) {
  2107. if (this.is_open == 0) {
  2108. if (this.patient.id <= 0) {
  2109. this.$message.error('没有选择患者')
  2110. this.loading = false
  2111. return
  2112. }
  2113. var arr = this.dialysisPrescription
  2114. console.log('arr', arr)
  2115. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  2116. if (
  2117. parseInt(arr.dialyzer_perfusion_apparatus) ==
  2118. this.dialyzerPerfusionApparatus[i].id
  2119. ) {
  2120. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  2121. i
  2122. ].name
  2123. }
  2124. }
  2125. const ParamsQuery = arr
  2126. console.log('长期处方1', ParamsQuery)
  2127. ParamsQuery['patient'] = this.patient.id
  2128. ParamsQuery['record_date'] = this.record_date
  2129. ParamsQuery['mode'] = '1'
  2130. postSoulution(ParamsQuery).then(response => {
  2131. if (response.data.state == 0) {
  2132. this.$message.error(response.data.msg)
  2133. return false
  2134. } else {
  2135. this.$notify({
  2136. title: '成功',
  2137. message: '提交成功',
  2138. type: 'success',
  2139. duration: 2000
  2140. })
  2141. const prescription_resp = response.data.data.prescription
  2142. const solution_resp = response.data.data.solution
  2143. var prescription = this.prescription
  2144. var solution = this.solution
  2145. for (var index in prescription_resp) {
  2146. // prescription[index] = prescription_resp[index];
  2147. this.$set(prescription, index, prescription_resp[index])
  2148. }
  2149. for (var index in solution_resp) {
  2150. // solution[index] = solution_resp[index];
  2151. this.$set(solution, index, solution_resp[index])
  2152. }
  2153. this.hide()
  2154. }
  2155. })
  2156. } else if (this.is_open == 1) {
  2157. if (this.targetAdvices.length > 0) {
  2158. // 弹框推送提
  2159. this.isShowRemindAdvice = true
  2160. this.isVisibility = false
  2161. } else {
  2162. if (this.patient.id <= 0) {
  2163. this.$message.error('没有选择患者')
  2164. this.loading = false
  2165. return
  2166. }
  2167. var arr = this.dialysisPrescription
  2168. console.log('arr', arr)
  2169. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  2170. if (
  2171. parseInt(arr.dialyzer_perfusion_apparatus) ==
  2172. this.dialyzerPerfusionApparatus[i].id
  2173. ) {
  2174. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  2175. i
  2176. ].name
  2177. }
  2178. }
  2179. const ParamsQuery = arr
  2180. console.log('长期处方2', ParamsQuery)
  2181. ParamsQuery['patient'] = this.patient.id
  2182. ParamsQuery['record_date'] = this.record_date
  2183. ParamsQuery['mode'] = '1'
  2184. postSoulution(ParamsQuery).then(response => {
  2185. if (response.data.state == 0) {
  2186. this.$message.error(response.data.msg)
  2187. return false
  2188. } else {
  2189. this.$notify({
  2190. title: '成功',
  2191. message: '提交成功',
  2192. type: 'success',
  2193. duration: 2000
  2194. })
  2195. const prescription_resp = response.data.data.prescription
  2196. const solution_resp = response.data.data.solution
  2197. var prescription = this.prescription
  2198. var solution = this.solution
  2199. for (var index in prescription_resp) {
  2200. // prescription[index] = prescription_resp[index];
  2201. this.$set(prescription, index, prescription_resp[index])
  2202. }
  2203. for (var index in solution_resp) {
  2204. // solution[index] = solution_resp[index];
  2205. this.$set(solution, index, solution_resp[index])
  2206. }
  2207. this.hide()
  2208. }
  2209. })
  2210. }
  2211. } else if (this.is_open == 2) {
  2212. var date = new Date()
  2213. var hour =
  2214. date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
  2215. var minute =
  2216. date.getMinutes() < 10
  2217. ? '0' + date.getMinutes()
  2218. : date.getMinutes()
  2219. if (this.waitUploadAdvices.length > 0) {
  2220. if (this.patient.id <= 0) {
  2221. this.$message.error('没有选择患者')
  2222. this.loading = false
  2223. return
  2224. }
  2225. var arr = this.dialysisPrescription
  2226. console.log('arr', arr)
  2227. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  2228. if (
  2229. parseInt(arr.dialyzer_perfusion_apparatus) ==
  2230. this.dialyzerPerfusionApparatus[i].id
  2231. ) {
  2232. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  2233. i
  2234. ].name
  2235. }
  2236. }
  2237. const ParamsQuery = arr
  2238. console.log('长期处方3', ParamsQuery)
  2239. ParamsQuery['patient'] = this.patient.id
  2240. ParamsQuery['record_date'] = this.record_date
  2241. console.log(this.prescription)
  2242. ParamsQuery['mode'] = '1'
  2243. postPrescription(ParamsQuery).then(response => {
  2244. if (response.data.state == 0) {
  2245. this.$message.error(response.data.msg)
  2246. return false
  2247. } else {
  2248. this.$notify({
  2249. title: '成功',
  2250. message: '提交成功',
  2251. type: 'success',
  2252. duration: 2000
  2253. })
  2254. const params = {
  2255. advices: this.waitUploadAdvices,
  2256. advice_date: uParseTime(
  2257. this.$route.query.date,
  2258. '{y}-{m}-{d}'
  2259. ),
  2260. advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  2261. advice_type: this.waitUploadAdvices[0].advice_type,
  2262. parent_id: this.patient_id,
  2263. // start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
  2264. start_time:
  2265. uParseTime(this.$route.query.date, '{y}-{m}-{d}') +
  2266. ' ' +
  2267. hour +
  2268. ':' +
  2269. minute,
  2270. remark: ''
  2271. }
  2272. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(
  2273. rs => {
  2274. var resp = rs.data
  2275. if (resp.state == 1) {
  2276. // this.doctorAdvices = resp.data.advices
  2277. this.$emit('advice')
  2278. } else {
  2279. }
  2280. }
  2281. )
  2282. const prescription_resp = response.data.data.prescription
  2283. var prescription = this.prescription
  2284. for (var index in prescription_resp) {
  2285. // prescription[index] = prescription_resp[index];
  2286. this.$set(prescription, index, prescription_resp[index])
  2287. }
  2288. this.hide()
  2289. }
  2290. })
  2291. } else {
  2292. if (this.patient.id <= 0) {
  2293. this.$message.error('没有选择患者')
  2294. this.loading = false
  2295. return
  2296. }
  2297. var arr = this.dialysisPrescription
  2298. console.log('arr', arr)
  2299. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  2300. if (
  2301. parseInt(arr.dialyzer_perfusion_apparatus) ==
  2302. this.dialyzerPerfusionApparatus[i].id
  2303. ) {
  2304. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  2305. i
  2306. ].name
  2307. }
  2308. }
  2309. const ParamsQuery = arr
  2310. console.log('长期处方5', ParamsQuery)
  2311. ParamsQuery['patient'] = this.patient.id
  2312. ParamsQuery['record_date'] = this.record_date
  2313. ParamsQuery['mode'] = '1'
  2314. postSoulution(ParamsQuery).then(response => {
  2315. if (response.data.state == 0) {
  2316. this.$message.error(response.data.msg)
  2317. return false
  2318. } else {
  2319. this.$notify({
  2320. title: '成功',
  2321. message: '提交成功',
  2322. type: 'success',
  2323. duration: 2000
  2324. })
  2325. const prescription_resp = response.data.data.prescription
  2326. const solution_resp = response.data.data.solution
  2327. var prescription = this.prescription
  2328. var solution = this.solution
  2329. for (var index in prescription_resp) {
  2330. // prescription[index] = prescription_resp[index];
  2331. this.$set(prescription, index, prescription_resp[index])
  2332. }
  2333. for (var index in solution_resp) {
  2334. // solution[index] = solution_resp[index];
  2335. this.$set(solution, index, solution_resp[index])
  2336. }
  2337. this.hide()
  2338. }
  2339. })
  2340. }
  2341. }
  2342. } else {
  2343. if (this.prescription.creater == 0) {
  2344. if (this.is_open == 0) {
  2345. if (this.patient.id <= 0) {
  2346. this.$message.error('没有选择患者')
  2347. this.loading = false
  2348. return
  2349. }
  2350. var arr = this.dialysisPrescription
  2351. console.log('arr', arr)
  2352. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  2353. if (
  2354. parseInt(arr.dialyzer_perfusion_apparatus) ==
  2355. this.dialyzerPerfusionApparatus[i].id
  2356. ) {
  2357. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  2358. i
  2359. ].name
  2360. }
  2361. }
  2362. const ParamsQuery = arr
  2363. console.log('长期处方6', ParamsQuery)
  2364. ParamsQuery['patient'] = this.patient.id
  2365. ParamsQuery['record_date'] = this.record_date
  2366. ParamsQuery['mode'] = '1'
  2367. postSoulution(ParamsQuery).then(response => {
  2368. if (response.data.state == 0) {
  2369. this.$message.error(response.data.msg)
  2370. return false
  2371. } else {
  2372. this.$notify({
  2373. title: '成功',
  2374. message: '提交成功',
  2375. type: 'success',
  2376. duration: 2000
  2377. })
  2378. const prescription_resp = response.data.data.prescription
  2379. const solution_resp = response.data.data.solution
  2380. var prescription = this.prescription
  2381. var solution = this.solution
  2382. for (var index in prescription_resp) {
  2383. // prescription[index] = prescription_resp[index];
  2384. this.$set(prescription, index, prescription_resp[index])
  2385. }
  2386. for (var index in solution_resp) {
  2387. // solution[index] = solution_resp[index];
  2388. this.$set(solution, index, solution_resp[index])
  2389. }
  2390. this.hide()
  2391. }
  2392. })
  2393. } else if (this.is_open == 1) {
  2394. if (this.targetAdvices.length > 0) {
  2395. // 弹框推送提醒
  2396. this.isShowRemindAdvice = true
  2397. this.isVisibility = false
  2398. } else {
  2399. if (this.patient.id <= 0) {
  2400. this.$message.error('没有选择患者')
  2401. this.loading = false
  2402. return
  2403. }
  2404. var arr = this.dialysisPrescription
  2405. console.log('arr', arr)
  2406. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  2407. if (
  2408. parseInt(arr.dialyzer_perfusion_apparatus) ==
  2409. this.dialyzerPerfusionApparatus[i].id
  2410. ) {
  2411. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  2412. i
  2413. ].name
  2414. }
  2415. }
  2416. const ParamsQuery = arr
  2417. console.log('长期处方7', ParamsQuery)
  2418. ParamsQuery['patient'] = this.patient.id
  2419. ParamsQuery['record_date'] = this.record_date
  2420. ParamsQuery['mode'] = '1'
  2421. postSoulution(ParamsQuery).then(response => {
  2422. if (response.data.state == 0) {
  2423. this.$message.error(response.data.msg)
  2424. return false
  2425. } else {
  2426. this.$notify({
  2427. title: '成功',
  2428. message: '提交成功',
  2429. type: 'success',
  2430. duration: 2000
  2431. })
  2432. const prescription_resp = response.data.data.prescription
  2433. const solution_resp = response.data.data.solution
  2434. var prescription = this.prescription
  2435. var solution = this.solution
  2436. for (var index in prescription_resp) {
  2437. // prescription[index] = prescription_resp[index];
  2438. this.$set(prescription, index, prescription_resp[index])
  2439. }
  2440. for (var index in solution_resp) {
  2441. // solution[index] = solution_resp[index];
  2442. this.$set(solution, index, solution_resp[index])
  2443. }
  2444. this.hide()
  2445. }
  2446. })
  2447. }
  2448. } else if (this.is_open == 2) {
  2449. var date = new Date()
  2450. var hour =
  2451. date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
  2452. var minute =
  2453. date.getMinutes() < 10
  2454. ? '0' + date.getMinutes()
  2455. : date.getMinutes()
  2456. if (this.waitUploadAdvices.length > 0) {
  2457. if (this.patient.id <= 0) {
  2458. this.$message.error('没有选择患者')
  2459. this.loading = false
  2460. return
  2461. }
  2462. var arr = this.dialysisPrescription
  2463. console.log('arr', arr)
  2464. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  2465. if (
  2466. parseInt(arr.dialyzer_perfusion_apparatus) ==
  2467. this.dialyzerPerfusionApparatus[i].id
  2468. ) {
  2469. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  2470. i
  2471. ].name
  2472. }
  2473. }
  2474. const ParamsQuery = arr
  2475. console.log('长期处方8', ParamsQuery)
  2476. ParamsQuery['patient'] = this.patient.id
  2477. ParamsQuery['record_date'] = this.record_date
  2478. ParamsQuery['mode'] = '1'
  2479. postSoulution(ParamsQuery).then(response => {
  2480. if (response.data.state == 0) {
  2481. this.$message.error(response.data.msg)
  2482. return false
  2483. } else {
  2484. this.$notify({
  2485. title: '成功',
  2486. message: '提交成功',
  2487. type: 'success',
  2488. duration: 2000
  2489. })
  2490. const params = {
  2491. advices: this.waitUploadAdvices,
  2492. advice_date: uParseTime(
  2493. this.$route.query.date,
  2494. '{y}-{m}-{d}'
  2495. ),
  2496. advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  2497. advice_type: this.waitUploadAdvices[0].advice_type,
  2498. parent_id: this.patient_id,
  2499. // start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d} {h}{i}'),
  2500. start_time:
  2501. uParseTime(this.$route.query.date, '{y}-{m}-{d}') +
  2502. ' ' +
  2503. hour +
  2504. ':' +
  2505. minute,
  2506. remark: ''
  2507. }
  2508. CreateGroupAdvice(
  2509. this.$route.query.patient_id,
  2510. 0,
  2511. params
  2512. ).then(rs => {
  2513. var resp = rs.data
  2514. if (resp.state == 1) {
  2515. // this.doctorAdvices = resp.data.advices
  2516. this.$emit('advice')
  2517. } else {
  2518. }
  2519. })
  2520. const prescription_resp = response.data.data.prescription
  2521. const solution_resp = response.data.data.solution
  2522. var prescription = this.prescription
  2523. var solution = this.solution
  2524. for (var index in prescription_resp) {
  2525. // prescription[index] = prescription_resp[index];
  2526. this.$set(prescription, index, prescription_resp[index])
  2527. }
  2528. for (var index in solution_resp) {
  2529. // solution[index] = solution_resp[index];
  2530. this.$set(solution, index, solution_resp[index])
  2531. }
  2532. this.hide()
  2533. }
  2534. })
  2535. } else {
  2536. if (this.patient.id <= 0) {
  2537. this.$message.error('没有选择患者')
  2538. this.loading = false
  2539. return
  2540. }
  2541. var arr = this.dialysisPrescription
  2542. console.log('arr', arr)
  2543. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  2544. if (
  2545. parseInt(arr.dialyzer_perfusion_apparatus) ==
  2546. this.dialyzerPerfusionApparatus[i].id
  2547. ) {
  2548. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  2549. i
  2550. ].name
  2551. }
  2552. }
  2553. const ParamsQuery = arr
  2554. console.log('长期处方9', ParamsQuery)
  2555. ParamsQuery['patient'] = this.patient.id
  2556. ParamsQuery['record_date'] = this.record_date
  2557. ParamsQuery['mode'] = '1'
  2558. postSoulution(ParamsQuery).then(response => {
  2559. if (response.data.state == 0) {
  2560. this.$message.error(response.data.msg)
  2561. return false
  2562. } else {
  2563. this.$notify({
  2564. title: '成功',
  2565. message: '提交成功',
  2566. type: 'success',
  2567. duration: 2000
  2568. })
  2569. const prescription_resp = response.data.data.prescription
  2570. const solution_resp = response.data.data.solution
  2571. var prescription = this.prescription
  2572. var solution = this.solution
  2573. for (var index in prescription_resp) {
  2574. // prescription[index] = prescription_resp[index];
  2575. this.$set(prescription, index, prescription_resp[index])
  2576. }
  2577. for (var index in solution_resp) {
  2578. // solution[index] = solution_resp[index];
  2579. this.$set(solution, index, solution_resp[index])
  2580. }
  2581. this.hide()
  2582. }
  2583. })
  2584. }
  2585. }
  2586. } else {
  2587. if (this.patient.id <= 0) {
  2588. this.$message.error('没有选择患者')
  2589. this.loading = false
  2590. return
  2591. }
  2592. var arr = this.dialysisPrescription
  2593. console.log('arr', arr)
  2594. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  2595. if (
  2596. parseInt(arr.dialyzer_perfusion_apparatus) ==
  2597. this.dialyzerPerfusionApparatus[i].id
  2598. ) {
  2599. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  2600. i
  2601. ].name
  2602. }
  2603. }
  2604. const ParamsQuery = arr
  2605. console.log('长期处方10', ParamsQuery)
  2606. ParamsQuery['patient'] = this.patient.id
  2607. ParamsQuery['record_date'] = this.record_date
  2608. ParamsQuery['mode'] = '1'
  2609. postSoulution(ParamsQuery).then(response => {
  2610. if (response.data.state == 0) {
  2611. this.$message.error(response.data.msg)
  2612. return false
  2613. } else {
  2614. this.$notify({
  2615. title: '成功',
  2616. message: '提交成功',
  2617. type: 'success',
  2618. duration: 2000
  2619. })
  2620. const prescription_resp = response.data.data.prescription
  2621. const solution_resp = response.data.data.solution
  2622. var prescription = this.prescription
  2623. var solution = this.solution
  2624. for (var index in prescription_resp) {
  2625. // prescription[index] = prescription_resp[index];
  2626. this.$set(prescription, index, prescription_resp[index])
  2627. }
  2628. for (var index in solution_resp) {
  2629. // solution[index] = solution_resp[index];
  2630. this.$set(solution, index, solution_resp[index])
  2631. }
  2632. this.hide()
  2633. }
  2634. })
  2635. }
  2636. }
  2637. },
  2638. isShows(name) {
  2639. var filedList = store.getters.xt_user.fileds
  2640. for (let i = 0; i < filedList.length; i++) {
  2641. if (
  2642. filedList[i].module == 1 &&
  2643. filedList[i].filed_name_cn == name &&
  2644. filedList[i].is_show == 1
  2645. ) {
  2646. return true
  2647. }
  2648. }
  2649. return false
  2650. },
  2651. getDoctorName(doctor_id) {
  2652. for (let i = 0; i < this.admin_users.length; i++) {
  2653. if (this.admin_users[i].id == doctor_id) {
  2654. return this.admin_users[i].name
  2655. }
  2656. }
  2657. },
  2658. getContent(val) {
  2659. let prescribing_number = ''
  2660. let single_dose = ''
  2661. let advice_desc = ''
  2662. if (val.prescribing_number > 0) {
  2663. prescribing_number =
  2664. val.prescribing_number + val.prescribing_number_unit
  2665. }
  2666. if (val.single_dose > 0) {
  2667. single_dose = ' 单次用量 ' + val.single_dose + val.single_dose_unit
  2668. }
  2669. if (val.advice_desc > 0) {
  2670. advice_desc = val.advice_desc + val.drug_spec_unit
  2671. }
  2672. let name = ''
  2673. if (val.child.length > 0) {
  2674. for (let i = 0; i < val.child.length; i++) {
  2675. if (val.child[i].prescribing_number > 0) {
  2676. val.child[i]['presc'] =
  2677. val.child[i].prescribing_number +
  2678. val.child[i].prescribing_number_unit
  2679. } else {
  2680. val.child[i]['presc'] = ''
  2681. }
  2682. if (val.child[i].single_dose > 0) {
  2683. val.child[i]['single'] =
  2684. ' ' +
  2685. ' 单次用量 ' +
  2686. ' ' +
  2687. val.child[i].single_dose +
  2688. val.child[i].single_dose_unit
  2689. } else {
  2690. val.child[i]['single'] = ''
  2691. }
  2692. name =
  2693. name +
  2694. '▲' +
  2695. val.child[i].advice_name +
  2696. '' +
  2697. val.child[i].advice_desc +
  2698. val.child[i].drug_spec_unit +
  2699. val.child[i].presc +
  2700. val.child[i].single
  2701. }
  2702. return (
  2703. val.advice_name +
  2704. ' ' +
  2705. advice_desc +
  2706. ' ' +
  2707. val.drug_spec_unit +
  2708. prescribing_number +
  2709. ' ' +
  2710. single_dose +
  2711. ' ' +
  2712. ' ' +
  2713. val.delivery_way +
  2714. ' ' +
  2715. val.execution_frequency +
  2716. val.remark +
  2717. name
  2718. )
  2719. } else {
  2720. return (
  2721. val.advice_name +
  2722. ' ' +
  2723. advice_desc +
  2724. prescribing_number +
  2725. ' ' +
  2726. single_dose +
  2727. ' ' +
  2728. ' ' +
  2729. val.delivery_way +
  2730. ' ' +
  2731. val.execution_frequency +
  2732. val.remark
  2733. )
  2734. }
  2735. },
  2736. changePrescription(id) {
  2737. const ParamsQuery = {}
  2738. ParamsQuery['patient_id'] = this.$route.query.patient_id
  2739. ParamsQuery['mode_id'] = id
  2740. GetSolution(ParamsQuery).then(response => {
  2741. if (response.data.state == 0) {
  2742. this.$message.error(response.data.msg)
  2743. return false
  2744. } else {
  2745. this.$message.success('切换成功')
  2746. if (response.data.data.solution != null) {
  2747. for (const key in response.data.data.solution) {
  2748. // 长期处方不为空
  2749. if (key != 'target_ultrafiltration') {
  2750. this.dialysisPrescription[key] =
  2751. response.data.data.solution[key]
  2752. }
  2753. }
  2754. } else {
  2755. if (response.data.data.prescription != null) {
  2756. // 临时处方不为空
  2757. for (const key in response.data.data.prescription) {
  2758. if (key != 'target_ultrafiltration') {
  2759. this.dialysisPrescription[key] =
  2760. response.data.data.prescription[key]
  2761. }
  2762. }
  2763. } else if (response.data.data.system_prescription != null) {
  2764. // 临时处方不为空
  2765. for (const key in response.data.data.system_prescription) {
  2766. if (key != 'target_ultrafiltration') {
  2767. this.dialysisPrescription[key] =
  2768. response.data.data.system_prescription[key]
  2769. }
  2770. }
  2771. } else {
  2772. for (const key in this.dialysisPrescription) {
  2773. // 临时处方为空
  2774. if (key != 'target_ultrafiltration') {
  2775. this.dialysisPrescription[key] = ''
  2776. }
  2777. }
  2778. this.dialysisPrescription.mode_id = id
  2779. }
  2780. }
  2781. }
  2782. if (
  2783. this.dialysisPrescription.dialysis_duration_hour === '' ||
  2784. this.dialysisPrescription.dialysis_duration_minute === ''
  2785. ) {
  2786. this.timeValue = ''
  2787. this.time = '03:00'
  2788. } else {
  2789. this.timeValue =
  2790. this.dialysisPrescription.dialysis_duration_hour +
  2791. '小时' +
  2792. this.dialysisPrescription.dialysis_duration_minute +
  2793. '分钟'
  2794. this.time =
  2795. (this.dialysisPrescription.dialysis_duration_hour > 10
  2796. ? this.dialysisPrescription.dialysis_duration_hour
  2797. : '0' + this.dialysisPrescription.dialysis_duration_hour) +
  2798. ':' +
  2799. (this.dialysisPrescription.dialysis_duration_minute > 10
  2800. ? this.dialysisPrescription.dialysis_duration_minute
  2801. : '0' + this.dialysisPrescription.dialysis_duration_minute)
  2802. }
  2803. })
  2804. if (
  2805. id === 1 ||
  2806. id === 3 ||
  2807. id === 4 ||
  2808. id === 6 ||
  2809. id === 7 ||
  2810. id === 8 ||
  2811. id === 9 ||
  2812. id === 10 ||
  2813. id === 11 ||
  2814. id === 13 ||
  2815. id === 14 ||
  2816. id === 15 ||
  2817. id === 16 ||
  2818. id === 19
  2819. ) {
  2820. this.zhiShow = false
  2821. this.huShow = false
  2822. this.totalShow = false
  2823. } else {
  2824. this.zhiShow = true
  2825. this.huShow = true
  2826. this.totalShow = true
  2827. }
  2828. },
  2829. handlePatientInfo() {
  2830. this.isVisibility = false
  2831. this.msgtip_visibility = true
  2832. },
  2833. cancleMsg() {
  2834. this.isVisibility = true
  2835. this.msgtip_visibility = false
  2836. },
  2837. getPermission() {
  2838. request
  2839. .get('/api/func_per/get', {
  2840. params: {
  2841. create_url: '/api/dialysis/prescription?mode=1',
  2842. modify_url: '/api/dialysis/prescription?mode=2',
  2843. modify_other_url: '/api/dialysis/prescription?mode=3',
  2844. module: 1
  2845. }
  2846. })
  2847. .then(res => {
  2848. console.log(res)
  2849. console.log('predialysis.creater', this.pre.creater)
  2850. console.log('admin.id', this.$store.getters.xt_user.user.id)
  2851. if (res.data.state == 0) {
  2852. this.hasPermission = false
  2853. } else if (res.data.state == 1) {
  2854. if (this.pre.id != '' && this.pre.creater != 0) {
  2855. // 有数据
  2856. if (this.pre.creater == this.$store.getters.xt_user.user.id) {
  2857. // 创建人是自己
  2858. if (res.data.data.is_has_modify == false) {
  2859. this.hasPermission = false
  2860. this.showTxt = '你没有修改透析处方权限'
  2861. }
  2862. } else {
  2863. // 创建人不是自己
  2864. if (res.data.data.is_has_modify_other == false) {
  2865. this.hasPermission = false
  2866. this.showTxt = '你没有修改他人透析处方权限'
  2867. }
  2868. }
  2869. } else if (this.pre.id == '' || this.pre.creater == 0) {
  2870. if (res.data.data.is_has_create == false) {
  2871. this.hasPermission = false
  2872. this.showTxt = '你没有新增透析处方权限'
  2873. }
  2874. }
  2875. }
  2876. })
  2877. }
  2878. },
  2879. watch: {
  2880. 'dialysisPrescription.dialysis_duration_hour': function() {
  2881. let dialysis_duration_minute = 0
  2882. let dialysis_duration_hour = 0
  2883. let duration = 0
  2884. if (this.dialysisPrescription.dialysis_duration_minute == '') {
  2885. dialysis_duration_minute = 0
  2886. } else {
  2887. dialysis_duration_minute = this.dialysisPrescription
  2888. .dialysis_duration_minute
  2889. }
  2890. if (this.dialysisPrescription.dialysis_duration_hour == '') {
  2891. dialysis_duration_hour = 0
  2892. } else {
  2893. dialysis_duration_hour = this.dialysisPrescription
  2894. .dialysis_duration_hour
  2895. }
  2896. duration = parseFloat(dialysis_duration_hour) + parseFloat(dialysis_duration_minute) / 60
  2897. this.dialysisPrescription.anticoagulant_zongliang = calculateAnticoagulantZL(1, this.dialysisPrescription.anticoagulant_shouji, duration, this.dialysisPrescription.anticoagulant_weichi)
  2898. if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
  2899. this.dialysisPrescription.anticoagulant_zongliang = ''
  2900. }
  2901. },
  2902. 'dialysisPrescription.dialysis_duration_minute': function() {
  2903. let dialysis_duration_minute = 0
  2904. let dialysis_duration_hour = 0
  2905. let duration = 0
  2906. if (this.dialysisPrescription.dialysis_duration_minute == '') {
  2907. dialysis_duration_minute = 0
  2908. } else {
  2909. dialysis_duration_minute = this.dialysisPrescription.dialysis_duration_minute
  2910. }
  2911. if (this.dialysisPrescription.dialysis_duration_hour == '') {
  2912. dialysis_duration_hour = 0
  2913. } else {
  2914. dialysis_duration_hour = this.dialysisPrescription
  2915. .dialysis_duration_hour
  2916. }
  2917. duration =
  2918. parseFloat(dialysis_duration_hour) +
  2919. parseFloat(dialysis_duration_minute) / 60
  2920. this.dialysisPrescription.anticoagulant_zongliang = calculateAnticoagulantZL(
  2921. 1,
  2922. this.dialysisPrescription.anticoagulant_shouji,
  2923. duration,
  2924. this.dialysisPrescription.anticoagulant_weichi
  2925. )
  2926. if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
  2927. this.dialysisPrescription.anticoagulant_zongliang = ''
  2928. }
  2929. // this.dialysisPrescription.anticoagulant_zongliang = calculateAnticoagulantZL(
  2930. // 1,
  2931. // this.dialysisPrescription.anticoagulant_shouji,
  2932. // duration,
  2933. // this.dialysisPrescription.anticoagulant_weichi
  2934. // );
  2935. // if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
  2936. // this.dialysisPrescription.anticoagulant_zongliang = "";
  2937. // }
  2938. },
  2939. 'dialysisPrescription.anticoagulant_shouji': function() {
  2940. let dialysis_duration_minute = 0
  2941. let dialysis_duration_hour = 0
  2942. let duration = 0
  2943. if (this.dialysisPrescription.dialysis_duration_minute == '') {
  2944. dialysis_duration_minute = 0
  2945. } else {
  2946. dialysis_duration_minute = this.dialysisPrescription
  2947. .dialysis_duration_minute
  2948. }
  2949. if (this.dialysisPrescription.dialysis_duration_hour == '') {
  2950. dialysis_duration_hour = 0
  2951. } else {
  2952. dialysis_duration_hour = this.dialysisPrescription
  2953. .dialysis_duration_hour
  2954. }
  2955. duration =
  2956. parseFloat(dialysis_duration_hour) +
  2957. parseFloat(dialysis_duration_minute) / 60
  2958. this.dialysisPrescription.anticoagulant_zongliang = calculateAnticoagulantZL(
  2959. 1,
  2960. this.dialysisPrescription.anticoagulant_shouji,
  2961. duration,
  2962. this.dialysisPrescription.anticoagulant_weichi
  2963. )
  2964. if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
  2965. this.dialysisPrescription.anticoagulant_zongliang = ''
  2966. }
  2967. // this.dialysisPrescription.anticoagulant_zongliang = calculateAnticoagulantZL(
  2968. // 1,
  2969. // this.dialysisPrescription.anticoagulant_shouji,
  2970. // duration,
  2971. // this.dialysisPrescription.anticoagulant_weichi
  2972. // );
  2973. // if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
  2974. // this.dialysisPrescription.anticoagulant_zongliang = "";
  2975. // }
  2976. },
  2977. 'dialysisPrescription.anticoagulant_weichi': function() {
  2978. let dialysis_duration_minute = 0
  2979. let dialysis_duration_hour = 0
  2980. let duration = 0
  2981. if (this.dialysisPrescription.dialysis_duration_minute == '') {
  2982. dialysis_duration_minute = 0
  2983. } else {
  2984. dialysis_duration_minute = this.dialysisPrescription
  2985. .dialysis_duration_minute
  2986. }
  2987. if (this.dialysisPrescription.dialysis_duration_hour == '') {
  2988. dialysis_duration_hour = 0
  2989. } else {
  2990. dialysis_duration_hour = this.dialysisPrescription
  2991. .dialysis_duration_hour
  2992. }
  2993. duration =
  2994. parseFloat(dialysis_duration_hour) +
  2995. parseFloat(dialysis_duration_minute) / 60
  2996. this.dialysisPrescription.anticoagulant_zongliang = calculateAnticoagulantZL(
  2997. 1,
  2998. this.dialysisPrescription.anticoagulant_shouji,
  2999. duration,
  3000. this.dialysisPrescription.anticoagulant_weichi
  3001. )
  3002. if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
  3003. this.dialysisPrescription.anticoagulant_zongliang = ''
  3004. }
  3005. // this.dialysisPrescription.anticoagulant_zongliang = calculateAnticoagulantZL(
  3006. // 1,
  3007. // this.dialysisPrescription.anticoagulant_shouji,
  3008. // duration,
  3009. // this.dialysisPrescription.anticoagulant_weichi
  3010. // );
  3011. // if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
  3012. // this.dialysisPrescription.anticoagulant_zongliang = "";
  3013. // }
  3014. },
  3015. 'prescription.id': {
  3016. immediate: true,
  3017. deep: true,
  3018. handler(oldVal, newVal) {
  3019. if (oldVal == newVal) {
  3020. for (var index in this.dialysisPrescription) {
  3021. this.dialysisPrescription[index] = this.prescription[index]
  3022. }
  3023. if (this.prescription['dialysate_formulation'] == 0) {
  3024. this.dialysisPrescription['dialysate_formulation'] = ''
  3025. }
  3026. if (this.prescription['anticoagulant'] == 0) {
  3027. this.dialysisPrescription['anticoagulant'] = ''
  3028. }
  3029. if (this.prescription['dialysis_duration_hour'] == 0) {
  3030. this.dialysisPrescription['dialysis_duration_hour'] = ''
  3031. }
  3032. if (this.prescription['dialysis_duration_minute'] == 0) {
  3033. this.dialysisPrescription['dialysis_duration_minute'] = ''
  3034. }
  3035. if (this.prescription['blood_flow_volume'] == 0) {
  3036. this.dialysisPrescription['blood_flow_volume'] = ''
  3037. }
  3038. if (this.prescription['target_ultrafiltration'] == 0) {
  3039. this.dialysisPrescription['target_ultrafiltration'] = ''
  3040. }
  3041. if (this.prescription['dialysate_temperature'] == 0) {
  3042. this.dialysisPrescription['dialysate_temperature'] = ''
  3043. }
  3044. if (this.prescription['anticoagulant_shouji'] == 0) {
  3045. this.dialysisPrescription['anticoagulant_shouji'] = ''
  3046. }
  3047. if (this.prescription['anticoagulant_weichi'] == 0) {
  3048. this.dialysisPrescription['anticoagulant_weichi'] = ''
  3049. }
  3050. if (this.prescription['anticoagulant_zongliang'] == 0) {
  3051. this.dialysisPrescription['anticoagulant_zongliang'] = ''
  3052. }
  3053. if (this.prescription['anticoagulant_gaijiliang'] == 0) {
  3054. this.dialysisPrescription['anticoagulant_gaijiliang'] = ''
  3055. }
  3056. if (this.prescription['kalium'] == 0) {
  3057. this.dialysisPrescription['kalium'] = ''
  3058. }
  3059. if (this.prescription['sodium'] == 0) {
  3060. this.dialysisPrescription['sodium'] = ''
  3061. }
  3062. if (this.prescription['calcium'] == 0) {
  3063. this.dialysisPrescription['calcium'] = ''
  3064. }
  3065. if (this.prescription['bicarbonate'] == 0) {
  3066. this.dialysisPrescription['bicarbonate'] = ''
  3067. }
  3068. if (this.prescription['glucose'] == 0) {
  3069. this.dialysisPrescription['glucose'] = ''
  3070. }
  3071. if (this.prescription['dialysate_flow'] == 0) {
  3072. this.dialysisPrescription['dialysate_flow'] = ''
  3073. }
  3074. if (this.prescription['conductivity'] == 0) {
  3075. this.dialysisPrescription['conductivity'] = ''
  3076. }
  3077. if (this.prescription['replacement_total'] == 0) {
  3078. this.dialysisPrescription['replacement_total'] = ''
  3079. }
  3080. if (this.prescription['target_ktv'] == 0) {
  3081. this.dialysisPrescription['target_ktv'] = ''
  3082. }
  3083. }
  3084. if (this.prescription.id > 0) {
  3085. for (var index in this.dialysisPrescription) {
  3086. this.dialysisPrescription[index] = this.prescription[index]
  3087. }
  3088. if (this.prescription['dialysate_formulation'] == 0) {
  3089. this.dialysisPrescription['dialysate_formulation'] = ''
  3090. }
  3091. if (this.prescription['anticoagulant'] == 0) {
  3092. this.dialysisPrescription['anticoagulant'] = ''
  3093. }
  3094. if (this.prescription['dialysis_duration_hour'] == 0) {
  3095. this.dialysisPrescription['dialysis_duration_hour'] = ''
  3096. }
  3097. if (this.prescription['dialysis_duration_minute'] == 0) {
  3098. this.dialysisPrescription['dialysis_duration_minute'] = ''
  3099. }
  3100. if (this.prescription['blood_flow_volume'] == 0) {
  3101. this.dialysisPrescription['blood_flow_volume'] = ''
  3102. }
  3103. if (this.prescription['target_ultrafiltration'] == 0) {
  3104. this.dialysisPrescription['target_ultrafiltration'] = ''
  3105. }
  3106. if (this.prescription['dialysate_temperature'] == 0) {
  3107. this.dialysisPrescription['dialysate_temperature'] = ''
  3108. }
  3109. if (this.prescription['anticoagulant_shouji'] == 0) {
  3110. this.dialysisPrescription['anticoagulant_shouji'] = ''
  3111. }
  3112. if (this.prescription['anticoagulant_weichi'] == 0) {
  3113. this.dialysisPrescription['anticoagulant_weichi'] = ''
  3114. }
  3115. if (this.prescription['anticoagulant_zongliang'] == 0) {
  3116. this.dialysisPrescription['anticoagulant_zongliang'] = ''
  3117. }
  3118. if (this.prescription['anticoagulant_gaijiliang'] == 0) {
  3119. this.dialysisPrescription['anticoagulant_gaijiliang'] = ''
  3120. }
  3121. if (this.prescription['kalium'] == 0) {
  3122. this.dialysisPrescription['kalium'] = ''
  3123. }
  3124. if (this.prescription['sodium'] == 0) {
  3125. this.dialysisPrescription['sodium'] = ''
  3126. }
  3127. if (this.prescription['calcium'] == 0) {
  3128. this.dialysisPrescription['calcium'] = ''
  3129. }
  3130. if (this.prescription['bicarbonate'] == 0) {
  3131. this.dialysisPrescription['bicarbonate'] = ''
  3132. }
  3133. if (this.prescription['glucose'] == 0) {
  3134. this.dialysisPrescription['glucose'] = ''
  3135. }
  3136. if (this.prescription['dialysate_flow'] == 0) {
  3137. this.dialysisPrescription['dialysate_flow'] = ''
  3138. }
  3139. if (this.prescription['conductivity'] == 0) {
  3140. this.dialysisPrescription['conductivity'] = ''
  3141. }
  3142. if (this.prescription['replacement_total'] == 0) {
  3143. this.dialysisPrescription['replacement_total'] = ''
  3144. }
  3145. if (this.prescription['target_ktv'] == 0) {
  3146. this.dialysisPrescription['target_ktv'] = ''
  3147. }
  3148. } else if (this.prescription.id == 0) {
  3149. for (var index in this.dialysisPrescription) {
  3150. this.dialysisPrescription[index] = this.prescription[index]
  3151. }
  3152. if (this.prescription['dialysate_formulation'] == 0) {
  3153. this.dialysisPrescription['dialysate_formulation'] = ''
  3154. }
  3155. if (this.prescription['anticoagulant'] == 0) {
  3156. this.dialysisPrescription['anticoagulant'] = ''
  3157. }
  3158. if (this.prescription['dialysis_duration_hour'] == 0) {
  3159. this.dialysisPrescription['dialysis_duration_hour'] = ''
  3160. }
  3161. if (this.prescription['dialysis_duration_minute'] == 0) {
  3162. this.dialysisPrescription['dialysis_duration_minute'] = ''
  3163. }
  3164. if (this.prescription['blood_flow_volume'] == 0) {
  3165. this.dialysisPrescription['blood_flow_volume'] = ''
  3166. }
  3167. if (this.prescription['target_ultrafiltration'] == 0) {
  3168. this.dialysisPrescription['target_ultrafiltration'] = ''
  3169. }
  3170. if (this.prescription['dialysate_temperature'] == 0) {
  3171. this.dialysisPrescription['dialysate_temperature'] = ''
  3172. }
  3173. if (this.prescription['anticoagulant_shouji'] == 0) {
  3174. this.dialysisPrescription['anticoagulant_shouji'] = ''
  3175. }
  3176. if (this.prescription['anticoagulant_weichi'] == 0) {
  3177. this.dialysisPrescription['anticoagulant_weichi'] = ''
  3178. }
  3179. if (this.prescription['anticoagulant_zongliang'] == 0) {
  3180. this.dialysisPrescription['anticoagulant_zongliang'] = ''
  3181. }
  3182. if (this.prescription['anticoagulant_gaijiliang'] == 0) {
  3183. this.dialysisPrescription['anticoagulant_gaijiliang'] = ''
  3184. }
  3185. if (this.prescription['kalium'] == 0) {
  3186. this.dialysisPrescription['kalium'] = ''
  3187. }
  3188. if (this.prescription['sodium'] == 0) {
  3189. this.dialysisPrescription['sodium'] = ''
  3190. }
  3191. if (this.prescription['calcium'] == 0) {
  3192. this.dialysisPrescription['calcium'] = ''
  3193. }
  3194. if (this.prescription['bicarbonate'] == 0) {
  3195. this.dialysisPrescription['bicarbonate'] = ''
  3196. }
  3197. if (this.prescription['glucose'] == 0) {
  3198. this.dialysisPrescription['glucose'] = ''
  3199. }
  3200. if (this.prescription['dialysate_flow'] == 0) {
  3201. this.dialysisPrescription['dialysate_flow'] = ''
  3202. }
  3203. if (this.prescription['conductivity'] == 0) {
  3204. this.dialysisPrescription['conductivity'] = ''
  3205. }
  3206. if (this.prescription['replacement_total'] == 0) {
  3207. this.dialysisPrescription['replacement_total'] = ''
  3208. }
  3209. if (this.prescription['target_ktv'] == 0) {
  3210. this.dialysisPrescription['target_ktv'] = ''
  3211. }
  3212. }
  3213. }
  3214. },
  3215. 'solution.id': function() {
  3216. if (this.solution.id > 0) {
  3217. if (
  3218. this.prescription != null &&
  3219. typeof this.prescription.id !== 'undefined' &&
  3220. this.prescription.id > 0
  3221. ) {
  3222. for (const key in this.prescription) {
  3223. this.dialysisPrescription[key] = this.prescription[key]
  3224. }
  3225. if (this.prescription['dialysate_formulation'] == 0) {
  3226. this.dialysisPrescription['dialysate_formulation'] = ''
  3227. }
  3228. if (this.prescription['anticoagulant'] == 0) {
  3229. this.dialysisPrescription['anticoagulant'] = ''
  3230. }
  3231. if (this.prescription['dialysis_duration_hour'] == 0) {
  3232. this.dialysisPrescription['dialysis_duration_hour'] = ''
  3233. }
  3234. if (this.prescription['dialysis_duration_minute'] == 0) {
  3235. this.dialysisPrescription['dialysis_duration_minute'] = ''
  3236. }
  3237. if (this.prescription['blood_flow_volume'] == 0) {
  3238. this.dialysisPrescription['blood_flow_volume'] = ''
  3239. }
  3240. if (this.prescription['target_ultrafiltration'] == 0) {
  3241. this.dialysisPrescription['target_ultrafiltration'] = ''
  3242. }
  3243. if (this.prescription['dialysate_temperature'] == 0) {
  3244. this.dialysisPrescription['dialysate_temperature'] = ''
  3245. }
  3246. if (this.prescription['anticoagulant_shouji'] == 0) {
  3247. this.dialysisPrescription['anticoagulant_shouji'] = ''
  3248. }
  3249. if (this.prescription['anticoagulant_weichi'] == 0) {
  3250. this.dialysisPrescription['anticoagulant_weichi'] = ''
  3251. }
  3252. if (this.prescription['anticoagulant_zongliang'] == 0) {
  3253. this.dialysisPrescription['anticoagulant_zongliang'] = ''
  3254. }
  3255. if (this.prescription['anticoagulant_gaijiliang'] == 0) {
  3256. this.dialysisPrescription['anticoagulant_gaijiliang'] = ''
  3257. }
  3258. if (this.prescription['kalium'] == 0) {
  3259. this.dialysisPrescription['kalium'] = ''
  3260. }
  3261. if (this.prescription['sodium'] == 0) {
  3262. this.dialysisPrescription['sodium'] = ''
  3263. }
  3264. if (this.prescription['calcium'] == 0) {
  3265. this.dialysisPrescription['calcium'] = ''
  3266. }
  3267. if (this.prescription['bicarbonate'] == 0) {
  3268. this.dialysisPrescription['bicarbonate'] = ''
  3269. }
  3270. if (this.prescription['glucose'] == 0) {
  3271. this.dialysisPrescription['glucose'] = ''
  3272. }
  3273. if (this.prescription['dialysate_flow'] == 0) {
  3274. this.dialysisPrescription['dialysate_flow'] = ''
  3275. }
  3276. if (this.prescription['conductivity'] == 0) {
  3277. this.dialysisPrescription['conductivity'] = ''
  3278. }
  3279. if (this.prescription['replacement_total'] == 0) {
  3280. this.dialysisPrescription['replacement_total'] = ''
  3281. }
  3282. if (this.prescription['target_ktv'] == 0) {
  3283. this.dialysisPrescription['target_ktv'] = ''
  3284. }
  3285. } else if (
  3286. this.solution != null &&
  3287. typeof this.solution.id !== 'undefined' &&
  3288. this.solution.id
  3289. ) {
  3290. for (const key in this.solution) {
  3291. this.dialysisPrescription[key] = this.solution[key]
  3292. }
  3293. if (this.solution['dialysate_formulation'] == 0) {
  3294. this.dialysisPrescription['dialysate_formulation'] = ''
  3295. }
  3296. if (this.solution['anticoagulant'] == 0) {
  3297. this.dialysisPrescription['anticoagulant'] = ''
  3298. }
  3299. if (this.solution['dialysis_duration_hour'] == 0) {
  3300. this.dialysisPrescription['dialysis_duration_hour'] = ''
  3301. }
  3302. if (this.solution['dialysis_duration_minute'] == 0) {
  3303. this.dialysisPrescription['dialysis_duration_minute'] = ''
  3304. }
  3305. if (this.solution['blood_flow_volume'] == 0) {
  3306. this.dialysisPrescription['blood_flow_volume'] = ''
  3307. }
  3308. if (this.solution['target_ultrafiltration'] == 0) {
  3309. this.dialysisPrescription['target_ultrafiltration'] = ''
  3310. }
  3311. if (this.solution['dialysate_temperature'] == 0) {
  3312. this.dialysisPrescription['dialysate_temperature'] = ''
  3313. }
  3314. if (this.solution['anticoagulant_shouji'] == 0) {
  3315. this.dialysisPrescription['anticoagulant_shouji'] = ''
  3316. }
  3317. if (this.solution['anticoagulant_weichi'] == 0) {
  3318. this.dialysisPrescription['anticoagulant_weichi'] = ''
  3319. }
  3320. if (this.solution['anticoagulant_zongliang'] == 0) {
  3321. this.dialysisPrescription['anticoagulant_zongliang'] = ''
  3322. }
  3323. if (this.solution['anticoagulant_gaijiliang'] == 0) {
  3324. this.dialysisPrescription['anticoagulant_gaijiliang'] = ''
  3325. }
  3326. if (this.solution['kalium'] == 0) {
  3327. this.dialysisPrescription['kalium'] = ''
  3328. }
  3329. if (this.solution['sodium'] == 0) {
  3330. this.dialysisPrescription['sodium'] = ''
  3331. }
  3332. if (this.solution['calcium'] == 0) {
  3333. this.dialysisPrescription['calcium'] = ''
  3334. }
  3335. if (this.solution['bicarbonate'] == 0) {
  3336. this.dialysisPrescription['bicarbonate'] = ''
  3337. }
  3338. if (this.solution['glucose'] == 0) {
  3339. this.dialysisPrescription['glucose'] = ''
  3340. }
  3341. if (this.solution['dialysate_flow'] == 0) {
  3342. this.dialysisPrescription['dialysate_flow'] = ''
  3343. }
  3344. if (this.solution['conductivity'] == 0) {
  3345. this.dialysisPrescription['conductivity'] = ''
  3346. }
  3347. if (this.solution['replacement_total'] == 0) {
  3348. this.dialysisPrescription['replacement_total'] = ''
  3349. }
  3350. if (this.solution['target_ktv'] == 0) {
  3351. this.dialysisPrescription['target_ktv'] = ''
  3352. }
  3353. }
  3354. }
  3355. }
  3356. }
  3357. }
  3358. </script>
  3359. <style rel="stylesheet/scss" lang="scss" scoped>
  3360. .el-checkbox,
  3361. .el-checkbox__input {
  3362. vertical-align: middle;
  3363. }
  3364. .newLine {
  3365. display: flex;
  3366. justify-content: space-between;
  3367. height: 40px;
  3368. line-height: 40px;
  3369. border-bottom: 1px solid #ccc;
  3370. }
  3371. .warnTxt {
  3372. text-align: center;
  3373. margin: 0 auto;
  3374. background: #faa331;
  3375. max-width: 240px;
  3376. padding: 10px 20px;
  3377. border-radius: 4px;
  3378. margin-bottom: 10px;
  3379. color: #fff;
  3380. }
  3381. </style>
  3382. <style lang="scss">
  3383. .newDialog {
  3384. .el-dialog__body {
  3385. padding: 10px 20px 30px;
  3386. }
  3387. }
  3388. </style>