血透系统pad前端

PrescriptionDialog.vue 79KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097
  1. <template>
  2. <div>
  3. <div v-if="isShowDialog" class="Dialog">
  4. <div class="DialogTit">
  5. <span @click="close()" class="iconfont">&#xe6e9;</span>
  6. <h1 class="name newName">透析处方</h1>
  7. <button class="newButton" @click="showmsgtip">{{patient.name}}</button>
  8. <span @click="commitInfo" class="success" v-if="isPermission()">保存</span>
  9. <span @click="commitInfo" class="success" v-if="!isPermission()"></span>
  10. </div>
  11. <div class="DialogContent newDialogContent" id="dialogTop">
  12. <div>
  13. <div @click="showSubMenu('mode')" class="item" ref="mode" v-if="isShow('透析模式')">
  14. <label class="name" for="txms">透析模式</label>
  15. <div class="content">
  16. <span class="text" id="txms">{{GetModeByModeId(dialysisPrescription.mode_id)}}</span>
  17. <span class="iconfont">&#xe6f9;</span>
  18. </div>
  19. </div>
  20. <div class="item" @click="openPicker" v-if="isShow('透析时长')">
  21. <label class="name" for="txsc">透析时长</label>
  22. <div class="content">
  23. <span class="text" style="width: 100px">{{timeValue}}</span>
  24. <span class="iconfont">&#xe6f9;</span>
  25. </div>
  26. </div>
  27. <div class="item" v-if="isShow('血流量')">
  28. <label class="name" for="xll">血流量(ml/min)</label>
  29. <div class="content">
  30. <input type="tel" @focus="inputFocus" id="xll" v-model="dialysisPrescription.blood_flow_volume"/>
  31. </div>
  32. </div>
  33. <div class="item" v-if="isShow('目标超滤量')">
  34. <label class="name" for="mbcll">目标超滤量(L)</label>
  35. <div class="content">
  36. <input type="tel" @focus="inputFocus" id="mbcll" v-model="dialysisPrescription.target_ultrafiltration"/>
  37. </div>
  38. </div>
  39. <div @click="showSubMenu('dialysate_formulation')" class="item" ref="dialysate_formulation"
  40. v-if="isShow('透析液配方')">
  41. <label class="name" for="txypf">透析液配方</label>
  42. <div class="content">
  43. <span class="text"
  44. id="txypf">{{GetDialysateFormulationById(dialysisPrescription.dialysate_formulation)}}</span>
  45. <span class="iconfont">&#xe6f9;</span>
  46. </div>
  47. </div>
  48. <div @click="showSubMenu('anticoagulant')" class="item" ref="anticoagulant" v-if="isShow('抗凝剂')">
  49. <label class="name" for="knj">抗凝剂</label>
  50. <div class="content">
  51. <span class="text" id="knj">{{GetAnticoagulantById(dialysisPrescription.anticoagulant)}}</span>
  52. <span class="iconfont">&#xe6f9;</span>
  53. </div>
  54. </div>
  55. <div class="item" v-if="anticoagulant.shouji != -1&&isShow('首剂')">
  56. <label class="name" for="sj">首剂({{anticoagulant.shouji_unit}})</label>
  57. <div class="content">
  58. <input type="tel" @focus="inputFocus" id="sj" v-model="dialysisPrescription.anticoagulant_shouji"
  59. :disabled="anticoagulant.shouji==1?false:true"/>
  60. </div>
  61. </div>
  62. <div class="item" v-if="anticoagulant.weichi != -1&&isShow('维持')">
  63. <label class="name" for="wz">维持({{anticoagulant.weichi_unit}})</label>
  64. <div class="content">
  65. <input type="tel" @focus="inputFocus" id="wz" class="inputBox"
  66. v-model="dialysisPrescription.anticoagulant_weichi"
  67. :disabled="anticoagulant.weichi==1?false:true">
  68. </div>
  69. </div>
  70. <div class="item" v-if="anticoagulant.zongliang != -1 && isShow('总量')">
  71. <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 2">总量(mg)</label>
  72. <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 3">总量(IU)</label>
  73. <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 4">总量(mg)</label>
  74. <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 5">总量(mg)</label>
  75. <label class="name" for="zl" v-if="dialysisPrescription.anticoagulant == 1">总量(mg)</label>
  76. <div class="content">
  77. <input type="tel" @focus="inputFocus" id="zl" class="inputBox"
  78. v-model="dialysisPrescription.anticoagulant_zongliang"
  79. :disabled="anticoagulant.zongliang==1?false:true">
  80. </div>
  81. </div>
  82. <div class="item" v-if="anticoagulant.gaimingcheng != -1 && isShow('钙名称')">
  83. <label class="name" for="g">钙名称({{anticoagulant.gaimingcheng_unit}})</label>
  84. <div class="content">
  85. <input type="text" id="g" class="inputBox" v-model="dialysisPrescription.anticoagulant_gaimingcheng"
  86. :disabled="anticoagulant.gaimingcheng==1?false:true">
  87. </div>
  88. </div>
  89. <div class="item" v-if="anticoagulant.gaijiliang != -1 && isShow('钙剂量')">
  90. <label class="name" for="gjl">钙剂量</label>
  91. <div class="content">
  92. <input type="text" id="gjl" class="inputBox" v-model="dialysisPrescription.anticoagulant_gaimingcheng"
  93. :disabled="anticoagulant.gaimingcheng==1?false:true">
  94. </div>
  95. </div>
  96. <!-- <div class="item">
  97. <label class="name" for="gtz">干体重(kg)</label>
  98. <div class="content">
  99. <input type="tel" @focus="inputFocus" id="gtz" v-model="dialysisPrescription.dry_weight"/>
  100. </div>
  101. </div> -->
  102. <div class="line"></div>
  103. <div class="item" v-if="isShow('置换量')" v-show="zhiShow">
  104. <label class="name" for="zhy">置换量(L)</label>
  105. <div class="content">
  106. <input type="tel" @focus="inputFocus" id="zhy" v-model="dialysisPrescription.replacement_total"/>
  107. </div>
  108. </div>
  109. <!-- <div class="line"></div> -->
  110. <div class="item" v-if="isShow('钾')">
  111. <label class="name" for="j">钾(mmol/L)</label>
  112. <div class="content">
  113. <input type="tel" @focus="inputFocus" id="j" v-model="dialysisPrescription.kalium"/>
  114. </div>
  115. </div>
  116. <div class="item" v-if="isShow('钠')">
  117. <label class="name" for="n">钠(mmol/L):</label>
  118. <div class="content">
  119. <input type="tel" @focus="inputFocus" id="n" v-model="dialysisPrescription.sodium"/>
  120. </div>
  121. </div>
  122. <div class="item" v-if="isShow('钙')">
  123. <label class="name" for="gg">钙(mmol/L)</label>
  124. <div class="content">
  125. <input type="tel" @focus="inputFocus" id="gg" v-model="dialysisPrescription.calcium"/>
  126. </div>
  127. </div>
  128. <div class="item" v-if="isShow('碳酸氢盐')">
  129. <label class="name" for="tsqy">碳酸氢盐(mmol/L)</label>
  130. <div class="content">
  131. <input type="tel" @focus="inputFocus" id="tsqy" v-model="dialysisPrescription.bicarbonate"/>
  132. </div>
  133. </div>
  134. <div class="item" v-if="isShow('葡萄糖')">
  135. <label class="name" for="ptt">葡萄糖(mmol/L)</label>
  136. <div class="content">
  137. <input type="tel" @focus="inputFocus" id="ptt" v-model="dialysisPrescription.glucose"/>
  138. </div>
  139. </div>
  140. <div class="line"></div>
  141. <div class="item" v-if="isShow('透析液流量')">
  142. <label class="name" for="txyll">透析液流量(ml/min)</label>
  143. <div class="content">
  144. <input type="tel" @focus="inputFocus" id="txyll" v-model="dialysisPrescription.dialysate_flow"/>
  145. </div>
  146. </div>
  147. <div class="item" v-if="isShow('透析液温度')">
  148. <label class="name" for="txywd">透析液温度(℃)</label>
  149. <div class="content">
  150. <!--<span class="text">HD</span>-->
  151. <!--<span class="iconfont">&#xe6f9;</span>-->
  152. <input type="tel" @focus="inputFocus" id="txywd" v-model="dialysisPrescription.dialysate_temperature"/>
  153. </div>
  154. </div>
  155. <div class="item" v-if="isShow('电导度')">
  156. <label class="name" for="dtl">电导度(mS/m)</label>
  157. <div class="content">
  158. <input type="tel" @focus="inputFocus" id="dtl" v-model="dialysisPrescription.conductivity"/>
  159. </div>
  160. </div>
  161. <div class="item" v-if="isShow('透析器/灌流器')">
  162. <label class="name" for="dtl">透析器/灌流器</label>
  163. <div class="content">
  164. <input @focus="inputFocus" id="dt" v-model="dialysisPrescription.dialyzer_perfusion_apparatus"/>
  165. </div>
  166. </div>
  167. <div class="line"></div>
  168. <div @click="showSubMenu('body_fluid')" class="item" ref="body_fluid" v-if="isShow('体液过多症状')">
  169. <label class="name" for="knj">体液过多症状</label>
  170. <div class="content">
  171. <span class="text" id="knja">{{getBodyFluid(dialysisPrescription.body_fluid)}}</span>
  172. <span class="iconfont">&#xe6f9;</span>
  173. </div>
  174. </div>
  175. <div class="item" v-if="isShow('体液过多其他症状')">
  176. <label class="name" for="knj">体液过多其他症状</label>
  177. <div class="content">
  178. <input @focus="inputFocus" id="dt" v-model="dialysisPrescription.body_fluid_other"/>
  179. </div>
  180. </div>
  181. <div @click="showSubMenu('special_medicine')" class="item" ref="special_medicine" v-if="isShow('透析前使用特殊药物')">
  182. <label class="name" for="knj">透析前使用特殊药物</label>
  183. <div class="content">
  184. <span class="text" id="knjaa">{{getSpecialMedicine(dialysisPrescription.special_medicine)}}</span>
  185. <span class="iconfont">&#xe6f9;</span>
  186. </div>
  187. </div>
  188. <div class="item" v-if="isShow('透析前使用其他特殊药物')">
  189. <label class="name" for="knj">透析前使用其他特殊药物</label>
  190. <div class="content">
  191. <input @focus="inputFocus" id="dt" v-model="dialysisPrescription.special_medicine_other"/>
  192. </div>
  193. </div>
  194. <div @click="showSubMenu('displace_liqui_part')" class="item" ref="displace_liqui_part" v-if="isShow('置换液')" v-show="huShow">
  195. <label class="name" for="knj">置换液</label>
  196. <div class="content">
  197. <span class="text" id="knjaa">{{getDisplaceLiquiPart(dialysisPrescription.displace_liqui_part)}}</span>
  198. <span class="iconfont">&#xe6f9;</span>
  199. </div>
  200. </div>
  201. <div class="item" v-if="isShow('置换液总量')" v-show="totalShow">
  202. <label class="name" for="knj">置换液总量(L)</label>
  203. <div class="content">
  204. <input @focus="inputFocus" id="dt" v-model="dialysisPrescription.displace_liqui_value"/>
  205. </div>
  206. </div>
  207. <div class="item" v-if="isShow('目标KT/V')">
  208. <label class="name" for="knj">目标KT/V</label>
  209. <div class="content">
  210. <input @focus="inputFocus" id="dt" v-model="dialysisPrescription.target_ktv"/>
  211. </div>
  212. </div>
  213. <div @click="showSubMenu('blood_access')" class="item" ref="blood_access" v-if="isShow('血管通路')">
  214. <label class="name" for="knj">血管通路</label>
  215. <div class="content">
  216. <span class="text" id="knjaa">{{getBloodAccess(dialysisPrescription.blood_access)}}</span>
  217. <span class="iconfont">&#xe6f9;</span>
  218. </div>
  219. </div>
  220. <div class="item" v-if="isShow('实际超滤量')">
  221. <label class="name" for="knj">实际超滤量(L)</label>
  222. <div class="content">
  223. <input @focus="inputFocus" id="dt" v-model="dialysisPrescription.ultrafiltration"/>
  224. </div>
  225. </div>
  226. <div @click="dialysisGoodsClick()" class="item" ref="consumable_material" v-if="config.is_open == 1">
  227. <label class="name" for="knj">透析耗材</label>
  228. <div class="content">
  229. <span class="text" id="knjaa"></span>
  230. <span class="iconfont">&#xe6f9;</span>
  231. </div>
  232. </div>
  233. <div class="item" style="display: none">
  234. <label class="name" for="dtl">医生签名</label>
  235. <div class="content">
  236. <div v-if="isShowDesc">医生尚未签名</div>
  237. <img v-if="isShowDoctorSign" style="width: 100px;height: 30px" :src="signUrl"
  238. alt="" srcset="">
  239. </div>
  240. </div>
  241. <div class="line"></div>
  242. <div>
  243. <div class="item">
  244. <label class="name" for="bz">备注</label>
  245. <div class="content">
  246. <span class="text"></span>
  247. </div>
  248. </div>
  249. <textarea class="textarea" id="bz" placeholder="请输入内容" v-model="dialysisPrescription.remark"
  250. @focus="lastInputFocus" @blur="lastInputBlur"></textarea>
  251. </div>
  252. </div>
  253. <!--<div class="footer">-->
  254. <!--处方医生:刘小军 医生-->
  255. <!--</div>-->
  256. <div class="PrescSubmit">
  257. <button style="display: none" class="tj" @click="sign()">医生签名</button>
  258. <button class="tjcq" @click="commitSolutionInfo" v-if="isPermission()">保存并设为长期处方</button>
  259. <button class="tj" style="display:none;" @click="commitInfo" v-if="isPermission()">保存</button>
  260. </div>
  261. </div>
  262. </div>
  263. <!--<two-menu title="二级菜单" v-show="isShowModeSubMenu"></two-menu>-->
  264. <check-box-sub-menu :visibility="visibility" v-on:menu-cancle="menuCancle" v-on:menu-comfirm="menuComfirm"
  265. v-on:menu-empty="menuEmpty"
  266. :propsForm="propForm"></check-box-sub-menu>
  267. <!--<multiple-sub-menu :goodTypes="types" :visibility="is_show" v-on:menu-cancle="menuCancle" v-on:menu-comfirm="menuComfirm" :propsForm="propForm"></multiple-sub-menu>-->
  268. <multiple-sub-menu :goodTypes="types" :info="info" :visibility="is_show" v-on:menu-cancel-two="menuCancleTwo"
  269. v-on:menu-comfirm-two="menuComfirmTwo" :propsForm="propForm"
  270. :dialysisPrescription="dialysisPrescription"></multiple-sub-menu>
  271. <mt-datetime-picker
  272. ref="picker"
  273. type="time"
  274. hourFormat="{value}小时"
  275. minuteFormat="{value}分钟"
  276. @confirm="handleTimeConfirm"
  277. v-model="time">
  278. </mt-datetime-picker>
  279. <long-advice-sub-menu :visibility="advice_visibility" v-on:menu-cancle-three="menuCancleThree"
  280. v-on:menu-comfirm-three="menuComfirmThree" :propsForm="advicePropForm"></long-advice-sub-menu>
  281. <msg-tip :visibility="msgtip_visibility" :predialysis="predialysis"
  282. :last_predialysis="last_predialysis"
  283. :record="record"
  284. :last_record="last_record"
  285. :patient_prop="patient"
  286. :prescription_prop="prescription_prop"
  287. v-on:menu-msg-tip="menuMsgTip"></msg-tip>
  288. </div>
  289. </template>
  290. <script>
  291. import CheckBoxSubMenu from './subMenu/checkBoxSubMenu'
  292. import MultipleSubMenu from './subMenu/multipleSubMenu'
  293. import {commitDialysisPrescription, CreateGroupAdvice, GetSolution, postSign, postSolution} from '@/api/dialysis'
  294. import { calculateAnticoagulantZL} from '@/utils/tools'
  295. import {Toast} from 'vant'
  296. import {getDataConfig} from '@/utils/data'
  297. import {parseTime} from '@/utils'
  298. import LongAdviceSubMenu from './subMenu/LongAdviceSubMenu'
  299. import MsgTip from './subMenu/MsgTip'
  300. export default {
  301. name: 'PrescriptionDialog',
  302. props: {
  303. admin_users_prop: {
  304. type: Array,
  305. default: function () {
  306. return new Array()
  307. }
  308. },
  309. predialysis: {
  310. type: Object
  311. },
  312. last_predialysis: {
  313. type: Object
  314. },
  315. record: {
  316. type: Object
  317. },
  318. last_record: {
  319. type: Object
  320. },
  321. patient_prop: {
  322. type: Object
  323. },
  324. solution_prop: {
  325. type: Object
  326. },
  327. config: {
  328. type: Object
  329. }, schedual: {
  330. type: Object
  331. }, dry_weight: {
  332. type: Object
  333. },
  334. operators: {
  335. type: Array,
  336. default: function () {
  337. return new Array()
  338. }
  339. },
  340. types: {
  341. type: Array,
  342. default: function () {
  343. return new Array()
  344. }
  345. },
  346. info: {
  347. type: Array,
  348. default: function () {
  349. return new Array()
  350. }
  351. }, last_prescription: {
  352. type: Object,
  353. },
  354. prescription_prop: {
  355. type: Object,
  356. }, is_open: {
  357. type: Number,
  358. }, targetAdvices: {
  359. type: Array,
  360. default: function () {
  361. return new Array()
  362. }
  363. }, waitUploadAdvices: {
  364. type: Array,
  365. default: function () {
  366. return new Array()
  367. }
  368. },
  369. machines_prop: {
  370. type: Array,
  371. default: function () {
  372. return new Array()
  373. }
  374. }
  375. },
  376. data () {
  377. return {
  378. is_pre: 0,
  379. template_id: 0,
  380. loading: false,
  381. signUrl: '',
  382. isShowDesc: true,
  383. advice_visibility: false,
  384. msgtip_visibility: false,
  385. time: '03:00',
  386. timeValue: '',
  387. tempTimeValue:'',
  388. isShowSign: false,
  389. anticoagulantsConfit: {},
  390. dialysateFormulationOptions: [],
  391. bodyFluidOptions: [],
  392. specialMedicineOptions: [],
  393. displaceLiquiPartOptions: [],
  394. bloodAccessOptions: [],
  395. advicePropForm: {
  396. list: [],
  397. result: [],
  398. operators: [],
  399. },
  400. is_show: false,
  401. perfusion_apparatus: {},
  402. replacementWays: [],
  403. dialyserList: [],
  404. modeOption: [],
  405. isShowDoctorBtn: true,
  406. isShowDoctorSign: false,
  407. visibility: false,
  408. isShowDialog: true,
  409. isShowModeSubMenu: false,
  410. dialysisPrescription: {
  411. mode_id: '',
  412. dialysis_duration: '',
  413. dialysis_duration_hour: '',
  414. dialysis_duration_minute: '',
  415. mode_name: '',
  416. dialyzer: '',
  417. perfusion_apparatus: '',
  418. blood_flow_volume: '',
  419. dewater_amount: '',
  420. displace_liqui: '',
  421. replacement_total: '',
  422. replacement_way: '',
  423. anticoagulant: '',
  424. anticoagulant_shouji: '',
  425. anticoagulant_weichi: '',
  426. anticoagulant_zongliang: '',
  427. anticoagulant_gaimingcheng: '',
  428. anticoagulant_gaijiliang: '',
  429. dialyzer_perfusion_apparatus: '',
  430. no_anticoagulant_shouji: '0',
  431. no_anticoagulant_weichi: '0',
  432. no_anticoagulant_zongliang: '0',
  433. kalium: '',
  434. sodium: '',
  435. calcium: '',
  436. bicarbonate: '',
  437. glucose: '',
  438. prescription_doctor: '',
  439. // dry_weight: "",
  440. dialysate_flow: '',
  441. dialysate_temperature: '',
  442. target_ultrafiltration: '',
  443. dialysate_formulation: '',
  444. conductivity: '',
  445. doctor: '',
  446. remark: '',
  447. body_fluid: '',
  448. special_medicine: '',
  449. special_medicine_other: '',
  450. displace_liqui_part: '',
  451. displace_liqui_value: '',
  452. blood_access: '',
  453. ultrafiltration: '',
  454. body_fluid_other: '',
  455. niprocart: '',
  456. jms: '',
  457. fistula_needle_set: '',
  458. fistula_needle_set_16: '',
  459. hemoperfusion: '',
  460. dialyser_sterilised: '',
  461. filtryzer: '',
  462. target_ktv: '',
  463. dialyzers: '',
  464. injector: '',
  465. bloodlines: '',
  466. tubing_hemodialysis: '',
  467. package: '',
  468. a_liquid: '',
  469. creater: '',
  470. modifier: '',
  471. },
  472. anticoagulant: {
  473. id: 0,
  474. name: '',
  475. type: 1,
  476. shouji: 1,
  477. weichi: 1,
  478. zongliang: 1,
  479. gaimingcheng: -1,
  480. gaijiliang: -1,
  481. shouji_unit: 'mg',
  482. weichi_unit: 'mg/h',
  483. zongliang_unit: 'mg',
  484. gaimingcheng_unit: '',
  485. gaijiliang_unit: ''
  486. },
  487. zhiShow: true,
  488. totalShow: true,
  489. huShow: true,
  490. doctorAdvices: [],
  491. propForm: {
  492. title: '',
  493. list: [],
  494. optionList: [],
  495. isMultiple: 2,
  496. result: [], //选中的值
  497. type: 1, //用来区分不同子菜单,方便对返回值进行赋值
  498. selectId: 0
  499. }
  500. }
  501. }, computed: {
  502. // 计算属性的 getter
  503. }, methods: {
  504. showmsgtip () {
  505. this.msgtip_visibility = true
  506. this.isShowDialog = false
  507. },
  508. isPermission () {
  509. if (this.$store.getters.user.user.user_type == 3 && (this.$store.getters.user.template_info.template_id == 2 || this.$store.getters.user.template_info.template_id == 6)) {
  510. return false
  511. } else {
  512. return true
  513. }
  514. },
  515. isShow (name) {
  516. var filedList = this.$store.getters.user.fileds
  517. for (let i = 0; i < filedList.length; i++) {
  518. if (filedList[i].module == 1 && filedList[i].filed_name_cn == name && filedList[i].is_show == 1) {
  519. return true
  520. }
  521. }
  522. return false
  523. },
  524. openPicker: function () {
  525. this.$refs.picker.open()
  526. },
  527. handleTimeConfirm: function (val) {
  528. val = val.replace('小时')
  529. val = val.replace('分钟')
  530. let timeArray = val.split(':')
  531. if (parseInt(timeArray[0].substring(0, 1)) == 0) {
  532. this.dialysisPrescription.dialysis_duration_hour = timeArray[0].charAt(timeArray[0].length - 1)
  533. } else {
  534. this.dialysisPrescription.dialysis_duration_hour = timeArray[0]
  535. }
  536. if (parseInt(timeArray[1].substring(0, 1)) == 0) {
  537. this.dialysisPrescription.dialysis_duration_minute = timeArray[1].charAt(timeArray[1].length - 1)
  538. } else {
  539. this.dialysisPrescription.dialysis_duration_minute = timeArray[1]
  540. }
  541. this.timeValue = this.dialysisPrescription.dialysis_duration_hour + '小时' + this.dialysisPrescription.dialysis_duration_minute + '分钟'
  542. this.dialysisPrescription.dialysis_duration = parseFloat(this.dialysisPrescription.dialysis_duration_hour) + parseFloat((this.dialysisPrescription.dialysis_duration_minute / 60).toFixed(2))
  543. },
  544. inputFocus: function (event) {
  545. var input = event.target
  546. setTimeout(function () {
  547. input.scrollIntoView()
  548. }, 0)
  549. if (input.setSelectionRange) {
  550. setTimeout(function () {
  551. input.setSelectionRange(0, input.value.length)
  552. }, 0)
  553. } else if (input.createTextRange) {
  554. var rng = input.createTextRange()
  555. rng.move('character', input.value.length)
  556. rng.select()
  557. }
  558. },
  559. lastInputFocus: function (event) {
  560. var input = event.target
  561. setTimeout(function () {
  562. input.style.marginBottom = '2rem'
  563. input.parentNode.scrollIntoView()
  564. }, 0)
  565. },
  566. lastInputBlur: function (event) {
  567. var input = event.target
  568. setTimeout(function () {
  569. input.style.marginBottom = ''
  570. }, 0)
  571. },
  572. showSubMenu: function (val) {
  573. switch (val) {
  574. case 'mode':
  575. this.propForm.type = 1
  576. this.isShowDialog = false
  577. this.propForm.title = '透析模式'
  578. this.visibility = true
  579. this.propForm.list = []
  580. this.propForm.optionList = this.modeOption
  581. this.propForm.isMultiple = 1
  582. this.propForm.selectId = this.dialysisPrescription.mode_id
  583. this.propForm.click_ref = 'mode'
  584. break
  585. case 'dialyzer':
  586. this.propForm.type = 2
  587. this.isShowDialog = false
  588. this.propForm.title = '透析器'
  589. this.visibility = true
  590. this.propForm.list = []
  591. this.propForm.optionList = this.machines_prop
  592. this.propForm.isMultiple = 1
  593. this.propForm.selectId = this.dialysisPrescription.dialyzer
  594. this.propForm.click_ref = 'dialyzer'
  595. break
  596. case 'perfusion_apparatus':
  597. this.propForm.type = 3
  598. this.isShowDialog = false
  599. this.propForm.title = '灌流器'
  600. this.visibility = true
  601. this.propForm.list = []
  602. this.propForm.optionList = this.perfusion_apparatus
  603. this.propForm.isMultiple = 1
  604. this.propForm.selectId = this.dialysisPrescription.perfusion_apparatus
  605. this.propForm.click_ref = 'perfusion_apparatus'
  606. break
  607. case 'replacement_way':
  608. this.propForm.type = 4
  609. this.isShowDialog = false
  610. this.propForm.title = '置换方式'
  611. this.visibility = true
  612. this.propForm.list = []
  613. this.propForm.optionList = this.replacementWays
  614. this.propForm.isMultiple = 1
  615. this.propForm.selectId = this.dialysisPrescription.replacement_way
  616. this.propForm.click_ref = 'replacement_way'
  617. break
  618. case 'anticoagulant':
  619. this.propForm.type = 5
  620. this.isShowDialog = false
  621. this.propForm.title = '抗疑剂'
  622. this.visibility = true
  623. this.propForm.list = []
  624. this.propForm.optionList = this.anticoagulantsConfit
  625. this.propForm.isMultiple = 1
  626. this.propForm.selectId = this.dialysisPrescription.anticoagulant
  627. this.propForm.click_ref = 'anticoagulant'
  628. break
  629. case 'dialysate_formulation':
  630. this.propForm.type = 6
  631. this.isShowDialog = false
  632. this.propForm.title = '透析液配方'
  633. this.visibility = true
  634. this.propForm.list = []
  635. this.propForm.optionList = this.dialysateFormulationOptions
  636. this.propForm.isMultiple = 1
  637. this.propForm.selectId = this.dialysisPrescription.dialysate_formulation
  638. this.propForm.click_ref = 'dialysate_formulation'
  639. break
  640. case 'body_fluid':
  641. this.propForm.type = 7
  642. this.isShowDialog = false
  643. this.propForm.title = '体液过多症状'
  644. this.visibility = true
  645. this.propForm.list = []
  646. this.propForm.optionList = this.bodyFluidOptions
  647. this.propForm.isMultiple = 1
  648. this.propForm.selectId = this.dialysisPrescription.body_fluid
  649. this.propForm.click_ref = 'body_fluid'
  650. break
  651. case 'special_medicine':
  652. this.propForm.type = 8
  653. this.isShowDialog = false
  654. this.propForm.title = '透析前使用特殊药物'
  655. this.visibility = true
  656. this.propForm.list = []
  657. this.propForm.optionList = this.specialMedicineOptions
  658. this.propForm.isMultiple = 1
  659. this.propForm.selectId = this.dialysisPrescription.special_medicine
  660. this.propForm.click_ref = 'special_medicine'
  661. break
  662. case 'displace_liqui_part':
  663. this.propForm.type = 9
  664. this.isShowDialog = false
  665. this.propForm.title = '置换液'
  666. this.visibility = true
  667. this.propForm.list = []
  668. this.propForm.optionList = this.displaceLiquiPartOptions
  669. this.propForm.isMultiple = 1
  670. this.propForm.selectId = this.dialysisPrescription.displace_liqui_part
  671. this.propForm.click_ref = 'displace_liqui_part'
  672. break
  673. case 'blood_access':
  674. this.propForm.type = 10
  675. this.isShowDialog = false
  676. this.propForm.title = '血管通路'
  677. this.visibility = true
  678. this.propForm.list = []
  679. this.propForm.optionList = this.bloodAccessOptions
  680. this.propForm.isMultiple = 1
  681. this.propForm.selectId = this.dialysisPrescription.blood_access
  682. this.propForm.click_ref = 'blood_access'
  683. break
  684. case 'dialyzer_perfusion_apparatus':
  685. // this.propForm.type = 11
  686. // this.isShowDialog = false
  687. // this.propForm.title = '透析器/灌流器'
  688. // this.visibility = true
  689. // this.propForm.list = []
  690. // this.propForm.optionList = this.bloodAccessOptions
  691. // this.propForm.isMultiple = 1
  692. // this.propForm.selectId = this.dialysisPrescription.dialyzer_perfusion_apparatus
  693. // this.propForm.click_ref = 'dialyzer_perfusion_apparatus'
  694. // break
  695. this.propForm.result = []
  696. this.isHasOther = 2
  697. this.propForm.type = 11
  698. this.isShowDialog = false
  699. this.propForm.title = '透析器/灌流器'
  700. this.visibility = true
  701. this.propForm.list = []
  702. this.propForm.list = getDataConfig('hemodialysis', 'dialyzer_perfusion_apparatus')
  703. this.propForm.optionList = []
  704. this.propForm.isMultiple = 2
  705. // this.propForm.result = typeof(this.formValue.hemorrhage) == "string"? this.formValue.hemorrhage.split(","):[]
  706. if (this.dialysisPrescription.dialyzer_perfusion_apparatus != undefined || this.dialysisPrescription.dialyzer_perfusion_apparatus != null) {
  707. if (this.dialysisPrescription.dialyzer_perfusion_apparatus.length > 0) {
  708. this.propForm.result = this.dialysisPrescription.dialyzer_perfusion_apparatus.split(',')
  709. } else {
  710. this.propForm.result = []
  711. }
  712. } else {
  713. this.propForm.result = []
  714. }
  715. this.propForm.click_ref = 'dialyzer_perfusion_apparatus'
  716. break
  717. }
  718. },
  719. menuCancle: function () {
  720. this.visibility = false
  721. this.isShowDialog = true
  722. this.$nextTick(() => {
  723. if (this.$refs[this.propForm.click_ref] != undefined && this.$refs[this.propForm.click_ref] != null) {
  724. this.$refs[this.propForm.click_ref].scrollIntoView()
  725. }
  726. })
  727. },
  728. menuCancleThree: function () {
  729. this.advice_visibility = false
  730. this.isShowDialog = true
  731. },
  732. menuMsgTip: function () {
  733. this.msgtip_visibility = false
  734. this.isShowDialog = true
  735. },
  736. menuComfirmThree: function (targetAdvices) {
  737. if (targetAdvices.length > 0) {
  738. if (this.is_pre == 1) {
  739. Toast.loading({forbidClick: true, duration: 0})
  740. let ParamsQuery = this.dialysisPrescription
  741. ParamsQuery['patient'] = this.$route.query.patient_id
  742. ParamsQuery['record_date'] = this.record_date
  743. commitDialysisPrescription(ParamsQuery).then(response => {
  744. if (response.data.state == 0) {
  745. Toast.fail(response.data.msg)
  746. return false
  747. } else {
  748. var date = new Date();
  749. var year = date.getFullYear();
  750. var month = date.getMonth() + 1;
  751. var day = date.getDate();
  752. var hours = date.getHours();
  753. var minites = date.getMinutes();
  754. if (month < 10) {
  755. month = "0" + month;
  756. }
  757. if (day < 10) {
  758. day = "0" + day;
  759. }
  760. if (hours < 10) {
  761. hours = "0" + hours;
  762. }
  763. if (minites < 10) {
  764. minites = "0" + minites;
  765. }
  766. var nowDate = year + "-" + month + "-" + day +" " +hours+":"+ minites;
  767. Toast.success('提交成功')
  768. let params = {
  769. advices: targetAdvices,
  770. advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
  771. advice_doctor: targetAdvices[0].advice_doctor,
  772. advice_type: targetAdvices[0].advice_type,
  773. parent_id: this.$route.query.patient_id,
  774. start_time: nowDate,
  775. remark: '',
  776. }
  777. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
  778. var resp = rs.data
  779. if (resp.state == 1) {
  780. this.$emit('prescription', response.data.data.prescription,resp.data.advices)
  781. } else {
  782. }
  783. })
  784. this.finish()
  785. }
  786. })
  787. } else if (this.is_pre == 2) {
  788. Toast.loading({forbidClick: true, duration: 0})
  789. let ParamsQuery = this.dialysisPrescription
  790. ParamsQuery['patient'] = this.$route.query.patient_id
  791. ParamsQuery['record_date'] = this.record_date
  792. postSolution(ParamsQuery).then(response => {
  793. if (response.data.state == 0) {
  794. Toast.fail(response.data.msg)
  795. return false
  796. } else {
  797. Toast.success('提交成功')
  798. var date = new Date();
  799. var year = date.getFullYear();
  800. var month = date.getMonth() + 1;
  801. var day = date.getDate();
  802. var hours = date.getHours();
  803. var minites = date.getMinutes();
  804. if (month < 10) {
  805. month = "0" + month;
  806. }
  807. if (day < 10) {
  808. day = "0" + day;
  809. }
  810. if (hours < 10) {
  811. hours = "0" + hours;
  812. }
  813. if (minites < 10) {
  814. minites = "0" + minites;
  815. }
  816. var nowDate = year + "-" + month + "-" + day +" " +hours+":"+ minites;
  817. let params = {
  818. advices: targetAdvices,
  819. advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
  820. advice_doctor: targetAdvices[0].advice_doctor,
  821. advice_type: targetAdvices[0].advice_type,
  822. parent_id: this.$route.query.patient_id,
  823. start_time: nowDate,
  824. remark: '',
  825. }
  826. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
  827. var resp = rs.data
  828. if (resp.state == 1) {
  829. this.$emit('prescription', response.data.data.prescription,resp.data.advices)
  830. this.$emit('longSolution', response.data.data.solution,resp.data.advices)
  831. } else {
  832. }
  833. })
  834. this.finish()
  835. }
  836. })
  837. }
  838. } else {
  839. if (this.is_pre == 1) {
  840. Toast.loading({forbidClick: true, duration: 0})
  841. let ParamsQuery = this.dialysisPrescription
  842. ParamsQuery['patient'] = this.$route.query.patient_id
  843. ParamsQuery['record_date'] = this.record_date
  844. commitDialysisPrescription(ParamsQuery).then(response => {
  845. if (response.data.state == 0) {
  846. Toast.fail(response.data.msg)
  847. return false
  848. } else {
  849. Toast.success('提交成功')
  850. this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
  851. this.finish()
  852. }
  853. })
  854. } else if (this.is_pre == 2) {
  855. Toast.loading({forbidClick: true, duration: 0})
  856. let ParamsQuery = this.dialysisPrescription
  857. ParamsQuery['patient'] = this.$route.query.patient_id
  858. ParamsQuery['record_date'] = this.record_date
  859. postSolution(ParamsQuery).then(response => {
  860. if (response.data.state == 0) {
  861. Toast.fail(response.data.msg)
  862. return false
  863. } else {
  864. Toast.success('提交成功')
  865. this.$emit('longSolution', response.data.data.solution, this.doctorAdvices)
  866. this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
  867. this.finish()
  868. }
  869. })
  870. }
  871. }
  872. },
  873. menuComfirm: function (val) {
  874. this.visibility = false
  875. this.isShowDialog = true
  876. this.$nextTick(() => {
  877. if (this.$refs[this.propForm.click_ref] != undefined && this.$refs[this.propForm.click_ref] != null) {
  878. this.$refs[this.propForm.click_ref].scrollIntoView()
  879. }
  880. })
  881. switch (val.type) {
  882. case 1:
  883. Toast.loading({forbidClick: true, duration: 0, message: '切换模式中,请稍候',})
  884. //从服务器获取对应模式的长期处方
  885. let ParamsQuery = {}
  886. ParamsQuery['patient_id'] = this.$route.query.patient_id
  887. ParamsQuery['mode_id'] = val.selectId
  888. GetSolution(ParamsQuery).then(response => {
  889. if (response.data.state == 0) {
  890. Toast.fail(response.data.msg)
  891. return false
  892. } else {
  893. Toast.success('切换成功')
  894. if (response.data.data.solution != null) {
  895. for (const key in response.data.data.solution) { //长期处方不为空
  896. if (key != 'target_ultrafiltration') {
  897. this.dialysisPrescription[key] = response.data.data.solution[key]
  898. }
  899. }
  900. } else {
  901. if (response.data.data.prescription != null) { //临时处方不为空
  902. for (const key in response.data.data.prescription) {
  903. if (key != 'target_ultrafiltration') {
  904. this.dialysisPrescription[key] = response.data.data.prescription[key]
  905. }
  906. }
  907. } else {
  908. for (const key in this.dialysisPrescription) { //临时处方为空
  909. if (key != 'target_ultrafiltration') {
  910. this.dialysisPrescription[key] = ''
  911. }
  912. }
  913. this.dialysisPrescription.mode_id = val.selectId
  914. }
  915. }
  916. }
  917. if (this.dialysisPrescription.dialysis_duration_hour === '' || this.dialysisPrescription.dialysis_duration_minute === '') {
  918. this.timeValue = ''
  919. this.time = '03:00'
  920. } else {
  921. this.timeValue = this.dialysisPrescription.dialysis_duration_hour + '小时' + this.dialysisPrescription.dialysis_duration_minute + '分钟'
  922. this.time = (this.dialysisPrescription.dialysis_duration_hour > 10 ? this.dialysisPrescription.dialysis_duration_hour : '0' + this.dialysisPrescription.dialysis_duration_hour) + ':' + (this.dialysisPrescription.dialysis_duration_minute > 10 ? this.dialysisPrescription.dialysis_duration_minute : '0' + this.dialysisPrescription.dialysis_duration_minute)
  923. }
  924. })
  925. break
  926. case 2:
  927. this.dialysisPrescription.dialyzer = val.selectId
  928. break
  929. case 3:
  930. this.dialysisPrescription.perfusion_apparatus = val.selectId
  931. break
  932. case 4:
  933. this.dialysisPrescription.replacement_way = val.selectId
  934. break
  935. case 5:
  936. this.dialysisPrescription.anticoagulant = val.selectId
  937. if (typeof this.anticoagulantsConfit[val.selectId] == 'undefined' || this.anticoagulantsConfit[val.selectId] == null) {
  938. return
  939. }
  940. this.anticoagulant = this.anticoagulantsConfit[val.selectId]
  941. break
  942. case 6:
  943. this.dialysisPrescription.dialysate_formulation = val.selectId
  944. break
  945. case 7:
  946. this.dialysisPrescription.body_fluid = val.selectId
  947. break
  948. case 8:
  949. this.dialysisPrescription.special_medicine = val.selectId
  950. break
  951. case 9:
  952. this.dialysisPrescription.displace_liqui_part = val.selectId
  953. break
  954. case 10:
  955. this.dialysisPrescription.blood_access = val.selectId
  956. break
  957. case 11:
  958. this.dialysisPrescription.dialyzer_perfusion_apparatus = val.result.join(',')
  959. break
  960. }
  961. },
  962. GetModeByModeId: function (val) {
  963. let treatment_mode_name = ''
  964. let treatment_mode = this.modeOption
  965. console.log(val)
  966. for (let keys in treatment_mode) {
  967. if (treatment_mode[keys].id == val) {
  968. treatment_mode_name = treatment_mode[keys].name
  969. }
  970. }
  971. for (let keys in treatment_mode) {
  972. if (treatment_mode[keys].id == val) {
  973. treatment_mode_name = treatment_mode[keys].name
  974. if (treatment_mode_name == 'HD' || treatment_mode_name == 'HD+HP' || treatment_mode_name == 'HP' || treatment_mode_name == 'HF' || treatment_mode_name == 'SCUF' || treatment_mode_name == 'IUF' || treatment_mode_name == 'HFHD' || treatment_mode_name == 'HFHD +HP' || treatment_mode_name == 'PHF'|| treatment_mode_name == 'HFR' || treatment_mode_name == 'CRRT' || treatment_mode_name == '腹水回收' || treatment_mode_name == 'HD前置换' || treatment_mode_name == 'HD后置换') {
  975. this.zhiShow = false
  976. this.totalShow = false
  977. this.huShow = false
  978. } else {
  979. this.zhiShow = true
  980. this.totalShow = true
  981. this.huShow = true
  982. }
  983. }
  984. }
  985. return treatment_mode_name
  986. },
  987. GetDialysateFormulationById: function (val) {
  988. let name = ''
  989. let dfl = this.dialysateFormulationOptions.length
  990. for (let index = 0; index < dfl; index++) {
  991. if (this.dialysateFormulationOptions[index].id == val) {
  992. name = this.dialysateFormulationOptions[index].name
  993. break
  994. }
  995. }
  996. return name
  997. },
  998. GetDialyzerById: function (val) {
  999. let dialyzer_name = ''
  1000. let machines = this.machines_prop
  1001. for (let i = 0; i < machines.length; i++) {
  1002. if (machines[i].id == val) {
  1003. dialyzer_name = machines[i].name
  1004. }
  1005. }
  1006. return dialyzer_name
  1007. },
  1008. GetPerfusionApparatusById: function (val) {
  1009. let perfusion_apparatus_name = ''
  1010. let perfusion_apparatus = this.perfusion_apparatus
  1011. for (let i = 0; i < perfusion_apparatus.length; i++) {
  1012. if (perfusion_apparatus[i].id == val) {
  1013. perfusion_apparatus_name = perfusion_apparatus[i].name
  1014. }
  1015. }
  1016. return perfusion_apparatus_name
  1017. },
  1018. GetReplacementWayById: function (val) {
  1019. let replacement_ways_name = ''
  1020. let replacement_ways = this.replacementWays
  1021. for (let i = 0; i < replacement_ways.length; i++) {
  1022. if (replacement_ways[i].id == val) {
  1023. replacement_ways_name = replacement_ways[i].name
  1024. }
  1025. }
  1026. return replacement_ways_name
  1027. },
  1028. GetAnticoagulantById: function (val) {
  1029. let anticoagulan_name = ''
  1030. let anticoagulant = this.anticoagulantsConfit
  1031. for (let keys in anticoagulant) {
  1032. if (anticoagulant[keys].id == val) {
  1033. anticoagulan_name = anticoagulant[keys].name
  1034. }
  1035. }
  1036. return anticoagulan_name
  1037. },
  1038. commitInfo: function () {
  1039. if(this.dialysisPrescription.anticoagulant == 1){
  1040. this.dialysisPrescription.anticoagulant_weichi = '0'
  1041. this.dialysisPrescription.anticoagulant_shouji = '0'
  1042. this.dialysisPrescription.anticoagulant_zongliang = '0'
  1043. }
  1044. if (this.$store.getters.user.template_info.template_id == 6) {
  1045. if (this.dialysisPrescription.mode_id == 2) {
  1046. if (this.dialysisPrescription.displace_liqui_part == 0 || this.dialysisPrescription.displace_liqui_part == -2 || this.dialysisPrescription.displace_liqui_value == 0 || this.dialysisPrescription.displace_liqui_value == '') {
  1047. Toast.fail('HDF模式下置换方式和置换液总量不能为空!')
  1048. return
  1049. }
  1050. }
  1051. }
  1052. this.is_pre = 1
  1053. if (this.prescription_prop.id == '') {
  1054. if (this.is_open == 0) {
  1055. Toast.loading({forbidClick: true, duration: 0})
  1056. let ParamsQuery = this.dialysisPrescription
  1057. ParamsQuery['patient'] = this.$route.query.patient_id
  1058. ParamsQuery['record_date'] = this.record_date
  1059. commitDialysisPrescription(ParamsQuery).then(response => {
  1060. if (response.data.state == 0) {
  1061. Toast.fail(response.data.msg)
  1062. return false
  1063. } else {
  1064. Toast.success('提交成功')
  1065. this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
  1066. this.finish()
  1067. }
  1068. })
  1069. } else if (this.is_open == 1) {
  1070. if (this.targetAdvices.length > 0) {
  1071. //弹框推送提醒
  1072. this.advicePropForm.list = this.targetAdvices
  1073. this.advicePropForm.operators = this.admin_users_prop
  1074. this.advice_visibility = true
  1075. this.isShowDialog = false
  1076. for (let i = 0; i < this.advicePropForm.list.length; i++) {
  1077. if (this.advicePropForm.list[i].parent_id == 0 && this.advicePropForm.list[i].isCheck == 1) {
  1078. this.advicePropForm.result.push(this.advicePropForm.list[i].id)
  1079. }
  1080. }
  1081. } else {
  1082. Toast.loading({forbidClick: true, duration: 0})
  1083. let ParamsQuery = this.dialysisPrescription
  1084. ParamsQuery['patient'] = this.$route.query.patient_id
  1085. ParamsQuery['record_date'] = this.record_date
  1086. commitDialysisPrescription(ParamsQuery).then(response => {
  1087. if (response.data.state == 0) {
  1088. Toast.fail(response.data.msg)
  1089. return false
  1090. } else {
  1091. Toast.success('提交成功')
  1092. this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
  1093. this.finish()
  1094. }
  1095. })
  1096. }
  1097. } else if (this.is_open == 2) {
  1098. if (this.waitUploadAdvices.length > 0) {
  1099. Toast.loading({forbidClick: true, duration: 0})
  1100. let ParamsQuery = this.dialysisPrescription
  1101. ParamsQuery['patient'] = this.$route.query.patient_id
  1102. ParamsQuery['record_date'] = this.record_date
  1103. commitDialysisPrescription(ParamsQuery).then(response => {
  1104. if (response.data.state == 0) {
  1105. Toast.fail(response.data.msg)
  1106. return false
  1107. } else {
  1108. Toast.success('提交成功')
  1109. var date = new Date();
  1110. var year = date.getFullYear();
  1111. var month = date.getMonth() + 1;
  1112. var day = date.getDate();
  1113. var hours = date.getHours();
  1114. var minites = date.getMinutes();
  1115. if (month < 10) {
  1116. month = "0" + month;
  1117. }
  1118. if (day < 10) {
  1119. day = "0" + day;
  1120. }
  1121. if (hours < 10) {
  1122. hours = "0" + hours;
  1123. }
  1124. if (minites < 10) {
  1125. minites = "0" + minites;
  1126. }
  1127. var nowDate = year + "-" + month + "-" + day +" " +hours+":"+ minites;
  1128. let params = {
  1129. advices: this.waitUploadAdvices,
  1130. advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
  1131. advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  1132. advice_type: this.waitUploadAdvices[0].advice_type,
  1133. parent_id: this.$route.query.patient_id,
  1134. start_time: nowDate,
  1135. remark: '',
  1136. }
  1137. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
  1138. var resp = rs.data
  1139. if (resp.state == 1) {
  1140. this.$emit('prescription', response.data.data.prescription, resp.data.advices)
  1141. } else {
  1142. }
  1143. })
  1144. this.finish()
  1145. }
  1146. })
  1147. } else {
  1148. Toast.loading({forbidClick: true, duration: 0})
  1149. let ParamsQuery = this.dialysisPrescription
  1150. ParamsQuery['patient'] = this.$route.query.patient_id
  1151. ParamsQuery['record_date'] = this.record_date
  1152. commitDialysisPrescription(ParamsQuery).then(response => {
  1153. if (response.data.state == 0) {
  1154. Toast.fail(response.data.msg)
  1155. return false
  1156. } else {
  1157. this.advice_visibility = false
  1158. Toast.success('提交成功')
  1159. this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
  1160. this.finish()
  1161. }
  1162. })
  1163. }
  1164. }
  1165. } else {
  1166. if (this.prescription_prop.creater == 0) {
  1167. if (this.is_open == 0) {
  1168. Toast.loading({forbidClick: true, duration: 0})
  1169. let ParamsQuery = this.dialysisPrescription
  1170. ParamsQuery['patient'] = this.$route.query.patient_id
  1171. ParamsQuery['record_date'] = this.record_date
  1172. commitDialysisPrescription(ParamsQuery).then(response => {
  1173. if (response.data.state == 0) {
  1174. Toast.fail(response.data.msg)
  1175. return false
  1176. } else {
  1177. Toast.success('提交成功')
  1178. this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
  1179. this.finish()
  1180. }
  1181. })
  1182. } else if (this.is_open == 1) {
  1183. if (this.targetAdvices.length > 0) {
  1184. //弹框推送提醒
  1185. this.advicePropForm.list = this.targetAdvices
  1186. this.advicePropForm.operators = this.admin_users_prop
  1187. this.advice_visibility = true
  1188. this.isShowDialog = false
  1189. for (let i = 0; i < this.advicePropForm.list.length; i++) {
  1190. if (this.advicePropForm.list[i].parent_id == 0 && this.advicePropForm.list[i].isCheck == 1) {
  1191. this.advicePropForm.result.push(this.advicePropForm.list[i].id)
  1192. }
  1193. }
  1194. } else {
  1195. Toast.loading({forbidClick: true, duration: 0})
  1196. let ParamsQuery = this.dialysisPrescription
  1197. ParamsQuery['patient'] = this.$route.query.patient_id
  1198. ParamsQuery['record_date'] = this.record_date
  1199. commitDialysisPrescription(ParamsQuery).then(response => {
  1200. if (response.data.state == 0) {
  1201. Toast.fail(response.data.msg)
  1202. return false
  1203. } else {
  1204. Toast.success('提交成功')
  1205. this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
  1206. this.finish()
  1207. }
  1208. })
  1209. }
  1210. } else if (this.is_open == 2) {
  1211. if (this.waitUploadAdvices.length > 0) {
  1212. Toast.loading({forbidClick: true, duration: 0})
  1213. let ParamsQuery = this.dialysisPrescription
  1214. ParamsQuery['patient'] = this.$route.query.patient_id
  1215. ParamsQuery['record_date'] = this.record_date
  1216. commitDialysisPrescription(ParamsQuery).then(response => {
  1217. if (response.data.state == 0) {
  1218. Toast.fail(response.data.msg)
  1219. return false
  1220. } else {
  1221. var date = new Date();
  1222. var year = date.getFullYear();
  1223. var month = date.getMonth() + 1;
  1224. var day = date.getDate();
  1225. var hours = date.getHours();
  1226. var minites = date.getMinutes();
  1227. if (month < 10) {
  1228. month = "0" + month;
  1229. }
  1230. if (day < 10) {
  1231. day = "0" + day;
  1232. }
  1233. if (hours < 10) {
  1234. hours = "0" + hours;
  1235. }
  1236. if (minites < 10) {
  1237. minites = "0" + minites;
  1238. }
  1239. var nowDate = year + "-" + month + "-" + day +" " +hours+":"+ minites;
  1240. let params = {
  1241. advices: this.waitUploadAdvices,
  1242. advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
  1243. advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  1244. advice_type: this.waitUploadAdvices[0].advice_type,
  1245. parent_id: this.$route.query.patient_id,
  1246. start_time: nowDate,
  1247. remark: '',
  1248. }
  1249. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
  1250. var resp = rs.data
  1251. if (resp.state == 1) {
  1252. this.doctorAdvices = resp.data.advices
  1253. this.$emit('prescription', response.data.data.prescription, resp.data.advices)
  1254. } else {
  1255. }
  1256. })
  1257. Toast.success('提交成功')
  1258. this.finish()
  1259. }
  1260. })
  1261. } else {
  1262. Toast.loading({forbidClick: true, duration: 0})
  1263. let ParamsQuery = this.dialysisPrescription
  1264. ParamsQuery['patient'] = this.$route.query.patient_id
  1265. ParamsQuery['record_date'] = this.record_date
  1266. commitDialysisPrescription(ParamsQuery).then(response => {
  1267. if (response.data.state == 0) {
  1268. Toast.fail(response.data.msg)
  1269. return false
  1270. } else {
  1271. Toast.success('提交成功')
  1272. this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
  1273. this.finish()
  1274. }
  1275. })
  1276. }
  1277. }
  1278. } else {
  1279. Toast.loading({forbidClick: true, duration: 0})
  1280. let ParamsQuery = this.dialysisPrescription
  1281. ParamsQuery['patient'] = this.$route.query.patient_id
  1282. ParamsQuery['record_date'] = this.record_date
  1283. commitDialysisPrescription(ParamsQuery).then(response => {
  1284. if (response.data.state == 0) {
  1285. Toast.fail(response.data.msg)
  1286. return false
  1287. } else {
  1288. Toast.success('提交成功')
  1289. this.$emit('prescription', response.data.data.prescription, this.doctorAdvices)
  1290. this.finish()
  1291. }
  1292. })
  1293. }
  1294. }
  1295. }, commitSolutionInfo: function () {
  1296. if (this.$store.getters.user.template_info.template_id == 6) {
  1297. if (this.dialysisPrescription.mode_id == 2) {
  1298. if (this.dialysisPrescription.displace_liqui_part == 0 || this.dialysisPrescription.displace_liqui_part == -2 || this.dialysisPrescription.displace_liqui_value == 0 || this.dialysisPrescription.displace_liqui_value == '') {
  1299. Toast.fail('HDF模式下置换方式和置换液总量不能为空!')
  1300. return
  1301. }
  1302. }
  1303. }
  1304. this.is_pre = 2
  1305. if (this.prescription_prop.id == '') {
  1306. if (this.is_open == 0) {
  1307. Toast.loading({forbidClick: true, duration: 0})
  1308. let ParamsQuery = this.dialysisPrescription
  1309. ParamsQuery['patient'] = this.$route.query.patient_id
  1310. ParamsQuery['record_date'] = this.record_date
  1311. postSolution(ParamsQuery).then(response => {
  1312. if (response.data.state == 0) {
  1313. Toast.fail(response.data.msg)
  1314. return false
  1315. } else {
  1316. Toast.success('提交成功')
  1317. this.$emit('advice')
  1318. this.$emit('longSolution', response.data.data.solution)
  1319. this.$emit('prescription', response.data.data.prescription)
  1320. this.finish()
  1321. }
  1322. })
  1323. } else if (this.is_open == 1) {
  1324. if (this.targetAdvices.length > 0) {
  1325. //弹框推送提醒
  1326. this.advicePropForm.list = this.targetAdvices
  1327. this.advicePropForm.operators = this.admin_users_prop
  1328. this.advice_visibility = true
  1329. this.isShowDialog = false
  1330. for (let i = 0; i < this.advicePropForm.list.length; i++) {
  1331. if (this.advicePropForm.list[i].parent_id == 0 && this.advicePropForm.list[i].isCheck == 1) {
  1332. this.advicePropForm.result.push(this.advicePropForm.list[i].id)
  1333. }
  1334. }
  1335. } else {
  1336. Toast.loading({forbidClick: true, duration: 0})
  1337. let ParamsQuery = this.dialysisPrescription
  1338. ParamsQuery['patient'] = this.$route.query.patient_id
  1339. ParamsQuery['record_date'] = this.record_date
  1340. postSolution(ParamsQuery).then(response => {
  1341. if (response.data.state == 0) {
  1342. Toast.fail(response.data.msg)
  1343. return false
  1344. } else {
  1345. Toast.success('提交成功')
  1346. this.$emit('advice')
  1347. this.$emit('longSolution', response.data.data.solution)
  1348. this.$emit('prescription', response.data.data.prescription)
  1349. this.finish()
  1350. }
  1351. })
  1352. }
  1353. } else if (this.is_open == 2) {
  1354. if (this.waitUploadAdvices.length > 0) {
  1355. Toast.loading({forbidClick: true, duration: 0})
  1356. let ParamsQuery = this.dialysisPrescription
  1357. ParamsQuery['patient'] = this.$route.query.patient_id
  1358. ParamsQuery['record_date'] = this.record_date
  1359. postSolution(ParamsQuery).then(response => {
  1360. if (response.data.state == 0) {
  1361. Toast.fail(response.data.msg)
  1362. return false
  1363. } else {
  1364. Toast.success('提交成功')
  1365. var date = new Date();
  1366. var year = date.getFullYear();
  1367. var month = date.getMonth() + 1;
  1368. var day = date.getDate();
  1369. var hours = date.getHours();
  1370. var minites = date.getMinutes();
  1371. if (month < 10) {
  1372. month = "0" + month;
  1373. }
  1374. if (day < 10) {
  1375. day = "0" + day;
  1376. }
  1377. if (hours < 10) {
  1378. hours = "0" + hours;
  1379. }
  1380. if (minites < 10) {
  1381. minites = "0" + minites;
  1382. }
  1383. var nowDate = year + "-" + month + "-" + day +" " +hours+":"+ minites;
  1384. let params = {
  1385. advices: this.waitUploadAdvices,
  1386. advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
  1387. advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  1388. advice_type: this.waitUploadAdvices[0].advice_type,
  1389. parent_id: this.$route.query.patient_id,
  1390. start_time: nowDate,
  1391. remark: '',
  1392. }
  1393. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
  1394. var resp = rs.data
  1395. if (resp.state == 1) {
  1396. this.doctorAdvices = resp.data.advices
  1397. this.$emit('longSolution', response.data.data.solution, resp.data.advices)
  1398. this.$emit('prescription', response.data.data.prescription, resp.data.advices)
  1399. } else {
  1400. }
  1401. })
  1402. this.finish()
  1403. }
  1404. })
  1405. } else {
  1406. Toast.loading({forbidClick: true, duration: 0})
  1407. let ParamsQuery = this.dialysisPrescription
  1408. ParamsQuery['patient'] = this.$route.query.patient_id
  1409. ParamsQuery['record_date'] = this.record_date
  1410. postSolution(ParamsQuery).then(response => {
  1411. if (response.data.state == 0) {
  1412. Toast.fail(response.data.msg)
  1413. return false
  1414. } else {
  1415. Toast.success('提交成功')
  1416. this.$emit('longSolution', response.data.data.solution)
  1417. this.$emit('prescription', response.data.data.prescription)
  1418. this.finish()
  1419. }
  1420. })
  1421. }
  1422. }
  1423. } else {
  1424. if (this.prescription_prop.creater == 0) {
  1425. if (this.is_open == 0) {
  1426. Toast.loading({forbidClick: true, duration: 0})
  1427. let ParamsQuery = this.dialysisPrescription
  1428. ParamsQuery['patient'] = this.$route.query.patient_id
  1429. ParamsQuery['record_date'] = this.record_date
  1430. postSolution(ParamsQuery).then(response => {
  1431. if (response.data.state == 0) {
  1432. Toast.fail(response.data.msg)
  1433. return false
  1434. } else {
  1435. Toast.success('提交成功')
  1436. this.$emit('longSolution', response.data.data.solution)
  1437. this.$emit('prescription', response.data.data.prescription)
  1438. this.finish()
  1439. }
  1440. })
  1441. } else if (this.is_open == 1) {
  1442. if (this.targetAdvices.length > 0) {
  1443. //弹框推送提醒
  1444. this.advicePropForm.list = this.targetAdvices
  1445. this.advicePropForm.operators = this.admin_users_prop
  1446. this.advice_visibility = true
  1447. this.isShowDialog = false
  1448. for (let i = 0; i < this.advicePropForm.list.length; i++) {
  1449. if (this.advicePropForm.list[i].parent_id == 0 && this.advicePropForm.list[i].isCheck == 1) {
  1450. this.advicePropForm.result.push(this.advicePropForm.list[i].id)
  1451. }
  1452. }
  1453. } else {
  1454. Toast.loading({forbidClick: true, duration: 0})
  1455. let ParamsQuery = this.dialysisPrescription
  1456. ParamsQuery['patient'] = this.$route.query.patient_id
  1457. ParamsQuery['record_date'] = this.record_date
  1458. postSolution(ParamsQuery).then(response => {
  1459. if (response.data.state == 0) {
  1460. Toast.fail(response.data.msg)
  1461. return false
  1462. } else {
  1463. Toast.success('提交成功')
  1464. this.$emit('longSolution', response.data.data.solution)
  1465. this.$emit('prescription', response.data.data.prescription)
  1466. this.finish()
  1467. }
  1468. })
  1469. }
  1470. } else if (this.is_open == 2) {
  1471. if (this.waitUploadAdvices.length > 0) {
  1472. Toast.loading({forbidClick: true, duration: 0})
  1473. let ParamsQuery = this.dialysisPrescription
  1474. ParamsQuery['patient'] = this.$route.query.patient_id
  1475. ParamsQuery['record_date'] = this.record_date
  1476. postSolution(ParamsQuery).then(response => {
  1477. if (response.data.state == 0) {
  1478. Toast.fail(response.data.msg)
  1479. return false
  1480. } else {
  1481. this.advice_visibility = false
  1482. var date = new Date();
  1483. var year = date.getFullYear();
  1484. var month = date.getMonth() + 1;
  1485. var day = date.getDate();
  1486. var hours = date.getHours();
  1487. var minites = date.getMinutes();
  1488. if (month < 10) {
  1489. month = "0" + month;
  1490. }
  1491. if (day < 10) {
  1492. day = "0" + day;
  1493. }
  1494. if (hours < 10) {
  1495. hours = "0" + hours;
  1496. }
  1497. if (minites < 10) {
  1498. minites = "0" + minites;
  1499. }
  1500. var nowDate = year + "-" + month + "-" + day +" " +hours+":"+ minites;
  1501. let params = {
  1502. advices: this.waitUploadAdvices,
  1503. advice_date: parseTime(this.$route.query.date, '{y}-{m}-{d}'),
  1504. advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  1505. advice_type: this.waitUploadAdvices[0].advice_type,
  1506. parent_id: this.$route.query.patient_id,
  1507. start_time: nowDate,
  1508. remark: '',
  1509. }
  1510. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(rs => {
  1511. var resp = rs.data
  1512. if (resp.state == 1) {
  1513. this.doctorAdvices = resp.data.advices
  1514. this.$emit('longSolution', response.data.data.solution,resp.data.advices)
  1515. this.$emit('prescription', response.data.data.prescription,resp.data.advices)
  1516. } else {
  1517. }
  1518. })
  1519. Toast.success('提交成功')
  1520. this.finish()
  1521. }
  1522. })
  1523. } else {
  1524. Toast.loading({forbidClick: true, duration: 0})
  1525. let ParamsQuery = this.dialysisPrescription
  1526. ParamsQuery['patient'] = this.$route.query.patient_id
  1527. ParamsQuery['record_date'] = this.record_date
  1528. postSolution(ParamsQuery).then(response => {
  1529. if (response.data.state == 0) {
  1530. Toast.fail(response.data.msg)
  1531. return false
  1532. } else {
  1533. Toast.success('提交成功')
  1534. this.$emit('advice')
  1535. this.$emit('longSolution', response.data.data.solution)
  1536. this.$emit('prescription', response.data.data.prescription)
  1537. this.finish()
  1538. }
  1539. })
  1540. }
  1541. }
  1542. } else {
  1543. Toast.loading({forbidClick: true, duration: 0})
  1544. let ParamsQuery = this.dialysisPrescription
  1545. ParamsQuery['patient'] = this.$route.query.patient_id
  1546. ParamsQuery['record_date'] = this.record_date
  1547. postSolution(ParamsQuery).then(response => {
  1548. if (response.data.state == 0) {
  1549. Toast.fail(response.data.msg)
  1550. return false
  1551. } else {
  1552. Toast.success('提交成功')
  1553. this.$emit('longSolution', response.data.data.solution)
  1554. this.$emit('prescription', response.data.data.prescription)
  1555. this.finish()
  1556. }
  1557. })
  1558. }
  1559. }
  1560. }, finish: function () {
  1561. this.$emit('finish')
  1562. }, close: function () {
  1563. this.$emit('close')
  1564. }, open: function () {
  1565. this.isShowDialog = true
  1566. this.visibility = false
  1567. this.$refs.picker.close()
  1568. var dialogTop = document.querySelector('#dialogTop')
  1569. if (dialogTop != null) {
  1570. this.$nextTick(() => {
  1571. dialogTop.scrollTop = 0
  1572. })
  1573. }
  1574. }, sign: function () {
  1575. let params = {
  1576. patient_id: this.$route.query.patient_id,
  1577. date: this.record_date,
  1578. }
  1579. postSign(params).then(response => {
  1580. if (response.data.state == 0) {
  1581. Toast.fail(response.data.msg)
  1582. return false
  1583. } else {
  1584. this.isShowDesc = false
  1585. this.isShowDoctorSign = true
  1586. this.dialysisPrescription.prescription_doctor = response.data.data.doctor_id
  1587. for (let i = 0; i < this.operators.length; i++) {
  1588. if (this.operators[i].creator == response.data.data.doctor_id) {
  1589. console.log(this.operators[i].url)
  1590. this.signUrl = this.operators[i].url
  1591. }
  1592. }
  1593. Toast.success('签名成功')
  1594. }
  1595. })
  1596. }, getBodyFluid: function (val) {
  1597. let body_fluid_name = ''
  1598. let body_fluid = this.bodyFluidOptions
  1599. for (let i = 0; i < body_fluid.length; i++) {
  1600. if (body_fluid[i].id == val) {
  1601. body_fluid_name = body_fluid[i].name
  1602. }
  1603. }
  1604. return body_fluid_name
  1605. }, getSpecialMedicine: function (val) {
  1606. let special_medicine_name = ''
  1607. let special_medicine = this.specialMedicineOptions
  1608. for (let i = 0; i < special_medicine.length; i++) {
  1609. if (special_medicine[i].id == val) {
  1610. special_medicine_name = special_medicine[i].name
  1611. }
  1612. }
  1613. return special_medicine_name
  1614. }, getDisplaceLiquiPart: function (val) {
  1615. let displace_liqui_part_name = ''
  1616. let displace_liqui_part = this.displaceLiquiPartOptions
  1617. for (let i = 0; i < displace_liqui_part.length; i++) {
  1618. if (displace_liqui_part[i].id == val) {
  1619. displace_liqui_part_name = displace_liqui_part[i].name
  1620. }
  1621. }
  1622. return displace_liqui_part_name
  1623. }, getBloodAccess: function (val) {
  1624. let blood_access_name = ''
  1625. let blood_access = this.bloodAccessOptions
  1626. for (let i = 0; i < blood_access.length; i++) {
  1627. if (blood_access[i].id == val) {
  1628. blood_access_name = blood_access[i].name
  1629. }
  1630. }
  1631. return blood_access_name
  1632. }, menuEmpty: function (val) {
  1633. this.visibility = false
  1634. this.isShowDialog = true
  1635. switch (val.type) {
  1636. case 1:
  1637. this.dialysisPrescription.mode_id = ''
  1638. break
  1639. case 2:
  1640. this.dialysisPrescription.dialyzer = ''
  1641. break
  1642. case 3:
  1643. this.dialysisPrescription.perfusion_apparatus = ''
  1644. break
  1645. case 4:
  1646. this.dialysisPrescription.replacement_way = ''
  1647. break
  1648. case 5:
  1649. this.anticoagulant = ''
  1650. break
  1651. case 6:
  1652. this.dialysisPrescription.dialysate_formulation = ''
  1653. break
  1654. case 7:
  1655. this.dialysisPrescription.body_fluid = ''
  1656. break
  1657. case 8:
  1658. this.dialysisPrescription.special_medicine = ''
  1659. break
  1660. case 9:
  1661. this.dialysisPrescription.displace_liqui_part = ''
  1662. break
  1663. case 10:
  1664. this.dialysisPrescription.blood_access = ''
  1665. break
  1666. }
  1667. }, getFloat: function (x) {
  1668. if (x != '.') {
  1669. var f = Math.round(x * 100) / 100
  1670. var s = f.toString()
  1671. var rs = s.indexOf('.')
  1672. if (rs <= 0) {
  1673. rs = s.length
  1674. s += '.'
  1675. }
  1676. while (s.length <= rs + 1) {
  1677. s += '0'
  1678. }
  1679. return s
  1680. } else {
  1681. return '0.0'
  1682. }
  1683. }, dialysisGoodsClick: function () {
  1684. this.isShowDialog = false
  1685. this.is_show = true
  1686. }, menuCancleTwo: function () {
  1687. this.isShowDialog = true
  1688. this.is_show = false
  1689. }, menuComfirmTwo: function (dialysisPrescription) {
  1690. this.isShowDialog = true
  1691. this.is_show = false
  1692. this.dialysisPrescription.niprocart = dialysisPrescription.niprocart
  1693. this.dialysisPrescription.jms = dialysisPrescription.jms
  1694. this.dialysisPrescription.fistula_needle_set = dialysisPrescription.fistula_needle_set
  1695. this.dialysisPrescription.fistula_needle_set_16 = dialysisPrescription.fistula_needle_set_16
  1696. this.dialysisPrescription.hemoperfusion = dialysisPrescription.hemoperfusion
  1697. this.dialysisPrescription.dialyser_sterilised = dialysisPrescription.dialyser_sterilised
  1698. this.dialysisPrescription.filtryzer = dialysisPrescription.filtryzer
  1699. this.dialysisPrescription.dialyzers = dialysisPrescription.dialyzers
  1700. this.dialysisPrescription.injector = dialysisPrescription.injector
  1701. this.dialysisPrescription.bloodlines = dialysisPrescription.bloodlines
  1702. this.dialysisPrescription.tubing_hemodialysis = dialysisPrescription.tubing_hemodialysis
  1703. this.dialysisPrescription.package = dialysisPrescription.package
  1704. this.dialysisPrescription.a_liquid = dialysisPrescription.a_liquid
  1705. }
  1706. },
  1707. created () {
  1708. this.template_id = this.$store.getters.user.template_info.template_id
  1709. if (this.$store.getters.user.user.user_type == 2) {
  1710. this.isShowSign = true
  1711. }
  1712. this.modeOption = this.$store.getters.treatment_mode
  1713. delete this.modeOption['0']
  1714. var perfusion_apparatus = getDataConfig('hemodialysis', 'perfusion_apparatus')
  1715. this.perfusion_apparatus = perfusion_apparatus
  1716. this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit
  1717. this.bodyFluidOptions = this.$store.getters.body_fluid
  1718. this.specialMedicineOptions = this.$store.getters.special_medicine
  1719. this.displaceLiquiPartOptions = this.$store.getters.displace_liqui
  1720. this.bloodAccessOptions = this.$store.getters.blood_access
  1721. this.dialysateFormulationOptions = getDataConfig('hemodialysis', 'dialysate_formulation')
  1722. this.replacementWays = getDataConfig('hemodialysis', 'replacement_ways')
  1723. this.patient = this.patient_prop
  1724. if (this.prescription_prop != null && typeof (this.prescription_prop.id) != 'undefined' && this.prescription_prop.id > 0) {
  1725. for (const key in this.prescription_prop) {
  1726. this.dialysisPrescription[key] = this.prescription_prop[key]
  1727. }
  1728. } else if (this.solution_prop != null && typeof this.solution_prop.id != 'undefined' && this.solution_prop.id) {
  1729. for (const key in this.solution_prop) {
  1730. if(key != "target_ultrafiltration") {
  1731. this.dialysisPrescription[key] = this.solution_prop[key]
  1732. }
  1733. }
  1734. } else if (this.last_prescription != null && typeof this.last_prescription.id != 'undefined' && this.last_prescription.id) {
  1735. for (const key in this.last_prescription) {
  1736. if(key != "target_ultrafiltration") {
  1737. this.dialysisPrescription[key] = this.last_prescription[key]
  1738. }
  1739. }
  1740. } else {
  1741. this.dialysisPrescription.mode_id = this.schedual.mode_id
  1742. }
  1743. if (this.dialysisPrescription.dialysis_duration_hour.length == 0 || this.dialysisPrescription.dialysis_duration_minute.length == 0) {
  1744. this.timeValue = ''
  1745. this.time = '03:00'
  1746. } else {
  1747. this.timeValue = this.dialysisPrescription.dialysis_duration_hour + '小时' + this.dialysisPrescription.dialysis_duration_minute + '分钟'
  1748. this.time = (this.dialysisPrescription.dialysis_duration_hour > 10 ? this.dialysisPrescription.dialysis_duration_hour : '0' + this.dialysisPrescription.dialysis_duration_hour) + ':' + (this.dialysisPrescription.dialysis_duration_minute > 10 ? this.dialysisPrescription.dialysis_duration_minute : '0' + this.dialysisPrescription.dialysis_duration_minute)
  1749. }
  1750. this.dialyserList = this.machines_prop
  1751. // this.doctor = this.$store.getters.user.user.user_type;
  1752. var date = this.$route.query && this.$route.query.date
  1753. date *= 1000
  1754. var newDate = new Date(date)
  1755. var y = newDate.getFullYear()
  1756. var m = newDate.getMonth() + 1
  1757. var d = newDate.getDate()
  1758. if (isNaN(y) || isNaN(m) || isNaN(d)) {
  1759. newDate = new Date()
  1760. y = newDate.getFullYear()
  1761. m = newDate.getMonth() + 1
  1762. d = newDate.getDate()
  1763. }
  1764. this.record_date =
  1765. y + '-' + (m < 10 ? '0' + m : m) + '-' + (d < 10 ? '0' + d : d)
  1766. // this.patient.id = this.patient_prop.id
  1767. if (this.dialysisPrescription.prescription_doctor == '') {
  1768. this.isShowDesc = true
  1769. this.isShowDoctorSign = false
  1770. } else {
  1771. this.isShowDesc = false
  1772. this.isShowDoctorSign = true
  1773. for (let i = 0; i < this.operators.length; i++) {
  1774. if (this.operators[i].creator == this.dialysisPrescription.prescription_doctor) {
  1775. this.signUrl = this.operators[i].url
  1776. }
  1777. }
  1778. }
  1779. this.dialysisPrescription.kalium = this.getFloat(this.dialysisPrescription.kalium)
  1780. this.dialysisPrescription.sodium = this.getFloat(this.dialysisPrescription.sodium)
  1781. this.dialysisPrescription.calcium = this.getFloat(this.dialysisPrescription.calcium)
  1782. this.dialysisPrescription.ultrafiltration = this.getFloat(this.dialysisPrescription.ultrafiltration)
  1783. this.dialysisPrescription.target_ultrafiltration = this.getFloat(this.dialysisPrescription.target_ultrafiltration)
  1784. if(this.dialysisPrescription.anticoagulant_shouji == ''){
  1785. this.dialysisPrescription.anticoagulant_shouji = '0'
  1786. }
  1787. if(this.dialysisPrescription.anticoagulant_weichi == ''){
  1788. this.dialysisPrescription.anticoagulant_weichi = '0'
  1789. }
  1790. if(this.dialysisPrescription.anticoagulant_zongliang == ''){
  1791. this.dialysisPrescription.anticoagulant_weichi = '0'
  1792. }
  1793. },
  1794. components: {
  1795. LongAdviceSubMenu,
  1796. MultipleSubMenu,
  1797. MsgTip,
  1798. // MultipleSubMenu,
  1799. CheckBoxSubMenu
  1800. },
  1801. watch: {
  1802. "dialysisPrescription.dialysis_duration":function(){
  1803. console.log(this.dialysisPrescription.dialysis_duration)
  1804. this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
  1805. this.dialysisPrescription.anticoagulant_shouji,
  1806. this.dialysisPrescription.dialysis_duration,
  1807. this.dialysisPrescription.anticoagulant_weichi
  1808. );
  1809. if(isNaN(this.dialysisPrescription.anticoagulant_zongliang)){
  1810. this.dialysisPrescription.anticoagulant_zongliang = ''
  1811. }
  1812. },
  1813. "dialysisPrescription.anticoagulant_shouji":function(){
  1814. this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
  1815. this.dialysisPrescription.anticoagulant_shouji,
  1816. this.dialysisPrescription.dialysis_duration,
  1817. this.dialysisPrescription.anticoagulant_weichi
  1818. );
  1819. if(isNaN(this.dialysisPrescription.anticoagulant_zongliang)){
  1820. this.dialysisPrescription.anticoagulant_zongliang = ''
  1821. }
  1822. },
  1823. "dialysisPrescription.anticoagulant_weichi":function(){
  1824. this.dialysisPrescription.anticoagulant_zongliang=calculateAnticoagulantZL(1,
  1825. this.dialysisPrescription.anticoagulant_shouji,
  1826. this.dialysisPrescription.dialysis_duration,
  1827. this.dialysisPrescription.anticoagulant_weichi
  1828. );
  1829. if(isNaN(this.dialysisPrescription.anticoagulant_zongliang)){
  1830. this.dialysisPrescription.anticoagulant_zongliang = ''
  1831. }
  1832. },
  1833. isShowDialog (val) {
  1834. if (val) {
  1835. this.advice_visibility = false
  1836. }
  1837. }
  1838. }
  1839. }
  1840. </script>
  1841. <style style="stylesheet/scss" lang="scss" scoped>
  1842. .DialogContent {
  1843. // padding-bottom:2rem !important;
  1844. .textarea {
  1845. width: 100%;
  1846. height: 2.4rem;
  1847. line-height: 0.6rem;
  1848. color: $pgh-color;
  1849. font-size: 0.45rem;
  1850. padding-left: 0.36rem;
  1851. border: none;
  1852. border-bottom: 1px #e5e5e5 solid;
  1853. }
  1854. }
  1855. .newButton{
  1856. background: #258ffc;
  1857. padding: 0 0.2rem;
  1858. height: 0.85rem;
  1859. line-height: 0.85rem;
  1860. border-radius:5px;
  1861. color: #fff;
  1862. margin-right: -3.5rem;
  1863. }
  1864. .newName{
  1865. margin-right: -3rem;
  1866. }
  1867. .newDialogContent{
  1868. display: flex;
  1869. flex-direction: column;
  1870. height: 100%;
  1871. overflow: hidden;
  1872. >:first-child{
  1873. flex: 1;
  1874. overflow: auto;
  1875. }
  1876. }
  1877. </style>