dialysisSolution.vue 104KB

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