dialysisSolution.vue 98KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684
  1. <template>
  2. <div class="patient-container">
  3. <patient-sidebar :id="patientID" defaultActive="2-1"></patient-sidebar>
  4. <div class="patient-app-container app-container">
  5. <div class="Total">
  6. <div class="sum">
  7. <el-button
  8. type="primary"
  9. size="small"
  10. icon="el-icon-plus"
  11. @click="openNew"
  12. :disabled="
  13. $store.getters.xt_user.subscibe.state == 3 ? true : false
  14. "
  15. >新增透析处方
  16. </el-button>
  17. </div>
  18. </div>
  19. <el-table
  20. ref="solutionTable"
  21. :data="tableData"
  22. border
  23. fit
  24. highlight-current-row
  25. @current-change="tableCurrentChange"
  26. :header-cell-style="{
  27. backgroundColor: 'rgb(245, 247, 250)',
  28. color: '#606266'
  29. }"
  30. :row-style="{ color: '#303133' }"
  31. style="width: 100%"
  32. >
  33. <el-table-column type="index" align="center" label="序号" width="60">
  34. </el-table-column>
  35. <el-table-column
  36. prop="mode_name"
  37. align="center"
  38. label="透析模式"
  39. min-width="50"
  40. >
  41. <template slot-scope="scope">
  42. {{modeOptions[scope.row.mode_id]?modeOptions[scope.row.mode_id].name:''}}
  43. </template>
  44. </el-table-column>
  45. <el-table-column
  46. prop="dialysis_duration"
  47. align="center"
  48. label="透析时长"
  49. min-width="50"
  50. >
  51. <template slot-scope="scope">
  52. {{ scope.row.dialysis_duration_hour }} 小时
  53. {{ scope.row.dialysis_duration_minute }} 分钟
  54. </template>
  55. </el-table-column>
  56. <el-table-column
  57. prop="doctor"
  58. label="医生"
  59. align="center"
  60. min-width="110"
  61. >
  62. <template slot-scope="scope">
  63. <span>{{ getAdminUserName(scope.row.registrars_id) }}</span>
  64. </template>
  65. </el-table-column>
  66. <el-table-column
  67. prop="created_time"
  68. align="center"
  69. label="创建日期"
  70. min-width="60"
  71. >
  72. <template slot-scope="scope">
  73. <span>{{ scope.row.created_time | parseTime("{y}-{m}-{d}") }}</span>
  74. </template>
  75. </el-table-column>
  76. <el-table-column
  77. prop="updated_time"
  78. align="center"
  79. label="更新日期"
  80. min-width="60"
  81. >
  82. <template slot-scope="scope">
  83. <span>{{ scope.row.updated_time | parseTime("{y}-{m}-{d}") }}</span>
  84. </template>
  85. </el-table-column>
  86. <el-table-column align="center" label="状态" width="60">
  87. <template slot-scope="scope">
  88. <span v-if="scope.row.solution_status == 1">生效</span>
  89. <span v-if="scope.row.solution_status == 2">失效</span>
  90. </template>
  91. </el-table-column>
  92. <el-table-column label="操作" align="center" min-width="140">
  93. <template slot-scope="scope">
  94. <el-tooltip
  95. class="item"
  96. effect="dark"
  97. content="编辑"
  98. placement="top"
  99. >
  100. <el-button
  101. size="small"
  102. type="primary"
  103. icon="el-icon-edit-outline"
  104. @click="openEdit(scope.$index, scope.row)"
  105. ></el-button>
  106. </el-tooltip>
  107. <el-tooltip
  108. class="item"
  109. effect="dark"
  110. content="查看更多"
  111. placement="top"
  112. >
  113. <el-button
  114. size="small"
  115. type="primary"
  116. @click="toClick(scope.row)">
  117. 查看更多
  118. </el-button>
  119. </el-tooltip>
  120. </template>
  121. </el-table-column>
  122. </el-table>
  123. <el-pagination
  124. align="right"
  125. @size-change="handleSizeChange"
  126. @current-change="handleCurrentChange"
  127. :current-page="queryParams.page"
  128. :page-sizes="[10, 20, 50, 100]"
  129. :page-size="10"
  130. background
  131. style="margin-top:20px;"
  132. layout="total, sizes, prev, pager, next, jumper"
  133. :total="total"
  134. >
  135. </el-pagination>
  136. <div v-show="startShow">
  137. <el-row :gutter="20" v-if="isShows('透析模式')">
  138. <el-col :span="6"><div class="grid-content bg-purple">透析模式:{{modeOptions[current_solution.mode_id]?modeOptions[current_solution.mode_id].name:''}}</div></el-col>
  139. </el-row>
  140. <el-row :gutter="20">
  141. <el-col :span="6" v-if="isShows('透析时长')"><div class="grid-content bg-purple">透析时长:{{current_solution.dialysis_duration_hour}}小时{{current_solution.dialysis_duration_minute}}分钟</div></el-col>
  142. <el-col :span="6" v-if="isShows('血流量')"><div class="grid-content bg-purple">血流量(ml/min):{{current_solution.blood_flow_volume}}</div></el-col>
  143. <el-col :span="6" v-if="isShows('透析液配方')"><div class="grid-content bg-purple">透析液配方:{{getDialysateFormulation(current_solution.dialysate_formulation)}}</div></el-col>
  144. <el-col :span="6" v-if="isShows('抗凝剂')"><div class="grid-content bg-purple">抗凝剂:{{getAnticoagulant(current_solution.anticoagulant)}}</div></el-col>
  145. </el-row>
  146. <el-row :gutter="20">
  147. <el-col :span="6" v-if="isShows('首剂')"><div class="grid-content bg-purple">首剂
  148. <span v-if="current_solution.anticoagulant == 6">(iu):</span>
  149. <span v-if="current_solution.anticoagulant == 7">(iu):</span>
  150. <span v-if="current_solution.anticoagulant == 5">(mg):</span>
  151. <span v-if="current_solution.anticoagulant == 4">(mg):</span>
  152. <span v-if="current_solution.anticoagulant == 3">(iu):</span>
  153. <span v-if="current_solution.anticoagulant == 2">(mg):</span>
  154. <span v-if="current_solution.anticoagulant == 1">(mg):</span>
  155. {{current_solution.anticoagulant_shouji}}</div></el-col>
  156. <el-col :span="6" v-if="isShows('维持')"><div class="grid-content bg-purple">维持
  157. <span v-if="current_solution.anticoagulant == 7">(iu/h):</span>
  158. <span v-if="current_solution.anticoagulant == 6">(iu/h):</span>
  159. <span v-if="current_solution.anticoagulant == 5">(ml/h):</span>
  160. <span v-if="current_solution.anticoagulant == 4">(mg/h):</span>
  161. <span v-if="current_solution.anticoagulant == 3">(iu/h):</span>
  162. <span v-if="current_solution.anticoagulant == 2">(mg/h):</span>
  163. <span v-if="current_solution.anticoagulant == 1">(mg/h):</span>
  164. {{current_solution.anticoagulant_weichi}}</div></el-col>
  165. <el-col :span="6" v-if="isShows('总量')"><div class="grid-content bg-purple">总量
  166. <span v-if="current_solution.anticoagulant == 5">(mg):</span>
  167. <span v-if="current_solution.anticoagulant == 6">(iu):</span>
  168. <span v-if="current_solution.anticoagulant == 7">(iu):</span>
  169. <span v-if="current_solution.anticoagulant == 4">(mg):</span>
  170. <span v-if="current_solution.anticoagulant == 3">(iu):</span>
  171. <span v-if="current_solution.anticoagulant == 2">(mg):</span>
  172. <span v-if="current_solution.anticoagulant == 1">(mg):</span>
  173. {{current_solution.anticoagulant_zongliang}}</div></el-col>
  174. <el-col :span="6"><div class="grid-content bg-purple">钾(mmol/L):{{current_solution.kalium}}</div></el-col>
  175. </el-row>
  176. <el-row :gutter="20">
  177. <el-col :span="6" v-if="isShows('钠')"><div class="grid-content bg-purple">钠(mmol/L):{{current_solution.sodium}}</div></el-col>
  178. <el-col :span="6" v-if="isShows('钙')"><div class="grid-content bg-purple">钙:(mmol/L):{{current_solution.calcium}}</div></el-col>
  179. <el-col :span="6" v-if="isShows('透析器/灌流器')"><div class="grid-content bg-purple">透析器/灌流器:{{current_solution.dialyzer_perfusion_apparatus}}</div></el-col>
  180. </el-row>
  181. <el-row :gutter="20">
  182. <el-col :span="6" v-if="isShows('透析器')"><div class="grid-content bg-purple">透析器:{{current_solution.dialysis_dialyszers}}</div></el-col>
  183. <el-col :span="6" v-if="isShows('灌流器')"><div class="grid-content bg-purple">灌流器:{{current_solution.dialysis_irrigation}}</div></el-col>
  184. <el-col :span="6" v-if="isShows('碳酸氢盐')"><div class="grid-content bg-purple">碳酸氢盐(mmol/L):{{current_solution.bicarbonate}}</div></el-col>
  185. <el-col :span="6" v-if="isShows('葡萄糖')"><div class="grid-content bg-purple">葡萄糖(mmol/L):{{current_solution.amylaceum}}</div></el-col>
  186. </el-row>
  187. <el-row :gutter="20">
  188. <el-col :span="6" v-if="isShows('透析液流量')"><div class="grid-content bg-purple">透析液流量(ml/min):{{current_solution.dialysate_flow}}</div></el-col>
  189. <el-col :span="6" v-if="isShows('透析液温度')"><div class="grid-content bg-purple">透析液温度(℃):{{current_solution.dialysate_temperature}}</div></el-col>
  190. <el-col :span="6" v-if="isShows('电导度')"><div class="grid-content bg-purple">电导度(mS/cm):{{current_solution.conductivity}}</div></el-col>
  191. <el-col :span="6" v-if="isShows('体液过多症状')"><div class="grid-content bg-purple">体液过多症状:{{getBodyFluid(current_solution.body_fluid)}}</div></el-col>
  192. </el-row>
  193. <el-row :gutter="20">
  194. <el-col :span="6" v-if="isShows('体液过多其他症状')"><div class="grid-content bg-purple">体液过多其他症状:{{current_solution.body_fluid_other}}</div></el-col>
  195. <el-col :span="6" v-if="isShows('透析前使用特殊药物')"><div class="grid-content bg-purple">透析前使用特殊药物:{{getSpecialMedicine(current_solution.special_medicine)}}</div></el-col>
  196. <el-col :span="6" v-if="isShows('使用其他特殊药物')"><div class="grid-content bg-purple">使用其他特殊药物:{{current_solution.special_medicine_other}}</div></el-col>
  197. <el-col :span="6" v-if="isShows('血管通路')"><div class="grid-content bg-purple">血管通路:{{getBloodAccess(current_solution.blood_access)}}</div></el-col>
  198. </el-row>
  199. <el-row :gutter="20">
  200. <el-col :span="6" v-if="isShows('血浆分离器')"><div class="grid-content bg-purple">血浆分离器:{{current_solution.plasma_separator}}</div></el-col>
  201. <el-col :span="6" v-if="isShows('透析管路')"><div class="grid-content bg-purple">透析管路:{{current_solution.hemodialysis_pipelines}}</div></el-col>
  202. <el-col :span="6" v-if="isShows('透析管路支数')"><div class="grid-content bg-purple">透析管路支数:{{current_solution.hemodialysis_pipelines_count}}</div></el-col>
  203. <el-col :span="6" v-if="isShows('穿刺针')"><div class="grid-content bg-purple">穿刺针:{{current_solution.puncture_needle}}</div></el-col>
  204. </el-row>
  205. <el-row :gutter="20">
  206. <el-col :span="6" v-if="isShows('穿刺针支数')"><div class="grid-content bg-purple">穿刺针支数:{{current_solution.puncture_needle_count}}</div></el-col>
  207. <el-col :span="6" v-if="isShows('促红素')"><div class="grid-content bg-purple">促红素:{{current_solution.epo_count}}</div></el-col>
  208. <el-col :span="6" v-if="isShows('促红素支数')"><div class="grid-content bg-purple">促红素支数:{{current_solution.epo_count}}</div></el-col>
  209. <el-col :span="6" v-if="isShows('最大超滤率')"><div class="grid-content bg-purple">最大超滤率(ml/h):{{current_solution.max_ultrafiltration_rate}}</div></el-col>
  210. </el-row>
  211. <el-row :gutter="20">
  212. <el-col :span="6" v-if="isShows('置换液') && (current_solution.mode_id == 2 || current_solution.mode_id == 5 || current_solution.mode_id == 12)"><div class="grid-content bg-purple">置换液:{{getDisplaceLiqui(current_solution.displace_liqui_part)}}</div></el-col>
  213. <el-col :span="6" v-if="isShows('置换液总量') && (current_solution.mode_id == 2 || current_solution.mode_id == 5 || current_solution.mode_id == 12)"><div class="grid-content bg-purple">置换液总量:{{current_solution.displace_liqui_value}}</div></el-col>
  214. <el-col :span="6" v-if="isShows('滤过器')"><div class="grid-content bg-purple">滤过器:{{current_solution.dialysis_strainer}}</div></el-col>
  215. </el-row>
  216. <el-row :gutter="20">
  217. <el-col :span="6" v-if="isShows('吸氧')"><div class="grid-content bg-purple">吸氧:
  218. <span v-if="current_solution.oxygen_uptake == 1">需</span>
  219. <span v-if="current_solution.oxygen_uptake == 2">无</span>
  220. </div></el-col>
  221. <el-col :span="6" v-if="isShows('吸氧') && current_solution.oxygen_uptake == 1"><div class="grid-content bg-purple">吸氧流量(L/分):{{current_solution.oxygen_flow}}</div></el-col>
  222. <el-col :span="6" v-if="isShows('吸氧') && current_solution.oxygen_uptake == 1"><div class="grid-content bg-purple">吸氧时长(h):{{current_solution.oxygen_time}}</div></el-col>
  223. </el-row>
  224. <el-row :gutter="20">
  225. <el-col :span="6"><div class="grid-content bg-purple">备注:{{current_solution.remark}}</div></el-col>
  226. </el-row>
  227. </div>
  228. </div>
  229. <el-dialog
  230. :title="isEdit ? '编辑透析处方' : '新增透析处方'"
  231. :visible.sync="dialogVisible"
  232. width="1010px"
  233. >
  234. <el-form
  235. ref="addPlan"
  236. :model="addPlan"
  237. :rules="addPlanRules"
  238. label-width="160px"
  239. >
  240. <el-row :gutter="20">
  241. <el-col :span="8" v-if="isShows('透析模式')">
  242. <el-form-item label="透析模式:" prop="mode">
  243. <el-select
  244. v-model="addPlan.mode"
  245. @change="addPlanModeChange"
  246. :disabled="isEdit ? true : false"
  247. >
  248. <el-option
  249. v-for="item in modeOptions"
  250. :label="item.name"
  251. :key="item.id"
  252. :value="item.id"
  253. ></el-option>
  254. </el-select>
  255. </el-form-item>
  256. </el-col>
  257. <el-col :span="8" v-if="isShows('透析时长')">
  258. <el-form-item label="透析时长(h):" prop="dialysis_duration">
  259. <el-time-picker
  260. v-model="dialysisTimeShow"
  261. :picker-options="{
  262. selectableRange: '00:01:00 - 23:59:00'
  263. }"
  264. placeholder="透析时长"
  265. style="width:100%;"
  266. value-format="H:m"
  267. format="H:m"
  268. @change="selectnDialysisTime"
  269. >
  270. </el-time-picker>
  271. </el-form-item>
  272. </el-col>
  273. <el-col :span="8" v-if="isShows('血流量')">
  274. <el-form-item label="血流量(ml/min):" prop="blood_flow_volume">
  275. <el-input v-model="addPlan.blood_flow_volume"></el-input>
  276. </el-form-item>
  277. </el-col>
  278. <el-col :span="8" v-if="isShows('透析液配方')">
  279. <el-form-item label="透析液配方:">
  280. <el-select v-model="addPlan.dialysate_formulation">
  281. <el-option
  282. v-for="item in dialysate_formulation"
  283. :label="item.name"
  284. :key="item.id"
  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="抗凝剂:" prop="anticoagulant">
  292. <el-select
  293. v-model="addPlan.anticoagulant"
  294. @change="changeThisAnticoagulant"
  295. >
  296. <el-option
  297. v-for="item in anticoagulantsConfit"
  298. :label="item.name"
  299. :key="item.id"
  300. :value="item.id"
  301. ></el-option>
  302. </el-select>
  303. </el-form-item>
  304. </el-col>
  305. <el-col
  306. :span="8"
  307. v-if="anticoagulant.shouji != -1 && isShows('首剂')"
  308. >
  309. <div v-if="this.$store.getters.xt_user.template_info.org_id == 10101">
  310. <el-form-item
  311. :label="'首剂(mg): '"
  312. prop="anticoagulant_shouji"
  313. v-if="addPlan.anticoagulant == 2"
  314. >
  315. <el-input
  316. v-model="addPlan.anticoagulant_shouji"
  317. :disabled="anticoagulant.shouji == 1 ? false : true"
  318. type="number"
  319. ></el-input>
  320. </el-form-item>
  321. <el-form-item
  322. :label="'首剂(iu): '"
  323. prop="anticoagulant_shouji"
  324. v-else
  325. >
  326. <el-input
  327. v-model="addPlan.anticoagulant_shouji"
  328. :disabled="anticoagulant.shouji == 1 ? false : true"
  329. type="number"
  330. ></el-input>
  331. </el-form-item>
  332. </div>
  333. <div v-else>
  334. <el-form-item
  335. :label="'首剂(' + anticoagulant.shouji_unit + '): '"
  336. prop="anticoagulant_shouji"
  337. >
  338. <el-input
  339. v-model="addPlan.anticoagulant_shouji"
  340. :disabled="anticoagulant.shouji == 1 ? false : true"
  341. type="number"
  342. ></el-input>
  343. </el-form-item>
  344. </div>
  345. </el-col>
  346. <el-col
  347. :span="8"
  348. v-if="anticoagulant.weichi != -1 && isShows('维持')"
  349. >
  350. <div v-if="this.$store.getters.xt_user.template_info.org_id == 10101">
  351. <el-form-item
  352. :label="'维持(mg/h): '"
  353. prop="anticoagulant_weichi"
  354. v-if="addPlan.anticoagulant == 2"
  355. >
  356. <el-input
  357. v-model="addPlan.anticoagulant_weichi"
  358. :disabled="anticoagulant.weichi == 1 ? false : true"
  359. type="number"
  360. ></el-input>
  361. </el-form-item>
  362. <el-form-item
  363. :label="'维持(iu/h): '"
  364. prop="anticoagulant_weichi"
  365. v-else
  366. >
  367. <el-input
  368. v-model="addPlan.anticoagulant_weichi"
  369. :disabled="anticoagulant.weichi == 1 ? false : true"
  370. type="number"
  371. ></el-input>
  372. </el-form-item>
  373. </div>
  374. <div v-else>
  375. <el-form-item
  376. :label="'维持(' + anticoagulant.weichi_unit + '): '"
  377. prop="anticoagulant_weichi"
  378. >
  379. <el-input
  380. v-model="addPlan.anticoagulant_weichi"
  381. :disabled="anticoagulant.weichi == 1 ? false : true"
  382. type="number"
  383. ></el-input>
  384. </el-form-item>
  385. </div>
  386. </el-col>
  387. <el-col
  388. :span="8"
  389. v-if="anticoagulant.zongliang != -1 && isShows('总量')"
  390. >
  391. <div v-if="this.$store.getters.xt_user.template_info.org_id == 10101">
  392. <el-form-item
  393. :label="'总量(mg): '"
  394. prop="anticoagulant_zongliang"
  395. v-if="addPlan.anticoagulant == 2"
  396. >
  397. <el-input
  398. v-model="addPlan.anticoagulant_zongliang"
  399. :disabled="anticoagulant.zongliang == 1 ? false : true"
  400. type="number"
  401. ></el-input>
  402. </el-form-item>
  403. <el-form-item
  404. :label="'总量(iu): '"
  405. prop="anticoagulant_zongliang"
  406. v-else
  407. >
  408. <el-input
  409. v-model="addPlan.anticoagulant_zongliang"
  410. :disabled="anticoagulant.zongliang == 1 ? false : true"
  411. type="number"
  412. ></el-input>
  413. </el-form-item>
  414. </div>
  415. <div v-else>
  416. <el-form-item
  417. :label="'总量(' + anticoagulant.zongliang_unit + '): '"
  418. prop="anticoagulant_zongliang"
  419. >
  420. <el-input
  421. v-model="addPlan.anticoagulant_zongliang"
  422. :disabled="anticoagulant.zongliang == 1 ? false : true"
  423. type="number"
  424. ></el-input>
  425. </el-form-item>
  426. </div>
  427. </el-col>
  428. <el-col
  429. :span="8"
  430. v-if="anticoagulant.gaimingcheng != -1 && isShows('钙名称')"
  431. >
  432. <el-form-item label="钙名称:" prop="anticoagulant_gaimingcheng">
  433. <el-input
  434. v-model="addPlan.anticoagulant_gaimingcheng"
  435. :disabled="anticoagulant.gaimingcheng == 1 ? false : true"
  436. placeholder="钙名称"
  437. ></el-input>
  438. </el-form-item>
  439. </el-col>
  440. <el-col
  441. :span="8"
  442. v-if="anticoagulant.gaijiliang != -1 && isShows('钙剂量')"
  443. >
  444. <el-form-item
  445. :label="'钙剂量(' + anticoagulant.gaimingcheng_unit + '): '"
  446. prop="anticoagulant_gaijiliang"
  447. >
  448. <el-input
  449. v-model="addPlan.anticoagulant_gaijiliang"
  450. :disabled="anticoagulant.gaijiliang == 1 ? false : true"
  451. placeholder="钙剂量"
  452. ></el-input>
  453. </el-form-item>
  454. </el-col>
  455. <el-col :span="8" v-if="isShows('钾')">
  456. <el-form-item label="钾(mmol/L): " prop="kalium">
  457. <el-input v-model="addPlan.kalium"></el-input>
  458. </el-form-item>
  459. </el-col>
  460. <el-col :span="8" v-if="isShows('钠')">
  461. <el-form-item label="钠(mmol/L): " prop="sodium">
  462. <el-input v-model="addPlan.sodium"></el-input>
  463. </el-form-item>
  464. </el-col>
  465. <el-col :span="8" v-if="isShows('钙')">
  466. <el-form-item label="钙(mmol/L): " prop="calcium">
  467. <el-input v-model="addPlan.calcium"></el-input>
  468. </el-form-item>
  469. </el-col>
  470. <el-col :span="8" v-if="isShows('透析器/灌流器')">
  471. <el-form-item label="透析器/灌流器:">
  472. <el-input
  473. v-model="addPlan.dialyzer_perfusion_apparatus" @focus="showInnerDialog('5')"></el-input>
  474. </el-form-item>
  475. </el-col>
  476. <el-col :span="8" v-if="isShows('透析器')">
  477. <el-form-item label="透析器:">
  478. <el-input v-model="dialysis_dialyszers" @focus="showInnerDialog('6')"></el-input>
  479. </el-form-item>
  480. </el-col>
  481. <el-col :span="8" v-if="isShows('灌流器')">
  482. <el-form-item label="灌流器:">
  483. <el-input v-model="dialysis_irrigation" @focus="showInnerDialog('7')"></el-input>
  484. </el-form-item>
  485. </el-col>
  486. <el-col :span="8" v-if="isShows('滤过器')">
  487. <el-form-item label="滤过器:">
  488. <el-input v-model="dialysis_strainer" @focus="showInnerDialog('11')"></el-input>
  489. </el-form-item>
  490. </el-col>
  491. <el-col :span="8" v-if="isShows('加糖')">
  492. <el-form-item label="加糖:">
  493. <el-input v-model="addPlan.chaptalization"></el-input>
  494. </el-form-item>
  495. </el-col>
  496. <el-col :span="8" v-if="isShows('碳酸氢盐')">
  497. <el-form-item label="碳酸氢盐(mmol/L): " prop="bicarbonate">
  498. <el-input v-model="addPlan.bicarbonate"></el-input>
  499. </el-form-item>
  500. </el-col>
  501. <!-- <el-col :span="8" v-if="isShows('葡萄糖')">
  502. <el-form-item label="葡萄糖(mmol/L): " prop="glucose">
  503. <el-input v-model="addPlan.glucose"></el-input>
  504. </el-form-item>
  505. </el-col> -->
  506. <el-col :span="8" v-if="isShows('葡萄糖')">
  507. <el-form-item label="葡萄糖(mmol/L): " prop="amylaceum">
  508. <el-input v-model="addPlan.amylaceum"></el-input>
  509. </el-form-item>
  510. </el-col>
  511. <el-col :span="8" v-if="isShows('透析液流量')">
  512. <el-form-item label="透析液流量(ml/min): " prop="dialysate_flow">
  513. <el-input v-model="addPlan.dialysate_flow"></el-input>
  514. </el-form-item>
  515. </el-col>
  516. <el-col :span="8" v-if="isShows('透析液温度')">
  517. <el-form-item
  518. label="透析液温度(℃): "
  519. prop="dialysate_temperature"
  520. >
  521. <el-input v-model="addPlan.dialysate_temperature"></el-input>
  522. </el-form-item>
  523. </el-col>
  524. <el-col :span="8" v-if="isShows('电导率')">
  525. <el-form-item label="电导率(mS/cm): " prop="conductivity">
  526. <el-input v-model="addPlan.conductivity"></el-input>
  527. </el-form-item>
  528. </el-col>
  529. <el-col :span="8" v-if="isShows('体液过多症状')">
  530. <el-form-item label="体液过多症状:">
  531. <el-select v-model="addPlan.body_fluid" @change="changeBodyFluid">
  532. <el-option
  533. v-for="item in body_fluid_option"
  534. :label="item.name"
  535. :key="item.id"
  536. :value="item.id"
  537. ></el-option>
  538. </el-select>
  539. </el-form-item>
  540. </el-col>
  541. <el-col :span="8" v-if="isShows('体液过多其他症状')">
  542. <el-form-item label="体液过多其他症状">
  543. <el-input v-model="addPlan.body_fluid_other"></el-input>
  544. </el-form-item>
  545. </el-col>
  546. <el-col :span="8" v-if="isShows('透析前使用特殊药物')">
  547. <el-form-item label="透析前使用特殊药物">
  548. <el-select
  549. v-model="addPlan.special_medicine"
  550. placeholder="请选择"
  551. style="width:100%;"
  552. >
  553. <el-option :key="0" label="请选择" :value="0"></el-option>
  554. <el-option
  555. v-for="item in special_medicine_option"
  556. :label="item.name"
  557. :key="item.id"
  558. :value="item.id"
  559. ></el-option>
  560. </el-select>
  561. </el-form-item>
  562. </el-col>
  563. <el-col :span="8" v-if="isShows('透析前使用其他特殊药物')">
  564. <el-form-item label="使用其他特殊药物">
  565. <el-input v-model="addPlan.special_medicine_other"></el-input>
  566. </el-form-item>
  567. </el-col>
  568. <el-col :span="8" v-if="isShows('置换量') && (addPlan.mode == 2 || addPlan.mode == 5 || addPlan.mode == 12)">
  569. <el-form-item label="置换量(L) : " prop="replacement_total">
  570. <el-input
  571. v-model="addPlan.replacement_total"
  572. type="number"
  573. ></el-input>
  574. </el-form-item>
  575. </el-col>
  576. <el-col :span="8">
  577. <el-form-item
  578. label="置换液:" v-if="isShows('置换液') && (addPlan.mode == 2 || addPlan.mode == 5 || addPlan.mode == 12)
  579. "
  580. >
  581. <el-select
  582. v-model="addPlan.displace_liqui_part"
  583. placeholder="请选择"
  584. >
  585. <el-option :key="0" label="请选择" :value="0"></el-option>
  586. <el-option
  587. v-for="(option, index) in displace_liqui_part_option"
  588. :key="index"
  589. :label="option.name"
  590. :value="option.id"
  591. ></el-option>
  592. </el-select>
  593. </el-form-item>
  594. </el-col>
  595. <el-col :span="8" v-if="isShows('置换液总量') && (addPlan.mode == 2 || addPlan.mode == 5 || addPlan.mode == 12)">
  596. <el-form-item label="置换液总量(L)">
  597. <el-input v-model="addPlan.displace_liqui_value"></el-input>
  598. </el-form-item>
  599. </el-col>
  600. <el-col :span="8" v-if="isShows('血管通路')">
  601. <el-form-item label="血管通路:">
  602. <el-select v-model="addPlan.blood_access" placeholder="请选择">
  603. <el-option :key="0" label="请选择" :value="0"></el-option>
  604. <el-option
  605. v-for="(option, index) in blood_access_option"
  606. :key="index"
  607. :label="option.name"
  608. :value="option.id"
  609. ></el-option>
  610. </el-select>
  611. </el-form-item>
  612. </el-col>
  613. <el-col :span="8" v-if="isShows('实际超滤量')">
  614. <el-form-item label="实际超滤量(L)">
  615. <el-input v-model="addPlan.ultrafiltration"></el-input>
  616. </el-form-item>
  617. </el-col>
  618. <el-col :span="8" v-if="isShows('血浆分离器')">
  619. <el-form-item label="血浆分离器:">
  620. <el-input v-model="addPlan.plasma_separator" @focus="showInnerDialog('8')"></el-input>
  621. </el-form-item>
  622. </el-col>
  623. <el-col :span="8" v-if="isShows('吸氧')">
  624. <el-form-item label="吸氧:">
  625. <el-select v-model="addPlan.oxygen_uptake" placeholder="请选择" @change="changeOxygenList">
  626. <el-option :key="0" label="请选择" :value="0"></el-option>
  627. <el-option
  628. v-for="(item, index) in oxygenList "
  629. :key="index"
  630. :label="item.name"
  631. :value="item.id"
  632. ></el-option>
  633. </el-select>
  634. </el-form-item>
  635. </el-col>
  636. <el-col :span="8" v-if="isShows('吸氧') && oxygenShow == true">
  637. <el-form-item label="吸氧流量(L/分):">
  638. <el-input v-model="addPlan.oxygen_flow"></el-input>
  639. </el-form-item>
  640. </el-col>
  641. <el-col :span="8" v-if="isShows('吸氧') && oxygenShow == true">
  642. <el-form-item label="吸氧时长(h):">
  643. <el-input v-model="addPlan.oxygen_time"></el-input>
  644. </el-form-item>
  645. </el-col>
  646. <el-col :span="8" v-if="isShows('目标KT/V')">
  647. <el-form-item label="目标KT/V">
  648. <el-input v-model="addPlan.target_ktv"></el-input>
  649. </el-form-item>
  650. </el-col>
  651. <el-col :span="8" v-if="isShows('透析管路')">
  652. <el-form-item label="透析管路:">
  653. <el-select v-model="addPlan.hemodialysis_pipelines" >
  654. <el-option
  655. v-for="item in hemodialysisPipelinesOptions"
  656. :label="item.name"
  657. :key="item.id"
  658. :value="item.name"
  659. ></el-option>
  660. </el-select>
  661. </el-form-item>
  662. </el-col>
  663. <el-col :span="8" v-if="isShows('透析管路支数')">
  664. <el-form-item label="透析管路支数">
  665. <el-input v-model="addPlan.hemodialysis_pipelines_count"></el-input>
  666. </el-form-item>
  667. </el-col>
  668. <el-col :span="8" v-if="isShows('穿刺针')">
  669. <el-form-item label="穿刺针:">
  670. <el-input v-model="addPlan.puncture_needle" @focus="showInnerDialog('10')"></el-input>
  671. </el-form-item>
  672. </el-col>
  673. <el-col :span="8" v-if="isShows('穿刺针支数')">
  674. <el-form-item label="穿刺针支数">
  675. <el-input v-model="addPlan.puncture_needle_count"></el-input>
  676. </el-form-item>
  677. </el-col>
  678. <el-col :span="8" v-if="isShows('促红素')">
  679. <el-form-item label="促红素:">
  680. <el-select v-model="addPlan.epo" @change="changeBodyFluid">
  681. <el-option
  682. v-for="item in epoOptions"
  683. :label="item.name"
  684. :key="item.id"
  685. :value="item.name"
  686. ></el-option>
  687. </el-select>
  688. </el-form-item>
  689. </el-col>
  690. <el-col :span="8" v-if="isShows('促红素支数')">
  691. <el-form-item label="促红素支数">
  692. <el-input v-model="addPlan.epo_count"></el-input>
  693. </el-form-item>
  694. </el-col>
  695. <el-col :span="8" v-if="isShows('最大超滤率')">
  696. <el-form-item label="最大超滤率(ml/h)">
  697. <el-input v-model="addPlan.max_ultrafiltration_rate"></el-input>
  698. </el-form-item>
  699. </el-col>
  700. </el-row>
  701. <el-row :gutter="24">
  702. <el-col :span="24">
  703. <el-form-item label="备注: " prop="remark">
  704. <el-input
  705. type="textarea"
  706. :rows="2"
  707. placeholder="请输入内容"
  708. v-model="addPlan.remark"
  709. >
  710. </el-input>
  711. </el-form-item>
  712. </el-col>
  713. </el-row>
  714. </el-form>
  715. <span slot="footer" class="dialog-footer">
  716. <el-button @click="dialogVisible = false">取 消</el-button>
  717. <el-button
  718. type="primary"
  719. @click="submitEditSolution('addPlan')"
  720. v-if="isEdit"
  721. :disabled="$store.getters.xt_user.subscibe.state == 3 ? true : false"
  722. >保 存</el-button
  723. >
  724. <el-button
  725. type="primary"
  726. @click="submitNewSolution('addPlan')"
  727. v-else
  728. :disabled="$store.getters.xt_user.subscibe.state == 3 ? true : false"
  729. >保 存</el-button
  730. >
  731. </span>
  732. </el-dialog>
  733. <multi-select-box
  734. :propsForm="InnerDialogProps"
  735. v-on:dialog-comfirm="innerDialogComfirm"
  736. v-on:dialog-cancle="innerDialogCancle">
  737. </multi-select-box>
  738. <el-dialog
  739. :visible.sync="startDialogVisible"
  740. width="1010px"
  741. >
  742. <el-table
  743. ref="solutionTable"
  744. :data="tableList"
  745. border
  746. fit
  747. highlight-current-row
  748. :header-cell-style="{
  749. backgroundColor: 'rgb(245, 247, 250)',
  750. color: '#606266'
  751. }"
  752. :row-style="{ color: '#303133' }"
  753. style="width: 100%"
  754. >
  755. <el-table-column type="index" align="center" label="序号" width="60">
  756. </el-table-column>
  757. <el-table-column
  758. prop="mode_name"
  759. align="center"
  760. label="透析模式"
  761. min-width="50"
  762. >
  763. <template slot-scope="scope">
  764. {{modeOptions[scope.row.mode_id]?modeOptions[scope.row.mode_id].name:''}}
  765. </template>
  766. </el-table-column>
  767. <el-table-column
  768. prop="dialysis_duration"
  769. align="center"
  770. label="透析时长"
  771. min-width="50"
  772. >
  773. <template slot-scope="scope">
  774. {{ scope.row.dialysis_duration_hour }} 小时
  775. {{ scope.row.dialysis_duration_minute }} 分钟
  776. </template>
  777. </el-table-column>
  778. <el-table-column
  779. prop="doctor"
  780. label="医生"
  781. align="center"
  782. min-width="110"
  783. >
  784. <template slot-scope="scope">
  785. <span>{{ getAdminUserName(scope.row.registrars_id) }}</span>
  786. </template>
  787. </el-table-column>
  788. <el-table-column
  789. prop="created_time"
  790. align="center"
  791. label="创建日期"
  792. min-width="60"
  793. >
  794. <template slot-scope="scope">
  795. <span>{{ scope.row.created_time | parseTime("{y}-{m}-{d}") }}</span>
  796. </template>
  797. </el-table-column>
  798. <el-table-column
  799. prop="updated_time"
  800. align="center"
  801. label="更新日期"
  802. min-width="60"
  803. >
  804. <template slot-scope="scope">
  805. <span>{{ scope.row.updated_time | parseTime("{y}-{m}-{d}") }}</span>
  806. </template>
  807. </el-table-column>
  808. <el-table-column align="center" label="状态" width="60">
  809. <template slot-scope="scope">
  810. <span v-if="scope.row.solution_status == 1">生效</span>
  811. <span v-if="scope.row.solution_status == 2">失效</span>
  812. </template>
  813. </el-table-column>
  814. </el-table>
  815. <el-pagination
  816. align="right"
  817. @size-change="handleSizeChangeOne"
  818. @current-change="handleCurrentChangeOne"
  819. :current-page="pageOne"
  820. :page-sizes="[10, 20, 50, 100]"
  821. :page-size="10"
  822. background
  823. style="margin-top:20px;"
  824. layout="total, sizes, prev, pager, next, jumper"
  825. :total="totalOne"
  826. >
  827. </el-pagination>
  828. <span slot="footer" class="dialog-footer">
  829. <el-button
  830. type="primary"
  831. @click="startDialogVisible = false"
  832. >取消</el-button
  833. >
  834. <el-button
  835. type="primary"
  836. @click="startDialogVisible = false"
  837. >确定</el-button
  838. >
  839. </span>
  840. </el-dialog>
  841. </div>
  842. </template>
  843. <script>
  844. import tableTitle from './components/tableTitle'
  845. import PatientSidebar from './components/PatientSidebar'
  846. import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
  847. import {
  848. createChildPatientDialysisSolution,
  849. createPatientDialysisSolution,
  850. deleteDialysisSolution,
  851. editChildPatientDialysisSolution,
  852. editDialysisSolutionDetail,
  853. editPatientDialysisSolution,
  854. findePatientDialysisLongSolutions,
  855. getDialysisSolutionDetailList
  856. } from '@/api/patient'
  857. import { getSystemPrescription } from '@/api/config'
  858. import { getDataConfig } from '@/utils/data'
  859. import { calculateAnticoagulantZL, uParseTime } from '@/utils/tools'
  860. import store from '@/store'
  861. import { GetDeviceInfo } from '@/api/dialysis'
  862. import MultiSelectBox from '../dialysis/details/dialog/MultiSelectBox/index'
  863. const periodWeek = [
  864. { value: '每周', label: '每周' },
  865. { value: '两周', label: '两周' },
  866. { value: '三周', label: '三周' },
  867. { value: '四周', label: '四周' }
  868. ]
  869. const periodDay = [
  870. { value: '2天', label: '2天' },
  871. { value: '3天', label: '3天' },
  872. { value: '4天', label: '4天' },
  873. { value: '5天', label: '5天' },
  874. { value: '10天', label: '10天' },
  875. { value: '15天', label: '15天' },
  876. { value: '30天', label: '30天' }
  877. ]
  878. const numOptionsWeek = [
  879. { value: '1次', label: '1次' },
  880. { value: '2次', label: '2次' },
  881. { value: '3次', label: '3次' },
  882. { value: '4次', label: '4次' },
  883. { value: '5次', label: '5次' },
  884. { value: '6次', label: '6次' },
  885. { value: '7次', label: '7次' }
  886. ]
  887. const numOptionsDay = [{ value: '1次', label: '1次' }]
  888. export default {
  889. name: 'Dialysis',
  890. data() {
  891. var checkFirstDialysis = (rule, value, callback) => {
  892. if (this.addPlan.type == 2 && !value) {
  893. return callback(new Error('请选择首次透析!'))
  894. }
  895. callback()
  896. }
  897. var checkSubName = (rule, value, callback) => {
  898. var pattern = /^\d*$/
  899. if (!pattern.test(value)) {
  900. return callback(new Error('只填写0-9的数字'))
  901. }
  902. callback()
  903. }
  904. return {
  905. hemodialysisPipelinesOptions:[],
  906. punctureNeedleOptions:[],
  907. epoOptions:[],
  908. zhiShow:false,
  909. huShow:false,
  910. totalShow:false,
  911. InnerDialogProps: {
  912. values: [],
  913. visibility: false,
  914. isShowTextArea: true,
  915. customContent: '',
  916. titles: '',
  917. type: '' // 不同弹框类型,用来匹配数据
  918. },
  919. deviceList: [],
  920. dialysisTimeShow: new Date(2018, 1, 1, 3, 0),
  921. isEdit: false,
  922. isChildEdit: false,
  923. totalrate: '无/两周一次',
  924. patientID: 0,
  925. dialogVisible: false,
  926. dialogFormVisible: false,
  927. formLabelWidth: '80px',
  928. formInputWidth: '80px',
  929. total: 0,
  930. tableData: null,
  931. form: {
  932. name: '',
  933. region: '',
  934. date1: '',
  935. date2: '',
  936. delivery: false,
  937. type: [],
  938. resource: '',
  939. desc: ''
  940. },
  941. addPlan: {
  942. id: 0,
  943. mode: '',
  944. mode_name: '',
  945. registrars_id: 0,
  946. dialyzer: '',
  947. dialysis_duration: '',
  948. dialysis_duration_hour: '',
  949. dialysis_duration_minute: '',
  950. hemodialysis_machine: '',
  951. perfusion_apparatus: '',
  952. blood_flow_volume: '',
  953. dewater: '',
  954. displace_liqui: 0,
  955. replacement_way: '',
  956. anticoagulant: '',
  957. anticoagulant_shouji: '',
  958. anticoagulant_weichi: '',
  959. anticoagulant_zongliang: '',
  960. anticoagulant_gaimingcheng: '',
  961. anticoagulant_gaijiliang: '',
  962. kalium: '',
  963. replacement_total: '',
  964. sodium: '',
  965. calcium: '',
  966. bicarbonate: '',
  967. glucose: '',
  968. dry_weight: '',
  969. dialysate_flow: '',
  970. dialysate_temperature: '',
  971. conductivity: '',
  972. doctor: '',
  973. dialysate_formulation: '',
  974. remark: '',
  975. target_ktv: '',
  976. target_ultrafiltration: '',
  977. dialyzer_perfusion_apparatus: '',
  978. body_fluid: '',
  979. body_fluid_other: '',
  980. special_medicine: '',
  981. special_medicine_other: '',
  982. displace_liqui_part: '',
  983. displace_liqui_value: '',
  984. ultrafiltration: '',
  985. blood_access: '',
  986. dialysis_dialyszers:'',
  987. dialysis_irrigation:'',
  988. plasma_separator:"",
  989. bilirubin_adsorption_column:"",
  990. oxygen_uptake:"",
  991. oxygen_flow:"",
  992. oxygen_time:"",
  993. hemodialysis_pipelines:'',
  994. hemodialysis_pipelines_count:'',
  995. puncture_needle:"",
  996. puncture_needle_count:"",
  997. epo:"",
  998. epo_count:"",
  999. max_ultrafiltration_rate:"",
  1000. amylaceum:"",
  1001. dialysis_strainer:"",
  1002. chaptalization:"",
  1003. },
  1004. childPlan: {
  1005. mode: '',
  1006. frequency: '',
  1007. name: '',
  1008. parent_id: 0,
  1009. sub_name: '',
  1010. initiate_mode: '',
  1011. doctor: ''
  1012. },
  1013. modeOptions: null,
  1014. anticoagulantsSet: {
  1015. type: 1
  1016. },
  1017. replacementWays: null,
  1018. anticoagulantsConfit: null,
  1019. dialysate_formulation: [],
  1020. body_fluid_option: [],
  1021. special_medicine_option: [],
  1022. displace_liqui_part_option: [],
  1023. blood_access_option: [],
  1024. timeOptions: [{ value: 1, label: '按周' }, { value: 2, label: '按日' }],
  1025. periodOptions: periodWeek,
  1026. numOptions: numOptionsWeek,
  1027. stateOptions: [{ value: 1, label: '启用' }, { value: 2, label: '停用' }],
  1028. doctorOptions: null,
  1029. adminUserOptions: null,
  1030. current_index: -1,
  1031. addPlanRules: {
  1032. mode: [{ required: true, message: '请选择透析模式', trigger: 'blur' }],
  1033. type: [{ required: true, message: '请选择频率', trigger: 'blur' }],
  1034. period: [{ required: true, message: '请选择周期', trigger: 'blur' }],
  1035. times: [{ required: true, message: '请选择次数', trigger: 'blur' }],
  1036. initiate_mode: [
  1037. { required: true, message: '请选择状态', trigger: 'blur' }
  1038. ],
  1039. doctor: [{ required: true, message: '请选择医生', trigger: 'blur' }],
  1040. first_dialysis: [{ validator: checkFirstDialysis, trigger: 'blur' }]
  1041. },
  1042. addChildPlanRules: {
  1043. sub_name: [
  1044. { required: true, message: '请填写处方名', trigger: 'blur' },
  1045. {
  1046. validator: checkSubName,
  1047. trigger: 'blur'
  1048. }
  1049. ],
  1050. initiate_mode: [
  1051. { required: true, message: '请选择状态', trigger: 'blur' }
  1052. ],
  1053. doctor: [{ required: true, message: '请选择医生', trigger: 'blur' }]
  1054. },
  1055. current_model: {
  1056. id: 0,
  1057. name: '',
  1058. dialysis_duration: 2,
  1059. replacement_total: 0,
  1060. replacement_way: 2,
  1061. hemodialysis_machine: 2,
  1062. blood_filter: 2,
  1063. perfusion_apparatus: 2,
  1064. blood_flow_volume: 2,
  1065. dialysate_flow: 2,
  1066. kalium: 2,
  1067. sodium: 2,
  1068. calcium: 2,
  1069. bicarbonate: 2
  1070. },
  1071. current_solution: {
  1072. id: 0,
  1073. name: '',
  1074. sub_name: '',
  1075. period: '',
  1076. times: '',
  1077. doctor: 0
  1078. },
  1079. anticoagulant: {
  1080. id: 0,
  1081. name: '',
  1082. type: 1,
  1083. shouji: 1,
  1084. weichi: 1,
  1085. zongliang: 1,
  1086. gaimingcheng: -1,
  1087. gaijiliang: -1,
  1088. shouji_unit: 'mg',
  1089. weichi_unit: 'mg/h',
  1090. zongliang_unit: 'mg',
  1091. gaimingcheng_unit: '',
  1092. gaijiliang_unit: ''
  1093. },
  1094. blood_filters: null,
  1095. perfusion_apparatus: null,
  1096. hemodialysis_machines: null,
  1097. dialyzerPerfusionApparatus: [],
  1098. solution_detail: {
  1099. id: 0,
  1100. affirm_state: 0,
  1101. dialysis_duration: '',
  1102. replacement_way: '',
  1103. mode_id: '',
  1104. blood_flow_volume: '',
  1105. hemodialysis_machine: '',
  1106. blood_filter: '',
  1107. perfusion_apparatus: '',
  1108. dialysate_flow: '',
  1109. kalium: '',
  1110. replacement_total: '',
  1111. sodium: '',
  1112. calcium: '',
  1113. bicarbonate: '',
  1114. anticoagulant: '',
  1115. anticoagulant_shouji: '',
  1116. anticoagulant_weichi: '',
  1117. anticoagulant_zongliang: '',
  1118. anticoagulant_gaimingcheng: '',
  1119. anticoagulant_gaijiliang: '',
  1120. dialysis_strainer:"",
  1121. },
  1122. queryParams: {
  1123. page: 1,
  1124. limit: 10,
  1125. id: 0
  1126. },
  1127. stockType:[],
  1128. irrigations:[],
  1129. dialyzers:[],
  1130. dialysis_dialyszers:'',
  1131. dialysis_irrigation:"",
  1132. dialysis_strainer:"",
  1133. chaptalization:"",
  1134. dialysisStrainerList:[],
  1135. plasmaSeparatorList:[],
  1136. bilirubinAdsorptionColumn:[],
  1137. oxygenList:[
  1138. {id:1,name:"需"},
  1139. {id:2,name:"无"}
  1140. ],
  1141. oxygenShow:false,
  1142. startDialogVisible:false,
  1143. tableList:[],
  1144. totalOne:0,
  1145. pageOne:1,
  1146. limitOne:10,
  1147. startShow:false,
  1148. solutionDetail:{},
  1149. }
  1150. },
  1151. watch: {
  1152. 'dialysisTimeShow':function(){
  1153. var val = this.addPlan.dialysis_duration_hour+":"+this.addPlan.dialysis_duration_minute
  1154. var valTime = val.split(':')
  1155. this.addPlan.dialysis_duration = parseFloat(valTime[0]) + parseFloat((valTime[1] / 60).toFixed(2))
  1156. this.addPlan.dialysis_duration_hour = valTime[0]
  1157. this.addPlan.dialysis_duration_minute = valTime[1]
  1158. },
  1159. 'addPlan.dialysis_duration': function() {
  1160. this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(1,
  1161. this.addPlan.anticoagulant_shouji,
  1162. this.addPlan.dialysis_duration,
  1163. this.addPlan.anticoagulant_weichi
  1164. )
  1165. },
  1166. 'addPlan.anticoagulant_shouji': function() {
  1167. this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(1,
  1168. this.addPlan.anticoagulant_shouji,
  1169. this.addPlan.dialysis_duration,
  1170. this.addPlan.anticoagulant_weichi
  1171. )
  1172. if(this.$store.getters.xt_user.template_info.template_id == 41 && this.addPlan.anticoagulant == 2 ){
  1173. this.addPlan.anticoagulant_zongliang = ""
  1174. this.addPlan.anticoagulant_zongliang = parseInt(this.addPlan.anticoagulant_shouji) + parseInt(this.addPlan.anticoagulant_weichi)
  1175. }
  1176. },
  1177. 'addPlan.anticoagulant_weichi': function() {
  1178. this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(
  1179. 1,
  1180. this.addPlan.anticoagulant_shouji,
  1181. this.addPlan.dialysis_duration,
  1182. this.addPlan.anticoagulant_weichi
  1183. )
  1184. if(this.$store.getters.xt_user.template_info.template_id == 41 && this.addPlan.anticoagulant == 2 ){
  1185. this.addPlan.anticoagulant_zongliang = ""
  1186. this.addPlan.anticoagulant_zongliang = parseInt(this.addPlan.anticoagulant_shouji) + parseInt(this.addPlan.anticoagulant_weichi)
  1187. }
  1188. }
  1189. },
  1190. components: {
  1191. MultiSelectBox,
  1192. tableTitle,
  1193. PatientSidebar
  1194. },
  1195. methods: {
  1196. showInnerDialog: function(val) {
  1197. this.InnerDialogProps.visibility = true
  1198. switch (val) {
  1199. case '5': // 透析器/灌流器
  1200. this.InnerDialogProps.values = this.dialyzerPerfusionApparatus
  1201. this.InnerDialogProps.titles = '透析器/灌流器'
  1202. this.InnerDialogProps.type = 'dialyzer_perfusion_apparatus'
  1203. this.InnerDialogProps.selected = this.addPlan.dialyzer_perfusion_apparatus
  1204. this.InnerDialogProps.isShowTextArea = false
  1205. break
  1206. case '6':
  1207. for(let i=0;i<this.dialyzers.length;i++){
  1208. this.dialyzers[i].name = this.dialyzers[i].specification_name
  1209. }
  1210. // console.log("2222222",this.dialyzers)
  1211. this.InnerDialogProps.values = this.dialyzers
  1212. this.InnerDialogProps.titles = '透析器'
  1213. this.InnerDialogProps.type = 'dialyzers'
  1214. this.InnerDialogProps.selected = this.dialysis_dialyszers
  1215. this.InnerDialogProps.isShowTextArea = false
  1216. break
  1217. case '7':
  1218. for(let i=0;i<this.irrigations.length;i++){
  1219. this.irrigations[i].name = this.irrigations[i].specification_name
  1220. }
  1221. this.InnerDialogProps.values = this.irrigations
  1222. this.InnerDialogProps.titles = '灌流器'
  1223. this.InnerDialogProps.type = 'irrigations'
  1224. this.InnerDialogProps.selected = this.dialysis_irrigation
  1225. this.InnerDialogProps.isShowTextArea = false
  1226. break
  1227. case '8':
  1228. this.InnerDialogProps.values = this.plasmaSeparatorList
  1229. this.InnerDialogProps.titles = '血浆分离器'
  1230. this.InnerDialogProps.type = 'plasma_separator'
  1231. this.InnerDialogProps.selected = this.addPlan.plasma_separator
  1232. this.InnerDialogProps.isShowTextArea = false
  1233. break
  1234. case '9':
  1235. this.InnerDialogProps.values = this.bilirubinAdsorptionColumn
  1236. this.InnerDialogProps.titles = '胆红素吸附柱'
  1237. this.InnerDialogProps.type = 'bilirubin_adsorption_column'
  1238. this.InnerDialogProps.selected = this.addPlan.bilirubin_adsorption_column
  1239. this.InnerDialogProps.isShowTextArea = false
  1240. break
  1241. case '10':
  1242. this.InnerDialogProps.values = this.punctureNeedleOptions
  1243. this.InnerDialogProps.titles = '穿刺针'
  1244. this.InnerDialogProps.type = 'puncture_needle'
  1245. this.InnerDialogProps.selected = this.addPlan.puncture_needle
  1246. this.InnerDialogProps.isShowTextArea = false
  1247. break
  1248. case '11':
  1249. for(let i=0;i<this.dialysisStrainerList.length;i++){
  1250. this.dialysisStrainerList[i].name = this.dialysisStrainerList[i].specification_name
  1251. }
  1252. this.InnerDialogProps.values = this.dialysisStrainerList
  1253. this.InnerDialogProps.titles = '滤过器'
  1254. this.InnerDialogProps.type = 'dialysis_strainer'
  1255. this.InnerDialogProps.selected = this.dialysis_strainer
  1256. this.InnerDialogProps.isShowTextArea = false
  1257. break
  1258. }
  1259. },
  1260. innerDialogComfirm: function(val) {
  1261. console.log("value",val)
  1262. this.InnerDialogProps.visibility = false
  1263. switch (val.type) {
  1264. case 'dialyzer_perfusion_apparatus':
  1265. this.addPlan.dialyzer_perfusion_apparatus = val.value.join(',')
  1266. break
  1267. case 'dialyzers':
  1268. this.dialysis_dialyszers = val.value.join(',')
  1269. break
  1270. case 'irrigations':
  1271. this.dialysis_irrigation = val.value.join(',')
  1272. break
  1273. case 'plasma_separator':
  1274. this.addPlan.plasma_separator = val.value.join(',')
  1275. break
  1276. case 'bilirubin_adsorption_column':
  1277. this.addPlan.bilirubin_adsorption_column = val.value.join(',')
  1278. break
  1279. case 'puncture_needle':
  1280. this.addPlan.puncture_needle = val.value.join(',')
  1281. break
  1282. case 'dialysis_strainer':
  1283. this.dialysis_strainer = val.value.join(',')
  1284. break
  1285. }
  1286. },
  1287. innerDialogCancle: function() {
  1288. this.InnerDialogProps.visibility = false
  1289. },
  1290. changeBodyFluid: function() {},
  1291. GetDeviceData: function() {
  1292. const params = {}
  1293. GetDeviceInfo(params).then(response => {
  1294. this.deviceList = response.data.data.device
  1295. })
  1296. },
  1297. selectnDialysisTime(val) {
  1298. var valTime = val.split(':')
  1299. this.addPlan.dialysis_duration = parseFloat(valTime[0]) + parseFloat((valTime[1] / 60).toFixed(2))
  1300. console.log("透析时长",this.addPlan.dialysis_duration)
  1301. this.addPlan.dialysis_duration_hour = valTime[0]
  1302. this.addPlan.dialysis_duration_minute = valTime[1]
  1303. },
  1304. tableCurrentChange(current) {
  1305. console.log("current",current)
  1306. this.startShow = true
  1307. if (typeof current === 'undefined' || current == null) {
  1308. this.current_solution = {
  1309. id: 0,
  1310. name: '',
  1311. sub_name: '',
  1312. period: '',
  1313. times: '',
  1314. doctor: 0
  1315. }
  1316. this.solution_detail = {
  1317. id: 0,
  1318. affirm_state: 0,
  1319. dialysis_duration: '',
  1320. replacement_way: '',
  1321. mode_id: '',
  1322. blood_flow_volume: '',
  1323. hemodialysis_machine: '',
  1324. blood_filter: '',
  1325. perfusion_apparatus: '',
  1326. dialysate_flow: '',
  1327. kalium: '',
  1328. replacement_total: '',
  1329. sodium: '',
  1330. calcium: '',
  1331. bicarbonate: '',
  1332. anticoagulant: '',
  1333. anticoagulant_shouji: '',
  1334. anticoagulant_weichi: '',
  1335. anticoagulant_zongliang: '',
  1336. anticoagulant_gaimingcheng: '',
  1337. anticoagulant_gaijiliang: ''
  1338. }
  1339. return
  1340. }
  1341. this.current_solution = current
  1342. this.setCurrentMode(current.mode_id)
  1343. this.solution_detail = {
  1344. id: this.current_solution.id,
  1345. affirm_state: this.current_solution.affirm_state,
  1346. dialysis_duration:
  1347. this.current_solution.dialysis_duration != 0
  1348. ? this.current_solution.dialysis_duration
  1349. : '',
  1350. replacement_way:
  1351. this.current_solution.replacement_way != 0
  1352. ? this.current_solution.replacement_way
  1353. : '',
  1354. replacement_total:
  1355. this.current_solution.replacement_total != 0
  1356. ? this.current_solution.replacement_total
  1357. : '',
  1358. mode_id: this.current_solution.mode_id,
  1359. blood_flow_volume:
  1360. this.current_solution.blood_flow_volume != 0
  1361. ? this.current_solution.blood_flow_volume
  1362. : '',
  1363. hemodialysis_machine:
  1364. this.current_solution.hemodialysis_machine != 0
  1365. ? this.current_solution.hemodialysis_machine
  1366. : '',
  1367. blood_filter:
  1368. this.current_solution.blood_filter != 0
  1369. ? this.current_solution.blood_filter
  1370. : '',
  1371. perfusion_apparatus:
  1372. this.current_solution.perfusion_apparatus != 0
  1373. ? this.current_solution.perfusion_apparatus
  1374. : '',
  1375. dialysate_flow:
  1376. this.current_solution.dialysate_flow != 0
  1377. ? this.current_solution.dialysate_flow
  1378. : '',
  1379. kalium:
  1380. this.current_solution.kalium != 0 ? this.current_solution.kalium : '',
  1381. sodium:
  1382. this.current_solution.sodium != 0 ? this.current_solution.sodium : '',
  1383. calcium:
  1384. this.current_solution.calcium != 0
  1385. ? this.current_solution.calcium
  1386. : '',
  1387. bicarbonate:
  1388. this.current_solution.bicarbonate != 0
  1389. ? this.current_solution.bicarbonate
  1390. : '',
  1391. anticoagulant:
  1392. this.current_solution.anticoagulant != 0
  1393. ? this.current_solution.anticoagulant
  1394. : '',
  1395. anticoagulant_shouji:
  1396. this.current_solution.anticoagulant_shouji != 0
  1397. ? this.current_solution.anticoagulant_shouji
  1398. : '',
  1399. anticoagulant_weichi:
  1400. this.current_solution.anticoagulant_weichi != 0
  1401. ? this.current_solution.anticoagulant_weichi
  1402. : '',
  1403. anticoagulant_zongliang:
  1404. this.current_solution.anticoagulant_zongliang != 0
  1405. ? this.current_solution.anticoagulant_zongliang
  1406. : ''
  1407. }
  1408. },
  1409. handleDelete(index, row) {
  1410. if (row.use_state == 1) {
  1411. this.$message.error('方案已被使用,不能删除')
  1412. return false
  1413. }
  1414. this.$confirm('确定删除' + row.name + row.sub_name + '方案吗?', '提示', {
  1415. confirmButtonText: '确定',
  1416. cancelButtonText: '取消',
  1417. type: 'warning'
  1418. }).then(() => {
  1419. deleteDialysisSolution(row.id).then(response => {
  1420. if (response.data.state == 0) {
  1421. this.$message.error(response.data.msg)
  1422. return false
  1423. } else {
  1424. this.$notify({
  1425. title: '成功',
  1426. message: '删除成功',
  1427. type: 'success',
  1428. duration: 2000
  1429. })
  1430. this.tableData.splice(index, 1)
  1431. }
  1432. })
  1433. })
  1434. },
  1435. submitSolution(formName) {
  1436. editDialysisSolutionDetail(
  1437. this.patientID,
  1438. this.solution_detail.id,
  1439. this.solution_detail
  1440. ).then(response => {
  1441. if (response.data.state == 0) {
  1442. this.$message.error(response.data.msg)
  1443. return false
  1444. } else {
  1445. this.$notify({
  1446. title: '成功',
  1447. message: '修改成功',
  1448. type: 'success',
  1449. duration: 2000
  1450. })
  1451. var thisSolution = response.data.data.solution
  1452. var spliceIndex = -1
  1453. for (let index = this.tableData.length - 1; ; index--) {
  1454. if (this.tableData[index].id === thisSolution.id) {
  1455. spliceIndex = index
  1456. break
  1457. }
  1458. }
  1459. if (spliceIndex > -1) {
  1460. var newIndex = spliceIndex + 1
  1461. if (newIndex === this.tableData.length) {
  1462. this.tableData.pop()
  1463. this.tableData.push(thisSolution)
  1464. } else {
  1465. var swapData = this.tableData.splice(newIndex)
  1466. this.tableData.pop()
  1467. this.tableData.push(thisSolution)
  1468. this.tableData = this.tableData.concat(swapData)
  1469. }
  1470. }
  1471. this.solution_detail.affirm_state = thisSolution.affirm_state
  1472. this.$refs.solutionTable.setCurrentRow(this.tableData[spliceIndex])
  1473. }
  1474. })
  1475. },
  1476. submitEditChildSolution(formName) {
  1477. this.$refs[formName].validate(valid => {
  1478. if (valid) {
  1479. var editData = {
  1480. initiate_mode: this.childPlan.initiate_mode,
  1481. doctor: this.childPlan.doctor
  1482. }
  1483. editChildPatientDialysisSolution(
  1484. this.patientID,
  1485. this.childPlan.id,
  1486. editData
  1487. ).then(response => {
  1488. if (response.data.state == 0) {
  1489. this.$message.error(response.data.msg)
  1490. return false
  1491. } else {
  1492. this.$notify({
  1493. title: '成功',
  1494. message: '修改成功',
  1495. type: 'success',
  1496. duration: 2000
  1497. })
  1498. this.dialogFormVisible = false
  1499. this.tableData[this.current_index].doctor =
  1500. response.data.data.solution.doctor
  1501. this.tableData[this.current_index].updated_time =
  1502. response.data.data.solution.updated_time
  1503. this.tableData[this.current_index].initiate_mode =
  1504. response.data.data.solution.initiate_mode
  1505. this.current_index = -1
  1506. this.$refs[formName].resetFields()
  1507. return false
  1508. }
  1509. })
  1510. }
  1511. })
  1512. },
  1513. submitNewChildSolution(formName) {
  1514. this.$refs[formName].validate(valid => {
  1515. if (valid) {
  1516. var createData = {
  1517. parent_id: this.childPlan.parent_id,
  1518. sub_name: this.childPlan.sub_name,
  1519. initiate_mode: this.childPlan.initiate_mode,
  1520. doctor: this.childPlan.doctor
  1521. }
  1522. createChildPatientDialysisSolution(this.patientID, createData).then(
  1523. response => {
  1524. if (response.data.state == 0) {
  1525. this.$message.error(response.data.msg)
  1526. return false
  1527. } else {
  1528. this.$notify({
  1529. title: '成功',
  1530. message: '创建成功',
  1531. type: 'success',
  1532. duration: 2000
  1533. })
  1534. this.$refs[formName].resetFields()
  1535. var spliceIndex = -1
  1536. for (let index = this.tableData.length - 1; ; index--) {
  1537. if (
  1538. this.tableData[index].parent_id === createData.parent_id
  1539. ) {
  1540. spliceIndex = index
  1541. break
  1542. } else if (
  1543. this.tableData[index].id === createData.parent_id
  1544. ) {
  1545. spliceIndex = index
  1546. break
  1547. }
  1548. }
  1549. if (spliceIndex > -1) {
  1550. spliceIndex += 1
  1551. if (spliceIndex === this.tableData.length) {
  1552. this.tableData.push(response.data.data.solution)
  1553. } else {
  1554. var swapData = this.tableData.splice(spliceIndex)
  1555. this.tableData.push(response.data.data.solution)
  1556. this.tableData = this.tableData.concat(swapData)
  1557. }
  1558. }
  1559. this.dialogFormVisible = false
  1560. return false
  1561. }
  1562. }
  1563. )
  1564. }
  1565. })
  1566. },
  1567. submitEditSolution(formName) {
  1568. this.$refs[formName].validate(valid => {
  1569. if (valid) {
  1570. let mode = '2'
  1571. if (
  1572. this.addPlan.registrars_id != this.$store.getters.xt_user.user.id
  1573. ) {
  1574. mode = '3'
  1575. }
  1576. this.addPlan.dialysis_dialyszers = this.dialysis_dialyszers
  1577. this.addPlan.dialysis_irrigation = this.dialysis_irrigation
  1578. this.addPlan.dialysis_strainer = this.dialysis_strainer
  1579. this.addPlan.mode_id = parseInt(this.addPlan.mode_id)
  1580. if(this.addPlan.mode!=2 && this.addPlan.mode!=5&&this.addPlan.mode!=12){
  1581. this.addPlan.displace_liqui_part = 0
  1582. this.addPlan.displace_liqui_value = 0
  1583. }
  1584. console.log("this.addplan",this.addPlan)
  1585. editPatientDialysisSolution(this.patientID,this.addPlan.id,this.addPlan, mode).then(response => {
  1586. if (response.data.state == 0) {
  1587. this.$message.error(response.data.msg)
  1588. return false
  1589. } else {
  1590. this.$notify({
  1591. title: '成功',
  1592. message: '修改成功',
  1593. type: 'success',
  1594. duration: 2000
  1595. })
  1596. this.dialogVisible = false
  1597. // this.$refs[formName].resetFields()
  1598. for (var dindex in response.data.data.solution) {
  1599. if (dindex == 'id') {
  1600. continue
  1601. }
  1602. this.tableData[this.current_index][dindex] =
  1603. response.data.data.solution[dindex]
  1604. }
  1605. // this.tableData[this.current_index].dialysis_duration = response.data.data.solution.dialysis_duration;
  1606. // this.tableData[this.current_index].doctor = response.data.data.solution.doctor;
  1607. // this.tableData[this.current_index].updated_time = response.data.data.solution.updated_time;
  1608. this.current_index = -1
  1609. console.log("responsedd23332233223wo",response.data.data.solution)
  1610. this.current_solution.mode_name = response.data.data.solution.mode_name
  1611. this.current_solution.dialysis_duration_hour = response.data.data.solution.dialysis_duration_hour
  1612. this.current_solution.dialysis_duration_minute = response.data.data.solution.dialysis_duration_minute
  1613. this.current_solution.blood_flow_volume = response.data.data.solution.blood_flow_volume
  1614. this.current_solution.dialysate_formulation = response.data.data.solution.dialysate_formulation
  1615. this.current_solution.anticoagulant = response.data.data.solution.anticoagulant
  1616. this.current_solution.anticoagulant_shouji = response.data.data.solution.anticoagulant_shouji
  1617. this.current_solution.anticoagulant_weichi = response.data.data.solution.anticoagulant_weichi
  1618. this.current_solution.anticoagulant_zongliang = response.data.data.solution.anticoagulant_zongliang
  1619. this.current_solution.sodium =response.data.data.solution.sodium
  1620. this.current_solution.calcium = response.data.data.solution.calcium
  1621. this.current_solution.dialyzer_perfusion_apparatus = response.data.data.solution.dialyzer_perfusion_apparatus
  1622. this.current_solution.dialysis_dialyszers = response.data.data.solution.dialysis_dialyszers
  1623. this.current_solution.dialysis_irrigation = response.data.data.solution.dialysis_irrigation
  1624. this.current_solution.bicarbonate = response.data.data.solution.bicarbonate
  1625. this.current_solution.glucose = response.data.data.data.solution.glucose
  1626. this.current_solution.dialysate_flow = response.data.data.solution.dialysate_flow
  1627. this.current_solution.dialysate_temperature = response.data.data.solution.dialysate_temperature
  1628. this.current_solution.conductivity = response.data.data.solution.conductivity
  1629. this.current_solution.body_fluid = response.data.data.solution.body_fluid
  1630. this.current_solution.body_fluid_other = response.data.data.solution.body_fluid_other
  1631. this.current_solution.special_medicine = response.data.data.solution.special_medicine
  1632. this.current_solution.special_medicine_other = response.data.data.solution.special_medicine_other
  1633. this.current_solution.blood_access = response.data.data.solution.blood_access
  1634. this.current_solution.plasma_separator = response.data.data.solution.plasma_separator
  1635. this.current_solution.hemodialysis_pipelines = response.data.data.solution.hemodialysis_pipelines
  1636. this.current_solution.hemodialysis_pipelines_count = response.data.data.solution.hemodialysis_pipelines_count
  1637. this.current_solution.puncture_needle =response.data.data.solution.puncture_needle
  1638. this.current_solution.puncture_needle_count = response.data.solution.puncture_needle_count
  1639. this.current_solution.epo_count = response.data.data.solution.epo_count
  1640. this.current_solution.max_ultrafiltration_rate = response.data.data.solution.max_ultrafiltration_rate
  1641. this.current_solution.remark = response.data.data.solution.remark
  1642. this.current_solution.dialysis_strainer = response.data.data.dialysis_strainer
  1643. this.current_solution.chaptalization = response.data.data.chaptalization
  1644. this.FindePatientDialysisLongSolutions()
  1645. return false
  1646. }
  1647. })
  1648. }
  1649. })
  1650. },
  1651. submitNewSolution(formName) {
  1652. if(this.addPlan.mode_id!=2 && this.addPlan.mode_id!=5&&this.addPlan.mode_id!=12){
  1653. this.addPlan.displace_liqui_part = 0
  1654. this.addPlan.displace_liqui_value = 0
  1655. }
  1656. this.addPlan.anticoagulant_zongliang = this.addPlan.anticoagulant_zongliang.toString()
  1657. this.$refs[formName].validate(valid => {
  1658. if (valid) {
  1659. const mode = '1'
  1660. this.addPlan.dialysis_dialyszers = this.dialysis_dialyszers
  1661. this.addPlan.dialysis_irrigation = this.dialysis_irrigation
  1662. this.addPlan.dialysis_strainer = this.dialysis_strainer
  1663. this.addPlan.mode_id = parseInt(this.addPlan.mode_id)
  1664. console.log("add",this.addPlan)
  1665. createPatientDialysisSolution(
  1666. this.patientID,
  1667. this.addPlan,
  1668. mode
  1669. ).then(response => {
  1670. if (response.data.state == 0) {
  1671. this.$message.error(response.data.msg)
  1672. return false
  1673. } else {
  1674. this.$notify({
  1675. title: '成功',
  1676. message: '创建成功',
  1677. type: 'success',
  1678. duration: 2000
  1679. })
  1680. this.dialogVisible = false
  1681. // this.tableData.unshift(response.data.data.solution)
  1682. if (this.tableData.length > 10) {
  1683. this.tableData.pop()
  1684. }
  1685. this.total += 1
  1686. // this.$refs[formName].resetFields()
  1687. this.FindePatientDialysisLongSolutions()
  1688. return false
  1689. }
  1690. })
  1691. }
  1692. })
  1693. },
  1694. handleEdit(index, row) {
  1695. // console.log(index, row)
  1696. },
  1697. handleSizeChange(val) {
  1698. this.queryParams.limit = val
  1699. this.FindePatientDialysisLongSolutions()
  1700. },
  1701. handleCurrentChange(val) {
  1702. this.queryParams.page = val
  1703. this.FindePatientDialysisLongSolutions()
  1704. },
  1705. handleSizeChangeOne(val) {
  1706. this.limitOne = val
  1707. this.getDialysisSolutionDetailList()
  1708. },
  1709. handleCurrentChangeOne(val) {
  1710. this.pageOne = val
  1711. this.getDialysisSolutionDetailList()
  1712. },
  1713. openEdit(index, row) {
  1714. this.current_index = index
  1715. this.addPlan.id = row.id
  1716. this.addPlan.mode = row.mode_id
  1717. this.addPlan.mode_name = row.mode_name
  1718. this.addPlan.dialyzer = row.dialyzer ? row.dialyzer : ''
  1719. this.addPlan.dialysis_duration = '' + row.dialysis_duration
  1720. this.addPlan.dialysis_duration_hour = '' + row.dialysis_duration_hour
  1721. this.addPlan.dialysis_duration_minute = '' + row.dialysis_duration_minute
  1722. this.addPlan.hemodialysis_machine = row.hemodialysis_machine + ''
  1723. this.addPlan.perfusion_apparatus = row.perfusion_apparatus + ''
  1724. this.addPlan.max_ultrafiltration_rate = row.max_ultrafiltration_rate
  1725. this.addPlan.anticoagulant_zongliang = row.anticoagulant_zongliang
  1726. this.addPlan.anticoagulant_shouji = row.anticoagulant_shouji
  1727. this.addPlan.anticoagulant_weichi = row.anticoagulant_weichi
  1728. // this.addPlan.oxygen_uptake = row.oxygen_uptake
  1729. // this.addPlan.hemodialysis_pipelines = row.hemodialysis_pipelines
  1730. // this.addPlan.hemodialysis_pipelines_count = row.hemodialysis_pipelines_count
  1731. // this.addPlan.puncture_needle = row.puncture_needle
  1732. // this.addPlan.puncture_needle_count = row.puncture_needle_count
  1733. // this.addPlan.epo = row.epo
  1734. // this.addPlan.epo_count = row.epo_count
  1735. if(row.blood_flow_volume!="" || row.blood_flow_volume!=undefined){
  1736. this.addPlan.blood_flow_volume = row.blood_flow_volume.toString()
  1737. }
  1738. if (row.anticoagulant == 3) {
  1739. this.addPlan.anticoagulant = '低分子肝素'
  1740. }
  1741. if (row.anticoagulant != 3) {
  1742. if(row.anticoagulant == 0){
  1743. this.addPlan.anticoagulant = ""
  1744. }else{
  1745. this.addPlan.anticoagulant = row.anticoagulant
  1746. }
  1747. }
  1748. this.addPlan.replacement_total = row.replacement_total
  1749. if(row.target_ktv!="" ||row.target_ktv!=undefined){
  1750. this.addPlan.target_ktv = row.target_ktv.toString()
  1751. }
  1752. if(row.target_ultrafiltration!="" || row.target_ultrafiltration!=undefined){
  1753. this.addPlan.target_ultrafiltration = row.target_ultrafiltration.toString()
  1754. }
  1755. this.addPlan.dialysis_duration = parseFloat(row.dialysis_duration_hour) + parseFloat((row.dialysis_duration_minute / 60).toFixed(2))
  1756. this.addPlan.dialysis_duration_hour = row.dialysis_duration_hour
  1757. this.addPlan.dialysis_duration_minute = row.dialysis_duration_minute
  1758. if(row.anticoagulant_shouji!=""|| row.anticoagulant_shouji!=undefined){
  1759. this.addPlan.anticoagulant_shouji = row.anticoagulant_shouji.toString()
  1760. }
  1761. if(row.anticoagulant_weichi!="" || row.anticoagulant_weichi!=undefined){
  1762. this.addPlan.anticoagulant_weichi = row.anticoagulant_weichi.toString()
  1763. }
  1764. if(row.anticoagulant_zongliang!="" || row.anticoagulant_zongliang!=undefined){
  1765. this.addPlan.anticoagulant_zongliang = row.anticoagulant_zongliang.toString()
  1766. }
  1767. if(row.anticoagulant_gaimingcheng!=""||row.anticoagulant_gaimingcheng!=undefined){
  1768. this.addPlan.anticoagulant_gaimingcheng = row.anticoagulant_gaimingcheng.toString()
  1769. }
  1770. if(row.anticoagulant_gaijiliang!=""||row.anticoagulant_gaijiliang!=undefined){
  1771. this.addPlan.anticoagulant_gaijiliang = row.anticoagulant_gaijiliang.toString()
  1772. }
  1773. if(row.kalium!=""||row.kalium!=undefined){
  1774. this.addPlan.kalium = row.kalium.toString()
  1775. }
  1776. if(row.sodium!=""||row.sodium!=undefined){
  1777. this.addPlan.sodium = row.sodium.toString()
  1778. }
  1779. if(row.calcium!=""||row.calcium!=undefined){
  1780. this.addPlan.calcium = row.calcium.toString()
  1781. }
  1782. if(row.bicarbonate!=""|| row.bicarbonate!=undefined){
  1783. this.addPlan.bicarbonate = row.bicarbonate.toString()
  1784. }
  1785. if(row.glucose!=""||row.glucose!=undefined){
  1786. this.addPlan.glucose = row.glucose.toString()
  1787. }
  1788. if(row.dialysate_flow!="" || row.dialysate_flow!=undefined){
  1789. this.addPlan.dialysate_flow = row.dialysate_flow.toString()
  1790. }
  1791. if( row.dialysate_temperature!=""|| row.dialysate_temperature!=undefined){
  1792. this.addPlan.dialysate_temperature = row.dialysate_temperature.toString()
  1793. }
  1794. if(row.conductivity!="" ||row.conductivity!=undefined ){
  1795. this.addPlan.conductivity = row.conductivity.toString()
  1796. }
  1797. this.addPlan.remark = row.remark
  1798. this.addPlan.hemodialysis_pipelines = row.hemodialysis_pipelines
  1799. if(row.hemodialysis_pipelines_count!="" || row.hemodialysis_pipelines_count!=undefined){
  1800. this.addPlan.hemodialysis_pipelines_count = row.hemodialysis_pipelines_count.toString()
  1801. }
  1802. this.addPlan.puncture_needle = row.puncture_needle
  1803. if(row.puncture_needle_count!=null || row.puncture_needle_count!=undefined){
  1804. this.addPlan.puncture_needle_count = row.puncture_needle_count.toString()
  1805. }
  1806. this.addPlan.epo = row.epo
  1807. if(row.epo_count!="" || row.epo_count!=undefined){
  1808. this.addPlan.epo_count = row.epo_count.toString()
  1809. }
  1810. if(row.dialyzer_perfusion_apparatus!="" || row.dialyzer_perfusion_apparatus!=undefined){
  1811. this.addPlan.dialyzer_perfusion_apparatus = row.dialyzer_perfusion_apparatus.toString()
  1812. }
  1813. if(row.plasma_separator!="" || row.plasma_separator!=undefined){
  1814. this.addPlan.plasma_separator = row.plasma_separator.toString()
  1815. }
  1816. if(row.bilirubin_adsorption_column!="" || row.bilirubin_adsorption_column!=undefined){
  1817. this.addPlan.bilirubin_adsorption_column = row.bilirubin_adsorption_column.toString()
  1818. }
  1819. this.addPlan.dialysis_irrigation = row.dialysis_irrigation
  1820. this.addPlan.dialysis_dialyszers = row.dialysis_dialyszers
  1821. this.dialysis_irrigation = row.dialysis_irrigation
  1822. this.dialysis_dialyszers = row.dialysis_dialyszers
  1823. this.dialysis_strainer = row.dialysis_strainer
  1824. this.addPlan.dialysis_strainer = row.dialysis_strainer
  1825. this.addPlan.oxygen_uptake = row.oxygen_uptake
  1826. this.addPlan.max_ultrafiltration_rate = row.max_ultrafiltration_rate
  1827. this.addPlan.oxygen_flow = row.oxygen_flow
  1828. this.addPlan.oxygen_time = row.oxygen_time
  1829. if(row.oxygen_uptake == 1){
  1830. this.oxygenShow = true
  1831. }
  1832. if(row.oxygen_uptake == 2){
  1833. this.oxygenShow = false
  1834. }
  1835. this.addPlan.oxygen_flow = row.oxygen_flow
  1836. this.addPlan.oxygen_time = row.oxygen_time
  1837. if(row.body_fluid == 0){
  1838. this.addPlan.body_fluid = ""
  1839. }else{
  1840. this.addPlan.body_fluid = row.body_fluid
  1841. }
  1842. if(row.body_fluid_other!=''|| row.body_fluid_other!=undefined){
  1843. this.addPlan.body_fluid_other = row.body_fluid_other.toString()
  1844. }
  1845. this.addPlan.special_medicine = row.special_medicine
  1846. if(row.special_medicine_other!=""||row.special_medicine_other!=undefined){
  1847. this.addPlan.special_medicine_other = row.special_medicine_other.toString()
  1848. }
  1849. this.addPlan.displace_liqui_part = row.displace_liqui_part
  1850. if(row.displace_liqui_value!=''||row.displace_liqui_value!=undefined){
  1851. this.addPlan.displace_liqui_value = row.displace_liqui_value.toString()
  1852. }
  1853. if(row.ultrafiltration!='' || row.ultrafiltration!=undefined){
  1854. this.addPlan.ultrafiltration = row.ultrafiltration.toString()
  1855. }
  1856. this.addPlan.blood_access = row.blood_access
  1857. this.addPlan.registrars_id = row.registrars_id
  1858. this.addPlan.created_time = row.created_time
  1859. this.addPlan.dialysis_irrigation = row.dialysis_irrigation
  1860. this.addPlan.dialysis_dialyszers = row.dialysis_dialyszers
  1861. this.dialysis_irrigation = row.dialysis_irrigation
  1862. this.dialysis_dialyszers = row.dialysis_dialyszers
  1863. this.dialogVisible = true
  1864. this.isEdit = true
  1865. if(row.dialysate_formulation==0){
  1866. this.addPlan.dialysate_formulation= ""
  1867. }
  1868. this.addPlan.dialysate_formulation = row.dialysate_formulation
  1869. this.dialysisTimeShow = new Date(2018,1,1,this.addPlan.dialysis_duration_hour,this.addPlan.dialysis_duration_minute)
  1870. this.addPlan.amylaceum = row.amylaceum
  1871. this.addPlan.chaptalization = row.chaptalization
  1872. },
  1873. isShows(name) {
  1874. var filedList = store.getters.xt_user.fileds
  1875. for (let i = 0; i < filedList.length; i++) {
  1876. if (
  1877. filedList[i].module == 1 &&
  1878. filedList[i].filed_name_cn == name &&
  1879. filedList[i].is_show == 1
  1880. ) {
  1881. return true
  1882. }
  1883. }
  1884. return false
  1885. },
  1886. openNew() {
  1887. this.current_index = -1
  1888. this.addPlan = {
  1889. mode: '',
  1890. mode_name: '',
  1891. id: 0,
  1892. type: 1,
  1893. period: '',
  1894. times: '',
  1895. initiate_mode: '',
  1896. doctor: '',
  1897. first_dialysis: '',
  1898. dialyzer: '',
  1899. dialysate_formulation: '',
  1900. hemodialysis_machine: '',
  1901. perfusion_apparatus: '',
  1902. blood_flow_volume: '',
  1903. dewater: '',
  1904. displace_liqui: 0,
  1905. replacement_way: '',
  1906. anticoagulant: '',
  1907. anticoagulant_shouji: '',
  1908. anticoagulant_weichi: '',
  1909. anticoagulant_zongliang: '',
  1910. anticoagulant_gaimingcheng: '',
  1911. anticoagulant_gaijiliang: '',
  1912. kalium: '',
  1913. replacement_total: '',
  1914. sodium: '',
  1915. calcium: '',
  1916. bicarbonate: '',
  1917. glucose: '',
  1918. dry_weight: '',
  1919. dialysate_flow: '',
  1920. dialysate_temperature: '',
  1921. conductivity: '',
  1922. remark: '',
  1923. target_ktv: '',
  1924. target_ultrafiltration: '',
  1925. dialyzer_perfusion_apparatus: '',
  1926. body_fluid: '',
  1927. body_fluid_other: '',
  1928. special_medicine: '',
  1929. special_medicine_other: '',
  1930. displace_liqui_part: '',
  1931. displace_liqui_value: '',
  1932. ultrafiltration: '',
  1933. blood_access: '',
  1934. hemodialysis_pipelines:'',
  1935. hemodialysis_pipelines_count:'',
  1936. puncture_needle:"",
  1937. puncture_needle_count:"",
  1938. epo:"",
  1939. epo_count:"",
  1940. dialysis_duration: '3.30',
  1941. dialysis_duration_hour: '3',
  1942. dialysis_duration_minute: '30',
  1943. created_time:"",
  1944. plasma_separator:"",
  1945. bilirubin_adsorption_column:"",
  1946. chaptalization:"",
  1947. }
  1948. this.addPlanTypeChange()
  1949. this.dialogVisible = true
  1950. this.isEdit = false
  1951. },
  1952. openNewChild(index, row) {
  1953. this.childPlan = {
  1954. mode: row.mode_name,
  1955. frequency: row.period + row.times,
  1956. name: row.name,
  1957. parent_id: row.id,
  1958. sub_name: '',
  1959. initiate_mode: '',
  1960. doctor: ''
  1961. }
  1962. this.isChildEdit = false
  1963. this.dialogFormVisible = true
  1964. },
  1965. openChildEdit(index, row) {
  1966. this.childPlan = {
  1967. mode: row.mode_name,
  1968. frequency: row.period + row.times,
  1969. name: row.name,
  1970. parent_id: row.parent_id,
  1971. id: row.id,
  1972. sub_name: row.sub_name,
  1973. initiate_mode: row.initiate_mode,
  1974. doctor: row.doctor
  1975. }
  1976. this.current_index = index
  1977. this.isChildEdit = true
  1978. this.dialogFormVisible = true
  1979. },
  1980. fetchAllDoctorAndNurse() {
  1981. fetchAllDoctorAndNurse().then(response => {
  1982. if (response.data.state == 1) {
  1983. this.doctorOptions = response.data.data.doctors
  1984. }
  1985. })
  1986. },
  1987. fetchAllAdminUsers() {
  1988. fetchAllAdminUsers().then(response => {
  1989. if (response.data.state == 1) {
  1990. this.adminUserOptions = response.data.data.users
  1991. }
  1992. })
  1993. },
  1994. FindePatientDialysisLongSolutions() {
  1995. findePatientDialysisLongSolutions(this.queryParams).then(response => {
  1996. if (response.data.state == 1) {
  1997. this.tableData = response.data.data.solutions
  1998. this.total = response.data.data.total
  1999. this.stockType = response.data.data.stockType
  2000. console.log("2333555555555",this.stockType)
  2001. if(this.stockType.length >0 ){
  2002. var arr = []
  2003. var arrTwo = []
  2004. var arrThree = []
  2005. for(let i=0;i<this.stockType.length;i++){
  2006. if(this.stockType[i].stock_attribute == 2){
  2007. arr.push(this.stockType[i])
  2008. }
  2009. if(this.stockType[i].stock_attribute == 3){
  2010. arrTwo.push(this.stockType[i])
  2011. }
  2012. if(this.stockType[i].stock_attribute == 4){
  2013. arrThree.push(this.stockType[i])
  2014. }
  2015. }
  2016. var dialyzator = []
  2017. var irrigation = []
  2018. var dialysisStrainer = []
  2019. for(let i=0;i<arr.length;i++){
  2020. for(let j=0;j<arr[i].GoodInfo.length;j++){
  2021. dialyzator.push(arr[i].GoodInfo[j])
  2022. }
  2023. }
  2024. console.log("透析器",dialyzator)
  2025. this.dialyzers = dialyzator
  2026. for(let i=0;i<arrThree.length;i++){
  2027. for(let j=0;j<arrThree[i].GoodInfo.length;j++){
  2028. dialysisStrainer.push(arrThree[i].GoodInfo[j])
  2029. }
  2030. }
  2031. this.dialysisStrainerList = dialysisStrainer
  2032. for(let i=0;i<arrTwo.length;i++){
  2033. for(let j=0;j<arrTwo[i].GoodInfo.length;j++){
  2034. irrigation.push(arrTwo[i].GoodInfo[j])
  2035. }
  2036. }
  2037. console.log("灌流器",irrigation)
  2038. this.irrigations = irrigation
  2039. }
  2040. }
  2041. })
  2042. },
  2043. addPlanTypeChange() {
  2044. if (this.addPlan.type == 1) {
  2045. this.periodOptions = periodWeek
  2046. this.numOptions = numOptionsWeek
  2047. } else {
  2048. this.addPlan.type == 2
  2049. this.periodOptions = periodDay
  2050. this.numOptions = numOptionsDay
  2051. }
  2052. },
  2053. changeThisAnticoagulant() {
  2054. var thismode = parseInt(this.addPlan.anticoagulant)
  2055. if (isNaN(thismode) || thismode <= 0) {
  2056. return false
  2057. }
  2058. if (
  2059. typeof this.anticoagulantsConfit[thismode] === 'undefined' ||
  2060. this.anticoagulantsConfit[thismode] == null
  2061. ) {
  2062. return false
  2063. }
  2064. this.anticoagulant = this.anticoagulantsConfit[thismode]
  2065. console.log("数据",this.anticoagulant)
  2066. if(this.$store.getters.xt_user.template_info.template_id == 41 && this.addPlan.anticoagulant == 2 ){
  2067. this.addPlan.anticoagulant_zongliang = ""
  2068. this.addPlan.anticoagulant_zongliang = parseInt(this.addPlan.anticoagulant_shouji) + parseInt(this.addPlan.anticoagulant_weichi)
  2069. }
  2070. },
  2071. addPlanModeChange() {
  2072. var thismode = parseInt(this.addPlan.mode)
  2073. if(thismode == 2 || thismode == 5 || thismode ==12){
  2074. this.zhiShow = true
  2075. this.huShow= true
  2076. this.totalShow = true
  2077. }else{
  2078. this.zhiShow= false
  2079. this.huShow = false
  2080. this.totalShow = false
  2081. }
  2082. if (isNaN(thismode) || thismode <= 0) {
  2083. return false
  2084. }
  2085. if (
  2086. typeof this.modeOptions[thismode] === 'undefined' ||
  2087. this.modeOptions[thismode] == null
  2088. ) {
  2089. return false
  2090. }
  2091. this.addPlan.mode_name = this.modeOptions[thismode].name
  2092. const params = {
  2093. id: thismode
  2094. }
  2095. getSystemPrescription(params).then(response => {
  2096. if (response.data.state == 1) {
  2097. var prescription = response.data.data.prescription
  2098. if(prescription.anticoagulant == 0){
  2099. prescription.anticoagulant = ""
  2100. }
  2101. if(prescription.body_fluid == 0){
  2102. prescription.body_fluid = ""
  2103. }
  2104. if (response.data.data.prescription.id > 0) {
  2105. for (const key in response.data.data.prescription) {
  2106. // 因为el-input特性整数类型或者浮点数类型需要转换成字符串,所以加上toString()
  2107. this.$set(
  2108. this.addPlan,
  2109. key,
  2110. response.data.data.prescription[key].toString()
  2111. )
  2112. }
  2113. // 因为el-select特性,整数类型不能转字符串,所以额外处理这些数据
  2114. this.$set(
  2115. this.addPlan,
  2116. 'dialysate_formulation',
  2117. response.data.data.prescription['dialysate_formulation']
  2118. )
  2119. this.$set(
  2120. this.addPlan,
  2121. 'anticoagulant',
  2122. response.data.data.prescription['anticoagulant']
  2123. )
  2124. this.$set(
  2125. this.addPlan,
  2126. 'body_fluid',
  2127. response.data.data.prescription['body_fluid']
  2128. )
  2129. this.$set(
  2130. this.addPlan,
  2131. 'special_medicine',
  2132. response.data.data.prescription['special_medicine']
  2133. )
  2134. this.$set(
  2135. this.addPlan,
  2136. 'displace_liqui_part',
  2137. response.data.data.prescription['displace_liqui_part']
  2138. )
  2139. this.$set(
  2140. this.addPlan,
  2141. 'blood_access',
  2142. response.data.data.prescription['blood_access']
  2143. )
  2144. this.dialysisTimeShow = new Date(
  2145. 2018,
  2146. 1,
  2147. 1,
  2148. this.addPlan.dialysis_duration_hour,
  2149. this.addPlan.dialysis_duration_minute
  2150. )
  2151. } else {
  2152. var tempAddPlan = {
  2153. id: 0,
  2154. dialyzer: '',
  2155. dialysis_duration: '',
  2156. dialysis_duration_hour: '',
  2157. dialysis_duration_minute: '',
  2158. hemodialysis_machine: '',
  2159. dialysate_formulation: '',
  2160. perfusion_apparatus: '',
  2161. blood_flow_volume: '',
  2162. dewater: '',
  2163. displace_liqui: 0,
  2164. replacement_way: '',
  2165. anticoagulant: '',
  2166. anticoagulant_shouji: '',
  2167. anticoagulant_weichi: '',
  2168. anticoagulant_zongliang: '',
  2169. anticoagulant_gaimingcheng: '',
  2170. anticoagulant_gaijiliang: '',
  2171. kalium: '',
  2172. replacement_total: '',
  2173. sodium: '',
  2174. calcium: '',
  2175. bicarbonate: '',
  2176. glucose: '',
  2177. dry_weight: '',
  2178. dialysate_flow: '',
  2179. dialysate_temperature: '',
  2180. conductivity: '',
  2181. doctor: '',
  2182. remark: '',
  2183. target_ktv: '',
  2184. target_ultrafiltration: '',
  2185. dialyzer_perfusion_apparatus: '',
  2186. body_fluid: '',
  2187. body_fluid_other: '',
  2188. special_medicine: '',
  2189. special_medicine_other: '',
  2190. displace_liqui_part: '',
  2191. displace_liqui_value: '',
  2192. ultrafiltration: '',
  2193. blood_access: '',
  2194. plasma_separator:"",
  2195. oxygen_time:"",
  2196. oxygen_uptake:"",
  2197. oxygen_flow:"",
  2198. hemodialysis_pipelines:'',
  2199. hemodialysis_pipelines_count:'',
  2200. puncture_needle:"",
  2201. puncture_needle_count:"",
  2202. epo:"",
  2203. epo_count:"",
  2204. }
  2205. for (const key in tempAddPlan) {
  2206. this.addPlan[key] = tempAddPlan[key]
  2207. }
  2208. }
  2209. }
  2210. })
  2211. },
  2212. setCurrentMode(id) {
  2213. if (
  2214. typeof this.modeOptions[id] === 'undefined' ||
  2215. this.modeOptions[id] == null
  2216. ) {
  2217. return false
  2218. }
  2219. this.current_model = this.modeOptions[id]
  2220. },
  2221. getDoctorName(doctorid) {
  2222. var name = ''
  2223. if (this.doctorOptions == null) {
  2224. return name
  2225. }
  2226. if (typeof this.doctorOptions.length === 'undefined') {
  2227. return name
  2228. }
  2229. var leng = this.doctorOptions.length
  2230. if (leng == 0) {
  2231. return name
  2232. }
  2233. for (let index = 0; index < leng; index++) {
  2234. if (this.doctorOptions[index].id == doctorid) {
  2235. name = this.doctorOptions[index].name
  2236. break
  2237. }
  2238. }
  2239. return name
  2240. },
  2241. getAdminUserName(id) {
  2242. var name = ''
  2243. if (this.adminUserOptions == null) {
  2244. return name
  2245. }
  2246. if (typeof this.adminUserOptions.length === 'undefined') {
  2247. return name
  2248. }
  2249. var leng = this.adminUserOptions.length
  2250. if (leng == 0) {
  2251. return name
  2252. }
  2253. for (let index = 0; index < leng; index++) {
  2254. if (this.adminUserOptions[index].id == id) {
  2255. name = this.adminUserOptions[index].name
  2256. break
  2257. }
  2258. }
  2259. return name
  2260. },
  2261. changeOxygenList(val){
  2262. if(val == 1){
  2263. this.oxygenShow = true
  2264. }
  2265. if(val == 2){
  2266. this.oxygenShow = false
  2267. this.addPlan.oxygen_flow = ""
  2268. this.addPlan.oxygen_time = ""
  2269. }
  2270. },
  2271. toClick(val){
  2272. this.solutionDetail = val
  2273. var params = {
  2274. mode_id:val.mode_id,
  2275. patient_id:val.patient_id,
  2276. page:this.pageOne,
  2277. limit:this.limitOne,
  2278. }
  2279. getDialysisSolutionDetailList(params).then(response=>{
  2280. if(response.data.state == 1){
  2281. this.startDialogVisible = true
  2282. var list = response.data.data.list
  2283. this.totalOne = response.data.data.total
  2284. this.tableList = list
  2285. }
  2286. })
  2287. },
  2288. getDialysisSolutionDetailList(){
  2289. var params = {
  2290. mode_id:this.solutionDetail.mode_id,
  2291. patient_id:this.solutionDetail.patient_id,
  2292. page:this.pageOne,
  2293. limit:this.limitOne,
  2294. }
  2295. console.log("params2222222",params)
  2296. getDialysisSolutionDetailList(params).then(response=>{
  2297. if(response.data.state == 1){
  2298. var list = response.data.data.list
  2299. this.totalOne = 0
  2300. this.totalOne = response.data.data.total
  2301. this.tableList = []
  2302. this.tableList = list
  2303. }
  2304. })
  2305. },
  2306. //修改
  2307. getDialysateFormulation(id){
  2308. var name = ""
  2309. for(let i=0;i<this.dialysate_formulation.length;i++){
  2310. if(id == this.dialysate_formulation[i].id){
  2311. name = this.dialysate_formulation[i].name
  2312. }
  2313. }
  2314. return name
  2315. },
  2316. getAnticoagulant(id){
  2317. var name = ""
  2318. if(id == 1){
  2319. name = "无肝素"
  2320. }
  2321. if(id == 2){
  2322. name = "普通肝素"
  2323. }
  2324. if(id == 3){
  2325. name = "低分子肝素"
  2326. }
  2327. if(id == 4){
  2328. name = "阿加曲班"
  2329. }
  2330. if(id == 5){
  2331. name ="枸橼酸钠"
  2332. }
  2333. if(id == 6){
  2334. name = "低分子肝素钙"
  2335. }
  2336. if(id == 7){
  2337. name = "低分子肝素钠"
  2338. }
  2339. if(id ==8){
  2340. name = "依诺肝素"
  2341. }
  2342. if(id ==9){
  2343. name = "达肝素"
  2344. }
  2345. if(id ==10){
  2346. name = "体外抗凝"
  2347. }
  2348. if(id ==11){
  2349. name = "那曲肝素"
  2350. }
  2351. if(id ==12){
  2352. name = "无抗凝剂"
  2353. }
  2354. if(id ==13){
  2355. name = "那曲肝素钙"
  2356. }
  2357. return name
  2358. },
  2359. getBodyFluid(id){
  2360. var name = ""
  2361. for(let i=0;i<this.body_fluid_option.length;i++){
  2362. if(id == this.body_fluid_option[i].id){
  2363. name = this.body_fluid_option[i].name
  2364. }
  2365. }
  2366. return name
  2367. },
  2368. getBloodAccess(id){
  2369. var name = ""
  2370. for(let i=0;i<this.blood_access_option.length;i++){
  2371. if(id == this.blood_access_option[i].id){
  2372. name = this.blood_access_option[i].name
  2373. }
  2374. }
  2375. return name
  2376. },
  2377. getHemodialysisPipelines(id){
  2378. console.log("管路",this.hemodialysisPipelinesOptions,id)
  2379. var name = ""
  2380. for(let i=0;i<this.hemodialysisPipelinesOptions.length;i++){
  2381. if(id == this.hemodialysisPipelinesOptions[i].id){
  2382. name = this.hemodialysisPipelinesOptions[i].name
  2383. }
  2384. }
  2385. return name
  2386. },
  2387. getDisplaceLiqui(id){
  2388. var name = ""
  2389. for(let i=0;i<this.displace_liqui_part_option.length;i++){
  2390. if(id == this.displace_liqui_part_option[i].id){
  2391. name = this.displace_liqui_part_option[i].name
  2392. }
  2393. }
  2394. return name
  2395. },
  2396. getSpecialMedicine(id){
  2397. var name = ""
  2398. for(let i=0;i<this.special_medicine_option.length;i++){
  2399. if(id == this.special_medicine_option[i].id){
  2400. name = this.special_medicine_option[i].name
  2401. }
  2402. }
  2403. return name
  2404. }
  2405. },
  2406. created() {
  2407. const id = this.$route.params && this.$route.params.id
  2408. this.patientID = parseInt(id)
  2409. if (isNaN(this.patientID) || this.patientID <= 0) {
  2410. this.$notify.error({
  2411. title: '错误',
  2412. message: '无效的id'
  2413. })
  2414. this.$router.back(-1)
  2415. }
  2416. this.hemodialysisPipelinesOptions = getDataConfig('hemodialysis', 'hemodialysis_pipelines')
  2417. this.punctureNeedleOptions = getDataConfig('hemodialysis', 'puncture_needle')
  2418. this.epoOptions =getDataConfig('hemodialysis', 'epo')
  2419. this.GetDeviceData()
  2420. this.fetchAllAdminUsers()
  2421. this.FindePatientDialysisLongSolutions()
  2422. this.modeOptions = this.$store.getters.treatment_mode
  2423. this.anticoagulantsSet = this.$store.getters.anticoagulants_set
  2424. this.replacementWays = this.$store.getters.replacement_ways
  2425. this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit
  2426. this.blood_filters = this.$store.getters.blood_filters
  2427. this.perfusion_apparatus = this.$store.getters.perfusion_apparatus
  2428. this.hemodialysis_machines = this.$store.getters.hemodialysis_machines
  2429. this.dialysate_formulation = getDataConfig(
  2430. 'hemodialysis',
  2431. 'dialysate_formulation'
  2432. )
  2433. this.body_fluid_option = this.$store.getters.body_fluid
  2434. this.special_medicine_option = this.$store.getters.special_medicine
  2435. this.displace_liqui_part_option = this.$store.getters.displace_liqui
  2436. this.blood_access_option = this.$store.getters.blood_access
  2437. this.blood_access_option = getDataConfig('hemodialysis', 'vascular_access_desc')
  2438. this.dialyzerPerfusionApparatus = getDataConfig(
  2439. 'hemodialysis',
  2440. 'dialyzer_perfusion_apparatus'
  2441. )
  2442. this.plasmaSeparatorList = getDataConfig('hemodialysis','plasma_separator')
  2443. this.bilirubinAdsorptionColumn = getDataConfig('hemodialysis','bilirubin_adsorption_column')
  2444. this.queryParams.id = this.patientID
  2445. }
  2446. }
  2447. </script>
  2448. <style rel="stylesheet/scss" lang="scss" scoped>
  2449. .Total {
  2450. .sure {
  2451. float: right;
  2452. margin: 5px 10px 0 0;
  2453. }
  2454. .plan {
  2455. font-size: 15px;
  2456. color: #6caef7;
  2457. background: #ecf5ff;
  2458. height: 42px;
  2459. line-height: 42px;
  2460. border: 1px #ebeef5 solid;
  2461. width: 100%;
  2462. padding-left: 15px;
  2463. span {
  2464. margin: 0 20px 0 0;
  2465. }
  2466. }
  2467. }
  2468. .form-table {
  2469. border: 1px #ebeef5 solid;
  2470. padding-bottom: 20px;
  2471. .el-col-6 {
  2472. width: 380px;
  2473. }
  2474. .el-row {
  2475. margin: 0 !important;
  2476. .el-form-item {
  2477. margin-bottom: 12px;
  2478. .el-form-item__content {
  2479. .el-select {
  2480. width: 100%;
  2481. }
  2482. }
  2483. }
  2484. }
  2485. }
  2486. </style>
  2487. <style>
  2488. .el-table td,
  2489. .el-table th.is-leaf,
  2490. .el-table--border,
  2491. .el-table--group {
  2492. border-color: #d0d3da;
  2493. }
  2494. .el-table--border::after,
  2495. .el-table--group::after,
  2496. .el-table::before {
  2497. background-color: #d0d3da;
  2498. }
  2499. </style>