dialysisPrescriptionDialog.vue 169KB

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