dialysisPrescriptionDialog.vue 195KB

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