|
@@ -1015,7 +1015,7 @@
|
1015
|
1015
|
</template>
|
1016
|
1016
|
|
1017
|
1017
|
<script>
|
1018
|
|
- import { getDialysisRecord } from '@/api/dialysis'
|
|
1018
|
+ import { getDialysisRecord,getPrintDialysisRecord } from '@/api/dialysis'
|
1019
|
1019
|
import { getDataConfig } from '@/utils/data'
|
1020
|
1020
|
import { jsGetAge, uParseTime } from '@/utils/tools'
|
1021
|
1021
|
import LabelBox from '../printItem/LabelBox'
|
|
@@ -1217,249 +1217,216 @@
|
1217
|
1217
|
return typeof (this.modeOptions[mode_id]) !== 'undefined' && typeof (this.modeOptions[mode_id].name) !== 'undefined' ? this.modeOptions[mode_id].name : ''
|
1218
|
1218
|
},
|
1219
|
1219
|
getDialysisRecord() {
|
1220
|
|
- this.loading = true
|
1221
|
|
-
|
1222
|
|
- // getDialysisRecord(this.queryParams).then(response => {
|
1223
|
|
- var response = this.childResponse
|
|
1220
|
+ getPrintDialysisRecord(this.queryParams).then(response => {
|
1224
|
1221
|
if (response.data.state == 1) {
|
1225
|
|
- this.adminUser = response.data.data.users
|
1226
|
|
- this.users = response.data.data.users
|
1227
|
|
- this.patientInfo = response.data.data.patientInfo
|
1228
|
|
- this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
|
1229
|
|
- // this.patientInfo.age = jsGetAge(this.patientInfo.birth, '-')
|
|
1222
|
+ this.adminUser = response.data.data.users;
|
|
1223
|
+ this.users = response.data.data.users;
|
|
1224
|
+ this.patientInfo = response.data.data.patientInfo;
|
|
1225
|
+ this.patientInfo.birth = uParseTime(
|
|
1226
|
+ this.patientInfo.birthday,
|
|
1227
|
+ "{y}-{m}-{d}"
|
|
1228
|
+ );
|
|
1229
|
+ this.patientInfo.age = jsGetAge(this.patientInfo.birth, "-");
|
1230
|
1230
|
if (response.data.data.patientInfo.first_dialysis_date != 0) {
|
1231
|
|
- this.patientInfo.first_dialysis_date = uParseTime(response.data.data.patientInfo.first_dialysis_date, '{y}-{m}-{d}')
|
|
1231
|
+ this.patientInfo.first_dialysis_date = uParseTime(
|
|
1232
|
+ response.data.data.patientInfo.first_dialysis_date,
|
|
1233
|
+ "{y}-{m}-{d}"
|
|
1234
|
+ );
|
1232
|
1235
|
} else {
|
1233
|
|
- this.patientInfo.first_dialysis_date = ''
|
|
1236
|
+ this.patientInfo.first_dialysis_date = "";
|
1234
|
1237
|
}
|
1235
|
|
- this.check = response.data.data.check
|
1236
|
|
- this.predialysis = response.data.data.PredialysisEvaluation
|
1237
|
|
- this.predialysis.blood_access_part_opera_name = this.bloodAccessParOperaName(this.predialysis.blood_access_part_opera_id)
|
1238
|
|
- this.afterdialysis = response.data.data.AssessmentAfterDislysis
|
1239
|
|
- this.operators = response.data.data.operators
|
1240
|
|
- this.dialysisOrder = response.data.data.dialysisOrder === null ? null : response.data.data.dialysisOrder
|
|
1238
|
+
|
|
1239
|
+ this.predialysis = response.data.data.PredialysisEvaluation;
|
|
1240
|
+ this.predialysis.blood_access_part_opera_name = this.bloodAccessParOperaName(
|
|
1241
|
+ this.predialysis.blood_access_part_opera_id
|
|
1242
|
+ );
|
|
1243
|
+ this.afterdialysis = response.data.data.AssessmentAfterDislysis;
|
|
1244
|
+ this.operators = response.data.data.operators;
|
|
1245
|
+ this.dialysisOrder =
|
|
1246
|
+ response.data.data.dialysisOrder === null
|
|
1247
|
+ ? null
|
|
1248
|
+ : response.data.data.dialysisOrder;
|
1241
|
1249
|
|
1242
|
1250
|
if (this.operators.length > 0) {
|
1243
|
|
- var operatorsLen = this.operators.length
|
|
1251
|
+ var operatorsLen = this.operators.length;
|
1244
|
1252
|
for (var index = 0; index < operatorsLen; index++) {
|
1245
|
|
- this.$set(this.operatorMaps, this.operators[index].creator, this.operators[index])
|
|
1253
|
+ this.$set(
|
|
1254
|
+ this.operatorMaps,
|
|
1255
|
+ this.operators[index].creator,
|
|
1256
|
+ this.operators[index]
|
|
1257
|
+ );
|
1246
|
1258
|
}
|
1247
|
1259
|
}
|
1248
|
1260
|
|
1249
|
|
- this.afterdialysis.txqnx = -1
|
1250
|
|
- if (this.afterdialysis.cruor.indexOf('0度') > -1) {
|
1251
|
|
- this.afterdialysis.txqnx = 0
|
|
1261
|
+ this.afterdialysis.txqnx = -1;
|
|
1262
|
+ if (this.afterdialysis.cruor.indexOf("0度") > -1) {
|
|
1263
|
+ this.afterdialysis.txqnx = 0;
|
1252
|
1264
|
}
|
1253
|
|
- if (this.afterdialysis.cruor.indexOf('Ⅰ度') > -1) {
|
1254
|
|
- this.afterdialysis.txqnx = 1
|
|
1265
|
+ if (this.afterdialysis.cruor.indexOf("Ⅰ度") > -1) {
|
|
1266
|
+ this.afterdialysis.txqnx = 1;
|
1255
|
1267
|
}
|
1256
|
|
- if (this.afterdialysis.cruor.indexOf('Ⅱ度') > -1) {
|
1257
|
|
- this.afterdialysis.txqnx = 2
|
|
1268
|
+ if (this.afterdialysis.cruor.indexOf("Ⅱ度") > -1) {
|
|
1269
|
+ this.afterdialysis.txqnx = 2;
|
1258
|
1270
|
}
|
1259
|
|
- if (this.afterdialysis.cruor.indexOf('Ⅲ度') > -1) {
|
1260
|
|
- this.afterdialysis.txqnx = 3
|
|
1271
|
+ if (this.afterdialysis.cruor.indexOf("Ⅲ度") > -1) {
|
|
1272
|
+ this.afterdialysis.txqnx = 3;
|
1261
|
1273
|
}
|
1262
|
1274
|
|
1263
|
|
- this.afterdialysis.complications = this.afterdialysis.complication.split(',')
|
1264
|
|
- this.afterdialysis.complications_other = []
|
1265
|
|
- this.afterdialysis.complications_index = []
|
1266
|
|
- var acllen = this.afterdialysis.complications.length
|
|
1275
|
+ this.afterdialysis.complications = this.afterdialysis.complication.split(
|
|
1276
|
+ ","
|
|
1277
|
+ );
|
|
1278
|
+ this.afterdialysis.complications_other = [];
|
|
1279
|
+ this.afterdialysis.complications_index = [];
|
|
1280
|
+ var acllen = this.afterdialysis.complications.length;
|
1267
|
1281
|
for (let index = 0; index < acllen; index++) {
|
1268
|
|
- if (this.complications.indexOf(this.afterdialysis.complications[index]) >= 0) {
|
1269
|
|
- this.afterdialysis.complications_index.push(this.afterdialysis.complications[index])
|
1270
|
|
- } else if (this.complications.indexOf(this.afterdialysis.complications[index]) < 0 && this.afterdialysis.complications_other.indexOf(this.afterdialysis.complications[index]) < 0) {
|
1271
|
|
- this.afterdialysis.complications_other.push(this.afterdialysis.complications[index])
|
|
1282
|
+ if (
|
|
1283
|
+ this.complications.indexOf(
|
|
1284
|
+ this.afterdialysis.complications[index]
|
|
1285
|
+ ) >= 0
|
|
1286
|
+ ) {
|
|
1287
|
+ this.afterdialysis.complications_index.push(
|
|
1288
|
+ this.afterdialysis.complications[index]
|
|
1289
|
+ );
|
|
1290
|
+ } else if (
|
|
1291
|
+ this.complications.indexOf(
|
|
1292
|
+ this.afterdialysis.complications[index]
|
|
1293
|
+ ) < 0 &&
|
|
1294
|
+ this.afterdialysis.complications_other.indexOf(
|
|
1295
|
+ this.afterdialysis.complications[index]
|
|
1296
|
+ ) < 0
|
|
1297
|
+ ) {
|
|
1298
|
+ this.afterdialysis.complications_other.push(
|
|
1299
|
+ this.afterdialysis.complications[index]
|
|
1300
|
+ );
|
1272
|
1301
|
}
|
1273
|
1302
|
}
|
1274
|
|
- this.afterdialysis.complications_other = this.afterdialysis.complications_other.join(',')
|
|
1303
|
+ this.afterdialysis.complications_other = this.afterdialysis.complications_other.join(
|
|
1304
|
+ ","
|
|
1305
|
+ );
|
1275
|
1306
|
|
1276
|
|
- this.prescription = response.data.data.dialysisPrescription
|
1277
|
|
- this.receiverTreatmentAccess = response.data.data.receiverTreatmentAccess
|
|
1307
|
+ this.prescription = response.data.data.dialysisPrescription;
|
|
1308
|
+ this.receiverTreatmentAccess =
|
|
1309
|
+ response.data.data.receiverTreatmentAccess;
|
1278
|
1310
|
|
1279
|
|
- this.prescription.mode = this.modeName(this.prescription.mode_id)
|
1280
|
|
- var rwLen = this.replacementWays.length
|
1281
|
|
- this.prescription.replacement = ''
|
|
1311
|
+ this.prescription.mode = this.modeName(this.prescription.mode_id);
|
|
1312
|
+ var rwLen = this.replacementWays.length;
|
|
1313
|
+ this.prescription.replacement = "";
|
1282
|
1314
|
for (let index = 0; index < rwLen; index++) {
|
1283
|
|
- if (this.replacementWays[index].id == this.prescription.replacement_way) {
|
1284
|
|
- this.prescription.replacement = this.replacementWays[index].name
|
1285
|
|
- break
|
|
1315
|
+ if (
|
|
1316
|
+ this.replacementWays[index].id ==
|
|
1317
|
+ this.prescription.replacement_way
|
|
1318
|
+ ) {
|
|
1319
|
+ this.prescription.replacement = this.replacementWays[index].name;
|
|
1320
|
+ break;
|
1286
|
1321
|
}
|
1287
|
1322
|
}
|
1288
|
1323
|
|
1289
|
|
- this.prescription.dialysate_formulation_name = this.dialysateFormulationName(this.prescription.dialysate_formulation)
|
|
1324
|
+ this.prescription.dialysate_formulation_name = this.dialysateFormulationName(
|
|
1325
|
+ this.prescription.dialysate_formulation
|
|
1326
|
+ );
|
1290
|
1327
|
|
1291
|
|
- var paLen = this.perfusionApparatus.length
|
1292
|
|
- this.prescription.perfusion_apparatus_name = ''
|
|
1328
|
+ var paLen = this.perfusionApparatus.length;
|
|
1329
|
+ this.prescription.perfusion_apparatus_name = "";
|
1293
|
1330
|
for (let index = 0; index < paLen; index++) {
|
1294
|
|
- if (this.perfusionApparatus[index].id == this.prescription.perfusion_apparatus) {
|
1295
|
|
- this.prescription.perfusion_apparatus_name = this.perfusionApparatus[index].name
|
1296
|
|
- break
|
|
1331
|
+ if (
|
|
1332
|
+ this.perfusionApparatus[index].id ==
|
|
1333
|
+ this.prescription.perfusion_apparatus
|
|
1334
|
+ ) {
|
|
1335
|
+ this.prescription.perfusion_apparatus_name = this.perfusionApparatus[
|
|
1336
|
+ index
|
|
1337
|
+ ].name;
|
|
1338
|
+ break;
|
1297
|
1339
|
}
|
1298
|
1340
|
}
|
1299
|
1341
|
|
1300
|
|
- var acLen = this.anticoagulantsConfit.length
|
1301
|
|
- var thisALID = this.prescription.anticoagulant
|
1302
|
|
- this.prescription.anticoagulant_name = ''
|
1303
|
|
-
|
1304
|
|
- if (typeof (this.anticoagulantsConfit[thisALID]) !== 'undefined' && this.anticoagulantsConfit[thisALID] != null) {
|
1305
|
|
- this.prescription.anticoagulant_name = this.anticoagulantsConfit[thisALID].name
|
1306
|
|
- this.AlPanel = this.anticoagulantsConfit[thisALID]
|
|
1342
|
+ var acLen = this.anticoagulantsConfit.length;
|
|
1343
|
+ var thisALID = this.prescription.anticoagulant;
|
|
1344
|
+ this.prescription.anticoagulant_name = "";
|
|
1345
|
+
|
|
1346
|
+ if (
|
|
1347
|
+ typeof this.anticoagulantsConfit[thisALID] != "undefined" &&
|
|
1348
|
+ this.anticoagulantsConfit[thisALID] != null
|
|
1349
|
+ ) {
|
|
1350
|
+ this.prescription.anticoagulant_name = this.anticoagulantsConfit[
|
|
1351
|
+ thisALID
|
|
1352
|
+ ].name;
|
|
1353
|
+ this.AlPanel = this.anticoagulantsConfit[thisALID];
|
1307
|
1354
|
}
|
1308
|
1355
|
|
1309
|
|
- this.advices = response.data.data.advices
|
1310
|
|
- this.monitors = response.data.data.monitors
|
1311
|
|
- this.summary = response.data.data.summary
|
1312
|
|
- this.org_template_info = response.data.data.org_template_info
|
|
1356
|
+ this.advices = response.data.data.advices;
|
|
1357
|
+ this.monitors = response.data.data.monitors;
|
|
1358
|
+ this.summary = response.data.data.summary;
|
|
1359
|
+
|
1313
|
1360
|
if (this.monitors.length < 8) {
|
1314
|
|
- var nl = 8 - this.monitors.length
|
|
1361
|
+ var nl = 8 - this.monitors.length;
|
1315
|
1362
|
for (let index = 0; index < nl; index++) {
|
1316
|
|
- this.monitors.push([])
|
|
1363
|
+ this.monitors.push([]);
|
1317
|
1364
|
}
|
1318
|
1365
|
}
|
1319
|
|
- this.jilurow = this.monitors.length + 1
|
1320
|
|
-
|
1321
|
|
- this.advice_jilurow = this.advices.length + 1
|
|
1366
|
+ this.jilurow = this.monitors.length + 1;
|
1322
|
1367
|
|
1323
|
|
- var childMap = {}
|
|
1368
|
+ var childMap = {};
|
1324
|
1369
|
for (const index in this.advices) {
|
1325
|
1370
|
if (this.advices[index].parent_id == 0) {
|
1326
|
|
- continue
|
|
1371
|
+ continue;
|
1327
|
1372
|
}
|
1328
|
1373
|
if (!(this.advices[index].parent_id in childMap)) {
|
1329
|
|
- childMap[this.advices[index].parent_id] = []
|
|
1374
|
+ childMap[this.advices[index].parent_id] = [];
|
1330
|
1375
|
}
|
1331
|
|
- childMap[this.advices[index].parent_id].push(this.advices[index])
|
|
1376
|
+ childMap[this.advices[index].parent_id].push(this.advices[index]);
|
1332
|
1377
|
}
|
1333
|
1378
|
|
1334
|
|
- var advices = []
|
|
1379
|
+ var advices = [];
|
1335
|
1380
|
for (const index in this.advices) {
|
1336
|
1381
|
if (this.advices[index].parent_id > 0) {
|
1337
|
|
- continue
|
|
1382
|
+ continue;
|
1338
|
1383
|
}
|
1339
|
|
- var item = this.advices[index]
|
|
1384
|
+ var item = this.advices[index];
|
1340
|
1385
|
if (item.id in childMap) {
|
1341
|
|
- item.children = childMap[item.id]
|
|
1386
|
+ item.children = childMap[item.id];
|
1342
|
1387
|
} else {
|
1343
|
|
- item.children = []
|
|
1388
|
+ item.children = [];
|
1344
|
1389
|
}
|
1345
|
|
- advices.push(item)
|
|
1390
|
+ advices.push(item);
|
1346
|
1391
|
}
|
1347
|
1392
|
|
1348
|
|
- var leftAdvice = []
|
1349
|
|
- var rightAdvice = []
|
1350
|
|
- var adlen = advices.length
|
|
1393
|
+ var leftAdvice = [];
|
|
1394
|
+ var rightAdvice = [];
|
|
1395
|
+ var adlen = advices.length;
|
1351
|
1396
|
|
1352
|
|
- var halfLen = adlen % 2 == 0 ? adlen / 2 : (adlen + 1) / 2
|
|
1397
|
+ var halfLen = adlen % 2 == 0 ? adlen / 2 : (adlen + 1) / 2;
|
1353
|
1398
|
for (var i = 0; i < halfLen; i++) {
|
1354
|
|
- leftAdvice.push(advices[i])
|
1355
|
|
- rightAdvice.push(advices[i + halfLen])
|
|
1399
|
+ leftAdvice.push(advices[i]);
|
|
1400
|
+ rightAdvice.push(advices[i + halfLen]);
|
1356
|
1401
|
}
|
|
1402
|
+
|
1357
|
1403
|
if (halfLen < 5) {
|
1358
|
|
- var nl = 5 - leftAdvice.length
|
|
1404
|
+ var nl = 5 - leftAdvice.length;
|
1359
|
1405
|
for (let index = 0; index < nl; index++) {
|
1360
|
|
- leftAdvice.push([])
|
|
1406
|
+ leftAdvice.push([]);
|
1361
|
1407
|
}
|
1362
|
|
- var nl = 5 - rightAdvice.length
|
|
1408
|
+ var nl = 5 - rightAdvice.length;
|
1363
|
1409
|
for (let index = 0; index < nl; index++) {
|
1364
|
|
- rightAdvice.push([])
|
|
1410
|
+ rightAdvice.push([]);
|
1365
|
1411
|
}
|
1366
|
1412
|
}
|
1367
|
1413
|
|
1368
|
|
- this.advices = []
|
|
1414
|
+ this.advices = [];
|
1369
|
1415
|
for (var i = 0; i < halfLen; i++) {
|
1370
|
|
- var item = []
|
1371
|
|
- item.push(leftAdvice[i])
|
1372
|
|
- item.push(rightAdvice[i])
|
1373
|
|
- this.advices.push(item)
|
|
1416
|
+ var item = [];
|
|
1417
|
+ item.push(leftAdvice[i]);
|
|
1418
|
+ item.push(rightAdvice[i]);
|
|
1419
|
+ this.advices.push(item);
|
1374
|
1420
|
}
|
1375
|
|
- this.loading = false
|
1376
|
|
-
|
1377
|
|
- this.doctor_advices = response.data.data.advices == null ? [] : response.data.data.advices
|
1378
|
|
-
|
1379
|
|
- for (let index = 0; index < this.doctor_advices.length; index++) {
|
1380
|
|
- this.doctor_advices[index]['isShow'] = 2
|
1381
|
|
- }
|
1382
|
|
-
|
1383
|
|
- if (this.doctor_advices.length > 0) {
|
1384
|
|
- var group = this.newAdviceGroupObject()
|
1385
|
|
- var initGroupBlock = function(group, advice) {
|
1386
|
|
- group.group_no = advice.groupno
|
1387
|
|
- }
|
1388
|
|
- for (let index = this.doctor_advices.length - 1; index >= 0; index--) {
|
1389
|
|
- var new_advice_index = 0
|
1390
|
|
-
|
1391
|
|
- if ('children' in this.doctor_advices[index] && this.doctor_advices[index].children.length > 0) {
|
1392
|
|
- new_advice_index = index + this.doctor_advices[index].children.length + 1
|
1393
|
|
-
|
1394
|
|
- var doctor_advice = {
|
1395
|
|
- delivery_way: this.doctor_advices[index].delivery_way,
|
1396
|
|
- execution_frequency: this.doctor_advices[index].execution_frequency,
|
1397
|
|
- groupno: this.doctor_advices[index].groupno,
|
1398
|
|
- id: this.doctor_advices[index].id,
|
1399
|
|
- parent_id: this.doctor_advices[index].parent_id,
|
1400
|
|
- children: this.doctor_advices[index].children,
|
1401
|
|
- remark: this.doctor_advices[index].remark
|
1402
|
|
-
|
1403
|
|
- }
|
1404
|
|
- doctor_advice['isShow'] = 1
|
1405
|
|
- this.doctor_advices.splice(new_advice_index, 0, doctor_advice)
|
1406
|
|
- // this.doctor_advices.push(doctor_advice)
|
1407
|
|
- }
|
1408
|
|
- }
|
1409
|
|
-
|
1410
|
|
- for (let index = 0; index < this.doctor_advices.length; index++) {
|
1411
|
|
- const advice = this.doctor_advices[index]
|
1412
|
|
- if (advice.groupno == 0) {
|
1413
|
|
- // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
|
1414
|
|
- if (advice.parent_id > 0) {
|
1415
|
|
- if (this.advice_groups.length > 0) {
|
1416
|
|
- var parent_group = this.advice_groups[
|
1417
|
|
- this.advice_groups.length - 1
|
1418
|
|
- ]
|
1419
|
|
- if (parent_group.advices.length > 0) {
|
1420
|
|
- if (parent_group.advices[0].id == advice.parent_id) {
|
1421
|
|
- parent_group.advices.push(advice)
|
1422
|
|
- }
|
1423
|
|
- }
|
1424
|
|
- }
|
1425
|
|
- continue
|
1426
|
|
- } else {
|
1427
|
|
- if (group.group_no > 0) {
|
1428
|
|
- this.advice_groups.push(group)
|
1429
|
|
- group = this.newAdviceGroupObject()
|
1430
|
|
- }
|
1431
|
|
-
|
1432
|
|
- initGroupBlock(group, advice)
|
1433
|
|
- group.advices.push(advice)
|
1434
|
|
- this.advice_groups.push(group)
|
1435
|
|
- group = this.newAdviceGroupObject()
|
1436
|
|
- continue
|
1437
|
|
- }
|
1438
|
|
- }
|
1439
|
|
-
|
1440
|
|
- if (group.group_no > 0 && group.group_no != advice.groupno) {
|
1441
|
|
- this.advice_groups.push(group)
|
1442
|
|
- group = this.newAdviceGroupObject()
|
1443
|
|
- }
|
1444
|
|
- if (group.group_no == 0) {
|
1445
|
|
- initGroupBlock(group, advice)
|
1446
|
|
- }
|
1447
|
|
- if (group.group_no == advice.groupno) {
|
1448
|
|
- group.advices.push(advice)
|
1449
|
|
- }
|
1450
|
|
- }
|
1451
|
|
- if (group.group_no > 0) {
|
1452
|
|
- // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
|
1453
|
|
- this.advice_groups.push(group)
|
1454
|
|
- }
|
1455
|
|
- }
|
1456
|
|
- console.log(this.advice_groups)
|
1457
|
1421
|
} else {
|
1458
|
|
- this.loading = false
|
1459
|
|
- this.$message.error('请求数据失败')
|
1460
|
|
- return false
|
|
1422
|
+ this.$message.error("请求数据失败");
|
|
1423
|
+ return false;
|
1461
|
1424
|
}
|
|
1425
|
+
|
|
1426
|
+ this.jumpPrint()
|
|
1427
|
+ });
|
1462
|
1428
|
},
|
|
1429
|
+
|
1463
|
1430
|
bloodAccessParOperaName(id) {
|
1464
|
1431
|
if (id in this.bloodAccessParOpera) {
|
1465
|
1432
|
return this.bloodAccessParOpera[id].name
|