dialysisPrescriptionDialog.vue 123KB

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