dialysisPrescriptionDialog.vue 160KB

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