pengjun 1 year ago
parent
commit
84d21f021d
  1. 8
      src/components/sumDoctorCheck/ButtonList.vue
  2. 414
      src/views/doctorCheck/lisResultImport.vue
  3. 4
      src/views/doctorCheck/sumDoctorCheck.vue

8
src/components/sumDoctorCheck/ButtonList.vue

@ -278,12 +278,8 @@ export default {
});
this.sumDoctorCheck.suggestionList.forEach(e => {
if (e.suggestionTitle && e.suggestionTitle.indexOf(key) > -1) message = `当前患者性别为:${this.dataTransOpts.tableS.patient_register.sexName} 报告不应出现 ${key} 字眼`
if (e.diagnosisNames) {
e.diagnosisNames.forEach(d => {
if (d && d.indexOf(key) > -1) message = `当前患者性别为:${this.dataTransOpts.tableS.patient_register.sexName} 报告不应出现 ${key} 字眼`
});
}
if (e.suggestionTitle && e.suggestionTitle.indexOf(key) > -1) message = `当前患者性别为:${this.dataTransOpts.tableS.patient_register.sexName} 报告不应出现 ${key} 字眼`
if (e.diagnosisNames && e.diagnosisNames.indexOf(key) > -1) message = `当前患者性别为:${this.dataTransOpts.tableS.patient_register.sexName} 报告不应出现 ${key} 字眼`
});
});
break;

414
src/views/doctorCheck/lisResultImport.vue

