1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909 |
- <template>
- <div class="patient-container">
- <patient-sidebar :id="patientID" defaultActive="2-1"></patient-sidebar>
- <div class="patient-app-container app-container">
- <div class="Total">
- <!-- <div class="plan" >透析计划</div> -->
- <!-- <table-title title="长期透析处方"></table-title> -->
- <div class="sum">
- <!-- <span>透析总频率:<el-input :value="totalrate" disabled style="width:180px"></el-input></span> -->
- <el-button
- type="primary"
- size="small"
- icon="el-icon-plus"
- @click="openNew"
- :disabled="
- $store.getters.xt_user.subscibe.state == 3 ? true : false
- "
- >新增透析处方
- </el-button>
- </div>
- </div>
- <el-table
- ref="solutionTable"
- :data="tableData"
- border
- fit
- highlight-current-row
- @current-change="tableCurrentChange"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266'
- }"
- :row-style="{ color: '#303133' }"
- style="width: 100%"
- >
- <el-table-column type="index" align="center" label="序号" width="60">
- </el-table-column>
- <el-table-column
- prop="mode_name"
- align="center"
- label="透析模式"
- min-width="50"
- >
- <template slot-scope="scope">
- {{ modeOptions[scope.row.mode_id]?modeOptions[scope.row.mode_id].name:'' }}
- </template>
- </el-table-column>
- <el-table-column
- prop="dialysis_duration"
- align="center"
- label="透析时长"
- min-width="50"
- >
- <template slot-scope="scope">
- {{ scope.row.dialysis_duration_hour }} 小时
- {{ scope.row.dialysis_duration_minute }} 分钟
- </template>
- </el-table-column>
- <!-- <el-table-column
- prop="period"
- label="频率"
- align="center"
- min-width="50">
- <template slot-scope="scope" >
- <span v-if="scope.row.parent_id === 0" >{{scope.row.period}}{{scope.row.times}}</span>
- <span v-else >--</span>
- </template>
- </el-table-column> -->
- <!-- <el-table-column
- prop="name"
- label="处方名"
- align="center"
- min-width="50">
- <template slot-scope="scope" >
- <span >{{scope.row.name}}{{scope.row.sub_name}}</span>
- </template>
- </el-table-column> -->
- <el-table-column
- prop="doctor"
- label="医生"
- align="center"
- min-width="110"
- >
- <template slot-scope="scope">
- <span>{{ getAdminUserName(scope.row.registrars_id) }}</span>
- </template>
- </el-table-column>
-
- <el-table-column
- prop="updated_time"
- align="center"
- label="更新日期"
- min-width="60"
- >
- <template slot-scope="scope">
- <span>{{ scope.row.updated_time | parseTime("{y}-{m}-{d}") }}</span>
- </template>
- </el-table-column>
- <!-- <el-table-column
- prop="state"
- label="状态"
- align="center"
- min-width="40">
- <template slot-scope="scope" >
- <span v-if="scope.row.initiate_mode==1">启用</span>
- <span v-else-if="scope.row.initiate_mode==2">停用</span>
- <span v-else>未知</span>
- </template>
- </el-table-column> -->
- <el-table-column label="操作" align="center" min-width="140">
- <template slot-scope="scope">
- <el-tooltip
- class="item"
- effect="dark"
- content="编辑"
- placement="top"
- >
- <el-button
- size="small"
- type="primary"
- icon="el-icon-edit-outline"
- @click="openEdit(scope.$index, scope.row)"
- ></el-button>
- </el-tooltip>
- <!-- <el-button
- size="mini"
- type="primary"
- @click="openChildEdit(scope.$index, scope.row)" v-else>编辑</el-button>
-
- <el-button
- size="mini"
- type="success"
- @click="openNewChild(scope.$index, scope.row)" v-if="scope.row.parent_id===0">新增</el-button>
- <el-button
- size="mini"
- type="danger"
- @click="handleDelete(scope.$index, scope.row)">删除</el-button>-->
- </template>
- </el-table-column>
- </el-table>
- <el-pagination
- align="right"
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :current-page="queryParams.page"
- :page-sizes="[10, 20, 50, 100]"
- :page-size="10"
- background
- style="margin-top:20px;"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total"
- >
- </el-pagination>
- </div>
-
- <el-dialog
- :title="isEdit ? '编辑透析处方' : '新增透析处方'"
- :visible.sync="dialogVisible"
- width="1010px"
- >
- <el-form
- ref="addPlan"
- :model="addPlan"
- :rules="addPlanRules"
- label-width="160px"
- >
- <el-row :gutter="20">
- <el-col :span="8" v-if="isShows('透析模式')">
- <el-form-item label="透析模式:" prop="mode">
- <el-select
- v-model="addPlan.mode"
- @change="addPlanModeChange"
- :disabled="isEdit ? true : false"
- >
- <el-option
- v-for="item in modeOptions"
- :label="item.name"
- :key="item.id"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
-
- <el-col :span="8" v-if="isShows('透析时长')">
- <el-form-item label="透析时长(h):" prop="dialysis_duration">
- <el-time-picker
- v-model="dialysisTimeShow"
- :picker-options="{
- selectableRange: '00:01:00 - 23:59:00'
- }"
- placeholder="透析时长"
- style="width:100%;"
- value-format="H:m"
- format="H:m"
- @change="selectnDialysisTime"
- >
- </el-time-picker>
- </el-form-item>
- </el-col>
-
- <!-- <el-col :span="8">
- <el-form-item label="透析器:" prop="dialyzer">
- <el-select v-model="addPlan.dialyzer" placeholder="" >
- <el-option v-for="item in deviceList" :label="item.name" :key="item.id" :value="item.id"></el-option>
- </el-select>
- </el-form-item>
- </el-col> -->
- <!-- <el-col :span="8">
- <el-form-item label="透析器:" prop="hemodialysis_machine">
- <el-select v-model="addPlan.hemodialysis_machine" placeholder="" >
- <el-option v-for="item in hemodialysis_machines" :label="item.name" :key="item.id" :value="item.id"></el-option>
- </el-select>
- </el-form-item>
- </el-col> -->
- <!-- <el-col :span="8">
- <el-form-item label="灌流器:" prop="perfusion_apparatus">
- <el-select v-model="addPlan.perfusion_apparatus" placeholder="" >
- <el-option v-for="item in perfusion_apparatus" :label="item.name" :key="item.id" :value="item.id"></el-option>
- </el-select>
- </el-form-item>
- </el-col> -->
- <el-col :span="8" v-if="isShows('血流量')">
- <el-form-item label="血流量(ml/min):" prop="blood_flow_volume">
- <el-input v-model="addPlan.blood_flow_volume"></el-input>
- </el-form-item>
- </el-col>
- <!--<el-col :span="8" v-if="isShows('目标超滤量')&&this.$store.getters.xt_user.template_info.template_id == 6">-->
- <!--<el-form-item label="目标超滤量(ml) : ">-->
- <!--<el-input v-model="addPlan.target_ultrafiltration" type="number"></el-input>-->
- <!--</el-form-item>-->
- <!--</el-col>-->
-
- <!--<el-col :span="8" v-if="isShows('目标超滤量')&&this.$store.getters.xt_user.template_info.template_id != 6">-->
- <!--<el-form-item label="目标超滤量(L) : ">-->
- <!--<el-input v-model="addPlan.target_ultrafiltration" type="number"></el-input>-->
- <!--</el-form-item>-->
- <!--</el-col>-->
-
- <el-col :span="8" v-if="isShows('透析液配方')">
- <el-form-item label="透析液配方:">
- <el-select v-model="addPlan.dialysate_formulation">
- <el-option
- v-for="item in dialysate_formulation"
- :label="item.name"
- :key="item.id"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <!-- <el-col :span="12">
- <el-form-item label="脱水量(L):" prop="dewater">
- <el-input v-model="addPlan.dewater" ></el-input>
- </el-form-item>
- </el-col> -->
- <!-- <el-col :span="12">
- <el-form-item label="置换液(L):" prop="displace_liqui">
- <el-input v-model="addPlan.displace_liqui" ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="置换方式:" prop="replacement_way" >
- <el-select v-model="addPlan.replacement_way" >
- <el-option v-for="item in replacementWays" :label="item.name" :key="item.id" :value="item.id"></el-option>
- </el-select>
- </el-form-item>
- </el-col> -->
- <el-col :span="8" v-if="isShows('抗凝剂')">
- <el-form-item label="抗凝剂:" prop="anticoagulant">
- <el-select
- v-model="addPlan.anticoagulant"
- @change="changeThisAnticoagulant"
- >
- <el-option
- v-for="item in anticoagulantsConfit"
- :label="item.name"
- :key="item.id"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col
- :span="8"
- v-if="anticoagulant.shouji != -1 && isShows('首剂')"
- >
- <el-form-item
- :label="'首剂(' + anticoagulant.shouji_unit + '): '"
- prop="anticoagulant_shouji"
- >
- <el-input
- v-model="addPlan.anticoagulant_shouji"
- :disabled="anticoagulant.shouji == 1 ? false : true"
- type="number"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col
- :span="8"
- v-if="anticoagulant.weichi != -1 && isShows('维持')"
- >
- <el-form-item
- :label="'维持(' + anticoagulant.weichi_unit + '): '"
- prop="anticoagulant_weichi"
- >
- <el-input
- v-model="addPlan.anticoagulant_weichi"
- :disabled="anticoagulant.weichi == 1 ? false : true"
- type="number"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col
- :span="8"
- v-if="anticoagulant.zongliang != -1 && isShows('总量')"
- >
- <el-form-item
- :label="'总量(' + anticoagulant.zongliang_unit + '): '"
- prop="anticoagulant_zongliang"
- >
- <el-input
- v-model="addPlan.anticoagulant_zongliang"
- :disabled="anticoagulant.zongliang == 1 ? false : true"
- type="number"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col
- :span="8"
- v-if="anticoagulant.gaimingcheng != -1 && isShows('钙名称')"
- >
- <el-form-item label="钙名称:" prop="anticoagulant_gaimingcheng">
- <el-input
- v-model="addPlan.anticoagulant_gaimingcheng"
- :disabled="anticoagulant.gaimingcheng == 1 ? false : true"
- placeholder="钙名称"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col
- :span="8"
- v-if="anticoagulant.gaijiliang != -1 && isShows('钙剂量')"
- >
- <el-form-item
- :label="'钙剂量(' + anticoagulant.gaimingcheng_unit + '): '"
- prop="anticoagulant_gaijiliang"
- >
- <el-input
- v-model="addPlan.anticoagulant_gaijiliang"
- :disabled="anticoagulant.gaijiliang == 1 ? false : true"
- placeholder="钙剂量"
- ></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8" v-if="isShows('置换量')" v-show="zhiShow">
- <el-form-item label="置换量(L) : " prop="replacement_total">
- <el-input
- v-model="addPlan.replacement_total"
- type="number"
- ></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8" v-if="isShows('钾')">
- <el-form-item label="钾(mmol/L): " prop="kalium">
- <el-input v-model="addPlan.kalium"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8" v-if="isShows('钠')">
- <el-form-item label="钠(mmol/L): " prop="sodium">
- <el-input v-model="addPlan.sodium"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8" v-if="isShows('钙')">
- <el-form-item label="钙(mmol/L): " prop="calcium">
- <el-input v-model="addPlan.calcium"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8" v-if="isShows('透析器/灌流器')">
- <el-form-item label="透析器/灌流器:">
- <el-input
- v-model="addPlan.dialyzer_perfusion_apparatus" @focus="showInnerDialog('5')"></el-input>
- </el-form-item>
- </el-col>
-
-
-
-
- <el-col :span="8" v-if="isShows('透析器')">
- <el-form-item label="透析器:">
- <el-input v-model="dialysis_dialyszers" @focus="showInnerDialog('6')"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8" v-if="isShows('灌流器')">
- <el-form-item label="灌流器:">
- <el-input v-model="dialysis_irrigation" @focus="showInnerDialog('7')"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8" v-if="isShows('碳酸氢盐')">
- <el-form-item label="碳酸氢盐(mmol/L): " prop="bicarbonate">
- <el-input v-model="addPlan.bicarbonate"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8" v-if="isShows('葡萄糖')">
- <el-form-item label="葡萄糖(mmol/L): " prop="glucose">
- <el-input v-model="addPlan.glucose"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8" v-if="isShows('透析液流量')">
- <el-form-item label="透析液流量(ml/min): " prop="dialysate_flow">
- <el-input v-model="addPlan.dialysate_flow"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8" v-if="isShows('透析液温度')">
- <el-form-item
- label="透析液温度(℃): "
- prop="dialysate_temperature"
- >
- <el-input v-model="addPlan.dialysate_temperature"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8" v-if="isShows('电导度')">
- <el-form-item label="电导度(mS/cm): " prop="conductivity">
- <el-input v-model="addPlan.conductivity"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8" v-if="isShows('体液过多症状')">
- <el-form-item label="体液过多症状:">
- <el-select v-model="addPlan.body_fluid" @change="changeBodyFluid">
- <el-option
- v-for="item in body_fluid_option"
- :label="item.name"
- :key="item.id"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
-
- <el-col :span="8" v-if="isShows('体液过多其他症状')">
- <el-form-item label="体液过多其他症状">
- <el-input v-model="addPlan.body_fluid_other"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8" v-if="isShows('透析前使用特殊药物')">
- <el-form-item label="透析前使用特殊药物">
- <el-select
- v-model="addPlan.special_medicine"
- placeholder="请选择"
- style="width:100%;"
- >
- <el-option :key="0" label="请选择" :value="0"></el-option>
- <el-option
- v-for="item in special_medicine_option"
- :label="item.name"
- :key="item.id"
- :value="item.id"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
-
- <el-col :span="8" v-if="isShows('透析前使用其他特殊药物')">
- <el-form-item label="使用其他特殊药物">
- <el-input v-model="addPlan.special_medicine_other"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8">
- <el-form-item
- label="置换液:"
- v-if="
- isShows('置换液') &&
- this.$store.getters.xt_user.template_info.template_id != 6
- "
- v-show="huShow"
- >
- <el-select
- v-model="addPlan.displace_liqui_part"
- placeholder="请选择"
- >
- <el-option :key="0" label="请选择" :value="0"></el-option>
- <el-option
- v-for="(option, index) in displace_liqui_part_option"
- :key="index"
- :label="option.name"
- :value="option.id"
- ></el-option>
- </el-select>
- </el-form-item>
-
- <el-form-item
- label="置换方式:"
- v-if="
- isShows('置换液') &&
- this.$store.getters.xt_user.template_info.template_id == 6
- "
- >
- <el-select
- v-model="addPlan.displace_liqui_part"
- placeholder="请选择"
- >
- <el-option :key="0" label="请选择" :value="0"></el-option>
- <el-option
- v-for="(option, index) in displace_liqui_part_option"
- :key="index"
- :label="option.name"
- :value="option.id"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
-
- <el-col :span="8" v-if="isShows('置换液总量')" v-show="totalShow">
- <el-form-item label="置换液总量(L)">
- <el-input v-model="addPlan.displace_liqui_value"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8" v-if="isShows('血管通路')">
- <el-form-item label="血管通路:">
- <el-select v-model="addPlan.blood_access" placeholder="请选择">
- <el-option :key="0" label="请选择" :value="0"></el-option>
-
- <el-option
- v-for="(option, index) in blood_access_option"
- :key="index"
- :label="option.name"
- :value="option.id"
- ></el-option>
- </el-select>
- </el-form-item>
- </el-col>
-
- <!-- </el-row>
- <el-row :gutter="20" > -->
- <el-col :span="8" v-if="isShows('实际超滤量')">
- <el-form-item label="实际超滤量(L)">
- <el-input v-model="addPlan.ultrafiltration"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8" v-if="isShows('目标KT/V')">
- <el-form-item label="目标KT/V">
- <el-input v-model="addPlan.target_ktv"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
-
- <el-row :gutter="24">
- <el-col :span="24">
- <el-form-item label="备注: " prop="remark">
- <el-input
- type="textarea"
- :rows="2"
- placeholder="请输入内容"
- v-model="addPlan.remark"
- >
- </el-input>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogVisible = false">取 消</el-button>
- <el-button
- type="primary"
- @click="submitEditSolution('addPlan')"
- v-if="isEdit"
- :disabled="$store.getters.xt_user.subscibe.state == 3 ? true : false"
- >保 存</el-button
- >
- <el-button
- type="primary"
- @click="submitNewSolution('addPlan')"
- v-else
- :disabled="$store.getters.xt_user.subscibe.state == 3 ? true : false"
- >保 存</el-button
- >
- </span>
- </el-dialog>
-
- <multi-select-box
- :propsForm="InnerDialogProps"
- v-on:dialog-comfirm="innerDialogComfirm"
- v-on:dialog-cancle="innerDialogCancle">
- </multi-select-box>
-
-
- </div>
- </template>
-
- <script>
- import tableTitle from './components/tableTitle'
- import PatientSidebar from './components/PatientSidebar'
- import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
- import {
- createChildPatientDialysisSolution,
- createPatientDialysisSolution,
- deleteDialysisSolution,
- editChildPatientDialysisSolution,
- editDialysisSolutionDetail,
- editPatientDialysisSolution,
- fetchPatientDialysisSolutions
- } from '@/api/patient'
-
- import { getSystemPrescription } from '@/api/config'
- import { getDataConfig } from '@/utils/data'
- import { calculateAnticoagulantZL, uParseTime } from '@/utils/tools'
- import store from '@/store'
-
- import { GetDeviceInfo } from '@/api/dialysis'
- import MultiSelectBox from '../dialysis/details/dialog/MultiSelectBox/index'
-
- const periodWeek = [
- { value: '每周', label: '每周' },
- { value: '两周', label: '两周' },
- { value: '三周', label: '三周' },
- { value: '四周', label: '四周' }
- ]
- const periodDay = [
- { value: '2天', label: '2天' },
- { value: '3天', label: '3天' },
- { value: '4天', label: '4天' },
- { value: '5天', label: '5天' },
- { value: '10天', label: '10天' },
- { value: '15天', label: '15天' },
- { value: '30天', label: '30天' }
- ]
- const numOptionsWeek = [
- { value: '1次', label: '1次' },
- { value: '2次', label: '2次' },
- { value: '3次', label: '3次' },
- { value: '4次', label: '4次' },
- { value: '5次', label: '5次' },
- { value: '6次', label: '6次' },
- { value: '7次', label: '7次' }
- ]
- const numOptionsDay = [{ value: '1次', label: '1次' }]
-
- export default {
- name: 'Dialysis',
- data() {
- var checkFirstDialysis = (rule, value, callback) => {
- if (this.addPlan.type == 2 && !value) {
- return callback(new Error('请选择首次透析!'))
- }
- callback()
- }
- var checkSubName = (rule, value, callback) => {
- var pattern = /^\d*$/
- if (!pattern.test(value)) {
- return callback(new Error('只填写0-9的数字'))
- }
- callback()
- }
- return {
- zhiShow:false,
- huShow:false,
- totalShow:false,
- InnerDialogProps: {
- values: [],
- visibility: false,
- isShowTextArea: true,
- customContent: '',
- titles: '',
- type: '' // 不同弹框类型,用来匹配数据
- },
- deviceList: [],
- dialysisTimeShow: new Date(2018, 1, 1, 3, 0),
- isEdit: false,
- isChildEdit: false,
- totalrate: '无/两周一次',
- patientID: 0,
- dialogVisible: false,
- dialogFormVisible: false,
- formLabelWidth: '80px',
- formInputWidth: '80px',
- total: 0,
- tableData: null,
- form: {
- name: '',
- region: '',
- date1: '',
- date2: '',
- delivery: false,
- type: [],
- resource: '',
- desc: ''
- },
- addPlan: {
- id: 0,
- mode: '',
- mode_name: '',
- registrars_id: 0,
- dialyzer: '',
- dialysis_duration: '',
- dialysis_duration_hour: '',
- dialysis_duration_minute: '',
- hemodialysis_machine: '',
- perfusion_apparatus: '',
- blood_flow_volume: '',
- dewater: '',
- displace_liqui: 0,
- replacement_way: '',
- anticoagulant: '',
- anticoagulant_shouji: '',
- anticoagulant_weichi: '',
- anticoagulant_zongliang: '',
- anticoagulant_gaimingcheng: '',
- anticoagulant_gaijiliang: '',
- kalium: '',
- replacement_total: '',
- sodium: '',
- calcium: '',
- bicarbonate: '',
- glucose: '',
- dry_weight: '',
- dialysate_flow: '',
- dialysate_temperature: '',
- conductivity: '',
- doctor: '',
- dialysate_formulation: '',
- remark: '',
- target_ktv: '',
- target_ultrafiltration: '',
- dialyzer_perfusion_apparatus: '',
- body_fluid: '',
- body_fluid_other: '',
- special_medicine: '',
- special_medicine_other: '',
- displace_liqui_part: '',
- displace_liqui_value: '',
- ultrafiltration: '',
- blood_access: '',
- dialysis_dialyszers:'',
- dialysis_irrigation:'',
- },
- childPlan: {
- mode: '',
- frequency: '',
- name: '',
- parent_id: 0,
- sub_name: '',
- initiate_mode: '',
- doctor: ''
- },
- modeOptions: null,
- anticoagulantsSet: {
- type: 1
- },
- replacementWays: null,
- anticoagulantsConfit: null,
- dialysate_formulation: [],
- body_fluid_option: [],
- special_medicine_option: [],
- displace_liqui_part_option: [],
- blood_access_option: [],
- timeOptions: [{ value: 1, label: '按周' }, { value: 2, label: '按日' }],
- periodOptions: periodWeek,
- numOptions: numOptionsWeek,
- stateOptions: [{ value: 1, label: '启用' }, { value: 2, label: '停用' }],
- doctorOptions: null,
- adminUserOptions: null,
- current_index: -1,
- addPlanRules: {
- mode: [{ required: true, message: '请选择透析模式', trigger: 'blur' }],
- type: [{ required: true, message: '请选择频率', trigger: 'blur' }],
- period: [{ required: true, message: '请选择周期', trigger: 'blur' }],
- times: [{ required: true, message: '请选择次数', trigger: 'blur' }],
- initiate_mode: [
- { required: true, message: '请选择状态', trigger: 'blur' }
- ],
- doctor: [{ required: true, message: '请选择医生', trigger: 'blur' }],
- first_dialysis: [{ validator: checkFirstDialysis, trigger: 'blur' }]
- },
- addChildPlanRules: {
- sub_name: [
- { required: true, message: '请填写处方名', trigger: 'blur' },
- {
- validator: checkSubName,
- trigger: 'blur'
- }
- ],
- initiate_mode: [
- { required: true, message: '请选择状态', trigger: 'blur' }
- ],
- doctor: [{ required: true, message: '请选择医生', trigger: 'blur' }]
- },
- current_model: {
- id: 0,
- name: '',
- dialysis_duration: 2,
- replacement_total: 0,
- replacement_way: 2,
- hemodialysis_machine: 2,
- blood_filter: 2,
- perfusion_apparatus: 2,
- blood_flow_volume: 2,
- dialysate_flow: 2,
- kalium: 2,
- sodium: 2,
- calcium: 2,
- bicarbonate: 2
- },
- current_solution: {
- id: 0,
- name: '',
- sub_name: '',
- period: '',
- times: '',
- doctor: 0
- },
- anticoagulant: {
- id: 0,
- name: '',
- type: 1,
- shouji: 1,
- weichi: 1,
- zongliang: 1,
- gaimingcheng: -1,
- gaijiliang: -1,
- shouji_unit: 'mg',
- weichi_unit: 'mg/h',
- zongliang_unit: 'mg',
- gaimingcheng_unit: '',
- gaijiliang_unit: ''
- },
- blood_filters: null,
- perfusion_apparatus: null,
- hemodialysis_machines: null,
- dialyzerPerfusionApparatus: [],
- solution_detail: {
- id: 0,
- affirm_state: 0,
- dialysis_duration: '',
- replacement_way: '',
- mode_id: '',
- blood_flow_volume: '',
- hemodialysis_machine: '',
- blood_filter: '',
- perfusion_apparatus: '',
- dialysate_flow: '',
- kalium: '',
- replacement_total: '',
- sodium: '',
- calcium: '',
- bicarbonate: '',
- anticoagulant: '',
- anticoagulant_shouji: '',
- anticoagulant_weichi: '',
- anticoagulant_zongliang: '',
- anticoagulant_gaimingcheng: '',
- anticoagulant_gaijiliang: ''
- },
- queryParams: {
- page: 1,
- limit: 10,
- id: 0
- },
- stockType:[],
- irrigations:[],
- dialyzers:[],
- dialysis_dialyszers:'',
- dialysis_irrigation:"",
- }
- },
- watch: {
- 'addPlan.dialysis_duration': function() {
- this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(
- 1,
- this.addPlan.anticoagulant_shouji,
- this.addPlan.dialysis_duration,
- this.addPlan.anticoagulant_weichi
- )
- },
- 'addPlan.anticoagulant_shouji': function() {
- this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(
- 1,
- this.addPlan.anticoagulant_shouji,
- this.addPlan.dialysis_duration,
- this.addPlan.anticoagulant_weichi
- )
- },
- 'addPlan.anticoagulant_weichi': function() {
- this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(
- 1,
- this.addPlan.anticoagulant_shouji,
- this.addPlan.dialysis_duration,
- this.addPlan.anticoagulant_weichi
- )
- }
- },
- components: {
- MultiSelectBox,
- tableTitle,
- PatientSidebar
- },
- methods: {
- showInnerDialog: function(val) {
- this.InnerDialogProps.visibility = true
- switch (val) {
- case '5': // 透析器/灌流器
- this.InnerDialogProps.values = this.dialyzerPerfusionApparatus
- this.InnerDialogProps.titles = '透析器/灌流器'
- this.InnerDialogProps.type = 'dialyzer_perfusion_apparatus'
- this.InnerDialogProps.selected = this.addPlan.dialyzer_perfusion_apparatus
- this.InnerDialogProps.isShowTextArea = false
- break
- case '6':
- for(let i=0;i<this.dialyzers.length;i++){
- this.dialyzers[i].name = this.dialyzers[i].specification_name
- }
- this.InnerDialogProps.values = this.dialyzers
- this.InnerDialogProps.titles = '透析器'
- this.InnerDialogProps.type = 'dialyzers'
- this.InnerDialogProps.selected = this.dialysis_dialyszers
- this.InnerDialogProps.isShowTextArea = false
-
- break
- case '7':
- for(let i=0;i<this.irrigations.length;i++){
- this.irrigations[i].name = this.irrigations[i].specification_name
- }
- this.InnerDialogProps.values = this.irrigations
- this.InnerDialogProps.titles = '灌流器'
- this.InnerDialogProps.type = 'irrigations'
- this.InnerDialogProps.selected = this.dialysis_irrigation
- this.InnerDialogProps.isShowTextArea = false
-
- break
- }
- },
- innerDialogComfirm: function(val) {
-
- this.InnerDialogProps.visibility = false
- switch (val.type) {
- case 'dialyzer_perfusion_apparatus':
- this.addPlan.dialyzer_perfusion_apparatus = val.value.join(',')
- break
- case 'dialyzers':
- this.dialysis_dialyszers = val.value.join(',')
- console.log("3333333",this.addPlan.dialysis_dialyszers)
-
- break
- case 'irrigations':
- this.dialysis_irrigation = val.value.join(',')
- break
-
- }
- },
- innerDialogCancle: function() {
- this.InnerDialogProps.visibility = false
- },
- changeBodyFluid: function() {},
- GetDeviceData: function() {
- const params = {}
- GetDeviceInfo(params).then(response => {
- this.deviceList = response.data.data.device
- })
- },
-
- selectnDialysisTime(val) {
- var valTime = val.split(':')
- this.addPlan.dialysis_duration =
- parseFloat(valTime[0]) + parseFloat((valTime[1] / 60).toFixed(2))
- this.addPlan.dialysis_duration_hour = valTime[0]
- this.addPlan.dialysis_duration_minute = valTime[1]
- },
-
- tableCurrentChange(current) {
- if (typeof current === 'undefined' || current == null) {
- this.current_solution = {
- id: 0,
- name: '',
- sub_name: '',
- period: '',
- times: '',
- doctor: 0
- }
- this.solution_detail = {
- id: 0,
- affirm_state: 0,
- dialysis_duration: '',
- replacement_way: '',
- mode_id: '',
- blood_flow_volume: '',
- hemodialysis_machine: '',
- blood_filter: '',
- perfusion_apparatus: '',
- dialysate_flow: '',
- kalium: '',
- replacement_total: '',
- sodium: '',
- calcium: '',
- bicarbonate: '',
- anticoagulant: '',
- anticoagulant_shouji: '',
- anticoagulant_weichi: '',
- anticoagulant_zongliang: '',
- anticoagulant_gaimingcheng: '',
- anticoagulant_gaijiliang: ''
- }
- return
- }
- this.current_solution = current
- this.setCurrentMode(current.mode_id)
- this.solution_detail = {
- id: this.current_solution.id,
- affirm_state: this.current_solution.affirm_state,
- dialysis_duration:
- this.current_solution.dialysis_duration != 0
- ? this.current_solution.dialysis_duration
- : '',
- replacement_way:
- this.current_solution.replacement_way != 0
- ? this.current_solution.replacement_way
- : '',
- replacement_total:
- this.current_solution.replacement_total != 0
- ? this.current_solution.replacement_total
- : '',
- mode_id: this.current_solution.mode_id,
- blood_flow_volume:
- this.current_solution.blood_flow_volume != 0
- ? this.current_solution.blood_flow_volume
- : '',
- hemodialysis_machine:
- this.current_solution.hemodialysis_machine != 0
- ? this.current_solution.hemodialysis_machine
- : '',
- blood_filter:
- this.current_solution.blood_filter != 0
- ? this.current_solution.blood_filter
- : '',
- perfusion_apparatus:
- this.current_solution.perfusion_apparatus != 0
- ? this.current_solution.perfusion_apparatus
- : '',
- dialysate_flow:
- this.current_solution.dialysate_flow != 0
- ? this.current_solution.dialysate_flow
- : '',
- kalium:
- this.current_solution.kalium != 0 ? this.current_solution.kalium : '',
- sodium:
- this.current_solution.sodium != 0 ? this.current_solution.sodium : '',
- calcium:
- this.current_solution.calcium != 0
- ? this.current_solution.calcium
- : '',
- bicarbonate:
- this.current_solution.bicarbonate != 0
- ? this.current_solution.bicarbonate
- : '',
- anticoagulant:
- this.current_solution.anticoagulant != 0
- ? this.current_solution.anticoagulant
- : '',
- anticoagulant_shouji:
- this.current_solution.anticoagulant_shouji != 0
- ? this.current_solution.anticoagulant_shouji
- : '',
- anticoagulant_weichi:
- this.current_solution.anticoagulant_weichi != 0
- ? this.current_solution.anticoagulant_weichi
- : '',
- anticoagulant_zongliang:
- this.current_solution.anticoagulant_zongliang != 0
- ? this.current_solution.anticoagulant_zongliang
- : ''
- }
- },
- handleDelete(index, row) {
- if (row.use_state == 1) {
- this.$message.error('方案已被使用,不能删除')
- return false
- }
- this.$confirm('确定删除' + row.name + row.sub_name + '方案吗?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- deleteDialysisSolution(row.id).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- this.$notify({
- title: '成功',
- message: '删除成功',
- type: 'success',
- duration: 2000
- })
- this.tableData.splice(index, 1)
- // if (row.parent_id>0) {
- // this.tableData.splice(index,1);
- // }else {
- // var resetTableData = this.tableData;
- // this.tableData = [];
- // var that = this;
- // resetTableData.forEach(function(item, itemindex){
- // if (item.id != row.id && item.parent_id != row.id) {
- // that.tableData.push(item);
- // }
- // });
- // }
- }
- })
- })
- },
- submitSolution(formName) {
- editDialysisSolutionDetail(
- this.patientID,
- this.solution_detail.id,
- this.solution_detail
- ).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- this.$notify({
- title: '成功',
- message: '修改成功',
- type: 'success',
- duration: 2000
- })
- var thisSolution = response.data.data.solution
- var spliceIndex = -1
-
- for (let index = this.tableData.length - 1; ; index--) {
- if (this.tableData[index].id === thisSolution.id) {
- spliceIndex = index
- break
- }
- }
-
- if (spliceIndex > -1) {
- var newIndex = spliceIndex + 1
- if (newIndex === this.tableData.length) {
- this.tableData.pop()
- this.tableData.push(thisSolution)
- } else {
- var swapData = this.tableData.splice(newIndex)
- this.tableData.pop()
- this.tableData.push(thisSolution)
- this.tableData = this.tableData.concat(swapData)
- }
- }
- this.solution_detail.affirm_state = thisSolution.affirm_state
- this.$refs.solutionTable.setCurrentRow(this.tableData[spliceIndex])
- }
- })
- },
- submitEditChildSolution(formName) {
- this.$refs[formName].validate(valid => {
- if (valid) {
- var editData = {
- initiate_mode: this.childPlan.initiate_mode,
- doctor: this.childPlan.doctor
- }
- editChildPatientDialysisSolution(
- this.patientID,
- this.childPlan.id,
- editData
- ).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- this.$notify({
- title: '成功',
- message: '修改成功',
- type: 'success',
- duration: 2000
- })
- this.$refs[formName].resetFields()
- this.dialogFormVisible = false
- this.tableData[this.current_index].doctor =
- response.data.data.solution.doctor
- this.tableData[this.current_index].updated_time =
- response.data.data.solution.updated_time
- this.tableData[this.current_index].initiate_mode =
- response.data.data.solution.initiate_mode
- this.current_index = -1
- return false
- }
- })
- }
- })
- },
- submitNewChildSolution(formName) {
- this.$refs[formName].validate(valid => {
- if (valid) {
- var createData = {
- parent_id: this.childPlan.parent_id,
- sub_name: this.childPlan.sub_name,
- initiate_mode: this.childPlan.initiate_mode,
- doctor: this.childPlan.doctor
- }
- createChildPatientDialysisSolution(this.patientID, createData).then(
- response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- this.$notify({
- title: '成功',
- message: '创建成功',
- type: 'success',
- duration: 2000
- })
- this.$refs[formName].resetFields()
- var spliceIndex = -1
-
- for (let index = this.tableData.length - 1; ; index--) {
- if (
- this.tableData[index].parent_id === createData.parent_id
- ) {
- spliceIndex = index
- break
- } else if (
- this.tableData[index].id === createData.parent_id
- ) {
- spliceIndex = index
- break
- }
- }
-
- if (spliceIndex > -1) {
- spliceIndex += 1
- if (spliceIndex === this.tableData.length) {
- this.tableData.push(response.data.data.solution)
- } else {
- var swapData = this.tableData.splice(spliceIndex)
- this.tableData.push(response.data.data.solution)
- this.tableData = this.tableData.concat(swapData)
- }
- }
- this.dialogFormVisible = false
- return false
- }
- }
- )
- }
- })
- },
- submitEditSolution(formName) {
- this.$refs[formName].validate(valid => {
- if (valid) {
- let mode = '2'
-
- if (
- this.addPlan.registrars_id != this.$store.getters.xt_user.user.id
- ) {
- mode = '3'
- }
- this.addPlan.dialysis_dialyszers = this.dialysis_dialyszers
- this.addPlan.dialysis_irrigation = this.dialysis_irrigation
- console.log("333333",this.addPlan)
- editPatientDialysisSolution(
- this.patientID,
- this.addPlan.id,
- this.addPlan,
- mode
- ).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- this.$notify({
- title: '成功',
- message: '修改成功',
- type: 'success',
- duration: 2000
- })
- this.$refs[formName].resetFields()
-
- this.dialogVisible = false
-
- for (var dindex in response.data.data.solution) {
- if (dindex == 'id') {
- continue
- }
- this.tableData[this.current_index][dindex] =
- response.data.data.solution[dindex]
- }
- // this.tableData[this.current_index].dialysis_duration = response.data.data.solution.dialysis_duration;
- // this.tableData[this.current_index].doctor = response.data.data.solution.doctor;
- // this.tableData[this.current_index].updated_time = response.data.data.solution.updated_time;
-
- this.current_index = -1
- return false
- }
- })
- }
- })
- },
- submitNewSolution(formName) {
- this.addPlan.anticoagulant_zongliang = this.addPlan.anticoagulant_zongliang.toString()
- this.$refs[formName].validate(valid => {
- if (valid) {
- const mode = '1'
- this.addPlan.dialysis_dialyszers = this.dialysis_dialyszers
- this.addPlan.dialysis_irrigation = this.dialysis_irrigation
- console.log("add",this.addPlan)
- createPatientDialysisSolution(
- this.patientID,
- this.addPlan,
- mode
- ).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- this.$notify({
- title: '成功',
- message: '创建成功',
- type: 'success',
- duration: 2000
- })
- this.$refs[formName].resetFields()
- this.dialogVisible = false
- this.tableData.unshift(response.data.data.solution)
- if (this.tableData.length > 10) {
- this.tableData.pop()
- }
- this.total += 1
- return false
- }
- })
- }
- })
- },
- handleEdit(index, row) {
- // console.log(index, row)
- },
- handleSizeChange(val) {
- this.queryParams.limit = val
- this.fetchPatientDialysisSolutions()
- },
- handleCurrentChange(val) {
- this.queryParams.page = val
- this.fetchPatientDialysisSolutions()
- },
- openEdit(index, row) {
- this.current_index = index
-
- this.addPlan.id = row.id
- this.addPlan.mode = row.mode_id
- this.addPlan.mode_name = row.mode_name
- this.addPlan.dialyzer = row.dialyzer ? row.dialyzer : ''
-
- this.addPlan.dialysis_duration = '' + row.dialysis_duration
- this.addPlan.dialysis_duration_hour = '' + row.dialysis_duration_hour
- this.addPlan.dialysis_duration_minute = '' + row.dialysis_duration_minute
- this.addPlan.hemodialysis_machine = row.hemodialysis_machine + ''
- this.addPlan.perfusion_apparatus = row.perfusion_apparatus + ''
- this.addPlan.blood_flow_volume = row.blood_flow_volume.toString()
- if (row.anticoagulant == 3) {
- this.addPlan.anticoagulant = '低分子肝素'
- }
- if (row.anticoagulant != 3) {
- if(row.anticoagulant == 0){
- this.addPlan.anticoagulant = ""
- }else{
- this.addPlan.anticoagulant = row.anticoagulant
- }
-
- }
- this.addPlan.replacement_total = row.replacement_total
-
- this.addPlan.target_ktv = row.target_ktv.toString()
- this.addPlan.target_ultrafiltration = row.target_ultrafiltration.toString()
-
- this.addPlan.dialysis_duration = parseFloat(row.dialysis_duration_hour) + parseFloat((row.dialysis_duration_minute / 60).toFixed(2))
- this.addPlan.dialysis_duration_hour = row.dialysis_duration_hour
- this.addPlan.dialysis_duration_minute = row.dialysis_duration_minute
- this.addPlan.anticoagulant_shouji = row.anticoagulant_shouji.toString()
- this.addPlan.anticoagulant_weichi = row.anticoagulant_weichi.toString()
- this.addPlan.anticoagulant_zongliang = row.anticoagulant_zongliang.toString()
- this.addPlan.anticoagulant_gaimingcheng = row.anticoagulant_gaimingcheng.toString()
- this.addPlan.anticoagulant_gaijiliang = row.anticoagulant_gaijiliang.toString()
- this.addPlan.kalium = row.kalium.toString()
- this.addPlan.sodium = row.sodium.toString()
- this.addPlan.calcium = row.calcium.toString()
- this.addPlan.bicarbonate = row.bicarbonate.toString()
- this.addPlan.glucose = row.glucose.toString()
- this.addPlan.dialysate_flow = row.dialysate_flow.toString()
- this.addPlan.dialysate_temperature = row.dialysate_temperature.toString()
- this.addPlan.conductivity = row.conductivity.toString()
- this.addPlan.remark = row.remark
-
- this.addPlan.dialyzer_perfusion_apparatus = row.dialyzer_perfusion_apparatus.toString()
- this.addPlan.dialysis_irrigation = row.dialysis_irrigation
- this.addPlan.dialysis_dialyszers = row.dialysis_dialyszers
- this.dialysis_irrigation = row.dialysis_irrigation
- this.dialysis_dialyszers = row.dialysis_dialyszers
- if(row.body_fluid == 0){
- this.addPlan.body_fluid = ""
- }else{
- this.addPlan.body_fluid = row.body_fluid
- }
- this.addPlan.body_fluid_other = row.body_fluid_other.toString()
- this.addPlan.special_medicine = row.special_medicine
- this.addPlan.special_medicine_other = row.special_medicine_other.toString()
- this.addPlan.displace_liqui_part = row.displace_liqui_part
- this.addPlan.displace_liqui_value = row.displace_liqui_value.toString()
- this.addPlan.ultrafiltration = row.ultrafiltration.toString()
- this.addPlan.blood_access = row.blood_access
-
- this.addPlan.registrars_id = row.registrars_id
- this.addPlan.dialysis_irrigation = row.dialysis_irrigation
- this.addPlan.dialysis_dialyszers = row.dialysis_dialyszers
- this.dialysis_irrigation = row.dialysis_irrigation
- this.dialysis_dialyszers = row.dialysis_dialyszers
- this.dialogVisible = true
- this.isEdit = true
- if(row.dialysate_formulation==0){
- this.addPlan.dialysate_formulation= ""
- }
- this.addPlan.dialysate_formulation = row.dialysate_formulation
- this.dialysisTimeShow = new Date(
- 2018,
- 1,
- 1,
- this.addPlan.dialysis_duration_hour,
- this.addPlan.dialysis_duration_minute
- )
- },
- isShows(name) {
- var filedList = store.getters.xt_user.fileds
- for (let i = 0; i < filedList.length; i++) {
- if (
- filedList[i].module == 1 &&
- filedList[i].filed_name_cn == name &&
- filedList[i].is_show == 1
- ) {
- return true
- }
- }
- return false
- },
- openNew() {
- this.current_index = -1
- this.addPlan = {
- mode: '',
- mode_name: '',
- id: 0,
- type: 1,
- period: '',
- times: '',
- initiate_mode: '',
- doctor: '',
- first_dialysis: '',
-
- dialyzer: '',
- dialysate_formulation: '',
- hemodialysis_machine: '',
- perfusion_apparatus: '',
- blood_flow_volume: '',
- dewater: '',
- displace_liqui: 0,
- replacement_way: '',
- anticoagulant: '',
- anticoagulant_shouji: '',
- anticoagulant_weichi: '',
- anticoagulant_zongliang: '',
- anticoagulant_gaimingcheng: '',
- anticoagulant_gaijiliang: '',
- kalium: '',
- replacement_total: '',
- sodium: '',
- calcium: '',
- bicarbonate: '',
- glucose: '',
- dry_weight: '',
- dialysate_flow: '',
- dialysate_temperature: '',
- conductivity: '',
- remark: '',
- target_ktv: '',
- target_ultrafiltration: '',
- dialyzer_perfusion_apparatus: '',
- body_fluid: '',
- body_fluid_other: '',
- special_medicine: '',
- special_medicine_other: '',
- displace_liqui_part: '',
- displace_liqui_value: '',
- ultrafiltration: '',
- blood_access: '',
-
- dialysis_duration: '3.30',
- dialysis_duration_hour: '3',
- dialysis_duration_minute: '30'
- }
- this.addPlanTypeChange()
-
- this.dialogVisible = true
- this.isEdit = false
- },
- openNewChild(index, row) {
- this.childPlan = {
- mode: row.mode_name,
- frequency: row.period + row.times,
- name: row.name,
- parent_id: row.id,
- sub_name: '',
- initiate_mode: '',
- doctor: ''
- }
- this.isChildEdit = false
- this.dialogFormVisible = true
- },
- openChildEdit(index, row) {
- this.childPlan = {
- mode: row.mode_name,
- frequency: row.period + row.times,
- name: row.name,
- parent_id: row.parent_id,
- id: row.id,
- sub_name: row.sub_name,
- initiate_mode: row.initiate_mode,
- doctor: row.doctor
- }
- this.current_index = index
- this.isChildEdit = true
- this.dialogFormVisible = true
- },
- fetchAllDoctorAndNurse() {
- fetchAllDoctorAndNurse().then(response => {
- if (response.data.state == 1) {
- this.doctorOptions = response.data.data.doctors
- }
- })
- },
- fetchAllAdminUsers() {
- fetchAllAdminUsers().then(response => {
- if (response.data.state == 1) {
- this.adminUserOptions = response.data.data.users
- }
- })
- },
- fetchPatientDialysisSolutions() {
- fetchPatientDialysisSolutions(this.queryParams).then(response => {
- if (response.data.state == 1) {
- this.tableData = response.data.data.solutions
- this.total = response.data.data.total
-
- this.stockType = response.data.data.stockType
- console.log("2333555555555",this.stockType)
- if(this.stockType.length >0 ){
- var arr = []
- var arrTwo = []
- for(let i=0;i<this.stockType.length;i++){
- if(this.stockType[i].stock_attribute == 2){
- arr.push(this.stockType[i])
- }
- if(this.stockType[i].stock_attribute == 3){
- arrTwo.push(this.stockType[i])
- }
- }
- var dialyzator = []
- var irrigation = []
- for(let i=0;i<arr.length;i++){
- for(let j=0;j<arr[i].GoodInfo.length;j++){
- dialyzator.push(arr[i].GoodInfo[j])
- }
- }
- console.log("透析器",dialyzator)
- this.dialyzers = dialyzator
-
- for(let i=0;i<arrTwo.length;i++){
- for(let j=0;j<arrTwo[i].GoodInfo.length;j++){
- irrigation.push(arrTwo[i].GoodInfo[j])
- }
- }
- console.log("灌流器",irrigation)
- this.irrigations = irrigation
- }
-
- }
- })
- },
- addPlanTypeChange() {
- if (this.addPlan.type == 1) {
- this.periodOptions = periodWeek
- this.numOptions = numOptionsWeek
- } else {
- this.addPlan.type == 2
- this.periodOptions = periodDay
- this.numOptions = numOptionsDay
- }
- },
- changeThisAnticoagulant() {
- var thismode = parseInt(this.addPlan.anticoagulant)
- if (isNaN(thismode) || thismode <= 0) {
- return false
- }
- if (
- typeof this.anticoagulantsConfit[thismode] === 'undefined' ||
- this.anticoagulantsConfit[thismode] == null
- ) {
- return false
- }
- this.anticoagulant = this.anticoagulantsConfit[thismode]
- },
-
- addPlanModeChange() {
- var thismode = parseInt(this.addPlan.mode)
- if(thismode == 2 || thismode == 5 || thismode ==12){
- this.zhiShow = true
- this.huShow= true
- this.totalShow = true
- }else{
- this.zhiShow= false
- this.huShow = false
- this.totalShow = false
- }
- if (isNaN(thismode) || thismode <= 0) {
- return false
- }
- if (
- typeof this.modeOptions[thismode] === 'undefined' ||
- this.modeOptions[thismode] == null
- ) {
- return false
- }
- // this.current_model = this.modeOptions[thismode];
- this.addPlan.mode_name = this.modeOptions[thismode].name
- const params = {
- id: thismode
- }
-
- getSystemPrescription(params).then(response => {
- if (response.data.state == 1) {
- var prescription = response.data.data.prescription
- if(prescription.anticoagulant == 0){
- prescription.anticoagulant = ""
- }
- if(prescription.body_fluid == 0){
- prescription.body_fluid = ""
- }
- if (response.data.data.prescription.id > 0) {
- for (const key in response.data.data.prescription) {
- // 因为el-input特性整数类型或者浮点数类型需要转换成字符串,所以加上toString()
- this.$set(
- this.addPlan,
- key,
- response.data.data.prescription[key].toString()
- )
- }
-
- // 因为el-select特性,整数类型不能转字符串,所以额外处理这些数据
- this.$set(
- this.addPlan,
- 'dialysate_formulation',
- response.data.data.prescription['dialysate_formulation']
- )
- this.$set(
- this.addPlan,
- 'anticoagulant',
- response.data.data.prescription['anticoagulant']
- )
- this.$set(
- this.addPlan,
- 'body_fluid',
- response.data.data.prescription['body_fluid']
- )
- this.$set(
- this.addPlan,
- 'special_medicine',
- response.data.data.prescription['special_medicine']
- )
- this.$set(
- this.addPlan,
- 'displace_liqui_part',
- response.data.data.prescription['displace_liqui_part']
- )
- this.$set(
- this.addPlan,
- 'blood_access',
- response.data.data.prescription['blood_access']
- )
-
- this.dialysisTimeShow = new Date(
- 2018,
- 1,
- 1,
- this.addPlan.dialysis_duration_hour,
- this.addPlan.dialysis_duration_minute
- )
- } else {
- var tempAddPlan = {
- id: 0,
- dialyzer: '',
- dialysis_duration: '',
- dialysis_duration_hour: '',
- dialysis_duration_minute: '',
- hemodialysis_machine: '',
- dialysate_formulation: '',
- perfusion_apparatus: '',
- blood_flow_volume: '',
- dewater: '',
- displace_liqui: 0,
- replacement_way: '',
- anticoagulant: '',
- anticoagulant_shouji: '',
- anticoagulant_weichi: '',
- anticoagulant_zongliang: '',
- anticoagulant_gaimingcheng: '',
- anticoagulant_gaijiliang: '',
- kalium: '',
- replacement_total: '',
- sodium: '',
- calcium: '',
- bicarbonate: '',
- glucose: '',
- dry_weight: '',
- dialysate_flow: '',
- dialysate_temperature: '',
- conductivity: '',
- doctor: '',
- remark: '',
- target_ktv: '',
- target_ultrafiltration: '',
- dialyzer_perfusion_apparatus: '',
- body_fluid: '',
- body_fluid_other: '',
- special_medicine: '',
- special_medicine_other: '',
- displace_liqui_part: '',
- displace_liqui_value: '',
- ultrafiltration: '',
- blood_access: ''
- }
-
- for (const key in tempAddPlan) {
- this.addPlan[key] = tempAddPlan[key]
- }
- }
- }
- })
- },
- setCurrentMode(id) {
- if (
- typeof this.modeOptions[id] === 'undefined' ||
- this.modeOptions[id] == null
- ) {
- return false
- }
- this.current_model = this.modeOptions[id]
- },
- getDoctorName(doctorid) {
- var name = ''
- if (this.doctorOptions == null) {
- return name
- }
- if (typeof this.doctorOptions.length === 'undefined') {
- return name
- }
- var leng = this.doctorOptions.length
- if (leng == 0) {
- return name
- }
-
- for (let index = 0; index < leng; index++) {
- if (this.doctorOptions[index].id == doctorid) {
- name = this.doctorOptions[index].name
- break
- }
- }
- return name
- },
- getAdminUserName(id) {
- var name = ''
- if (this.adminUserOptions == null) {
- return name
- }
- if (typeof this.adminUserOptions.length === 'undefined') {
- return name
- }
- var leng = this.adminUserOptions.length
- if (leng == 0) {
- return name
- }
-
- for (let index = 0; index < leng; index++) {
- if (this.adminUserOptions[index].id == id) {
- name = this.adminUserOptions[index].name
- break
- }
- }
- return name
- }
- },
- created() {
- const id = this.$route.params && this.$route.params.id
- this.patientID = parseInt(id)
- if (isNaN(this.patientID) || this.patientID <= 0) {
- this.$notify.error({
- title: '错误',
- message: '无效的id'
- })
- this.$router.back(-1)
- }
-
- this.GetDeviceData()
- this.fetchAllAdminUsers()
- this.fetchPatientDialysisSolutions()
- this.modeOptions = this.$store.getters.treatment_mode
- this.anticoagulantsSet = this.$store.getters.anticoagulants_set
- this.replacementWays = this.$store.getters.replacement_ways
- this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit
- this.blood_filters = this.$store.getters.blood_filters
- this.perfusion_apparatus = this.$store.getters.perfusion_apparatus
- this.hemodialysis_machines = this.$store.getters.hemodialysis_machines
- this.dialysate_formulation = getDataConfig(
- 'hemodialysis',
- 'dialysate_formulation'
- )
- this.body_fluid_option = this.$store.getters.body_fluid
- this.special_medicine_option = this.$store.getters.special_medicine
-
- this.displace_liqui_part_option = this.$store.getters.displace_liqui
- this.blood_access_option = this.$store.getters.blood_access
- this.blood_access_option = getDataConfig('hemodialysis', 'vascular_access_desc')
-
- this.dialyzerPerfusionApparatus = getDataConfig(
- 'hemodialysis',
- 'dialyzer_perfusion_apparatus'
- )
-
- this.queryParams.id = this.patientID
- // this.fetchAllDoctorAndNurse();
-
- }
- }
- </script>
-
- <style rel="stylesheet/scss" lang="scss" scoped>
- .Total {
- .sure {
- float: right;
- margin: 5px 10px 0 0;
- }
-
- .plan {
- font-size: 15px;
- color: #6caef7;
- background: #ecf5ff;
- height: 42px;
- line-height: 42px;
- border: 1px #ebeef5 solid;
- width: 100%;
- padding-left: 15px;
-
- span {
- margin: 0 20px 0 0;
- }
- }
- }
- .form-table {
- border: 1px #ebeef5 solid;
- padding-bottom: 20px;
-
- .el-col-6 {
- width: 380px;
- }
-
- .el-row {
- margin: 0 !important;
-
- .el-form-item {
- margin-bottom: 12px;
-
- .el-form-item__content {
- .el-select {
- width: 100%;
- }
- }
- }
- }
- }
- </style>
- <style>
- .el-table td,
- .el-table th.is-leaf,
- .el-table--border,
- .el-table--group {
- border-color: #d0d3da;
- }
-
- .el-table--border::after,
- .el-table--group::after,
- .el-table::before {
- background-color: #d0d3da;
- }
- </style>
|