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

dialysisPrescriptionDialog.vue 141KB

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