@ -92,7 +92,7 @@
<div style="display: flex;flex-wrap: wrap;">
<span style="margin-top: 6px;">未填检查时间时起始检查时间</span>
<el-date-picker v-model="dataImportOpts.startCheckDate" type="datetime" placeholder="选择起始检查时间" align="right"
:picker-options="pickerOptions" value-format="yyyy-MM-dd HH:mm:ss">
:picker-options="pickerOptions" value-format="yyyy-MM-dd HH:mm:ss" style="width:160px;" size="small">
</el-date-picker>
<span style="margin-top: 6px;">标本间隔时间</span>
<el-input type="number" v-model="dataImportOpts.checkInterval" size="small" style="width:60px;margin: 0 5px;">
@ -274,16 +274,6 @@ export default {
dddw, moment, checkPagePriv,
dictInit() {
//
this.getCustomerOrgTree()
//
getapi("/api/app/sex").then((res) => {
if (res.code == 1) {
this.dict.sex = res.data;
}
});
},
//
@ -307,65 +297,6 @@ export default {
},
//
getCustomerOrgTree() {
getapi("/api/app/customerorg/getbycodeall?IsHidePerson=1").then((res) => {
// console.log("res.data", res.data);
if (res.code != -1) {
this.customerOrgTree = res.data;
let lfind = arrayExistObj(this.customerOrgTree, 'id', this.dict.personOrgId)
if (lfind > -1) this.customerOrgTree.splice(lfind, 1)
tcdate(this.customerOrgTree)
}
});
},
//
changeCustomerOrg(v) {
this.chooseCustomerOrg(v)
},
//
changeQueryCustomerOrg(v) {
this.chooseCustomerOrg(v, 'query')
},
chooseCustomerOrg(v, obj) {
let id = ''
if (typeof v == 'string') {
id = v
} else {
id = v[0]
}
getapi(
`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${id}`
).then((res) => {
if (res.code != -1) {
if (obj == 'query') {
this.query.customerOrgRegisterList = res.data
if (this.query.customerOrgRegisterList.length > 0) {
this.query.customerOrgRegister = this.query.customerOrgRegisterList[this.query.customerOrgRegisterList.length - 1];
} else {
this.query.customerOrgRegister = {};
// this.customerOrgGroups = [];
}
}
this.customerOrgRegisterList = arrayFilter(res.data, 'isComplete', 'N') //
if (this.customerOrgRegisterList.length > 0) {
this.customerOrgRegister = this.customerOrgRegisterList[this.customerOrgRegisterList.length - 1];
// this.getCustomerOrgGroup(this.customerOrgRegister.id);
} else {
this.customerOrgRegister = {};
// this.customerOrgGroups = [];
}
}
});
},
//
btnFirst() {
if (!this.peisid || this.peisid == 'null') {
@ -764,16 +695,7 @@ export default {
//
btnImport() {
if (!this.customerOrgIds || this.customerOrgIds.length == 0) {
this.$message.warning("请选择单位")
return
}
if (!this.customerOrgRegister || !this.customerOrgRegister.id) {
this.$message.warning("请选择单位体检次数")
return
}
this.elProgress.display = true;
this.elProgress.percentage = 0;
@ -790,63 +712,34 @@ export default {
});
//
this.importing(this.dataImportOpts.startRow, this.dataImportOpts.nameType)
this.importing(this.dataImportOpts.startRow)
//
document.getElementById('fileNames').value = '';
},
//
// startRow :
// startRowNameType : 1 3.()
async importing(startRow, startRowNameType) {
// startRow :
async importing(startRow) {
let body = {}
for (let i = startRow; i < this.choosedData.length; i++) {
this.elProgress.percentage = Math.floor(
((i + 1) * 100) / this.choosedData.length
);
// Excel
body = this.excelDataToApiBody(this.choosedData[i])
if (i == startRow) body.nameType = startRowNameType
console.log(`this.choosedData[${i}],startRowNameType,body`)
try {
//
if (this.choosedSameMan.patientNo) {
//
if (this.choosedSameMan.patientNo == '$newPatient$') {
body.nameType = '3'
} else {
body.patientNo = this.choosedSameMan.patientNo
}
} else if (startRowNameType != '3') {
let result = await this.isSamePatient(startRowNameType, body)
if (result.isContinue) {
if (result.err) {
this.tableData.push(Object.assign({ importState: '导入失败', importDes: result.err }, this.choosedData[i]))
continue
}
} else {
this.dataImportOpts.startRow = i
break; // i this.importing
}
}
console.log(`this.choosedData[${i}],body`,this.choosedData[i],body)
// /api/app/patientregister/createpatientregisterexcel
let res = await postapi('/api/app/patientregister/CreatePatientRegisterFromExcel', body)
this.choosedSameMan = {} //
if (res.code >= 0) {
this.tableData.push(Object.assign({ importState: '导入成功' }, this.choosedData[i]))
} else {
this.tableData.push(Object.assign({ importState: '导入失败', importDes: res.message }, this.choosedData[i]))
}
} catch (error) {
this.tableData.push(Object.assign({ importState: '导入失败', importDes: `${error}` }, this.choosedData[i]))
// /api/app/patientregister/createpatientregisterexcel
let res = await postapi('/api/app/patientregister/CreatePatientRegisterFromExcel', body)
this.choosedSameMan = {} //
if (res.code >= 0) {
this.tableData.push(Object.assign({ importState: '导入成功' }, this.choosedData[i]))
} else {
this.tableData.push(Object.assign({ importState: '导入失败', importDes: res.message }, this.choosedData[i]))
}
//
if (i == this.choosedData.length - 1) {
this.elProgress.display = false;
@ -855,82 +748,7 @@ export default {
}
},
//
async isSamePatient(startRowNameType, body) {
console.log('isSamePatient', startRowNameType, body)
let result = {
isContinue: true,
err: ''
}
let res
if (body.idNo) {
try {
res = await postapi('/api/app/patient/GetByIdNo', { idNo: body.idNo })
if (res.code < 0) {
result.err = `身份证号查重错误,原因:${res.message}`
return result
} else if (res.code == 1) {
body.patientNo = res.data.patientNo
return result
}
} catch (error) {
result.err = `身份证号查重错误,原因:${error}`
return result
}
}
//
let url, localBody = {
customerOrgId: body.customerOrgId,
name: body.patientName
}
switch (startRowNameType) {
case '1':
case '2':
if (startRowNameType == '1') url = '/api/app/patientregister/GetSameNamePatient'
if (startRowNameType == '2') url = '/api/app/patientregister/GetCustomerOrgSameNamePatient'
res = await postapi(url, localBody)
if (res.code >= 0) {
if (res.data.length > 0) {
result.isContinue = false
this.sameMans = res.data
this.dialogSameMan = true
}
} else {
result.err = `${startRowNameType == '2' ? '同单位内' : ''}同名查重错误,原因:${res.message}`
}
break;
default:
break;
}
return result
// if (this.choosedSameMan.patientNo) {
// body.patientNo = this.choosedSameMan.patientNo
// // body.patientId = this.choosedSameMan.patientId
// this.choosedSameMan = {} //
// }
// try {
// switch (key) {
// case value:
// break;
// default:
// break;
// }
// { dispLabel: '', val: 'patientName' },
// { dispLabel: '', val: 'sexName' },
// { dispLabel: '', val: 'age' },
// { dispLabel: '', val: 'birthDate' },
// { dispLabel: '', val: 'maritalStatusName' },
// { dispLabel: '', val: 'nationName' },
// { dispLabel: '', val: 'idNo' },
},
//Excel
excelDataToApiBody(ExcelData) {
@ -938,136 +756,16 @@ export default {
customerOrgId: this.customerOrgIds[this.customerOrgIds.length - 1],
customerOrgRegisterId: this.customerOrgRegister.id,
medicalCenterId: this.peisid,
nameType: this.dataImportOpts.nameType,
completeFlag: this.dataImportOpts.completeFlag,
isAutoCreateDepartment: this.dataImportOpts.isAutoCreateDepartment ? 'Y' : 'N',
isAutoCreatePatientNo: this.dataImportOpts.isAutoCreatePatientNo ? 'Y' : 'N',
completeFlag: this.dataImportOpts.completeFlag,
cardStartNum: this.dataImportOpts.cardStartNum,
cardLength: this.dataImportOpts.cardLength
}
this.excelCols.forEach(e => {
if (e.val) {
switch (e.val) {
case 'age':
if (ExcelData[e.dispLabel]) body[e.val] = parseInt(ExcelData[e.dispLabel])
break;
// case 'birthDate':
// if(ExcelData[e.dispLabel]) body[e.val] = moment(new Date(ExcelData[e.dispLabel])).format('yyyy-MM-DD')
// break;
case 'poisons':
if (ExcelData[e.dispLabel]) body[e.val] = ExcelData[e.dispLabel].replaceAll(",", ",").split(",")
break;
default:
body[e.val] = ExcelData[e.dispLabel]
break;
}
}
})
if (this.seq > 30) {
body.isOccupationalDisease = 'Y'
body.isDefaultMedicalType = 'Y'
}
return body
},
//
rowClickSameMan(row) {
this.choosedSameMan = deepCopy(row)
},
//
btnOldMan() {
if (!this.choosedSameMan.patientNo) {
this.$message.warning("请选择要导入的档案人员")
return
}
this.importing(this.dataImportOpts.startRow, this.dataImportOpts.nameType)
this.dialogSameMan = false
},
//
btnNewMan() {
this.choosedSameMan = { patientNo: '$newPatient$' } //
this.importing(this.dataImportOpts.startRow, this.dataImportOpts.nameType)
this.dialogSameMan = false
},
//
async getPrList() {
let ret = false
if (!this.query.customerOrgIds || this.query.customerOrgIds.length == 0) {
this.$message.warning("请选择单位或部门")
return false
}
if (!this.query.customerOrgRegister || !this.query.customerOrgRegister.id) {
this.$message.warning("请选择单位体检次数")
return false
}
this.query.customerOrgId = this.query.customerOrgIds[this.query.customerOrgIds.length - 1]
this.query.customerOrgRegisterId = this.query.customerOrgRegister.id
let body = Object.assign({}, this.query)
delete body.customerOrgIds
delete body.customerOrgRegister
delete body.customerOrgRegisterList
if (!body.completeFlag) delete body.completeFlag
if (!body.patientName) delete body.patientName
if (!body.startPatientNo && !body.endPatientNo) {
delete body.startPatientNo
delete body.endPatientNo
} else if (!body.startPatientNo) {
this.$message.warning("请填写起始档案号")
return false
} else if (!body.endPatientNo) {
this.$message.warning("请填写截止档案号")
return false
}
if (!body.startDate && !body.endDate) {
delete body.startDate
delete body.endDate
} else if (!body.startDate) {
this.$message.warning("请填写起始登记日期")
return false
} else if (!body.endDate) {
this.$message.warning("请填写截止登记日期")
return false
} else {
body.startDate = moment(new Date(body.startDate)).format('yyyy-MM-DD')
body.endDate = moment(new Date(body.endDate)).format('yyyy-MM-DD')
}
const loading = this.$loading({
lock: true,
text: "Loading",
spinner: "el-icon-loading",
background: "rgba(0, 0, 0, 0.7)",
});
try {
let res = await postapi('/api/patientregister/getpatientregisterimportlist', body)
if (res.code != -1) {
this.prList = res.data
if (res.data.length == 0) {
this.$message.warning("没有符合条件的数据")
} else {
ret = true
}
}
} catch (error) {
//
}
loading.close()
return ret
},
//
rowClickPrList(row) {
// console.log("this.excelData",this.excelData);
@ -1115,82 +813,6 @@ export default {
}
},
//
getGroups(customerOrgRegisterId) {
///api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=3fa85f64-5717-4562-b3fc-2c963f66afa6
getapi(`/api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${customerOrgRegisterId}`).then(res => {
if (res.code != - 1) {
this.groups = res.data;
this.curGroup = null //
}
})
},
//
async btnImportFromDataBase() {
let customerOrgIds = []
let customerOrgId = ""
if (this.newCustomerOrgFlag) {
customerOrgIds = this.customerOrgIds
} else {
customerOrgIds = this.query.customerOrgIds
}
if (customerOrgIds && customerOrgIds.length > 0) customerOrgId = customerOrgIds[customerOrgIds.length - 1]
if (!customerOrgId) {
this.$message.warning("请选择新导入的体检单位或部门")
return
}
if (!this.curGroup || !this.customerOrgRegister) {
this.$message.warning("请选择新导入的体检次数与分组")
return
}
let body = {
customerOrgRegisterId: this.customerOrgRegister.id,
customerOrgGroupId: this.curGroup.id,
completeFlag: this.dataImportOpts.completeFlag,
payTypeFlag: this.payTypeFlag,
medicalCenterId: this.peisid,
}
//{
// "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "customerOrgId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "customerOrgRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "customerOrgGroupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "completeFlag": "string",
// "payTypeFlag": "string",
// "medicalCenterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
// }
this.elProgress.display = true
this.elProgress.percentage = 0
for (let i = 0; i < this.prList.length; i++) {
this.elProgress.percentage = Math.floor(((i + 1) * 100) / this.prList.length);
if (!this.prList[i].choosed) continue
body.patientRegisterId = this.prList[i].id
body.customerOrgId = this.newCustomerOrgFlag ? customerOrgId : this.prList[i].customerOrgId
try {
// /api/app/patientregister/createpatientregisterhistory
let res = await postapi('/api/app/patientregister/CreatePatientRegisterFromHistory', body)
if (res.code >= 0) {
this.tableData.push(Object.assign({ importState: '导入成功' }, this.prList[i]))
} else {
this.tableData.push(Object.assign({ importState: '导入失败', importDes: res.message }, this.prList[i]))
}
} catch (error) {
this.tableData.push(Object.assign({ importState: '导入失败', importDes: res.message }, this.prList[i]))
}
}
this.elProgress.display = false
this.seq = -1
},
//
btnExport(elId) {
let table = document.getElementById(elId);

4
src/views/doctorCheck/sumDoctorCheck.vue

@ -36,9 +36,9 @@
<el-tab-pane label="明细结果" name="2">
<CheckDetails :patientRegisterId="dataTransOpts.tableS.patient_register.id" :tabChoosed="tabChoosed" :refParams="{ place: 'summary' }"/>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane label="危急值和随访值" name="3"> </el-tab-pane>
<!--
<el-tab-pane label="危急值" name="3"> </el-tab-pane>
<el-tab-pane label="项目对比" name="4">
<SumItemsType :patientId="dataTransOpts.tableS.patient_register.patientId" />
</el-tab-pane>

Loading…
Cancel
Save