dialysisPrescriptionDialog.vue 117KB

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