血透系统pad前端

PrescriptionDialog.vue 85KB

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