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

dialysisPrescriptionDialog.vue 136KB

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