-
-
+
+
+
+
小结
+
+
+ 生成小结
+
+
+ 新增小结
+
+
+ 保存结果
+
+
+ 审核
+
+
+ 排队
+
+
+
+
-
-
+
+
+
+
+
-
+
@@ -19,9 +46,14 @@
width="100%" border @row-click="rowClick">
-
-
+
+
+
+
+
@@ -34,7 +66,7 @@ import Sortable from "sortablejs";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
export default {
components: {},
- props:["isCheckPicture"],
+ props:["isCheckPicture","optGrant","addSummary","btnMakeDiagnosis","save","audit","unAudit","btnLineUp"],
data() {
return {
@@ -134,6 +166,16 @@ export default {
});
},
+ //删除诊断明细
+ delSum(index) {
+ this.doctorCheck.checkSummaryList.splice(index, 1);
+ },
+
+ //删除建议明细
+ delSug(index) {
+ this.doctorCheck.checkSuggestionList.splice(index, 1);
+ },
+
},
//监听事件
@@ -149,5 +191,10 @@ export default {
\ No newline at end of file
diff --git a/src/components/doctorCheck/PatientRegisterList.vue b/src/components/doctorCheck/PatientRegisterList.vue
index 16d7f34..0d4b7ee 100644
--- a/src/components/doctorCheck/PatientRegisterList.vue
+++ b/src/components/doctorCheck/PatientRegisterList.vue
@@ -2,11 +2,18 @@
+
姓名:
-
@@ -176,7 +183,7 @@ export default {
components: {
CusOrgOCX,
},
- props: ['win'],
+ props: ['win','winAbsolute'],
data() {
return {
dataList: [], //列表数据
@@ -321,7 +328,7 @@ export default {
if(this.local.query.checkAsb) body.asbitems = [this.local.query.checkAsb]
if(this.local.query.haveImage) body.isPicture = 'Y'
- body.maxResultCount = 500
+ body.maxResultCount = 1000
// "patientName": "string",
// "sexId": "string",
// "isAudit": "string",
@@ -329,11 +336,20 @@ export default {
// "maxResultCount": 0
console.log('/api/patientregister/getpeisrecordlist', body)
+ const loading = this.$loading({
+ lock: true,
+ text: "Loading",
+ spinner: "el-icon-loading",
+ background: "rgba(0, 0, 0, 0.7)",
+ });
postapi('/api/patientregister/getpeisrecordlist', body)
.then((res) => {
if(res.code != -1){
this.dataList = res.data.items;
- }
+ }
+ loading.close();
+ }).catch(err =>{
+ loading.close();
});
},
diff --git a/src/components/sumDoctorCheck/ButtonList.vue b/src/components/sumDoctorCheck/ButtonList.vue
index 87f341e..1c56c01 100644
--- a/src/components/sumDoctorCheck/ButtonList.vue
+++ b/src/components/sumDoctorCheck/ButtonList.vue
@@ -43,7 +43,7 @@
-->
-
+
-
+
@@ -61,7 +61,7 @@
-
+
@@ -95,7 +95,7 @@ export default {
return {
peoplePhoto:'', //人员照片
activeName:'asbitem',
- isCheckPicture:false, //是否显示结果图片
+ isCheckPicture:true, //是否显示结果图片
};
},
@@ -116,7 +116,7 @@ export default {
},
computed: {
- ...mapState(["window","dict", "patientRegister", "customerOrg"]),
+ ...mapState(["window","dict", "patientRegister", "customerOrg", "doctorCheck","sumDoctorCheck"]),
},
methods: {
@@ -242,6 +242,364 @@ export default {
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 == '1') return "该项目项目已保存,不可再执行此操作,如需操作请点【修改结果】"
+ if (this.doctorCheck.RegisterCheckEdit.isAudit == 'Y') return '组合项目已审核,请先取消审核,方可执行此操作!'
+ }
+ if (optType == 'edit') {
+ if (this.doctorCheck.RegisterCheckEdit.completeFlag == '0') 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
+ },
+
+ // 生成小结
+ 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/getdiagnosisresult`, body)
+ .then((res) => {
+ if (res.code != -1) {
+ // console.log(res.data)
+ // {
+ // "diagnosisResultDetails": [
+ // {
+ // "diagnosisResult": "超重"
+ // }
+ // ],
+ // "diagnosisSuggestionDetails": [
+ // {
+ // "diagnosisSuggestion": "定期复查"
+ // },
+ // {
+ // "diagnosisSuggestion": "控制热量摄入,适当运动"
+ // }
+ // ]
+ // }
+
+ // 小结
+ 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
+ })
+ })
+ this.$message.success("操作成功!")
+ }
+ })
+ .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',
+ })
+ this.doctorCheck.checkSuggestionList.push({
+ id:Math.random(),
+ registerCheckId: this.doctorCheck.RegisterCheckEdit.id,
+ suggestion: '',
+ })
+ },
+
+ //保存数据
+ save() {
+ let ret = this.optGrant('save')
+ if (ret) {
+ this.$message.warning(ret)
+ return
+ }
+
+ //更新明细
+ this.updateCheckItemList();
+
+ //更新检查项目与医生
+ this.updateDoctorCheck();
+
+ //更新小结
+ this.saveCheckSummary();
+
+ //更新建议
+ this.saveCheckSuggestion(true);
+ },
+
+ //更新检查项目与医生
+ updateDoctorCheck(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 = {
+ 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) {
+ 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) this.$message.success("操作成功!")
+ }
+ })
+ .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) {
+ if(successTip) this.$message.success("操作成功!")
+ }
+ })
+ .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) {
+ if(successTip) this.$message.success("操作成功!")
+ }
+ })
+ .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) this.$message.success("操作成功!")
+ }
+ })
+ .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('排队')
+ },
+
+
+
},
//监听事件()