|
@@ -129,7 +129,7 @@ const openEmr = () => {
|
|
|
const showPsnInsuinfo = ref(false)
|
|
|
const showTreatmentinfos = ref(false)
|
|
|
const checkTreatmentParams = ref({})
|
|
|
-const beforeGetTreatinfo = () => {
|
|
|
+const beforeGetTreatinfo = async () => {
|
|
|
if (nullPatient()) return
|
|
|
if (!patient.value.medType) {
|
|
|
ElMessage({
|
|
@@ -139,28 +139,114 @@ const beforeGetTreatinfo = () => {
|
|
|
showClose: true,
|
|
|
})
|
|
|
return true
|
|
|
+ }else {
|
|
|
+ medinsStore.setInjuryMode((patient.value.medType === "gs21") || (patient.value.medType === "gs22") || (patient.value.medType === "gs23"));
|
|
|
}
|
|
|
- let cd = getReadCardData()
|
|
|
- checkTreatmentParams.value = {
|
|
|
- medType: patient.value.medType,
|
|
|
- patNo: patient.value.patNo,
|
|
|
- times: patient.value.admissTimes,
|
|
|
- ledgerSn: patient.value.ledgerSn,
|
|
|
- socialNo: patient.value.socialNo,
|
|
|
- name: patient.value.name,
|
|
|
- admdvs: patient.value.admdvs,
|
|
|
- readCardResult: cd.readCardResult,
|
|
|
- mdtrtCertType: cd.mdtrtCertType,
|
|
|
- busCardInfo: cd.busCardInfo,
|
|
|
+ if(injuryMode.value) {
|
|
|
+ let inpatient_no = patient.value.patNo
|
|
|
+ let admiss_times = patient.value.admissTimes
|
|
|
+ // 调用工伤患者关系列表接口
|
|
|
+ const loading = ElMessage({
|
|
|
+ message: '正在获取工伤患者信息,请稍候...',
|
|
|
+ type: 'info',
|
|
|
+ duration: 0,
|
|
|
+ showClose: true,
|
|
|
+ grouping: true,
|
|
|
+ });
|
|
|
+
|
|
|
+ try {
|
|
|
+ //const response = await fetch(`http://localhost:9205/thyy/api/public/injury/getWorkInjuryPatientRelationList?inpatient_no=${inpatient_no}&admiss_times=${admiss_times}`, {
|
|
|
+ const response = await fetch(`http://localhost:9205/thyy/api/public/injury/getWorkInjuryPatientRelationList?inpatient_no=${inpatient_no}&admiss_times=${admiss_times}`, {
|
|
|
+ method: 'GET',
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'application/json',
|
|
|
+ },
|
|
|
+ });
|
|
|
+ const result = await response.json();
|
|
|
+
|
|
|
+ if (result && result.code === 1 && result.data && Array.isArray(result.data) && result.data.length > 0) {
|
|
|
+ // 取数组的第一个值
|
|
|
+ const firstItem = result.data[0];
|
|
|
+ checkTreatmentParams.value = {
|
|
|
+ medType: patient.value.medType,
|
|
|
+ patNo: patient.value.patNo,
|
|
|
+ times: patient.value.admissTimes,
|
|
|
+ ledgerSn: patient.value.ledgerSn,
|
|
|
+ socialNo: patient.value.socialNo,
|
|
|
+ name: patient.value.name,
|
|
|
+ admdvs: patient.value.admdvs,
|
|
|
+ readCardResult: {
|
|
|
+ data:{
|
|
|
+ output: {
|
|
|
+ inpatient_no: firstItem.inpatientNo,
|
|
|
+ admiss_times: firstItem.admissTimes,
|
|
|
+ psn_no: firstItem.psnNo,
|
|
|
+ emp_no: firstItem.empNo,
|
|
|
+ emp_name: firstItem.empName,
|
|
|
+ certno: firstItem.certno,
|
|
|
+ psn_name: firstItem.psnName,
|
|
|
+ gend: firstItem.gend,
|
|
|
+ age: firstItem.age,
|
|
|
+ psn_type: firstItem.psnType,
|
|
|
+ insu_admdvs: firstItem.insuAdmdvs,
|
|
|
+ inhosp_stas: firstItem.inhospStas,
|
|
|
+ certificate_type: firstItem.certificateType,
|
|
|
+ birthday: firstItem.birthday,
|
|
|
+ QualificationId: firstItem.QualificationId,
|
|
|
+ injury_part_desc: firstItem.injuryPartDesc,
|
|
|
+ visit_type: firstItem.visitType,
|
|
|
+ exam_ccls: firstItem.examCcls
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mdtrtCertType: 'injurySicard',
|
|
|
+ };
|
|
|
+ showPsnInsuinfo.value = true;
|
|
|
+ } else {
|
|
|
+ ElMessage({
|
|
|
+ message: '未找到工伤患者关系信息',
|
|
|
+ type: 'warning',
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } catch (error) {
|
|
|
+ ElMessage({
|
|
|
+ message: '获取工伤患者信息失败',
|
|
|
+ type: 'error',
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ } finally {
|
|
|
+ loading.close && loading.close();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ let cd = getReadCardData()
|
|
|
+ checkTreatmentParams.value = {
|
|
|
+ medType: patient.value.medType,
|
|
|
+ patNo: patient.value.patNo,
|
|
|
+ times: patient.value.admissTimes,
|
|
|
+ ledgerSn: patient.value.ledgerSn,
|
|
|
+ socialNo: patient.value.socialNo,
|
|
|
+ name: patient.value.name,
|
|
|
+ admdvs: patient.value.admdvs,
|
|
|
+ readCardResult: cd.readCardResult,
|
|
|
+ mdtrtCertType: cd.mdtrtCertType,
|
|
|
+ busCardInfo: cd.busCardInfo,
|
|
|
+ }
|
|
|
+ showPsnInsuinfo.value = true
|
|
|
}
|
|
|
- showPsnInsuinfo.value = true
|
|
|
}
|
|
|
const checkTreatmentinfos = (row) => {
|
|
|
- checkTreatmentParams.value.psnNo = row.psnNo
|
|
|
- checkTreatmentParams.value.begntime = getDatetime()
|
|
|
- checkTreatmentParams.value.insutype = row.insutype
|
|
|
- showPsnInsuinfo.value = false
|
|
|
- showTreatmentinfos.value = true
|
|
|
+ if (injuryMode.value) {
|
|
|
+
|
|
|
+ }else {
|
|
|
+ checkTreatmentParams.value.psnNo = row.psnNo
|
|
|
+ checkTreatmentParams.value.begntime = getDatetime()
|
|
|
+ checkTreatmentParams.value.insutype = row.insutype
|
|
|
+ showPsnInsuinfo.value = false
|
|
|
+ showTreatmentinfos.value = true
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
const childrenDepts = ['1040000', '1040100', '1700015']
|