const $ = require('jquery'); require("../css/appealExamine.less"); require('./modal.js'); require('jquery-templates'); const { api } = require('./api.js') const { post, getCookie, getUrlArgObjectNew, getLogoParam, listenScroll, exportTimeLimit } = require('./utils.js') require('./../resource/jquery-ui/jquery-ui.min.js'); require('./../resource/jquery-ui/jquery-ui.min.css'); listenScroll() let srcUrl = $("#contentIframe", parent.document).attr("src") const id = getUrlArgObjectNew("id", srcUrl) || ""; const hospitalId = getUrlArgObjectNew("hospitalId", srcUrl) || ""; const behospitalCode = getUrlArgObjectNew("behospitalCode", srcUrl) || ""; const casesEntryId = getUrlArgObjectNew("casesEntryId", srcUrl) || ""; const qcresultDetailId = getUrlArgObjectNew("qcresultDetailId", srcUrl) || ""; const appealOperationType = getUrlArgObjectNew("appealOperationType", srcUrl) || ""; const form = getUrlArgObjectNew("form", srcUrl) || ""; const page = getUrlArgObjectNew("page", srcUrl) || ""; let behosDateStart = getUrlArgObjectNew("behosDateStart", srcUrl) || "" let behosDateEnd = getUrlArgObjectNew("behosDateEnd", srcUrl) || "" let deptId = getUrlArgObjectNew("deptId", srcUrl) || "" let deptName = getUrlArgObjectNew("deptName", srcUrl) || "" let moduleName = getUrlArgObjectNew("moduleName", srcUrl) || "" let name = getUrlArgObjectNew("name", srcUrl) || "" let operationType = getUrlArgObjectNew("operationType", srcUrl) || "" let state = getUrlArgObjectNew("state", srcUrl) || "" let patientName = getUrlArgObjectNew("patientName", srcUrl) || "" let appealInfo, appealExamineRecordDTOList, auditNumber; (function () { getApprovedView() if (form == 2) { $(".bot").hide(); $('.appealExamine h2').html('申诉信息 > 申诉审核 > 查看'); } else if (form == 3) { $(".bot").hide(); $('.appealExamine h2').html('申诉信息 > 申诉记录 > 查看'); } })(); //获取审核详情 function getApprovedView() { const param = { id: id, behospitalCode: behospitalCode, casesEntryId: casesEntryId, hospitalId: hospitalId, qcresultDetailId: qcresultDetailId, } return post(api.getApprovedView, param).then(res => { if (res.data.code == '0') { data = res.data.data console.log(); appealExamineRecordDTOList = { casesEntryName: data.appealExamineRecordDTOList[data.appealExamineRecordDTOList.length - 1].casesEntryName, value: data.appealExamineRecordDTOList[data.appealExamineRecordDTOList.length - 1].value, msg: data.appealExamineRecordDTOList[data.appealExamineRecordDTOList.length - 1].casesEntryMsg, explainInfo: data.appealExamineRecordDTOList[data.appealExamineRecordDTOList.length - 1].appealRemark, }; appealInfo = { exampleOperation: 2, casesEntryName: data.casesEntryName, casesEntryMsg: data.casesEntryMsg, remark: data.remark, behospitalCode: data.behospitalCode, modeId: data.modeId, qcResultAlgVO: { casesEntryId: casesEntryId, id: data.qcresultDetailId, casesScore: data.appealExamineRecordDTOList[data.appealExamineRecordDTOList.length - 1].casesScore, msg: data.appealExamineRecordDTOList[data.appealExamineRecordDTOList.length - 1].casesEntryMsg, score: data.qcresultDetaiValue, isReject: data.appealExamineRecordDTOList[data.appealExamineRecordDTOList.length - 1].isReject, explainInfo: data.appealExamineRecordDTOList[data.appealExamineRecordDTOList.length - 1].appealRemark, } }; $('.info').html(''); $('.content').html(''); $('.history').html(''); getInfo(data); getCon(data); getHistory(data.appealExamineRecordDTOList) // getAppealInfo(id, behospitalCode, casesEntryId, hospitalId, qcresultDetailId); } else { const token = localStorage.getItem('accessToken'); if (!token && window.location.href.indexOf('login') == -1) { //alert('无token判断,跳回登录') } else { $.alerModal({ "message": res.data.msg, type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) }); } } }).catch((e) => { }) } function getAppealInfo(id, behospitalCode, casesEntryId, hospitalId, qcresultDetailId) { const param = { id: id, behospitalCode: behospitalCode, casesEntryId: casesEntryId, hospitalId: hospitalId, qcresultDetailId: qcresultDetailId, } return post(api.getAppealInfo, param).then(res => { if (res.data.code == '0') { data = res.data.data.appealExamineRecordDTOList getHistory(data) } else { const token = localStorage.getItem('accessToken'); if (!token && window.location.href.indexOf('login') == -1) { //alert('无token判断,跳回登录') } else { $.alerModal({ "message": res.data.msg, type: "tip", time: '1000', isFather: true, fatherWrapper: $("#mainBox", parent.document) }); } } }).catch((e) => { }) } function getInfo(data) { let str = '' str += `病案号:${data.behospitalCode || '-'} 姓名:${data.name || '-'} 性别:${data.sex || '-'} 年龄:${data.age || '-'} 科室:${data.behDeptName || '-'} 主管医生:${data.doctorName || '-'} 入院时间:${data.behospitalDate || '-'} 出院时间:${data.leaveHospitalDate || '-'}`; $('.info').append(str); } function getCon(data) { let str = '' str += `
申诉模块:${data.modeName || '-'}
病历内容:${data.defectContent || '-'}
缺陷详情:${data.qcresultDetailMsg || '-'}
评分:${data.qcresultDetaiValue == 0 ? '0' : data.qcresultDetaiValue ? -data.qcresultDetaiValue : '-'}
病案详情:查看
`; $('.content').append(str); $('.goDetail').on('click', function (e) { scoreDetail(data.behospitalCode, data.age, 'YH-BLZK-ZKSSKS', data.name, data.modeName) }) } function getHistory(data) { let str = '' for (let i = 0; i < data.length; i++) { const item = data[i] str += `申诉时间:${item.appealCreateDate || '-'}申诉人:${item.claimantName || '-'}审核人:${item.checkName || '-'}
操作类型:${item.appealOperationType == 0 ? '删改条目' : item.appealOperationType == 1 ? '新增已有条目' : item.appealOperationType == 2 ? '新增缺失条目' : '恢复条目'}
${item.appealOperationType == 1 ? `质控条目:${item.casesEntryName || '-'}
提示信息:${item.casesEntryMsg || '-'}
分值:${item.value == 0 ? '0' : item.value ? item.value : '-'}
备注:${item.appealRemark || '-'}
`: ""}申诉说明:${item.appealExplain || '-'}
${item.exampleStatus == 2 ? `审核时间:${item.appealExamineDate || '-'}审核人:${item.checkName || '-'}
审核结果:审核通过
处理方式:${item.exampleOperation == 1 ? '修改' : item.exampleOperation == 2 ? '删除' : item.exampleOperation == 3 ? '新增已有' : item.exampleOperation == 4 ? '新增缺失' : '恢复条目'}
质控条目:${item.casesEntryName || '-'}
提示信息:${item.msg || '-'}
分值:${item.score == 0 ? '0' : item.score ? item.score : '-'}
备注:${item.exampleRemark || '-'}
` : item.exampleStatus == 1 ? `审核时间:${item.appealExamineDate || '-'}
审核结果:驳回
驳回理由:${item.rejectReason || '-'}
` : ""}