Browse Source

pacs

master
pengjun 11 months ago
parent
commit
00650e7973
  1. 2
      src/components/doctorCheck/CheckItemList.vue
  2. 46
      src/views/doctorCheck/doctorCheck.vue
  3. 890
      src/views/doctorCheck/doctorCheckBak241125.vue

2
src/components/doctorCheck/CheckItemList.vue

@ -294,7 +294,7 @@ export default {
tableHeight() { tableHeight() {
let temp = this.window.pageHeight < 600 ? 600 : this.window.pageHeight; let temp = this.window.pageHeight < 600 ? 600 : this.window.pageHeight;
return Math.floor( return Math.floor(
((temp - 260 - (this.isCheckPicture ? 110 : 0)) * 3) / 5
((temp - 292 - (this.isCheckPicture ? 110 : 0)) * 3) / 5
); );
}, },
}, },

46
src/views/doctorCheck/doctorCheck.vue

@ -30,27 +30,28 @@
<QueueCheckList /> <QueueCheckList />
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<div :style="'width:' + (window.pageWidth - 200 - 110 - 15) + 'px;'">
<div :style="'margin-left: 2px;width:' + (window.pageWidth - 200 - 110 - 15 - 2) + 'px;'">
<CheckItemList :isCheckPicture="isCheckPicture" :doctor_check_check_charge="doctor_check_check_charge"
:registerCheckId="dataTransOpts.tableS.register_check.id" />
</div>
<div v-if="isCheckPicture" class="demo-image__preview"
:style="'margin-top: 2px;margin-left: 2px;height:110px;width:' + (window.pageWidth - 200 - 110 - 45 - 2) + 'px;'">
<CheckPicture :doctorBtnDisabled="doctorBtnDisabled" :save="save" />
</div>
<div :style="'margin-top: 2px;margin-left: 2px;width:' + (window.pageWidth - 200 - 110 - 15 - 2) + 'px;'">
<CheckSumSug :registerCheckId="dataTransOpts.tableS.register_check.id" :isCheckPicture="isCheckPicture"
:optGrant="optGrant" :addSummary="addSummary" :btnMakeDiagnosis="btnMakeDiagnosis" :save="save"
:audit="audit" :unAudit="unAudit" :btnLineUp="btnLineUp" :doctorBtnDisabled="doctorBtnDisabled" />
</div>
<div :style="'margin-top: 2px;width:' + (window.pageWidth - 200 - 110 - 15 - 2) + 'px;'">
<RegisterCheckEdit :registerCheckId="dataTransOpts.tableS.register_check.id" />
</div>
</div>
<el-tabs v-model="activeMain" :style="'width:' + (window.pageWidth - 200 - 110 - 15) + 'px;'">
<el-tab-pane label="检查情况" name="text">
<div :style="'margin-left: 2px;'">
<CheckItemList :isCheckPicture="isCheckPicture" :doctor_check_check_charge="doctor_check_check_charge"
:registerCheckId="dataTransOpts.tableS.register_check.id" />
</div>
<div v-if="isCheckPicture" class="demo-image__preview"
:style="'margin-top: 2px;margin-left: 2px;'">
<CheckPicture :doctorBtnDisabled="doctorBtnDisabled" :save="save" />
</div>
<div :style="'margin-top: 2px;margin-left: 2px;'">
<CheckSumSug :registerCheckId="dataTransOpts.tableS.register_check.id" :isCheckPicture="isCheckPicture"
:optGrant="optGrant" :addSummary="addSummary" :btnMakeDiagnosis="btnMakeDiagnosis" :save="save"
:audit="audit" :unAudit="unAudit" :btnLineUp="btnLineUp" :doctorBtnDisabled="doctorBtnDisabled" />
</div>
<div :style="'margin-top: 2px;'">
<RegisterCheckEdit :registerCheckId="dataTransOpts.tableS.register_check.id" />
</div>
</el-tab-pane>
</el-tabs>
</div> </div>
</div> </div>
<div style="width:110px;"> <div style="width:110px;">
@ -102,7 +103,8 @@ export default {
data() { data() {
return { return {
peoplePhoto: '', // peoplePhoto: '', //
activeName: 'asbitem',
activeName: 'asbitem', // asbitem call
activeMain: 'text', // text
isCheckPicture: true, // isCheckPicture: true, //
LocalConfig: { LocalConfig: {

890
src/views/doctorCheck/doctorCheckBak241125.vue

@ -0,0 +1,890 @@
<template>
<div>
<div>
<div style="display: flex;justify-content:space-between;">
<div class="contenttitle">
体检 /<span class="contenttitleBold">检查医生诊台</span>
</div>
<div style="position: absolute;margin-right:120px; top:50px;right:10px;z-index: 2;">
<el-image style="width: 100px; height: 105px;" :src="peoplePhoto">
<div slot="placeholder" class="image-slot">
加载中<span class="dot">...</span>
</div>
</el-image>
</div>
</div>
<div style="display: flex;">
<div :style="`width:${window.pageWidth - 120}px;`">
<div style="display: flex;justify-content:space-between;z-index:-1;">
<div>
<PatientRegisterBase />
</div>
<div style="width: 100px;"></div>
</div>
<div style="display: flex;">
<el-tabs v-model="activeName" tab-position="bottom" style="width: 200px;">
<el-tab-pane label="组合项目" name="asbitem">
<RegisterCheckList />
</el-tab-pane>
<el-tab-pane v-if="LocalConfig.doctorCheck.isQueue == 'Y'" label="叫号" name="call">
<QueueCheckList />
</el-tab-pane>
</el-tabs>
<div :style="'width:' + (window.pageWidth - 200 - 110 - 15) + 'px;'">
<div :style="'margin-left: 2px;width:' + (window.pageWidth - 200 - 110 - 15 - 2) + 'px;'">
<CheckItemList :isCheckPicture="isCheckPicture" :doctor_check_check_charge="doctor_check_check_charge"
:registerCheckId="dataTransOpts.tableS.register_check.id" />
</div>
<div v-if="isCheckPicture" class="demo-image__preview"
:style="'margin-top: 2px;margin-left: 2px;height:110px;width:' + (window.pageWidth - 200 - 110 - 45 - 2) + 'px;'">
<CheckPicture :doctorBtnDisabled="doctorBtnDisabled" :save="save" />
</div>
<div :style="'margin-top: 2px;margin-left: 2px;width:' + (window.pageWidth - 200 - 110 - 15 - 2) + 'px;'">
<CheckSumSug :registerCheckId="dataTransOpts.tableS.register_check.id" :isCheckPicture="isCheckPicture"
:optGrant="optGrant" :addSummary="addSummary" :btnMakeDiagnosis="btnMakeDiagnosis" :save="save"
:audit="audit" :unAudit="unAudit" :btnLineUp="btnLineUp" :doctorBtnDisabled="doctorBtnDisabled" />
</div>
<div :style="'margin-top: 2px;width:' + (window.pageWidth - 200 - 110 - 15 - 2) + 'px;'">
<RegisterCheckEdit :registerCheckId="dataTransOpts.tableS.register_check.id" />
</div>
</div>
</div>
</div>
<div style="width:110px;">
<ButtonList :optGrant="optGrant" :addSummary="addSummary" :btnMakeDiagnosis="btnMakeDiagnosis" :save="save"
:audit="audit" :unAudit="unAudit" :doctorBtnDisabled="doctorBtnDisabled" />
</div>
</div>
</div>
<!--组件弹窗-->
<div v-if="dialogWin.FollowCriticalCheck">
<!-- 危急值 -->
<el-dialog title="危急值" :visible.sync="dialogWin.FollowCriticalCheck" width="800px" :show-close="false"
:close-on-click-modal="false" :append-to-body="true">
<FollowCriticalCheck />
</el-dialog>
</div>
</div>
</template>
<script>
import { mapState } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { arrayExistObj, tcdate, deepCopy } from "../../utlis/proFunc";
import { photoParse } from "../../utlis/proApi";
import PatientRegisterBase from "../../components/doctorCheck/PatientRegisterBase.vue";
import ButtonList from "../../components/doctorCheck/ButtonList.vue";
import CheckPicture from "../../components/doctorCheck/CheckPicture.vue";
import RegisterCheckList from "../../components/doctorCheck/RegisterCheckList.vue";
import QueueCheckList from "../../components/doctorCheck/QueueCheckList.vue";
import CheckItemList from "../../components/doctorCheck/CheckItemList.vue";
import CheckSumSug from "../../components/doctorCheck/CheckSumSug.vue";
import RegisterCheckEdit from "../../components/doctorCheck/RegisterCheckEdit.vue";
import FollowCriticalCheck from "../../components/follow/FollowCriticalCheck.vue";
import moment from 'moment';
import Follow from "@/components/follow/follow.vue";
export default {
components: {
RegisterCheckList,
QueueCheckList,
PatientRegisterBase,
ButtonList,
CheckPicture,
CheckItemList,
CheckSumSug,
RegisterCheckEdit,
FollowCriticalCheck,
},
data() {
return {
peoplePhoto: '', //
activeName: 'asbitem',
isCheckPicture: true, //
LocalConfig: {
doctorCheck: { //
isCheckPicture: false, //
isQueue: 'N', //
queueRoom: '', //
isAutoNext: 'N', //
}
},
LocalConfigInit: {},
doctor_check_check_charge: 'Y', //
};
},
created() {
// console.log("this.$route.query", this.$route.query)
if (this.$route.query.patient_register) {
this.dataTransOpts.tableS.patient_register = this.$route.query.patient_register
} else {
this.dataTransOpts.tableS.patient_register = { id: '', patientRegisterNo: '' }
this.dataTransOpts.tableS.register_check = { id: '' }
this.peoplePhoto = ''
}
this.LocalConfigInit = deepCopy(this.LocalConfig)
let LocalConfig = window.localStorage.getItem("LocalConfig") || null
try {
this.LocalConfig = Object.assign({}, deepCopy(this.LocalConfigInit), JSON.parse(LocalConfig) || {})
} catch (error) {
console.log('window.localStorage.getItem("LocalConfig")', error)
}
if (this.$peisAPI) {
// this.$message.info("");
// console.log('this.$peisAPI',this.$peisAPI)
this.$peisAPI.getIsCheckPicture().then(res => {
console.log("this.$peisAPI.getIsCheckPicture()", res)
if (res) this.isCheckPicture = res.toUpperCase() == 'Y' ? true : false
})
} else {
try {
this.isCheckPicture = this.LocalConfig.doctorCheck.isCheckPicture
} catch (error) {
console.log('window.localStorage.getItem("LocalConfig")', error)
}
}
console.log('this.LocalConfig', this.LocalConfig)
},
//
mounted() {
this.dictInit();
// window.addEventListener("contextmenu", (e) => {
// if (this.$peisAPI) {
// e.preventDefault();
// this.$peisAPI.contextMenuForPeis()
// }
// })
},
// deactivated() {
// window.removeEventListener('contextmenu', (e) => {
// console.log('window.removeEventListener')
// });
// },
computed: {
...mapState(["window", "dataTransOpts", "dict", "dialogWin", "patientRegister", "customerOrg", "doctorCheck", "sumDoctorCheck"]),
},
methods: {
//
async dictInit() {
let sysParmId = "doctor_check_check_charge"
let sysParam = await postapi('/api/app/SysParmValue/GetSysParmValueBySysParmId', { sysParmId })
this.doctor_check_check_charge = sysParam.data.toUpperCase()
//
getapi("/api/app/sex").then((res) => {
if (res.code == 1) {
this.dict.sex = res.data;
}
});
//
getapi("/api/app/for-sex").then((res) => {
if (res.code == 1) {
this.dict.forSex = res.data;
}
});
//
getapi("/api/app/organization-units/organization-unit-by-is-peis").then(
(res) => {
if (res.code == 1) {
this.dict.organization = res.data;
}
}
);
//
// getapi("/api/app/customer-org/in-filter").then((res) => {
// if (res.code == 1) {
// this.dict.customerOrg = res.data;
// }
// });
//
getapi("/api/app/medical-type/in-filter").then((res) => {
if (res.code == 1) {
this.dict.medicalType = res.data;
}
});
//
getapi("/api/app/personnel-type/in-filter").then((res) => {
if (res.code == 1) {
this.dict.personnelType = res.data;
}
});
//
getapi("/api/app/MaritalStatus/GetMaritalStatusList").then((res) => {
if (res.code == 1) {
this.dict.maritalStatus = res.data;
}
});
//
getapi("/api/app/sex-hormone-term/in-filter").then((res) => {
if (res.code == 1) {
this.dict.sexHormoneTerm = res.data;
}
});
//
getapi("/api/app/nation/in-filter").then((res) => {
if (res.code == 1) {
this.dict.nation = res.data;
}
});
//
getapi("/api/app/birth-place/in-filter").then((res) => {
if (res.code == 1) {
this.dict.birthPlace = res.data;
}
});
//
postapi("/api/app/medicalpackage/GetBasicList", {}).then((res) => {
if (res.code == 1) {
this.dict.medicalPackage = res.data;
}
});
//
// getapi("/api/app/customer-org-group").then((res) => {
// if (res.code == 1) {
// this.dict.customerOrgGroupAll = res.data.items;
// }
// });
//
getapi("/api/app/pay-mode").then((res) => {
if (res.code == 1) {
this.dict.payMode = res.data;
}
});
//
getapi("/api/app/item-type/by-code-all").then((res) => {
if (res.code == 1) {
this.dict.itemTypeTree = res.data;
tcdate(this.dict.itemTypeTree);
}
});
//
postapi("/api/app/asbitem/GetBasicList", { isFilterActive: 'Y' }).then((res) => {
if (res.code == 1) {
this.dict.asbItemAll = res.data;
}
});
//
// getapi("/api/app/customerorg/getbycodeall").then((res) => {
// //customerOrgTree = res.data;
// console.log("res.data", res.data);
// this.patientRegister.customerOrgTreeAll = res.data;
// tcdate(this.patientRegister.customerOrgTreeAll)
// });
postapi('/api/app/CustomerOrg/GetCustomerOrgByParentId', { parentId: null })
.then(res => {
if (res.code > -1) {
res.data.forEach(e => {
e.isLeaf = e.isChild == 'Y' ? false : true
});
this.patientRegister.customerOrgTreeAll = res.data;
tcdate(this.patientRegister.customerOrgTreeAll)
}
})
console.log("dict", this.dict);
},
//
optGrant(optType) {
let ret = ''
if (!this.doctorCheck.RegisterCheckEdit.id) return '请选择组合项目'
if (this.doctorCheck.RegisterCheckEdit.isLock == 'Y') return '组合项目已锁定,不可执行此操作'
// if (this.doctorCheck.RegisterCheckEdit.completeFlag == '2') return ''
if (optType == 'save') {
// if (!this.doctorCheck.RegisterCheckEdit.checkDoctorId) return ""
if (this.doctorCheck.RegisterCheckEdit.completeFlag == '2') return "该项目项目已弃检,不可再执行此操作"
if (this.doctorCheck.RegisterCheckEdit.completeFlag == '1') return "该项目项目已保存,不可再执行此操作,如需操作请点【修改结果】"
if (this.doctorCheck.RegisterCheckEdit.isAudit == 'Y') return '组合项目已审核,请先取消审核,方可执行此操作!'
}
if (optType == 'edit') {
if (this.doctorCheck.RegisterCheckEdit.completeFlag == '0') return "该检查项目尚未保存,无需执行此操作"
if (this.doctorCheck.RegisterCheckEdit.completeFlag == '2') return "该项目项目已弃检,不可再执行此操作"
if (this.doctorCheck.RegisterCheckEdit.isAudit == 'Y') return '组合项目已审核,请先取消审核,方可执行此操作!'
}
if (optType == 'del') {
if (this.doctorCheck.RegisterCheckEdit.completeFlag == '0') return "该检查项目尚未保存,无需执行此操作"
if (this.doctorCheck.RegisterCheckEdit.isAudit == 'Y') return '组合项目已审核,请先取消审核,方可执行此操作!'
}
if (optType == 'audit') {
if (this.doctorCheck.RegisterCheckEdit.completeFlag == '0') return "该检查项目尚未保存,无需执行此操作"
if (this.doctorCheck.RegisterCheckEdit.isAudit == 'Y') return "该检查项目已审核,无需再执行此操作"
}
if (optType == 'unAudit') {
if (this.doctorCheck.RegisterCheckEdit.completeFlag == '0') return "该检查项目尚未保存,无需执行此操作"
if (this.doctorCheck.RegisterCheckEdit.isAudit == 'N') return "该检查项目尚未审核,无需执行此操作"
}
if (optType == 'delItem' || optType == 'refuseItem' || optType == 'makeDiagnosis') {
if (this.doctorCheck.RegisterCheckEdit.completeFlag == '1') return "该项目项目已保存,不可再执行此操作,如需操作请点【修改结果】"
if (this.doctorCheck.RegisterCheckEdit.isAudit == 'Y') return "该检查项目已审核,请先取消审核"
}
return ret
},
//
doctorBtnDisabled(btnFlagName) {
let patientRegister = this.dataTransOpts.tableS.patient_register
let RegisterCheckEdit = this.doctorCheck.RegisterCheckEdit
let ret = true
//' '
if (!patientRegister.id) return ret
switch (btnFlagName) {
case 'btnCheckHistory':
case 'btnReport':
return false
case 'toSumDoctorCheck':
let operatorType = window.sessionStorage.getItem("operatorType")
if (operatorType == '2' || operatorType == '3') ret = false
return ret
case 'btnOcc':
console.log('patientRegister', patientRegister)
if (patientRegister.isPatientOccupationalDisease && patientRegister.isPatientOccupationalDisease == 'Y') ret = false
return ret
}
// ''
if (patientRegister.isLock && patientRegister.isLock == 'Y') return ret
if (patientRegister.completeFlag && patientRegister.completeFlag == '3') return ret
if (btnFlagName == 'editPr' || btnFlagName == 'delPr') return false
//
if (!RegisterCheckEdit.id) return ret
switch (btnFlagName) {
case 'btnEdit': //
case 'btnDel': //
if (RegisterCheckEdit.completeFlag && (RegisterCheckEdit.completeFlag == '1' || RegisterCheckEdit.completeFlag == '2')) ret = false
break;
case 'refuse': //
case 'refuseItem': //
case 'delItem': //
case 'btnMakeDiagnosis': //
case 'save': //
case 'addSummary': //
case 'delSum': //
case 'addSuggestion': //
case 'delSug': //
case 'btnGetPic': //
case 'btnExpPic': //
case 'btnCutPic': //
case 'btnSavePic': //
case 'btnDelImage': //
// console.log('btnFlagName RegisterCheckEdit', btnFlagName, RegisterCheckEdit.completeFlag)
if (this.doctor_check_check_charge == 'Y') {
if (RegisterCheckEdit.completeFlag && RegisterCheckEdit.completeFlag == '0' && RegisterCheckEdit.isCharge == 'Y') ret = false
} else {
if (RegisterCheckEdit.completeFlag && RegisterCheckEdit.completeFlag == '0') ret = false
}
break;
case 'btnCritical':
if (RegisterCheckEdit.isAudit && RegisterCheckEdit.isAudit != 'Y') ret = false
break;
case 'audit':
if (RegisterCheckEdit.completeFlag && RegisterCheckEdit.completeFlag != '0' && RegisterCheckEdit.isAudit && RegisterCheckEdit.isAudit != 'Y') ret = false
break;
case 'unAudit':
if (RegisterCheckEdit.completeFlag && RegisterCheckEdit.completeFlag != '0' && RegisterCheckEdit.isAudit && RegisterCheckEdit.isAudit != 'N') ret = false
break;
default:
ret = false
break;
}
// console.log('sumBtnDisabled btnFlagName, patientRegister,ret', btnFlagName, patientRegister, ret)
return ret
},
//
btnMakeDiagnosis() {
let ret = this.optGrant('makeDiagnosis')
if (ret) {
this.$message.warning(ret)
return
}
if (this.doctorCheck.checkItemList.length == 0) {
this.$message.warning("系统错误,组合项目没有明细")
return
}
console.log('生成小结');
if (this.doctorCheck.checkSummaryList.length > 0) {
this.$confirm("已经有小结,是否重新生成小结?", "提示", {
confirmButtonText: "是",
cancelButtonText: "否",
type: "warning",
}).then(() => {
this.makeDiagnosisFun();
}).catch((err) => {
if (err == "cancel") {
this.$message.info("已取消");
}
});
} else {
this.makeDiagnosisFun();
}
},
//
makeDiagnosisFun() {
// /api/app/diagnosisfunction/getdiagnosisresult
// {
// "registerCheckId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "items": [
// {
// "itemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "result": "string"
// }
// ]
// }
let body = {
registerCheckId: '',
items: []
}
this.doctorCheck.checkItemList.forEach((e, index) => {
if (index == 0) body.registerCheckId = e.registerCheckId
body.items.push({
itemId: e.itemId,
result: e.result
})
})
// console.log(`/api/app/diagnosisfunction/getdiagnosisresult`, body)
this.doctorCheck.checkSummaryList = []
this.doctorCheck.checkSuggestionList = []
postapi(`/api/app/DiagnosisFunction/GetDoctorCheckDiagnosisResultAsync`, body)
.then((res) => {
if (res.code > -1) {
// if (res.code == 0) {
// //
// this.$message.warning({ showClose: true, message: res.message })
// }
//
res.data.diagnosisResultDetails.forEach(e => {
this.doctorCheck.checkSummaryList.push({
id: Math.random(),
registerCheckId: body.registerCheckId,
summary: e.diagnosisResult,
summaryFlag: 'Y'
})
})
//
res.data.diagnosisSuggestionDetails.forEach(e => {
this.doctorCheck.checkSuggestionList.push({
id: Math.random(),
registerCheckId: body.registerCheckId,
suggestion: e.diagnosisSuggestion
})
})
//
getapi(`/api/app/registercheck/getregistercheck?id=${this.doctorCheck.RegisterCheckId}`)
.then(res => {
if (res.code > -1) {
this.doctorCheck.RegisterCheckEdit.isCriticalValue = res.data.isCriticalValue
}
})
console.log("操作成功!")
}
})
.catch((err) => {
this.$message({ type: "error", message: `生成小结失败,原因:${err}` });
});
},
//
addSummary() {
let ret = this.optGrant('makeDiagnosis')
if (ret) {
this.$message.warning(ret)
return
}
this.doctorCheck.checkSummaryList.push({
id: Math.random(),
registerCheckId: this.doctorCheck.RegisterCheckEdit.id,
summary: '',
summaryFlag: 'N',
})
},
//
save() {
let ret = this.optGrant('save')
if (ret) {
this.$message.warning(ret)
return
}
// //
// this.updateCheckItemList();
// //
// this.updateDoctorCheck();
// //
// this.saveCheckSummary();
// //
// this.saveCheckSuggestion(true);
//
// {
// "registerCheckId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "checkDoctorId": "string",
// "checkDate": "2024-04-17T14:13:24.889Z",
// "registerCheckItems": [
// {
// "itemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "result": "string",
// "criticalValue": "string",
// "checkDoctorName": "string",
// "checkDate": "string"
// }
// ],
// "summarys": [
// {
// "summary": "string",
// "summaryFlag": "string"
// }
// ],
// "suggestions": [
// {
// "suggestion": "string"
// }
// ]
// }
let checkDate = this.doctorCheck.RegisterCheckEdit.checkDate || new Date();
checkDate = moment(new Date(checkDate)).format('yyyy-MM-DD HH:mm:ss'); //yyyy-MM-DD HH:mm:ss
let checkDoctorId = this.doctorCheck.RegisterCheckEdit.checkDoctorId || null;
if (!checkDoctorId) {
this.$message.warning({ showClose: true, message: '检查医生不能为空,请选择检查医生!' })
return
}
let registerCheckId = this.doctorCheck.RegisterCheckEdit.id
//
let registerCheckItems = []
this.doctorCheck.checkItemList.forEach(e => {
registerCheckItems.push({
itemId: e.itemId,
result: e.result,
checkDoctorName: checkDoctorId,
checkDate,
})
});
//
let summarys = []
this.doctorCheck.checkSummaryList.forEach(item => {
summarys.push({
summary: item.summary,
summaryFlag: item.summaryFlag,
})
});
//
let suggestions = []
this.doctorCheck.checkSuggestionList.forEach(item => {
suggestions.push({
suggestion: item.suggestion
})
});
let body = {
registerCheckId,
checkDoctorId,
checkDate,
registerCheckItems,
summarys,
suggestions
}
if (summarys.length == 0) {
this.$message.warning({ showClose: true, message: '请生成小结!' })
return
}
postapi('/api/app/registercheck/UpdateCheckResult', body)
.then(res => {
if (res.code > -1) {
this.doctorCheck.RegisterCheckEdit.completeFlag = '1';
//
let lfind = arrayExistObj(this.doctorCheck.RegisterCheckList, 'id', body.registerCheckId)
if (lfind > -1) {
this.doctorCheck.RegisterCheckList[lfind].completeFlag = '1'
//
if (this.LocalConfig.doctorCheck.isAutoNext == 'Y') {
// this.doctorCheck.RegisterCheckList registerCheckId
lfind = Number(lfind) + 1
if (this.doctorCheck.RegisterCheckList.length >= lfind) {
this.doctorCheck.RegisterCheckId = this.doctorCheck.RegisterCheckList[lfind].id
this.doctorCheck.asbitemName = this.doctorCheck.RegisterCheckList[lfind].asbitemName
this.doctorCheck.checkRequestNo = this.doctorCheck.RegisterCheckList[lfind].checkRequestNo
this.dataTransOpts.tableS.register_check.id = this.doctorCheck.RegisterCheckList[lfind].id
this.dataTransOpts.refresh.register_check.S++
this.dataTransOpts.refresh.register_check_item.M++
}
}
}
//console.log('')
} else {
this.$message.error({ showClose: true, message: res.message })
}
})
},
//
updateDoctorCheck(successTip) {
let checkDate = this.doctorCheck.RegisterCheckEdit.checkDate || new Date();
checkDate = moment(new Date(checkDate)).format('yyyy-MM-DD HH:mm:ss'); //yyyy-MM-DD HH:mm:ss
let checkDoctorId = this.doctorCheck.RegisterCheckEdit.checkDoctorId || window.sessionStorage.getItem("user");
let body = {
registerCheckId: this.doctorCheck.RegisterCheckEdit.id,
checkDoctorId,
checkDate
}
console.log(`/api/app/registercheck/updatecheckdoctor`, body)
postapi(`/api/app/registercheck/updatecheckdoctor`, body)
.then((res) => {
console.log("updateDoctorCheck", res.data);
if (res.code != -1) {
console.log("更新检查医生 成功", res.data);
this.doctorCheck.RegisterCheckEdit.completeFlag = '1';
//
let lfind = arrayExistObj(this.doctorCheck.RegisterCheckList, 'id', body.registerCheckId)
if (lfind > -1) this.doctorCheck.RegisterCheckList[lfind].completeFlag = '1'
if (successTip) console.log("操作成功!")
}
})
.catch((err) => {
this.$message({ type: "error", message: `更新检查医生失败,原因:${err}` });
});
},
//
updateCheckItemList(successTip) {
let checkDate = this.doctorCheck.RegisterCheckEdit.checkDate || new Date();
checkDate = moment(new Date(checkDate)).format('yyyy-MM-DD'); //yyyy-MM-DD HH:mm:ss
let checkDoctorId = this.doctorCheck.RegisterCheckEdit.checkDoctorId || window.sessionStorage.getItem("user");
let body = []
for (let i = 0; i < this.doctorCheck.checkItemList.length; i++) {
body.push({
registerCheckId: this.doctorCheck.checkItemList[i].registerCheckId,
itemId: this.doctorCheck.checkItemList[i].itemId,
result: this.doctorCheck.checkItemList[i].result,
checkDoctorName: checkDoctorId,
checkDate,
})
}
console.log(`/api/app/registercheckitem/updateregistercheckitemmany`, body)
postapi(`/api/app/registercheckitem/updateregistercheckitemmany`, body)
.then((res) => {
console.log("updateCheckItemList", res.data);
if (res.code != -1) {
console.log("更新检查项目明细成功", res.data);
if (successTip) console.log("操作成功!")
}
})
.catch((err) => {
this.$message({ type: "error", message: `更新检查项目明细失败,原因:${err}` });
});
},
//
saveCheckSummary(successTip) {
let details = []
this.doctorCheck.checkSummaryList.forEach(item => {
details.push({
registerCheckId: item.registerCheckId,
summary: item.summary,
summaryFlag: item.summaryFlag,
})
});
let body = {
registerCheckId: this.doctorCheck.RegisterCheckEdit.id,
details
}
console.log(`/api/app/registerchecksummary/createregisterchecksummarymany`, body)
postapi(`/api/app/registerchecksummary/createregisterchecksummarymany`, body)
.then((res) => {
console.log("saveCheckSummary", res.data);
if (res.code != -1) {
console.log("更新小结 成功", res.data);
if (successTip) console.log("操作成功!")
}
})
.catch((err) => {
this.$message({ type: "error", message: `更新小结失败,原因:${err}` });
});
},
//
saveCheckSuggestion(successTip) {
let details = []
this.doctorCheck.checkSuggestionList.forEach(item => {
details.push({
registerCheckId: item.registerCheckId,
suggestion: item.suggestion
})
});
let body = {
registerCheckId: this.doctorCheck.RegisterCheckEdit.id,
details
}
console.log(`/api/app/registerchecksuggestion/createregisterchecksuggestionmany`, body)
postapi(`/api/app/registerchecksuggestion/createregisterchecksuggestionmany`, body)
.then((res) => {
console.log("saveCheckSuggestion", res.data);
if (res.code != -1) {
//this.doctorCheck.RegisterCheckEdit.completeFlag = '1';
if (successTip) console.log("操作成功!")
}
})
.catch((err) => {
this.$message({ type: "error", message: `更新建议失败,原因:${err}` });
});
},
//
audit() {
let ret = this.optGrant('audit')
if (ret) {
this.$message.warning(ret)
return
}
let body = {
registerCheckId: this.doctorCheck.RegisterCheckEdit.id,
//auditorUserId: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
//auditTime: "string"
}
console.log(`/api/app/registercheck/updateauditordoctor`, body)
postapi(`/api/app/registercheck/updateauditordoctor`, body)
.then((res) => {
console.log("audit", res.data);
if (res.code != -1) {
this.doctorCheck.RegisterCheckEdit.isAudit = 'Y';
this.$message({ type: "success", message: `组合项目审核成功` });
}
})
.catch((err) => {
this.$message({ type: "error", message: `组合项目审核失败,原因:${err}` });
});
},
//
unAudit() {
let ret = this.optGrant('unAudit')
if (ret) {
this.$message.warning(ret)
return
}
console.log(`/api/app/registercheck/updateisaudit?RegisterCheckId=${this.doctorCheck.RegisterCheckEdit.id}&IsAudit=N`)
postapi(`/api/app/registercheck/updateisaudit?RegisterCheckId=${this.doctorCheck.RegisterCheckEdit.id}&IsAudit=N`)
.then((res) => {
console.log("unAudit", res.data);
if (res.code != -1) {
this.doctorCheck.RegisterCheckEdit.isAudit = 'N';
this.$message({ type: "success", message: `组合项目取消审核成功` });
}
})
.catch((err) => {
this.$message({ type: "error", message: `组合项目取消审核失败,原因:${err}` });
});
},
//
btnLineUp() {
console.log('排队')
},
},
//()
watch: {
// //1
// "patientRegister.query.CustomerOrgParentId"(newVal, oldVal) {
// console.log(
// "watch patientRegister.query.CustomerOrgParentId newVal",
// newVal,
// " oldVal",
// oldVal
// );
// if (newVal != oldVal && newVal !== this.dict.personOrgId) {
// this.getCustomerOrgGroup(newVal);
// }
// },
"patientRegister.photo": {
immediate: true,
// deep:true,
handler(newVal, oldVal) {
//console.log('patientRegister.patientRegisterRd.id newVal',newVal,' oldVal',oldVal)
if (newVal != oldVal) {
this.peoplePhoto = photoParse(newVal)
}
}
},
},
};
</script>
<style scoped>
@import '../../assets/css/global_card.css';
@import '../../assets/css/global_input.css';
@import '../../assets/css/global_table.css';
@import '../../assets/css/global.css';
</style>
Loading…
Cancel
Save