|
@@ -986,9 +986,9 @@ const injurySicard = async () => {
|
|
|
});
|
|
|
const result = await response.json();
|
|
|
console.log("patient.value00000000000000000000",patient.value)
|
|
|
- console.log("result1111111111111111111111111111",result)
|
|
|
- if (result && result.code === 1 && result.data) {
|
|
|
- if(result.data && result.data.data && result.data.data.certno && (result.data.data.certno !== patient.value.socialNo)) {
|
|
|
+ console.log("resultccccccccccccccccccccccc",result)
|
|
|
+ if (result && result.code === 1 && result.data && result.data.code === 200 && result.data.data.infcode == '0') {
|
|
|
+ if(result.data && result.data.data && result.data.data.output && result.data.data.output.certno && (result.data.data.output.certno !== patient.value.socialNo)) {
|
|
|
ElMessage({
|
|
|
message: '人证不符,请检查身份证号码!',
|
|
|
type: 'error',
|
|
@@ -997,7 +997,7 @@ const injurySicard = async () => {
|
|
|
});
|
|
|
return
|
|
|
}
|
|
|
- if(result.data && result.data.data && result.data.data.psn_name && (result.data.data.psn_name !== patient.value.name)) {
|
|
|
+ if(result.data && result.data.data && result.data.data.output && result.data.data.output.psn_name && (result.data.data.output.psn_name !== patient.value.name)) {
|
|
|
ElMessage({
|
|
|
message: '人证不符,请检查姓名!',
|
|
|
type: 'error',
|
|
@@ -1012,16 +1012,16 @@ const injurySicard = async () => {
|
|
|
let QualificationId = '';
|
|
|
let injury_part_desc = '';
|
|
|
let visit_type = '';
|
|
|
- if (result.data.data.exam_ccls) {
|
|
|
+ if (result.data.data.output.exam_ccls) {
|
|
|
// 格式:^工伤医疗费资格审核信息ID|受伤部位信息描述|就诊类型^
|
|
|
- const match = result.data.data.exam_ccls.match(/^\^?(.*?)\|(.*?)\|(.*?)\^?$/);
|
|
|
+ const match = result.data.data.output.exam_ccls.match(/^\^?(.*?)\|(.*?)\|(.*?)\^?$/);
|
|
|
if (match) {
|
|
|
QualificationId = match[1];
|
|
|
injury_part_desc = match[2];
|
|
|
visit_type = match[3];
|
|
|
}
|
|
|
}
|
|
|
- await fetch('http://130.150.161.72:9206/thyy/api/public/injury/addWorkInjuryPatientRelation', {
|
|
|
+ const responseTwo = await fetch('http://130.150.161.72:9206/thyy/api/public/injury/addWorkInjuryPatientRelation', {
|
|
|
method: 'POST',
|
|
|
headers: {
|
|
|
'Content-Type': 'application/json',
|
|
@@ -1029,28 +1029,38 @@ const injurySicard = async () => {
|
|
|
body: JSON.stringify({
|
|
|
inpatient_no:patient.value.inpatientNo,
|
|
|
admiss_times:patient.value.admissTimes,
|
|
|
- psn_no:result.data.data.psn_no,
|
|
|
- emp_no:result.data.data.psn_no,
|
|
|
- emp_name:result.data.data.psn_no,
|
|
|
- certno:result.data.data.psn_no,
|
|
|
- psn_name:result.data.data.psn_no,
|
|
|
- gend:result.data.data.psn_no,
|
|
|
- age:result.data.data.psn_no,
|
|
|
- psn_type:result.data.data.psn_no,
|
|
|
- insu_admdvs:result.data.data.psn_no,
|
|
|
- inhosp_stas:result.data.data.psn_no,
|
|
|
- trt_chk_rslt:result.data.data.psn_no,
|
|
|
- exam_ccls:result.data.data.psn_no,
|
|
|
- certificate_type:result.data.data.psn_no,
|
|
|
- birthday:result.data.data.psn_no,
|
|
|
+ psn_no:result.data.data.output.psn_no,
|
|
|
+ emp_no:result.data.data.output.emp_no,
|
|
|
+ emp_name:result.data.data.output.emp_name,
|
|
|
+ certno:result.data.data.output.certno,
|
|
|
+ psn_name:result.data.data.output.psn_name,
|
|
|
+ gend:result.data.data.output.gend,
|
|
|
+ age:result.data.data.output.age,
|
|
|
+ psn_type:result.data.data.output.psn_type,
|
|
|
+ insu_admdvs:result.data.data.output.insu_admdvs,
|
|
|
+ inhosp_stas:result.data.data.output.inhosp_stas,
|
|
|
+ trt_chk_rslt:result.data.data.output.trt_chk_rslt,
|
|
|
+ exam_ccls:result.data.data.output.exam_ccls,
|
|
|
+ certificate_type:result.data.data.output.certificate_type,
|
|
|
+ birthday:result.data.data.output.birthday,
|
|
|
QualificationId,
|
|
|
injury_part_desc,
|
|
|
visit_type
|
|
|
}),
|
|
|
});
|
|
|
+ const resultTwo = await responseTwo.json();
|
|
|
+ if(!(resultTwo && resultTwo.code === 1)) {
|
|
|
+ ElMessage({
|
|
|
+ message: '本地录入工伤社保卡信息失败',
|
|
|
+ type: 'error',
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
} catch (e) {
|
|
|
ElMessage({
|
|
|
- message: '工伤读社保卡接口异常',
|
|
|
+ message: '本地录入工伤社保卡信息失败',
|
|
|
type: 'error',
|
|
|
duration: 2500,
|
|
|
showClose: true,
|
|
@@ -1061,7 +1071,7 @@ const injurySicard = async () => {
|
|
|
patient.value.mdtrtCertType = 'injurySicard';
|
|
|
patient.value.readCardResult = injurySicardResult.value;
|
|
|
patient.value.readCardBizType = '01103';
|
|
|
- console.log("patient.value111111111111111111111111",patient.value)
|
|
|
+ console.log("patient.value22222222222222222222222222222222222222222",patient.value)
|
|
|
ElMessage({
|
|
|
message: '工伤读社保卡成功',
|
|
|
type: 'success',
|
|
@@ -1211,6 +1221,17 @@ const checkRegisterDatetime = () => {
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
+ if ((patient.value.medType&&((patient.value.medType === 'gs21') || (patient.value.medType === 'gs22') || (patient.value.medType === 'gs23')))) {
|
|
|
+ if(!(zyInYbDiags.value && zyInYbDiags.value.length && zyInYbDiags.value.length > 0)) {
|
|
|
+ ElMessage({
|
|
|
+ message: "医保入院诊断,不能为空!",
|
|
|
+ type: "warning",
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
patient.value.expContent = JSON.stringify(expContent);
|
|
|
submitSiPatientInfo({
|
|
|
patient: patient.value,
|
|
@@ -1337,7 +1358,7 @@ const getPsnInsuinfo = () => {
|
|
|
if (injuryMode.value) {
|
|
|
//employeeInfoInquiry(patient.value).then(res => {
|
|
|
//injuryinfo.value = res;
|
|
|
- injuryinfo.value = [patient.value.readCardResult.data];
|
|
|
+ injuryinfo.value = [patient.value.readCardResult.data.output];
|
|
|
showPsnInsuinfo.value = true;
|
|
|
//});
|
|
|
} else {
|
|
@@ -1375,21 +1396,142 @@ const handleClickInjuryinfo = row => {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
})
|
|
|
- .then(() => {
|
|
|
- row.patNo = patient.value.inpatientNo;
|
|
|
- row.times = patient.value.admissTimes;
|
|
|
- row.ledgerSn = patient.value.ledgerSn;
|
|
|
- row.aka130 = "42";
|
|
|
- row.bka003 = "420";
|
|
|
- inpatientRegister(row).then(res => {
|
|
|
+ .then(async () => {
|
|
|
+ // 解析 exam_ccls 字段
|
|
|
+ let QualificationId = '';
|
|
|
+ let injury_part_desc = '';
|
|
|
+ let visit_type = '';
|
|
|
+ if (patient.value.readCardResult.data.output.exam_ccls) {
|
|
|
+ // 格式:^工伤医疗费资格审核信息ID|受伤部位信息描述|就诊类型^
|
|
|
+ const match = patient.value.readCardResult.data.output.exam_ccls.match(/^\^?(.*?)\|(.*?)\|(.*?)\^?$/);
|
|
|
+ if (match) {
|
|
|
+ QualificationId = match[1];
|
|
|
+ injury_part_desc = match[2];
|
|
|
+ visit_type = match[3];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ const businessParams = {
|
|
|
+ ipt_otp_no: patient.value.inpatientNo + '_' + patient.value.admissTimes,
|
|
|
+ med_type: patient.value.medType,
|
|
|
+ adm_time: getCurrentDateTimeStr(),
|
|
|
+ adm_diag_dscr: zyInYbDiags.value && zyInYbDiags.value.length && (zyInYbDiags.value.length > 0) && zyInYbDiags.value[0] && zyInYbDiags.value[0].icdCode ? zyInYbDiags.value[0].icdCode : '',
|
|
|
+ wardarea_name: patient.value.admissWardName,
|
|
|
+ adm_dept_codg: patient.value.admissWard,
|
|
|
+ adm_bed: patient.value.bedNo,
|
|
|
+ atddr_no: patient.value.admissPhysician,
|
|
|
+ tel: patient.value.contactPhone,
|
|
|
+ psn_no: patient.value.readCardResult.data.output.psn_no,
|
|
|
+ ipt_no: patient.value.inpatientNo,
|
|
|
+ qualification_id: QualificationId
|
|
|
+ }
|
|
|
+ const params = {
|
|
|
+ "action": "transaction",
|
|
|
+ "transactionName": "RegisterPatient",
|
|
|
+ "businessParams": businessParams
|
|
|
+ }
|
|
|
+ console.log("params22222222222222222222222222222222222222222222222222",params)
|
|
|
+ try {
|
|
|
+ const response = await fetch('http://130.150.161.72:9206/thyy/api/public/injury/workinjury', {
|
|
|
+ method: 'POST',
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'application/json',
|
|
|
+ },
|
|
|
+ body: JSON.stringify(params),
|
|
|
+ });
|
|
|
+ const result = await response.json();
|
|
|
+ // 你可以根据 result 做后续处理
|
|
|
+ if (result && result.code === 1 && result.data && result.data.code === 200 && result.data.data.infcode == '0') {
|
|
|
+ //调用addWorkInjuryInterfaceLog接口
|
|
|
+ try {
|
|
|
+ const responseTwo = await fetch('http://130.150.161.72:9206/thyy/api/public/injury/addWorkInjuryInterfaceLog', {
|
|
|
+ method: 'POST',
|
|
|
+ headers: {
|
|
|
+ 'Content-Type': 'application/json',
|
|
|
+ },
|
|
|
+ body: JSON.stringify({
|
|
|
+ inpatient_no:patient.value.inpatientNo,
|
|
|
+ admiss_times:patient.value.admissTimes,
|
|
|
+ ledger_sn:patient.value.ledger_sn,
|
|
|
+ infno:result.data.transformed_parameters.infno,
|
|
|
+ msgid:result.data.transformed_parameters.msgid,
|
|
|
+ recer_sys_code:result.data.transformed_parameters.recer_sys_code,
|
|
|
+ infver:result.data.transformed_parameters.infver,
|
|
|
+ opter_type:result.data.transformed_parameters.opter_type,
|
|
|
+ opter:result.data.transformed_parameters.opter,
|
|
|
+ opter_name:result.data.transformed_parameters.opter_name,
|
|
|
+ inf_time:result.data.transformed_parameters.inf_time,
|
|
|
+ fixmedins_code:result.data.transformed_parameters.fixmedins_code,
|
|
|
+ sign_no:result.data.transformed_parameters.sign_no,
|
|
|
+ idfi_mode:result.data.transformed_parameters.idfi_mode,
|
|
|
+ input:result.data.transformed_parameters.input,
|
|
|
+ qrcode_info:result.data.transformed_parameters.qrcode_info,
|
|
|
+ infcode:result.data.data.infcode,
|
|
|
+ inf_refmsgid:result.data.data.inf_refmsgid,
|
|
|
+ refmsg_time:result.data.data.refmsg_time,
|
|
|
+ respond_time:result.data.data.respond_time,
|
|
|
+ err_msg:result.data.data.err_msg,
|
|
|
+ warn_msg:result.data.data.warn_msg,
|
|
|
+ output:result.data.data.output
|
|
|
+ }),
|
|
|
+ });
|
|
|
+ const resultTwo = await responseTwo.json();
|
|
|
+ if(resultTwo && resultTwo.code === 1) {
|
|
|
+ ElMessage({
|
|
|
+ message: '工伤入院登记成功',
|
|
|
+ type: 'success',
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ }else {
|
|
|
+ ElMessage({
|
|
|
+ message: '本地工伤入院登记接口异常,需要你进行冲正处理了',
|
|
|
+ type: 'error',
|
|
|
+ duration: 10000,
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ } catch (e) {
|
|
|
+ ElMessage({
|
|
|
+ message: '本地工伤入院登记接口异常,需要你进行冲正处理了',
|
|
|
+ type: 'error',
|
|
|
+ duration: 10000,
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ ElMessage({
|
|
|
+ message: result.message || '工伤入院登记失败',
|
|
|
+ type: 'error',
|
|
|
+ duration: 2500,
|
|
|
+ showClose: true,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } catch (e) {
|
|
|
ElMessage({
|
|
|
- message: "审核已通过,医保入院登记成功。",
|
|
|
- type: "success",
|
|
|
+ message: '工伤入院登记接口异常',
|
|
|
+ type: 'error',
|
|
|
duration: 2500,
|
|
|
showClose: true,
|
|
|
});
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ //row.patNo = patient.value.inpatientNo;
|
|
|
+ //row.times = patient.value.admissTimes;
|
|
|
+ //row.ledgerSn = patient.value.ledgerSn;
|
|
|
+ //row.aka130 = "42";
|
|
|
+ //row.bka003 = "420";
|
|
|
+ //inpatientRegister(row).then(res => {
|
|
|
+ // ElMessage({
|
|
|
+ // message: "审核已通过,医保入院登记成功。",
|
|
|
+ // type: "success",
|
|
|
+ // duration: 2500,
|
|
|
+ //// showClose: true,
|
|
|
+ // });
|
|
|
showPsnInsuinfo.value = false;
|
|
|
- });
|
|
|
+ //});
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
};
|
|
@@ -1557,6 +1699,20 @@ function formatCertType(val) {
|
|
|
return map[val] || val || '';
|
|
|
}
|
|
|
|
|
|
+// 获取当前时间,格式为YYYYMMDDHH24MISS
|
|
|
+function getCurrentDateTimeStr() {
|
|
|
+ const now = new Date();
|
|
|
+ const pad = (n) => n < 10 ? '0' + n : n;
|
|
|
+ return (
|
|
|
+ now.getFullYear().toString() +
|
|
|
+ pad(now.getMonth() + 1) +
|
|
|
+ pad(now.getDate()) +
|
|
|
+ pad(now.getHours()) +
|
|
|
+ pad(now.getMinutes()) +
|
|
|
+ pad(now.getSeconds())
|
|
|
+ );
|
|
|
+}
|
|
|
+
|
|
|
onMounted(() => {
|
|
|
getPsnCertTypes().then(res => {
|
|
|
psnCertTypes.value = res;
|