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

dialysisPrescriptionDialog.vue 119KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558
  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. var arr = this.dialysisPrescription;
  1267. console.log("arr", arr);
  1268. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  1269. if (
  1270. parseInt(arr.dialyzer_perfusion_apparatus) ==
  1271. this.dialyzerPerfusionApparatus[i].id
  1272. ) {
  1273. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  1274. i
  1275. ].name;
  1276. }
  1277. }
  1278. const ParamsQuery = arr;
  1279. console.log("医嘱推送2", ParamsQuery);
  1280. ParamsQuery["patient"] = this.patient.id;
  1281. ParamsQuery["record_date"] = this.record_date;
  1282. if (this.prescription.creater <= 0) {
  1283. ParamsQuery["mode"] = "1";
  1284. } else {
  1285. ParamsQuery["mode"] = "2";
  1286. if (
  1287. this.$store.getters.xt_user.user.id !=
  1288. this.dialysisPrescription.creater
  1289. ) {
  1290. ParamsQuery["mode"] = "3";
  1291. }
  1292. }
  1293. postPrescription(ParamsQuery).then(response => {
  1294. if (response.data.state == 0) {
  1295. this.$message.error(response.data.msg);
  1296. return false;
  1297. } else {
  1298. this.$notify({
  1299. title: "成功",
  1300. message: "提交成功",
  1301. type: "success",
  1302. duration: 2000
  1303. });
  1304. var date = new Date();
  1305. var hour =
  1306. date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
  1307. var minute =
  1308. date.getMinutes() < 10
  1309. ? "0" + date.getMinutes()
  1310. : date.getMinutes();
  1311. const params = {
  1312. advices: results,
  1313. advice_date: uParseTime(this.$route.query.date, "{y}-{m}-{d}"),
  1314. advice_doctor: results[0].advice_doctor,
  1315. advice_type: results[0].advice_type,
  1316. parent_id: this.patient_id,
  1317. start_time:
  1318. uParseTime(this.$route.query.date, "{y}-{m}-{d}") +
  1319. " " +
  1320. hour +
  1321. ":" +
  1322. minute,
  1323. remark: ""
  1324. };
  1325. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(
  1326. rs => {
  1327. var resp = rs.data;
  1328. if (resp.state == 1) {
  1329. this.doctorAdvices = resp.data.advices;
  1330. this.$emit("advice");
  1331. } else {
  1332. }
  1333. }
  1334. );
  1335. const prescription_resp = response.data.data.prescription;
  1336. var prescription = this.prescription;
  1337. for (var index in prescription_resp) {
  1338. // prescription[index] = prescription_resp[index];
  1339. this.$set(prescription, index, prescription_resp[index]);
  1340. }
  1341. this.hide();
  1342. }
  1343. });
  1344. } else if (this.is_pre == 2) {
  1345. if (this.patient.id <= 0) {
  1346. this.$message.error("没有选择患者");
  1347. this.loading = false;
  1348. return;
  1349. }
  1350. var arr = this.dialysisPrescription;
  1351. console.log("arr", arr);
  1352. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  1353. if (
  1354. parseInt(arr.dialyzer_perfusion_apparatus) ==
  1355. this.dialyzerPerfusionApparatus[i].id
  1356. ) {
  1357. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  1358. i
  1359. ].name;
  1360. }
  1361. }
  1362. const ParamsQuery = arr;
  1363. console.log("医嘱推送3", ParamsQuery);
  1364. ParamsQuery["patient"] = this.patient.id;
  1365. ParamsQuery["record_date"] = this.record_date;
  1366. ParamsQuery["mode"] = 1;
  1367. postSoulution(ParamsQuery).then(response => {
  1368. if (response.data.state == 0) {
  1369. this.$message.error(response.data.msg);
  1370. return false;
  1371. } else {
  1372. this.$notify({
  1373. title: "成功",
  1374. message: "提交成功",
  1375. type: "success",
  1376. duration: 2000
  1377. });
  1378. console.log(hour + ":" + minute);
  1379. var date = new Date();
  1380. var hour =
  1381. date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
  1382. var minute =
  1383. date.getMinutes() < 10
  1384. ? "0" + date.getMinutes()
  1385. : date.getMinutes();
  1386. const params = {
  1387. advices: results,
  1388. advice_date: uParseTime(this.$route.query.date, "{y}-{m}-{d}"),
  1389. advice_doctor: results[0].advice_doctor,
  1390. advice_type: results[0].advice_type,
  1391. parent_id: this.patient_id,
  1392. start_time:
  1393. uParseTime(this.$route.query.date, "{y}-{m}-{d}") +
  1394. " " +
  1395. hour +
  1396. ":" +
  1397. minute,
  1398. remark: ""
  1399. };
  1400. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(
  1401. rs => {
  1402. var resp = rs.data;
  1403. if (resp.state == 1) {
  1404. // this.doctorAdvices = resp.data.advices
  1405. this.$emit("advice");
  1406. } else {
  1407. }
  1408. }
  1409. );
  1410. const prescription_resp = response.data.data.prescription;
  1411. const solution_resp = response.data.data.solution;
  1412. var prescription = this.prescription;
  1413. var solution = this.solution;
  1414. for (var index in prescription_resp) {
  1415. // prescription[index] = prescription_resp[index];
  1416. this.$set(prescription, index, prescription_resp[index]);
  1417. }
  1418. for (var index in solution_resp) {
  1419. // solution[index] = solution_resp[index];
  1420. this.$set(solution, index, solution_resp[index]);
  1421. }
  1422. this.hide();
  1423. }
  1424. });
  1425. }
  1426. } else {
  1427. if (this.is_pre == 1) {
  1428. if (this.patient.id <= 0) {
  1429. this.$message.error("没有选择患者");
  1430. this.loading = false;
  1431. return;
  1432. }
  1433. var arr = this.dialysisPrescription;
  1434. console.log("arr", arr);
  1435. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  1436. if (
  1437. parseInt(arr.dialyzer_perfusion_apparatus) ==
  1438. this.dialyzerPerfusionApparatus[i].id
  1439. ) {
  1440. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  1441. i
  1442. ].name;
  1443. }
  1444. }
  1445. const ParamsQuery = arr;
  1446. console.log("医嘱推送4", ParamsQuery);
  1447. ParamsQuery["patient"] = this.patient.id;
  1448. ParamsQuery["record_date"] = this.record_date;
  1449. console.log(this.prescription);
  1450. let mode = "";
  1451. if (this.prescription.creater <= 0) {
  1452. mode = 1;
  1453. } else {
  1454. mode = 2;
  1455. }
  1456. ParamsQuery["mode"] = mode;
  1457. postPrescription(ParamsQuery).then(response => {
  1458. if (response.data.state == 0) {
  1459. this.$message.error(response.data.msg);
  1460. return false;
  1461. } else {
  1462. this.$notify({
  1463. title: "成功",
  1464. message: "提交成功",
  1465. type: "success",
  1466. duration: 2000
  1467. });
  1468. const prescription_resp = response.data.data.prescription;
  1469. var prescription = this.prescription;
  1470. for (var index in prescription_resp) {
  1471. // prescription[index] = prescription_resp[index];
  1472. this.$set(prescription, index, prescription_resp[index]);
  1473. }
  1474. this.hide();
  1475. }
  1476. });
  1477. } else if (this.is_pre == 2) {
  1478. if (this.patient.id <= 0) {
  1479. this.$message.error("没有选择患者");
  1480. this.loading = false;
  1481. return;
  1482. }
  1483. var arr = this.dialysisPrescription;
  1484. console.log("arr", arr);
  1485. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  1486. if (
  1487. parseInt(arr.dialyzer_perfusion_apparatus) ==
  1488. this.dialyzerPerfusionApparatus[i].id
  1489. ) {
  1490. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  1491. i
  1492. ].name;
  1493. }
  1494. }
  1495. const ParamsQuery = arr;
  1496. console.log("医嘱推送5", ParamsQuery);
  1497. ParamsQuery["patient"] = this.patient.id;
  1498. ParamsQuery["record_date"] = this.record_date;
  1499. ParamsQuery["mode"] = 1;
  1500. postSoulution(ParamsQuery).then(response => {
  1501. if (response.data.state == 0) {
  1502. this.$message.error(response.data.msg);
  1503. return false;
  1504. } else {
  1505. this.$notify({
  1506. title: "成功",
  1507. message: "提交成功",
  1508. type: "success",
  1509. duration: 2000
  1510. });
  1511. const prescription_resp = response.data.data.prescription;
  1512. const solution_resp = response.data.data.solution;
  1513. var prescription = this.prescription;
  1514. var solution = this.solution;
  1515. for (var index in prescription_resp) {
  1516. // prescription[index] = prescription_resp[index];
  1517. this.$set(prescription, index, prescription_resp[index]);
  1518. }
  1519. for (var index in solution_resp) {
  1520. // solution[index] = solution_resp[index];
  1521. this.$set(solution, index, solution_resp[index]);
  1522. }
  1523. this.hide();
  1524. }
  1525. });
  1526. }
  1527. }
  1528. this.isShowRemindAdvice = false;
  1529. this.isVisibility = true;
  1530. },
  1531. handleAdviceCancle() {
  1532. this.isShowRemindAdvice = false;
  1533. this.isVisibility = true;
  1534. },
  1535. getTime(val) {
  1536. return uParseTime(val, "{y}-{m}-{d} {h}:{i}");
  1537. },
  1538. show(pre) {
  1539. console.log("pre--------",pre)
  1540. if(pre.id == 0){
  1541. this.dialysisPrescription.anticoagulant = "低分子肝素"
  1542. }
  1543. if (pre.anticoagulant == 3) {
  1544. this.dialysisPrescription.anticoagulant = "低分子肝素";
  1545. }
  1546. //入口
  1547. var pre = pre;
  1548. // console.log("pre是----", pre);
  1549. if (pre.mode_id == 2 || pre.mode_id == 5 || pre.mode_id == 12) {
  1550. this.zhiShow = true;
  1551. this.huShow = true;
  1552. this.totalShow = true;
  1553. } else if (
  1554. pre.mode_id == 1 ||
  1555. pre.mode_id == 3 ||
  1556. pre.mode_id == 4 ||
  1557. pre.mode_id == 6 ||
  1558. pre.mode_id == 7 ||
  1559. pre.mode_id == 8 ||
  1560. pre.mode_id == 9 ||
  1561. pre.mode_id == 10 ||
  1562. pre.mode_id == 11 ||
  1563. pre.mode_id == 13 ||
  1564. pre.mode_id == 14 ||
  1565. pre.mode_id == 19
  1566. ) {
  1567. this.zhiShow = false;
  1568. this.huShow = false;
  1569. this.totalShow = false;
  1570. }
  1571. this.pre = pre;
  1572. // console.log("pre1", pre);
  1573. this.getPermission();
  1574. let last_weight_after = 0;
  1575. let weight_before = 0;
  1576. if (this.last_record == null) {
  1577. last_weight_after = 0;
  1578. } else {
  1579. last_weight_after = this.last_record.weight_after;
  1580. }
  1581. if (this.predialysis == null || this.predialysis.id == 0) {
  1582. weight_before = 0;
  1583. } else {
  1584. weight_before = this.predialysis.weight_before;
  1585. }
  1586. if (weight_before > 0 && last_weight_after > 0) {
  1587. this.add_weight = parseFloat(weight_before - last_weight_after).toFixed(
  1588. 2
  1589. );
  1590. console.log("体重增加",this.add_weight)
  1591. }
  1592. this.isVisibility = true;
  1593. this.checkedCities = [];
  1594. for (let i = 0; i < this.targetAdvices.length; i++) {
  1595. if (this.targetAdvices[i].isCheck == 1) {
  1596. this.checkedCities.push(this.targetAdvices[i].id);
  1597. }
  1598. }
  1599. },
  1600. hide() {
  1601. this.isVisibility = false;
  1602. },
  1603. changeThisAnticoagulant: function(val) {
  1604. // console.log("val", val);
  1605. //debugger;
  1606. // var thismode = parseInt(val);
  1607. var thismode = val;
  1608. if (isNaN(thismode) || thismode <= 0) {
  1609. return false;
  1610. }
  1611. //if (
  1612. // typeof this.anticoagulantsConfit[thismode] === "undefined" ||
  1613. // this.anticoagulantsConfit[thismode] == null
  1614. // ) {
  1615. // return false;
  1616. // }
  1617. if (val < 2) {
  1618. this.anticoagulant = this.anticoagulantsConfit[thismode - 1];
  1619. }
  1620. if (val > 2) {
  1621. this.anticoagulant = this.anticoagulantsConfit[thismode - 2];
  1622. }
  1623. //console.log("fffff", this.anticoagulant);
  1624. },
  1625. handleCommit: function() {
  1626. if (this.dialysisPrescription.anticoagulant == "低分子肝素") {
  1627. this.dialysisPrescription.anticoagulant = 3;
  1628. }
  1629. if (this.dialysisPrescription.anticoagulant == 1) {
  1630. this.dialysisPrescription.anticoagulant_weichi = "0";
  1631. this.dialysisPrescription.anticoagulant_shouji = "0";
  1632. this.dialysisPrescription.anticoagulant_zongliang = "0";
  1633. }
  1634. if (this.$store.getters.xt_user.template_info.template_id == 6) {
  1635. if (this.dialysisPrescription.mode_id == 2) {
  1636. if (
  1637. this.dialysisPrescription.displace_liqui_part == 0 ||
  1638. this.dialysisPrescription.displace_liqui_part == -2 ||
  1639. this.dialysisPrescription.displace_liqui_value == 0 ||
  1640. this.dialysisPrescription.displace_liqui_value == ""
  1641. ) {
  1642. this.$message.error("HDF模式下置换液和置换液总量不能为空!");
  1643. return;
  1644. }
  1645. }
  1646. }
  1647. this.is_pre = 1;
  1648. if (this.prescription.id == 0) {
  1649. if (this.is_open == 0) {
  1650. if (this.patient.id <= 0) {
  1651. this.$message.error("没有选择患者");
  1652. this.loading = false;
  1653. return;
  1654. }
  1655. var arr = this.dialysisPrescription;
  1656. console.log("arr", arr);
  1657. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  1658. if (
  1659. parseInt(arr.dialyzer_perfusion_apparatus) == this.dialyzerPerfusionApparatus[i].id) {
  1660. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[i].name;
  1661. }
  1662. }
  1663. const ParamsQuery = arr;
  1664. console.log("night", ParamsQuery);
  1665. ParamsQuery["patient"] = this.patient.id;
  1666. ParamsQuery["record_date"] = this.record_date;
  1667. ParamsQuery["mode"] = "1";
  1668. postPrescription(ParamsQuery).then(response => {
  1669. if (response.data.state == 0) {
  1670. this.$message.error(response.data.msg);
  1671. return false;
  1672. } else {
  1673. this.$notify({
  1674. title: "成功",
  1675. message: "提交成功",
  1676. type: "success",
  1677. duration: 2000
  1678. });
  1679. const prescription_resp = response.data.data.prescription;
  1680. var prescription = this.prescription;
  1681. for (var index in prescription_resp) {
  1682. // prescription[index] = prescription_resp[index];
  1683. this.$set(prescription, index, prescription_resp[index]);
  1684. }
  1685. this.hide();
  1686. }
  1687. });
  1688. } else if (this.is_open == 1) {
  1689. if (this.targetAdvices.length > 0) {
  1690. // 弹框推送提醒
  1691. this.isShowRemindAdvice = true;
  1692. this.isVisibility = false;
  1693. } else {
  1694. if (this.patient.id <= 0) {
  1695. this.$message.error("没有选择患者");
  1696. this.loading = false;
  1697. return;
  1698. }
  1699. var arr = this.dialysisPrescription;
  1700. console.log("arr", arr);
  1701. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  1702. if (
  1703. parseInt(arr.dialyzer_perfusion_apparatus) ==
  1704. this.dialyzerPerfusionApparatus[i].id
  1705. ) {
  1706. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  1707. i
  1708. ].name;
  1709. }
  1710. }
  1711. const ParamsQuery = arr;
  1712. console.log("ParamsQuerytwo", ParamsQuery);
  1713. ParamsQuery["patient"] = this.patient.id;
  1714. ParamsQuery["record_date"] = this.record_date;
  1715. ParamsQuery["mode"] = "1";
  1716. postPrescription(ParamsQuery).then(response => {
  1717. if (response.data.state == 0) {
  1718. this.$message.error(response.data.msg);
  1719. return false;
  1720. } else {
  1721. this.$notify({
  1722. title: "成功",
  1723. message: "提交成功",
  1724. type: "success",
  1725. duration: 2000
  1726. });
  1727. const prescription_resp = response.data.data.prescription;
  1728. var prescription = this.prescription;
  1729. for (var index in prescription_resp) {
  1730. // prescription[index] = prescription_resp[index];
  1731. this.$set(prescription, index, prescription_resp[index]);
  1732. }
  1733. this.hide();
  1734. }
  1735. });
  1736. }
  1737. } else if (this.is_open == 2) {
  1738. var date = new Date();
  1739. var hour =
  1740. date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
  1741. var minute =
  1742. date.getMinutes() < 10
  1743. ? "0" + date.getMinutes()
  1744. : date.getMinutes();
  1745. if (this.waitUploadAdvices.length > 0) {
  1746. if (this.patient.id <= 0) {
  1747. this.$message.error("没有选择患者");
  1748. this.loading = false;
  1749. return;
  1750. }
  1751. var arr = this.dialysisPrescription;
  1752. console.log("arr", arr);
  1753. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  1754. if (
  1755. parseInt(arr.dialyzer_perfusion_apparatus) ==
  1756. this.dialyzerPerfusionApparatus[i].id
  1757. ) {
  1758. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  1759. i
  1760. ].name;
  1761. }
  1762. }
  1763. const ParamsQuery = arr;
  1764. console.log("paramsquerythree", ParamsQuery);
  1765. ParamsQuery["patient"] = this.patient.id;
  1766. ParamsQuery["record_date"] = this.record_date;
  1767. ParamsQuery["mode"] = "1";
  1768. postPrescription(ParamsQuery).then(response => {
  1769. if (response.data.state == 0) {
  1770. this.$message.error(response.data.msg);
  1771. return false;
  1772. } else {
  1773. this.$notify({
  1774. title: "成功",
  1775. message: "提交成功",
  1776. type: "success",
  1777. duration: 2000
  1778. });
  1779. const params = {
  1780. advices: this.waitUploadAdvices,
  1781. advice_date: uParseTime(
  1782. this.$route.query.date,
  1783. "{y}-{m}-{d}"
  1784. ),
  1785. advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  1786. advice_type: this.waitUploadAdvices[0].advice_type,
  1787. parent_id: this.patient_id,
  1788. // start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
  1789. start_time:
  1790. uParseTime(this.$route.query.date, "{y}-{m}-{d}") +
  1791. " " +
  1792. hour +
  1793. ":" +
  1794. minute,
  1795. remark: ""
  1796. };
  1797. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(
  1798. rs => {
  1799. var resp = rs.data;
  1800. if (resp.state == 1) {
  1801. // this.doctorAdvices = resp.data.advices
  1802. this.$emit("advice");
  1803. } else {
  1804. }
  1805. }
  1806. );
  1807. const prescription_resp = response.data.data.prescription;
  1808. var prescription = this.prescription;
  1809. for (var index in prescription_resp) {
  1810. // prescription[index] = prescription_resp[index];
  1811. this.$set(prescription, index, prescription_resp[index]);
  1812. }
  1813. this.hide();
  1814. }
  1815. });
  1816. } else {
  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 ( parseInt(arr.dialyzer_perfusion_apparatus) == this.dialyzerPerfusionApparatus[i].id) {
  1826. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[i].name;
  1827. }
  1828. }
  1829. const ParamsQuery = arr;
  1830. console.log("paramsqueryfour", ParamsQuery);
  1831. console.log("创建者",this.prescription.creater)
  1832. //if (this.prescription.creater <= 0) {
  1833. // mode = 1;
  1834. //} else {
  1835. // mode = 2;
  1836. //}
  1837. ParamsQuery["patient"] = this.patient.id;
  1838. ParamsQuery["record_date"] = this.record_date;
  1839. // console.log(this.prescription);
  1840. postPrescription(ParamsQuery).then(response => {
  1841. if (response.data.state == 0) {
  1842. this.$message.error(response.data.msg);
  1843. return false;
  1844. } else {
  1845. this.$notify({
  1846. title: "成功",
  1847. message: "提交成功",
  1848. type: "success",
  1849. duration: 2000
  1850. });
  1851. const prescription_resp = response.data.data.prescription;
  1852. // console.log("aaaaaaa", prescription_resp);
  1853. var prescription = this.prescription;
  1854. for (var index in prescription_resp) {
  1855. // prescription[index] = prescription_resp[index];
  1856. this.$set(prescription, index, prescription_resp[index]);
  1857. }
  1858. this.hide();
  1859. }
  1860. });
  1861. }
  1862. }
  1863. } else {
  1864. if (this.prescription.creater == 0) {
  1865. if (this.is_open == 0) {
  1866. if (this.patient.id <= 0) {
  1867. this.$message.error("没有选择患者");
  1868. this.loading = false;
  1869. return;
  1870. }
  1871. var arr = this.dialysisPrescription;
  1872. console.log("arr", arr);
  1873. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  1874. if (
  1875. parseInt(arr.dialyzer_perfusion_apparatus) ==
  1876. this.dialyzerPerfusionApparatus[i].id
  1877. ) {
  1878. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  1879. i
  1880. ].name;
  1881. }
  1882. }
  1883. const ParamsQuery = arr;
  1884. console.log("paramsqueryfive", ParamsQuery);
  1885. ParamsQuery["patient"] = this.patient.id;
  1886. ParamsQuery["record_date"] = this.record_date;
  1887. ParamsQuery["mode"] = "1";
  1888. postPrescription(ParamsQuery).then(response => {
  1889. if (response.data.state == 0) {
  1890. this.$message.error(response.data.msg);
  1891. return false;
  1892. } else {
  1893. this.$notify({
  1894. title: "成功",
  1895. message: "提交成功",
  1896. type: "success",
  1897. duration: 2000
  1898. });
  1899. const prescription_resp = response.data.data.prescription;
  1900. var prescription = this.prescription;
  1901. for (var index in prescription_resp) {
  1902. // prescription[index] = prescription_resp[index];
  1903. this.$set(prescription, index, prescription_resp[index]);
  1904. }
  1905. this.hide();
  1906. }
  1907. });
  1908. } else if (this.is_open == 1) {
  1909. if (this.targetAdvices.length > 0) {
  1910. // 弹框推送提醒
  1911. this.isShowRemindAdvice = true;
  1912. this.isVisibility = false;
  1913. } else {
  1914. if (this.patient.id <= 0) {
  1915. this.$message.error("没有选择患者");
  1916. this.loading = false;
  1917. return;
  1918. }
  1919. var arr = this.dialysisPrescription;
  1920. console.log("arr", arr);
  1921. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  1922. if (
  1923. parseInt(arr.dialyzer_perfusion_apparatus) ==
  1924. this.dialyzerPerfusionApparatus[i].id
  1925. ) {
  1926. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  1927. i
  1928. ].name;
  1929. }
  1930. }
  1931. const ParamsQuery = arr;
  1932. console.log("ParamsQuerysix", ParamsQuery);
  1933. ParamsQuery["patient"] = this.patient.id;
  1934. ParamsQuery["record_date"] = this.record_date;
  1935. ParamsQuery["mode"] = "1";
  1936. postPrescription(ParamsQuery).then(response => {
  1937. if (response.data.state == 0) {
  1938. this.$message.error(response.data.msg);
  1939. return false;
  1940. } else {
  1941. this.$notify({
  1942. title: "成功",
  1943. message: "提交成功",
  1944. type: "success",
  1945. duration: 2000
  1946. });
  1947. const prescription_resp = response.data.data.prescription;
  1948. var prescription = this.prescription;
  1949. for (var index in prescription_resp) {
  1950. // prescription[index] = prescription_resp[index];
  1951. this.$set(prescription, index, prescription_resp[index]);
  1952. }
  1953. this.hide();
  1954. }
  1955. });
  1956. }
  1957. } else if (this.is_open == 2) {
  1958. var date = new Date();
  1959. var hour =
  1960. date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
  1961. var minute =
  1962. date.getMinutes() < 10
  1963. ? "0" + date.getMinutes()
  1964. : date.getMinutes();
  1965. if (this.waitUploadAdvices.length > 0) {
  1966. if (this.patient.id <= 0) {
  1967. this.$message.error("没有选择患者");
  1968. this.loading = false;
  1969. return;
  1970. }
  1971. var arr = this.dialysisPrescription;
  1972. console.log("arr", arr);
  1973. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  1974. if (
  1975. parseInt(arr.dialyzer_perfusion_apparatus) ==
  1976. this.dialyzerPerfusionApparatus[i].id
  1977. ) {
  1978. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  1979. i
  1980. ].name;
  1981. }
  1982. }
  1983. const ParamsQuery = arr;
  1984. console.log("parasmqueryseven", parasmqueryseven);
  1985. ParamsQuery["patient"] = this.patient.id;
  1986. ParamsQuery["record_date"] = this.record_date;
  1987. ParamsQuery["mode"] = "1";
  1988. postPrescription(ParamsQuery).then(response => {
  1989. if (response.data.state == 0) {
  1990. this.$message.error(response.data.msg);
  1991. return false;
  1992. } else {
  1993. this.$notify({
  1994. title: "成功",
  1995. message: "提交成功",
  1996. type: "success",
  1997. duration: 2000
  1998. });
  1999. const params = {
  2000. advices: this.waitUploadAdvices,
  2001. advice_date: uParseTime(
  2002. this.$route.query.date,
  2003. "{y}-{m}-{d}"
  2004. ),
  2005. advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  2006. advice_type: this.waitUploadAdvices[0].advice_type,
  2007. parent_id: this.patient_id,
  2008. // start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
  2009. start_time:
  2010. uParseTime(this.$route.query.date, "{y}-{m}-{d}") +
  2011. " " +
  2012. hour +
  2013. ":" +
  2014. minute,
  2015. remark: ""
  2016. };
  2017. CreateGroupAdvice(
  2018. this.$route.query.patient_id,
  2019. 0,
  2020. params
  2021. ).then(rs => {
  2022. var resp = rs.data;
  2023. if (resp.state == 1) {
  2024. // this.doctorAdvices = resp.data.advices
  2025. this.$emit("advice");
  2026. } else {
  2027. }
  2028. });
  2029. const prescription_resp = response.data.data.prescription;
  2030. var prescription = this.prescription;
  2031. for (var index in prescription_resp) {
  2032. // prescription[index] = prescription_resp[index];
  2033. this.$set(prescription, index, prescription_resp[index]);
  2034. }
  2035. this.hide();
  2036. }
  2037. });
  2038. } else {
  2039. if (this.patient.id <= 0) {
  2040. this.$message.error("没有选择患者");
  2041. this.loading = false;
  2042. return;
  2043. }
  2044. var arr = this.dialysisPrescription;
  2045. console.log("arr", arr);
  2046. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  2047. if (
  2048. parseInt(arr.dialyzer_perfusion_apparatus) ==
  2049. this.dialyzerPerfusionApparatus[i].id
  2050. ) {
  2051. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  2052. i
  2053. ].name;
  2054. }
  2055. }
  2056. const ParamsQuery = arr;
  2057. console.log("eight", ParamsQuery);
  2058. ParamsQuery["patient"] = this.patient.id;
  2059. ParamsQuery["record_date"] = this.record_date;
  2060. ParamsQuery["mode"] = "1";
  2061. postPrescription(ParamsQuery).then(response => {
  2062. if (response.data.state == 0) {
  2063. this.$message.error(response.data.msg);
  2064. return false;
  2065. } else {
  2066. this.$notify({
  2067. title: "成功",
  2068. message: "提交成功",
  2069. type: "success",
  2070. duration: 2000
  2071. });
  2072. const prescription_resp = response.data.data.prescription;
  2073. var prescription = this.prescription;
  2074. for (var index in prescription_resp) {
  2075. // prescription[index] = prescription_resp[index];
  2076. this.$set(prescription, index, prescription_resp[index]);
  2077. }
  2078. this.hide();
  2079. }
  2080. });
  2081. }
  2082. }
  2083. } else {
  2084. if (this.patient.id <= 0) {
  2085. this.$message.error("没有选择患者");
  2086. this.loading = false;
  2087. return;
  2088. }
  2089. var arr = this.dialysisPrescription;
  2090. console.log("arr", arr);
  2091. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  2092. if (
  2093. parseInt(arr.dialyzer_perfusion_apparatus) ==
  2094. this.dialyzerPerfusionApparatus[i].id
  2095. ) {
  2096. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  2097. i
  2098. ].name;
  2099. }
  2100. }
  2101. const ParamsQuery = arr;
  2102. console.log("night", ParamsQuery);
  2103. ParamsQuery["patient"] = this.patient.id;
  2104. ParamsQuery["record_date"] = this.record_date;
  2105. ParamsQuery["mode"] = "2";
  2106. if (
  2107. this.$store.getters.xt_user.user.id !=
  2108. this.dialysisPrescription.creater
  2109. ) {
  2110. ParamsQuery["mode"] = "3";
  2111. }
  2112. postPrescription(ParamsQuery).then(response => {
  2113. if (response.data.state == 0) {
  2114. this.$message.error(response.data.msg);
  2115. return false;
  2116. } else {
  2117. this.$notify({
  2118. title: "成功",
  2119. message: "提交成功",
  2120. type: "success",
  2121. duration: 2000
  2122. });
  2123. const prescription_resp = response.data.data.prescription;
  2124. var prescription = this.prescription;
  2125. for (var index in prescription_resp) {
  2126. // prescription[index] = prescription_resp[index];
  2127. this.$set(prescription, index, prescription_resp[index]);
  2128. }
  2129. this.hide();
  2130. }
  2131. });
  2132. }
  2133. }
  2134. },
  2135. handleCancle: function() {
  2136. this.hide();
  2137. },
  2138. handleSolution: function() {
  2139. if (this.dialysisPrescription.anticoagulant == 1) {
  2140. this.dialysisPrescription.anticoagulant_weichi = "0";
  2141. this.dialysisPrescription.anticoagulant_shouji = "0";
  2142. this.dialysisPrescription.anticoagulant_zongliang = "0";
  2143. }
  2144. if (this.$store.getters.xt_user.template_info.template_id == 6) {
  2145. if (this.dialysisPrescription.mode_id == 2) {
  2146. if (
  2147. this.dialysisPrescription.displace_liqui_part == 0 ||
  2148. this.dialysisPrescription.displace_liqui_part == -2 ||
  2149. this.dialysisPrescription.displace_liqui_value == 0 ||
  2150. this.dialysisPrescription.displace_liqui_value == ""
  2151. ) {
  2152. this.$message.error("HDF模式下置换液和置换液总量不能为空!");
  2153. return;
  2154. }
  2155. }
  2156. }
  2157. this.is_pre = 2;
  2158. if (this.prescription.id == 0) {
  2159. if (this.is_open == 0) {
  2160. if (this.patient.id <= 0) {
  2161. this.$message.error("没有选择患者");
  2162. this.loading = false;
  2163. return;
  2164. }
  2165. var arr = this.dialysisPrescription;
  2166. console.log("arr", arr);
  2167. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  2168. if (
  2169. parseInt(arr.dialyzer_perfusion_apparatus) ==
  2170. this.dialyzerPerfusionApparatus[i].id
  2171. ) {
  2172. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  2173. i
  2174. ].name;
  2175. }
  2176. }
  2177. const ParamsQuery = arr;
  2178. console.log("长期处方1", ParamsQuery);
  2179. ParamsQuery["patient"] = this.patient.id;
  2180. ParamsQuery["record_date"] = this.record_date;
  2181. ParamsQuery["mode"] = "1";
  2182. postSoulution(ParamsQuery).then(response => {
  2183. if (response.data.state == 0) {
  2184. this.$message.error(response.data.msg);
  2185. return false;
  2186. } else {
  2187. this.$notify({
  2188. title: "成功",
  2189. message: "提交成功",
  2190. type: "success",
  2191. duration: 2000
  2192. });
  2193. const prescription_resp = response.data.data.prescription;
  2194. const solution_resp = response.data.data.solution;
  2195. var prescription = this.prescription;
  2196. var solution = this.solution;
  2197. for (var index in prescription_resp) {
  2198. // prescription[index] = prescription_resp[index];
  2199. this.$set(prescription, index, prescription_resp[index]);
  2200. }
  2201. for (var index in solution_resp) {
  2202. // solution[index] = solution_resp[index];
  2203. this.$set(solution, index, solution_resp[index]);
  2204. }
  2205. this.hide();
  2206. }
  2207. });
  2208. } else if (this.is_open == 1) {
  2209. if (this.targetAdvices.length > 0) {
  2210. // 弹框推送提
  2211. this.isShowRemindAdvice = true;
  2212. this.isVisibility = false;
  2213. } else {
  2214. if (this.patient.id <= 0) {
  2215. this.$message.error("没有选择患者");
  2216. this.loading = false;
  2217. return;
  2218. }
  2219. var arr = this.dialysisPrescription;
  2220. console.log("arr", arr);
  2221. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  2222. if (
  2223. parseInt(arr.dialyzer_perfusion_apparatus) ==
  2224. this.dialyzerPerfusionApparatus[i].id
  2225. ) {
  2226. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  2227. i
  2228. ].name;
  2229. }
  2230. }
  2231. const ParamsQuery = arr;
  2232. console.log("长期处方2", ParamsQuery);
  2233. ParamsQuery["patient"] = this.patient.id;
  2234. ParamsQuery["record_date"] = this.record_date;
  2235. ParamsQuery["mode"] = "1";
  2236. postSoulution(ParamsQuery).then(response => {
  2237. if (response.data.state == 0) {
  2238. this.$message.error(response.data.msg);
  2239. return false;
  2240. } else {
  2241. this.$notify({
  2242. title: "成功",
  2243. message: "提交成功",
  2244. type: "success",
  2245. duration: 2000
  2246. });
  2247. const prescription_resp = response.data.data.prescription;
  2248. const solution_resp = response.data.data.solution;
  2249. var prescription = this.prescription;
  2250. var solution = this.solution;
  2251. for (var index in prescription_resp) {
  2252. // prescription[index] = prescription_resp[index];
  2253. this.$set(prescription, index, prescription_resp[index]);
  2254. }
  2255. for (var index in solution_resp) {
  2256. // solution[index] = solution_resp[index];
  2257. this.$set(solution, index, solution_resp[index]);
  2258. }
  2259. this.hide();
  2260. }
  2261. });
  2262. }
  2263. } else if (this.is_open == 2) {
  2264. var date = new Date();
  2265. var hour =
  2266. date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
  2267. var minute =
  2268. date.getMinutes() < 10
  2269. ? "0" + date.getMinutes()
  2270. : date.getMinutes();
  2271. if (this.waitUploadAdvices.length > 0) {
  2272. if (this.patient.id <= 0) {
  2273. this.$message.error("没有选择患者");
  2274. this.loading = false;
  2275. return;
  2276. }
  2277. var arr = this.dialysisPrescription;
  2278. console.log("arr", arr);
  2279. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  2280. if (
  2281. parseInt(arr.dialyzer_perfusion_apparatus) ==
  2282. this.dialyzerPerfusionApparatus[i].id
  2283. ) {
  2284. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  2285. i
  2286. ].name;
  2287. }
  2288. }
  2289. const ParamsQuery = arr;
  2290. console.log("长期处方3", ParamsQuery);
  2291. ParamsQuery["patient"] = this.patient.id;
  2292. ParamsQuery["record_date"] = this.record_date;
  2293. console.log(this.prescription);
  2294. ParamsQuery["mode"] = "1";
  2295. postPrescription(ParamsQuery).then(response => {
  2296. if (response.data.state == 0) {
  2297. this.$message.error(response.data.msg);
  2298. return false;
  2299. } else {
  2300. this.$notify({
  2301. title: "成功",
  2302. message: "提交成功",
  2303. type: "success",
  2304. duration: 2000
  2305. });
  2306. const params = {
  2307. advices: this.waitUploadAdvices,
  2308. advice_date: uParseTime(
  2309. this.$route.query.date,
  2310. "{y}-{m}-{d}"
  2311. ),
  2312. advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  2313. advice_type: this.waitUploadAdvices[0].advice_type,
  2314. parent_id: this.patient_id,
  2315. // start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d}'),
  2316. start_time:
  2317. uParseTime(this.$route.query.date, "{y}-{m}-{d}") +
  2318. " " +
  2319. hour +
  2320. ":" +
  2321. minute,
  2322. remark: ""
  2323. };
  2324. CreateGroupAdvice(this.$route.query.patient_id, 0, params).then(
  2325. rs => {
  2326. var resp = rs.data;
  2327. if (resp.state == 1) {
  2328. // this.doctorAdvices = resp.data.advices
  2329. this.$emit("advice");
  2330. } else {
  2331. }
  2332. }
  2333. );
  2334. const prescription_resp = response.data.data.prescription;
  2335. var prescription = this.prescription;
  2336. for (var index in prescription_resp) {
  2337. // prescription[index] = prescription_resp[index];
  2338. this.$set(prescription, index, prescription_resp[index]);
  2339. }
  2340. this.hide();
  2341. }
  2342. });
  2343. } else {
  2344. if (this.patient.id <= 0) {
  2345. this.$message.error("没有选择患者");
  2346. this.loading = false;
  2347. return;
  2348. }
  2349. var arr = this.dialysisPrescription;
  2350. console.log("arr", arr);
  2351. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  2352. if (
  2353. parseInt(arr.dialyzer_perfusion_apparatus) ==
  2354. this.dialyzerPerfusionApparatus[i].id
  2355. ) {
  2356. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  2357. i
  2358. ].name;
  2359. }
  2360. }
  2361. const ParamsQuery = arr;
  2362. console.log("长期处方5", ParamsQuery);
  2363. ParamsQuery["patient"] = this.patient.id;
  2364. ParamsQuery["record_date"] = this.record_date;
  2365. ParamsQuery["mode"] = "1";
  2366. postSoulution(ParamsQuery).then(response => {
  2367. if (response.data.state == 0) {
  2368. this.$message.error(response.data.msg);
  2369. return false;
  2370. } else {
  2371. this.$notify({
  2372. title: "成功",
  2373. message: "提交成功",
  2374. type: "success",
  2375. duration: 2000
  2376. });
  2377. const prescription_resp = response.data.data.prescription;
  2378. const solution_resp = response.data.data.solution;
  2379. var prescription = this.prescription;
  2380. var solution = this.solution;
  2381. for (var index in prescription_resp) {
  2382. // prescription[index] = prescription_resp[index];
  2383. this.$set(prescription, index, prescription_resp[index]);
  2384. }
  2385. for (var index in solution_resp) {
  2386. // solution[index] = solution_resp[index];
  2387. this.$set(solution, index, solution_resp[index]);
  2388. }
  2389. this.hide();
  2390. }
  2391. });
  2392. }
  2393. }
  2394. } else {
  2395. if (this.prescription.creater == 0) {
  2396. if (this.is_open == 0) {
  2397. if (this.patient.id <= 0) {
  2398. this.$message.error("没有选择患者");
  2399. this.loading = false;
  2400. return;
  2401. }
  2402. var arr = this.dialysisPrescription;
  2403. console.log("arr", arr);
  2404. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  2405. if (
  2406. parseInt(arr.dialyzer_perfusion_apparatus) ==
  2407. this.dialyzerPerfusionApparatus[i].id
  2408. ) {
  2409. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  2410. i
  2411. ].name;
  2412. }
  2413. }
  2414. const ParamsQuery = arr;
  2415. console.log("长期处方6", ParamsQuery);
  2416. ParamsQuery["patient"] = this.patient.id;
  2417. ParamsQuery["record_date"] = this.record_date;
  2418. ParamsQuery["mode"] = "1";
  2419. postSoulution(ParamsQuery).then(response => {
  2420. if (response.data.state == 0) {
  2421. this.$message.error(response.data.msg);
  2422. return false;
  2423. } else {
  2424. this.$notify({
  2425. title: "成功",
  2426. message: "提交成功",
  2427. type: "success",
  2428. duration: 2000
  2429. });
  2430. const prescription_resp = response.data.data.prescription;
  2431. const solution_resp = response.data.data.solution;
  2432. var prescription = this.prescription;
  2433. var solution = this.solution;
  2434. for (var index in prescription_resp) {
  2435. // prescription[index] = prescription_resp[index];
  2436. this.$set(prescription, index, prescription_resp[index]);
  2437. }
  2438. for (var index in solution_resp) {
  2439. // solution[index] = solution_resp[index];
  2440. this.$set(solution, index, solution_resp[index]);
  2441. }
  2442. this.hide();
  2443. }
  2444. });
  2445. } else if (this.is_open == 1) {
  2446. if (this.targetAdvices.length > 0) {
  2447. // 弹框推送提醒
  2448. this.isShowRemindAdvice = true;
  2449. this.isVisibility = false;
  2450. } else {
  2451. if (this.patient.id <= 0) {
  2452. this.$message.error("没有选择患者");
  2453. this.loading = false;
  2454. return;
  2455. }
  2456. var arr = this.dialysisPrescription;
  2457. console.log("arr", arr);
  2458. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  2459. if (
  2460. parseInt(arr.dialyzer_perfusion_apparatus) ==
  2461. this.dialyzerPerfusionApparatus[i].id
  2462. ) {
  2463. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  2464. i
  2465. ].name;
  2466. }
  2467. }
  2468. const ParamsQuery = arr;
  2469. console.log("长期处方7", ParamsQuery);
  2470. ParamsQuery["patient"] = this.patient.id;
  2471. ParamsQuery["record_date"] = this.record_date;
  2472. ParamsQuery["mode"] = "1";
  2473. postSoulution(ParamsQuery).then(response => {
  2474. if (response.data.state == 0) {
  2475. this.$message.error(response.data.msg);
  2476. return false;
  2477. } else {
  2478. this.$notify({
  2479. title: "成功",
  2480. message: "提交成功",
  2481. type: "success",
  2482. duration: 2000
  2483. });
  2484. const prescription_resp = response.data.data.prescription;
  2485. const solution_resp = response.data.data.solution;
  2486. var prescription = this.prescription;
  2487. var solution = this.solution;
  2488. for (var index in prescription_resp) {
  2489. // prescription[index] = prescription_resp[index];
  2490. this.$set(prescription, index, prescription_resp[index]);
  2491. }
  2492. for (var index in solution_resp) {
  2493. // solution[index] = solution_resp[index];
  2494. this.$set(solution, index, solution_resp[index]);
  2495. }
  2496. this.hide();
  2497. }
  2498. });
  2499. }
  2500. } else if (this.is_open == 2) {
  2501. var date = new Date();
  2502. var hour =
  2503. date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
  2504. var minute =
  2505. date.getMinutes() < 10
  2506. ? "0" + date.getMinutes()
  2507. : date.getMinutes();
  2508. if (this.waitUploadAdvices.length > 0) {
  2509. if (this.patient.id <= 0) {
  2510. this.$message.error("没有选择患者");
  2511. this.loading = false;
  2512. return;
  2513. }
  2514. var arr = this.dialysisPrescription;
  2515. console.log("arr", arr);
  2516. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  2517. if (
  2518. parseInt(arr.dialyzer_perfusion_apparatus) ==
  2519. this.dialyzerPerfusionApparatus[i].id
  2520. ) {
  2521. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  2522. i
  2523. ].name;
  2524. }
  2525. }
  2526. const ParamsQuery = arr;
  2527. console.log("长期处方8", ParamsQuery);
  2528. ParamsQuery["patient"] = this.patient.id;
  2529. ParamsQuery["record_date"] = this.record_date;
  2530. ParamsQuery["mode"] = "1";
  2531. postSoulution(ParamsQuery).then(response => {
  2532. if (response.data.state == 0) {
  2533. this.$message.error(response.data.msg);
  2534. return false;
  2535. } else {
  2536. this.$notify({
  2537. title: "成功",
  2538. message: "提交成功",
  2539. type: "success",
  2540. duration: 2000
  2541. });
  2542. const params = {
  2543. advices: this.waitUploadAdvices,
  2544. advice_date: uParseTime(
  2545. this.$route.query.date,
  2546. "{y}-{m}-{d}"
  2547. ),
  2548. advice_doctor: this.waitUploadAdvices[0].advice_doctor,
  2549. advice_type: this.waitUploadAdvices[0].advice_type,
  2550. parent_id: this.patient_id,
  2551. // start_time: uParseTime(this.$route.query.date, '{y}-{m}-{d} {h}{i}'),
  2552. start_time:
  2553. uParseTime(this.$route.query.date, "{y}-{m}-{d}") +
  2554. " " +
  2555. hour +
  2556. ":" +
  2557. minute,
  2558. remark: ""
  2559. };
  2560. CreateGroupAdvice(
  2561. this.$route.query.patient_id,
  2562. 0,
  2563. params
  2564. ).then(rs => {
  2565. var resp = rs.data;
  2566. if (resp.state == 1) {
  2567. // this.doctorAdvices = resp.data.advices
  2568. this.$emit("advice");
  2569. } else {
  2570. }
  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. } else {
  2588. if (this.patient.id <= 0) {
  2589. this.$message.error("没有选择患者");
  2590. this.loading = false;
  2591. return;
  2592. }
  2593. var arr = this.dialysisPrescription;
  2594. console.log("arr", arr);
  2595. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  2596. if (
  2597. parseInt(arr.dialyzer_perfusion_apparatus) ==
  2598. this.dialyzerPerfusionApparatus[i].id
  2599. ) {
  2600. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  2601. i
  2602. ].name;
  2603. }
  2604. }
  2605. const ParamsQuery = arr;
  2606. console.log("长期处方9", ParamsQuery);
  2607. ParamsQuery["patient"] = this.patient.id;
  2608. ParamsQuery["record_date"] = this.record_date;
  2609. ParamsQuery["mode"] = "1";
  2610. postSoulution(ParamsQuery).then(response => {
  2611. if (response.data.state == 0) {
  2612. this.$message.error(response.data.msg);
  2613. return false;
  2614. } else {
  2615. this.$notify({
  2616. title: "成功",
  2617. message: "提交成功",
  2618. type: "success",
  2619. duration: 2000
  2620. });
  2621. const prescription_resp = response.data.data.prescription;
  2622. const solution_resp = response.data.data.solution;
  2623. var prescription = this.prescription;
  2624. var solution = this.solution;
  2625. for (var index in prescription_resp) {
  2626. // prescription[index] = prescription_resp[index];
  2627. this.$set(prescription, index, prescription_resp[index]);
  2628. }
  2629. for (var index in solution_resp) {
  2630. // solution[index] = solution_resp[index];
  2631. this.$set(solution, index, solution_resp[index]);
  2632. }
  2633. this.hide();
  2634. }
  2635. });
  2636. }
  2637. }
  2638. } else {
  2639. if (this.patient.id <= 0) {
  2640. this.$message.error("没有选择患者");
  2641. this.loading = false;
  2642. return;
  2643. }
  2644. var arr = this.dialysisPrescription;
  2645. console.log("arr", arr);
  2646. for (let i = 0; i < this.dialyzerPerfusionApparatus.length; i++) {
  2647. if (
  2648. parseInt(arr.dialyzer_perfusion_apparatus) ==
  2649. this.dialyzerPerfusionApparatus[i].id
  2650. ) {
  2651. arr.dialyzer_perfusion_apparatus = this.dialyzerPerfusionApparatus[
  2652. i
  2653. ].name;
  2654. }
  2655. }
  2656. const ParamsQuery = arr;
  2657. console.log("长期处方10", ParamsQuery);
  2658. ParamsQuery["patient"] = this.patient.id;
  2659. ParamsQuery["record_date"] = this.record_date;
  2660. ParamsQuery["mode"] = "1";
  2661. postSoulution(ParamsQuery).then(response => {
  2662. if (response.data.state == 0) {
  2663. this.$message.error(response.data.msg);
  2664. return false;
  2665. } else {
  2666. this.$notify({
  2667. title: "成功",
  2668. message: "提交成功",
  2669. type: "success",
  2670. duration: 2000
  2671. });
  2672. const prescription_resp = response.data.data.prescription;
  2673. const solution_resp = response.data.data.solution;
  2674. var prescription = this.prescription;
  2675. var solution = this.solution;
  2676. for (var index in prescription_resp) {
  2677. // prescription[index] = prescription_resp[index];
  2678. this.$set(prescription, index, prescription_resp[index]);
  2679. }
  2680. for (var index in solution_resp) {
  2681. // solution[index] = solution_resp[index];
  2682. this.$set(solution, index, solution_resp[index]);
  2683. }
  2684. this.hide();
  2685. }
  2686. });
  2687. }
  2688. }
  2689. },
  2690. isShows(name) {
  2691. var filedList = store.getters.xt_user.fileds;
  2692. for (let i = 0; i < filedList.length; i++) {
  2693. if (
  2694. filedList[i].module == 1 &&
  2695. filedList[i].filed_name_cn == name &&
  2696. filedList[i].is_show == 1
  2697. ) {
  2698. return true;
  2699. }
  2700. }
  2701. return false;
  2702. },
  2703. getDoctorName(doctor_id) {
  2704. for (let i = 0; i < this.admin_users.length; i++) {
  2705. if (this.admin_users[i].id == doctor_id) {
  2706. return this.admin_users[i].name;
  2707. }
  2708. }
  2709. },
  2710. getContent(val) {
  2711. let prescribing_number = "";
  2712. let single_dose = "";
  2713. let advice_desc = "";
  2714. if (val.prescribing_number > 0) {
  2715. prescribing_number =
  2716. val.prescribing_number + val.prescribing_number_unit;
  2717. }
  2718. if (val.single_dose > 0) {
  2719. single_dose = " 单次用量 " + val.single_dose + val.single_dose_unit;
  2720. }
  2721. if (val.advice_desc > 0) {
  2722. advice_desc = val.advice_desc + val.drug_spec_unit;
  2723. }
  2724. let name = "";
  2725. if (val.child.length > 0) {
  2726. for (let i = 0; i < val.child.length; i++) {
  2727. if (val.child[i].prescribing_number > 0) {
  2728. val.child[i]["presc"] =
  2729. val.child[i].prescribing_number +
  2730. val.child[i].prescribing_number_unit;
  2731. } else {
  2732. val.child[i]["presc"] = "";
  2733. }
  2734. if (val.child[i].single_dose > 0) {
  2735. val.child[i]["single"] =
  2736. " " +
  2737. " 单次用量 " +
  2738. " " +
  2739. val.child[i].single_dose +
  2740. val.child[i].single_dose_unit;
  2741. } else {
  2742. val.child[i]["single"] = "";
  2743. }
  2744. name =
  2745. name +
  2746. "▲" +
  2747. val.child[i].advice_name +
  2748. "" +
  2749. val.child[i].advice_desc +
  2750. val.child[i].drug_spec_unit +
  2751. val.child[i].presc +
  2752. val.child[i].single;
  2753. }
  2754. return (
  2755. val.advice_name +
  2756. " " +
  2757. advice_desc +
  2758. " " +
  2759. val.drug_spec_unit +
  2760. prescribing_number +
  2761. " " +
  2762. single_dose +
  2763. " " +
  2764. " " +
  2765. val.delivery_way +
  2766. " " +
  2767. val.execution_frequency +
  2768. val.remark +
  2769. name
  2770. );
  2771. } else {
  2772. return (
  2773. val.advice_name +
  2774. " " +
  2775. advice_desc +
  2776. prescribing_number +
  2777. " " +
  2778. single_dose +
  2779. " " +
  2780. " " +
  2781. val.delivery_way +
  2782. " " +
  2783. val.execution_frequency +
  2784. val.remark
  2785. );
  2786. }
  2787. },
  2788. changePrescription(id) {
  2789. const ParamsQuery = {};
  2790. ParamsQuery["patient_id"] = this.$route.query.patient_id;
  2791. ParamsQuery["mode_id"] = id;
  2792. GetSolution(ParamsQuery).then(response => {
  2793. if (response.data.state == 0) {
  2794. this.$message.error(response.data.msg);
  2795. return false;
  2796. } else {
  2797. this.$message.success("切换成功");
  2798. if (response.data.data.solution != null) {
  2799. for (const key in response.data.data.solution) {
  2800. // 长期处方不为空
  2801. if (key != "target_ultrafiltration") {
  2802. this.dialysisPrescription[key] =
  2803. response.data.data.solution[key];
  2804. }
  2805. }
  2806. } else {
  2807. if (response.data.data.prescription != null) {
  2808. // 临时处方不为空
  2809. for (const key in response.data.data.prescription) {
  2810. if (key != "target_ultrafiltration") {
  2811. this.dialysisPrescription[key] =
  2812. response.data.data.prescription[key];
  2813. }
  2814. }
  2815. } else if (response.data.data.system_prescription != null) {
  2816. // 临时处方不为空
  2817. for (const key in response.data.data.system_prescription) {
  2818. if (key != "target_ultrafiltration") {
  2819. this.dialysisPrescription[key] =
  2820. response.data.data.system_prescription[key];
  2821. }
  2822. }
  2823. } else {
  2824. for (const key in this.dialysisPrescription) {
  2825. // 临时处方为空
  2826. if (key != "target_ultrafiltration") {
  2827. this.dialysisPrescription[key] = "";
  2828. }
  2829. }
  2830. this.dialysisPrescription.mode_id = id;
  2831. }
  2832. }
  2833. }
  2834. if (
  2835. this.dialysisPrescription.dialysis_duration_hour === "" ||
  2836. this.dialysisPrescription.dialysis_duration_minute === ""
  2837. ) {
  2838. this.timeValue = "";
  2839. this.time = "03:00";
  2840. } else {
  2841. this.timeValue =
  2842. this.dialysisPrescription.dialysis_duration_hour +
  2843. "小时" +
  2844. this.dialysisPrescription.dialysis_duration_minute +
  2845. "分钟";
  2846. this.time =
  2847. (this.dialysisPrescription.dialysis_duration_hour > 10
  2848. ? this.dialysisPrescription.dialysis_duration_hour
  2849. : "0" + this.dialysisPrescription.dialysis_duration_hour) +
  2850. ":" +
  2851. (this.dialysisPrescription.dialysis_duration_minute > 10
  2852. ? this.dialysisPrescription.dialysis_duration_minute
  2853. : "0" + this.dialysisPrescription.dialysis_duration_minute);
  2854. }
  2855. });
  2856. if (
  2857. id === 1 ||
  2858. id === 3 ||
  2859. id === 4 ||
  2860. id === 6 ||
  2861. id === 7 ||
  2862. id === 8 ||
  2863. id === 9 ||
  2864. id === 10 ||
  2865. id === 11 ||
  2866. id === 13 ||
  2867. id === 14 ||
  2868. id === 15 ||
  2869. id === 16 ||
  2870. id === 19
  2871. ) {
  2872. this.zhiShow = false;
  2873. this.huShow = false;
  2874. this.totalShow = false;
  2875. } else {
  2876. this.zhiShow = true;
  2877. this.huShow = true;
  2878. this.totalShow = true;
  2879. }
  2880. },
  2881. handlePatientInfo() {
  2882. this.isVisibility = false;
  2883. this.msgtip_visibility = true;
  2884. },
  2885. cancleMsg() {
  2886. this.isVisibility = true;
  2887. this.msgtip_visibility = false;
  2888. },
  2889. getPermission() {
  2890. request
  2891. .get("/api/func_per/get", {
  2892. params: {
  2893. create_url: "/api/dialysis/prescription?mode=1",
  2894. modify_url: "/api/dialysis/prescription?mode=2",
  2895. modify_other_url: "/api/dialysis/prescription?mode=3",
  2896. module: 1
  2897. }
  2898. })
  2899. .then(res => {
  2900. console.log(res);
  2901. console.log("predialysis.creater", this.pre.creater);
  2902. console.log("admin.id", this.$store.getters.xt_user.user.id);
  2903. if (res.data.state == 0) {
  2904. this.hasPermission = false;
  2905. } else if (res.data.state == 1) {
  2906. if (this.pre.id != "" && this.pre.creater != 0) {
  2907. //有数据
  2908. if (this.pre.creater == this.$store.getters.xt_user.user.id) {
  2909. //创建人是自己
  2910. if (res.data.data.is_has_modify == false) {
  2911. this.hasPermission = false;
  2912. this.showTxt = "你没有修改透析处方权限";
  2913. }
  2914. } else {
  2915. //创建人不是自己
  2916. if (res.data.data.is_has_modify_other == false) {
  2917. this.hasPermission = false;
  2918. this.showTxt = "你没有修改他人透析处方权限";
  2919. }
  2920. }
  2921. } else if (this.pre.id == "" || this.pre.creater == 0) {
  2922. if (res.data.data.is_has_create == false) {
  2923. this.hasPermission = false;
  2924. this.showTxt = "你没有新增透析处方权限";
  2925. }
  2926. }
  2927. }
  2928. });
  2929. }
  2930. },
  2931. watch: {
  2932. "dialysisPrescription.dialysis_duration_hour": function() {
  2933. let dialysis_duration_minute = 0;
  2934. let dialysis_duration_hour = 0;
  2935. let duration = 0;
  2936. if (this.dialysisPrescription.dialysis_duration_minute == "") {
  2937. dialysis_duration_minute = 0;
  2938. } else {
  2939. dialysis_duration_minute = this.dialysisPrescription
  2940. .dialysis_duration_minute;
  2941. }
  2942. if (this.dialysisPrescription.dialysis_duration_hour == "") {
  2943. dialysis_duration_hour = 0;
  2944. } else {
  2945. dialysis_duration_hour = this.dialysisPrescription
  2946. .dialysis_duration_hour;
  2947. }
  2948. duration =
  2949. parseFloat(dialysis_duration_hour) +
  2950. parseFloat(dialysis_duration_minute) / 60;
  2951. this.dialysisPrescription.anticoagulant_zongliang = calculateAnticoagulantZL(
  2952. 1,
  2953. this.dialysisPrescription.anticoagulant_shouji,
  2954. duration,
  2955. this.dialysisPrescription.anticoagulant_weichi
  2956. );
  2957. if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
  2958. this.dialysisPrescription.anticoagulant_zongliang = "";
  2959. }
  2960. },
  2961. "dialysisPrescription.dialysis_duration_minute": function() {
  2962. let dialysis_duration_minute = 0;
  2963. let dialysis_duration_hour = 0;
  2964. let duration = 0;
  2965. if (this.dialysisPrescription.dialysis_duration_minute == "") {
  2966. dialysis_duration_minute = 0;
  2967. } else {
  2968. dialysis_duration_minute = this.dialysisPrescription
  2969. .dialysis_duration_minute;
  2970. }
  2971. if (this.dialysisPrescription.dialysis_duration_hour == "") {
  2972. dialysis_duration_hour = 0;
  2973. } else {
  2974. dialysis_duration_hour = this.dialysisPrescription
  2975. .dialysis_duration_hour;
  2976. }
  2977. duration =
  2978. parseFloat(dialysis_duration_hour) +
  2979. parseFloat(dialysis_duration_minute) / 60;
  2980. this.dialysisPrescription.anticoagulant_zongliang = calculateAnticoagulantZL(
  2981. 1,
  2982. this.dialysisPrescription.anticoagulant_shouji,
  2983. this.dialysisPrescription.dialysis_duration,
  2984. this.dialysisPrescription.anticoagulant_weichi
  2985. );
  2986. if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
  2987. this.dialysisPrescription.anticoagulant_zongliang = "";
  2988. }
  2989. //this.dialysisPrescription.anticoagulant_zongliang = calculateAnticoagulantZL(
  2990. // 1,
  2991. // this.dialysisPrescription.anticoagulant_shouji,
  2992. // duration,
  2993. // this.dialysisPrescription.anticoagulant_weichi
  2994. // );
  2995. // if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
  2996. // this.dialysisPrescription.anticoagulant_zongliang = "";
  2997. // }
  2998. },
  2999. "dialysisPrescription.anticoagulant_shouji": function() {
  3000. let dialysis_duration_minute = 0;
  3001. let dialysis_duration_hour = 0;
  3002. let duration = 0;
  3003. if (this.dialysisPrescription.dialysis_duration_minute == "") {
  3004. dialysis_duration_minute = 0;
  3005. } else {
  3006. dialysis_duration_minute = this.dialysisPrescription
  3007. .dialysis_duration_minute;
  3008. }
  3009. if (this.dialysisPrescription.dialysis_duration_hour == "") {
  3010. dialysis_duration_hour = 0;
  3011. } else {
  3012. dialysis_duration_hour = this.dialysisPrescription
  3013. .dialysis_duration_hour;
  3014. }
  3015. duration =
  3016. parseFloat(dialysis_duration_hour) +
  3017. parseFloat(dialysis_duration_minute) / 60;
  3018. this.dialysisPrescription.anticoagulant_zongliang = calculateAnticoagulantZL(
  3019. 1,
  3020. this.dialysisPrescription.anticoagulant_shouji,
  3021. this.dialysisPrescription.dialysis_duration,
  3022. this.dialysisPrescription.anticoagulant_weichi
  3023. );
  3024. if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
  3025. this.dialysisPrescription.anticoagulant_zongliang = "";
  3026. }
  3027. // this.dialysisPrescription.anticoagulant_zongliang = calculateAnticoagulantZL(
  3028. // 1,
  3029. // this.dialysisPrescription.anticoagulant_shouji,
  3030. // duration,
  3031. // this.dialysisPrescription.anticoagulant_weichi
  3032. // );
  3033. // if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
  3034. // this.dialysisPrescription.anticoagulant_zongliang = "";
  3035. // }
  3036. },
  3037. "dialysisPrescription.anticoagulant_weichi": function() {
  3038. let dialysis_duration_minute = 0;
  3039. let dialysis_duration_hour = 0;
  3040. let duration = 0;
  3041. if (this.dialysisPrescription.dialysis_duration_minute == "") {
  3042. dialysis_duration_minute = 0;
  3043. } else {
  3044. dialysis_duration_minute = this.dialysisPrescription
  3045. .dialysis_duration_minute;
  3046. }
  3047. if (this.dialysisPrescription.dialysis_duration_hour == "") {
  3048. dialysis_duration_hour = 0;
  3049. } else {
  3050. dialysis_duration_hour = this.dialysisPrescription
  3051. .dialysis_duration_hour;
  3052. }
  3053. duration =
  3054. parseFloat(dialysis_duration_hour) +
  3055. parseFloat(dialysis_duration_minute) / 60;
  3056. this.dialysisPrescription.anticoagulant_zongliang = calculateAnticoagulantZL(
  3057. 1,
  3058. this.dialysisPrescription.anticoagulant_shouji,
  3059. this.dialysisPrescription.dialysis_duration,
  3060. this.dialysisPrescription.anticoagulant_weichi
  3061. );
  3062. if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
  3063. this.dialysisPrescription.anticoagulant_zongliang = "";
  3064. }
  3065. // this.dialysisPrescription.anticoagulant_zongliang = calculateAnticoagulantZL(
  3066. // 1,
  3067. // this.dialysisPrescription.anticoagulant_shouji,
  3068. // duration,
  3069. // this.dialysisPrescription.anticoagulant_weichi
  3070. // );
  3071. // if (isNaN(this.dialysisPrescription.anticoagulant_zongliang)) {
  3072. // this.dialysisPrescription.anticoagulant_zongliang = "";
  3073. // }
  3074. },
  3075. "prescription.id": function() {
  3076. if (this.prescription.id > 0) {
  3077. for (var index in this.dialysisPrescription) {
  3078. this.dialysisPrescription[index] = this.prescription[index];
  3079. }
  3080. if (this.prescription["dialysate_formulation"] == 0) {
  3081. this.dialysisPrescription["dialysate_formulation"] = "";
  3082. }
  3083. if (this.prescription["anticoagulant"] == 0) {
  3084. this.dialysisPrescription["anticoagulant"] = "";
  3085. }
  3086. if (this.prescription["dialysis_duration_hour"] == 0) {
  3087. this.dialysisPrescription["dialysis_duration_hour"] = "";
  3088. }
  3089. if (this.prescription["dialysis_duration_minute"] == 0) {
  3090. this.dialysisPrescription["dialysis_duration_minute"] = "";
  3091. }
  3092. if (this.prescription["blood_flow_volume"] == 0) {
  3093. this.dialysisPrescription["blood_flow_volume"] = "";
  3094. }
  3095. if (this.prescription["target_ultrafiltration"] == 0) {
  3096. this.dialysisPrescription["target_ultrafiltration"] = "";
  3097. }
  3098. if (this.prescription["dialysate_temperature"] == 0) {
  3099. this.dialysisPrescription["dialysate_temperature"] = "";
  3100. }
  3101. if (this.prescription["anticoagulant_shouji"] == 0) {
  3102. this.dialysisPrescription["anticoagulant_shouji"] = "";
  3103. }
  3104. if (this.prescription["anticoagulant_weichi"] == 0) {
  3105. this.dialysisPrescription["anticoagulant_weichi"] = "";
  3106. }
  3107. if (this.prescription["anticoagulant_zongliang"] == 0) {
  3108. this.dialysisPrescription["anticoagulant_zongliang"] = "";
  3109. }
  3110. if (this.prescription["anticoagulant_gaijiliang"] == 0) {
  3111. this.dialysisPrescription["anticoagulant_gaijiliang"] = "";
  3112. }
  3113. if (this.prescription["kalium"] == 0) {
  3114. this.dialysisPrescription["kalium"] = "";
  3115. }
  3116. if (this.prescription["sodium"] == 0) {
  3117. this.dialysisPrescription["sodium"] = "";
  3118. }
  3119. if (this.prescription["calcium"] == 0) {
  3120. this.dialysisPrescription["calcium"] = "";
  3121. }
  3122. if (this.prescription["bicarbonate"] == 0) {
  3123. this.dialysisPrescription["bicarbonate"] = "";
  3124. }
  3125. if (this.prescription["glucose"] == 0) {
  3126. this.dialysisPrescription["glucose"] = "";
  3127. }
  3128. if (this.prescription["dialysate_flow"] == 0) {
  3129. this.dialysisPrescription["dialysate_flow"] = "";
  3130. }
  3131. if (this.prescription["conductivity"] == 0) {
  3132. this.dialysisPrescription["conductivity"] = "";
  3133. }
  3134. if (this.prescription["replacement_total"] == 0) {
  3135. this.dialysisPrescription["replacement_total"] = "";
  3136. }
  3137. if (this.prescription["target_ktv"] == 0) {
  3138. this.dialysisPrescription["target_ktv"] = "";
  3139. }
  3140. }
  3141. },
  3142. "solution.id": function() {
  3143. if (this.solution.id > 0) {
  3144. if (
  3145. this.prescription != null &&
  3146. typeof this.prescription.id !== "undefined" &&
  3147. this.prescription.id > 0
  3148. ) {
  3149. for (const key in this.prescription) {
  3150. this.dialysisPrescription[key] = this.prescription[key];
  3151. }
  3152. if (this.prescription["dialysate_formulation"] == 0) {
  3153. this.dialysisPrescription["dialysate_formulation"] = "";
  3154. }
  3155. if (this.prescription["anticoagulant"] == 0) {
  3156. this.dialysisPrescription["anticoagulant"] = "";
  3157. }
  3158. if (this.prescription["dialysis_duration_hour"] == 0) {
  3159. this.dialysisPrescription["dialysis_duration_hour"] = "";
  3160. }
  3161. if (this.prescription["dialysis_duration_minute"] == 0) {
  3162. this.dialysisPrescription["dialysis_duration_minute"] = "";
  3163. }
  3164. if (this.prescription["blood_flow_volume"] == 0) {
  3165. this.dialysisPrescription["blood_flow_volume"] = "";
  3166. }
  3167. if (this.prescription["target_ultrafiltration"] == 0) {
  3168. this.dialysisPrescription["target_ultrafiltration"] = "";
  3169. }
  3170. if (this.prescription["dialysate_temperature"] == 0) {
  3171. this.dialysisPrescription["dialysate_temperature"] = "";
  3172. }
  3173. if (this.prescription["anticoagulant_shouji"] == 0) {
  3174. this.dialysisPrescription["anticoagulant_shouji"] = "";
  3175. }
  3176. if (this.prescription["anticoagulant_weichi"] == 0) {
  3177. this.dialysisPrescription["anticoagulant_weichi"] = "";
  3178. }
  3179. if (this.prescription["anticoagulant_zongliang"] == 0) {
  3180. this.dialysisPrescription["anticoagulant_zongliang"] = "";
  3181. }
  3182. if (this.prescription["anticoagulant_gaijiliang"] == 0) {
  3183. this.dialysisPrescription["anticoagulant_gaijiliang"] = "";
  3184. }
  3185. if (this.prescription["kalium"] == 0) {
  3186. this.dialysisPrescription["kalium"] = "";
  3187. }
  3188. if (this.prescription["sodium"] == 0) {
  3189. this.dialysisPrescription["sodium"] = "";
  3190. }
  3191. if (this.prescription["calcium"] == 0) {
  3192. this.dialysisPrescription["calcium"] = "";
  3193. }
  3194. if (this.prescription["bicarbonate"] == 0) {
  3195. this.dialysisPrescription["bicarbonate"] = "";
  3196. }
  3197. if (this.prescription["glucose"] == 0) {
  3198. this.dialysisPrescription["glucose"] = "";
  3199. }
  3200. if (this.prescription["dialysate_flow"] == 0) {
  3201. this.dialysisPrescription["dialysate_flow"] = "";
  3202. }
  3203. if (this.prescription["conductivity"] == 0) {
  3204. this.dialysisPrescription["conductivity"] = "";
  3205. }
  3206. if (this.prescription["replacement_total"] == 0) {
  3207. this.dialysisPrescription["replacement_total"] = "";
  3208. }
  3209. if (this.prescription["target_ktv"] == 0) {
  3210. this.dialysisPrescription["target_ktv"] = "";
  3211. }
  3212. } else if (
  3213. this.solution != null &&
  3214. typeof this.solution.id !== "undefined" &&
  3215. this.solution.id
  3216. ) {
  3217. for (const key in this.solution) {
  3218. this.dialysisPrescription[key] = this.solution[key];
  3219. }
  3220. if (this.solution["dialysate_formulation"] == 0) {
  3221. this.dialysisPrescription["dialysate_formulation"] = "";
  3222. }
  3223. if (this.solution["anticoagulant"] == 0) {
  3224. this.dialysisPrescription["anticoagulant"] = "";
  3225. }
  3226. if (this.solution["dialysis_duration_hour"] == 0) {
  3227. this.dialysisPrescription["dialysis_duration_hour"] = "";
  3228. }
  3229. if (this.solution["dialysis_duration_minute"] == 0) {
  3230. this.dialysisPrescription["dialysis_duration_minute"] = "";
  3231. }
  3232. if (this.solution["blood_flow_volume"] == 0) {
  3233. this.dialysisPrescription["blood_flow_volume"] = "";
  3234. }
  3235. if (this.solution["target_ultrafiltration"] == 0) {
  3236. this.dialysisPrescription["target_ultrafiltration"] = "";
  3237. }
  3238. if (this.solution["dialysate_temperature"] == 0) {
  3239. this.dialysisPrescription["dialysate_temperature"] = "";
  3240. }
  3241. if (this.solution["anticoagulant_shouji"] == 0) {
  3242. this.dialysisPrescription["anticoagulant_shouji"] = "";
  3243. }
  3244. if (this.solution["anticoagulant_weichi"] == 0) {
  3245. this.dialysisPrescription["anticoagulant_weichi"] = "";
  3246. }
  3247. if (this.solution["anticoagulant_zongliang"] == 0) {
  3248. this.dialysisPrescription["anticoagulant_zongliang"] = "";
  3249. }
  3250. if (this.solution["anticoagulant_gaijiliang"] == 0) {
  3251. this.dialysisPrescription["anticoagulant_gaijiliang"] = "";
  3252. }
  3253. if (this.solution["kalium"] == 0) {
  3254. this.dialysisPrescription["kalium"] = "";
  3255. }
  3256. if (this.solution["sodium"] == 0) {
  3257. this.dialysisPrescription["sodium"] = "";
  3258. }
  3259. if (this.solution["calcium"] == 0) {
  3260. this.dialysisPrescription["calcium"] = "";
  3261. }
  3262. if (this.solution["bicarbonate"] == 0) {
  3263. this.dialysisPrescription["bicarbonate"] = "";
  3264. }
  3265. if (this.solution["glucose"] == 0) {
  3266. this.dialysisPrescription["glucose"] = "";
  3267. }
  3268. if (this.solution["dialysate_flow"] == 0) {
  3269. this.dialysisPrescription["dialysate_flow"] = "";
  3270. }
  3271. if (this.solution["conductivity"] == 0) {
  3272. this.dialysisPrescription["conductivity"] = "";
  3273. }
  3274. if (this.solution["replacement_total"] == 0) {
  3275. this.dialysisPrescription["replacement_total"] = "";
  3276. }
  3277. if (this.solution["target_ktv"] == 0) {
  3278. this.dialysisPrescription["target_ktv"] = "";
  3279. }
  3280. }
  3281. }
  3282. }
  3283. }
  3284. };
  3285. </script>
  3286. <style rel="stylesheet/scss" lang="scss" scoped>
  3287. .el-checkbox,
  3288. .el-checkbox__input {
  3289. vertical-align: middle;
  3290. }
  3291. .newLine {
  3292. display: flex;
  3293. justify-content: space-between;
  3294. height: 40px;
  3295. line-height: 40px;
  3296. border-bottom: 1px solid #ccc;
  3297. }
  3298. .warnTxt {
  3299. text-align: center;
  3300. margin: 0 auto;
  3301. background: #faa331;
  3302. max-width: 240px;
  3303. padding: 10px 20px;
  3304. border-radius: 4px;
  3305. margin-bottom: 10px;
  3306. color: #fff;
  3307. }
  3308. </style>
  3309. <style lang="scss">
  3310. .newDialog {
  3311. .el-dialog__body {
  3312. padding: 10px 20px 30px;
  3313. }
  3314. }
  3315. </style>