LIJU 2 周之前
父节点
当前提交
82d1e1a8fe

+ 63 - 0
src/main/java/cn/hnthyy/thmz/controller/mz/MzPharmacyController.java

@@ -435,6 +435,27 @@ public class MzPharmacyController {
                             }
                         }
                         
+                        // 获取患者信息,添加医保接口需要的三个参数
+                        if (StringUtils.isNotBlank(mzChargeDetail.getPatientId())) {
+                            MzPatientMi patientInfo = mzPatientMiService.queryByPatientId(mzChargeDetail.getPatientId());
+                            if (patientInfo != null) {
+                                // 设置患者证件类型(默认身份证)
+                                mzChargeDetail.setPsnCertType(patientInfo.getCertificateType() != null ? 
+                                    patientInfo.getCertificateType() : "01");
+                                // 设置患者证件号码(身份证号)
+                                mzChargeDetail.setCertno(patientInfo.getSocialNo() != null ? 
+                                    patientInfo.getSocialNo() : "");
+                                // 设置患者姓名
+                                mzChargeDetail.setPsnName(patientInfo.getName() != null ? 
+                                    patientInfo.getName() : mzChargeDetail.getName());
+                            } else {
+                                // 如果查询不到患者信息,使用默认值
+                                mzChargeDetail.setPsnCertType("01"); // 默认身份证
+                                mzChargeDetail.setCertno(""); // 空字符串
+                                mzChargeDetail.setPsnName(mzChargeDetail.getName()); // 使用收费明细中的姓名
+                            }
+                        }
+                        
                         // 获取药品相关信息
                         if (StringUtils.isNotBlank(mzChargeDetail.getChargeItemCode())) {
                             // 获取药品字典信息
@@ -491,6 +512,27 @@ public class MzPharmacyController {
                         }
                     }
                     
+                    // 获取患者信息,添加医保接口需要的三个参数
+                    if (StringUtils.isNotBlank(chargeDetailInfoVo.getPatientId())) {
+                        MzPatientMi patientInfo = mzPatientMiService.queryByPatientId(chargeDetailInfoVo.getPatientId());
+                        if (patientInfo != null) {
+                            // 设置患者证件类型(默认身份证)
+                            chargeDetailInfoVo.setPsnCertType(patientInfo.getCertificateType() != null ? 
+                                patientInfo.getCertificateType() : "01");
+                            // 设置患者证件号码(身份证号)
+                            chargeDetailInfoVo.setCertno(patientInfo.getSocialNo() != null ? 
+                                patientInfo.getSocialNo() : "");
+                            // 设置患者姓名
+                            chargeDetailInfoVo.setPsnName(patientInfo.getName() != null ? 
+                                patientInfo.getName() : chargeDetailInfoVo.getName());
+                        } else {
+                            // 如果查询不到患者信息,使用默认值
+                            chargeDetailInfoVo.setPsnCertType("01"); // 默认身份证
+                            chargeDetailInfoVo.setCertno(""); // 空字符串
+                            chargeDetailInfoVo.setPsnName(chargeDetailInfoVo.getName()); // 使用收费明细中的姓名
+                        }
+                    }
+                    
                     // 获取药品相关信息
                     if (StringUtils.isNotBlank(chargeDetailInfoVo.getChargeItemCode())) {
                         // 获取药品字典信息
@@ -595,6 +637,27 @@ public class MzPharmacyController {
                 cfxxList.get(0).setWarnDeptName(warnDeptName);
                 Employee employee = employeeService.queryByUserCode(cfxxList.get(0).getDoctorCode());
                 cfxxList.get(0).setEmployeeName(employee.getEmployeeName());
+                
+                // 获取患者信息,添加医保接口需要的三个参数
+                if (StringUtils.isNotBlank(cfxxList.get(0).getPatientId())) {
+                    MzPatientMi patientInfo = mzPatientMiService.queryByPatientId(cfxxList.get(0).getPatientId());
+                    if (patientInfo != null) {
+                        // 设置患者证件类型(默认身份证)
+                        cfxxList.get(0).setPsnCertType(patientInfo.getCertificateType() != null ? 
+                            patientInfo.getCertificateType() : "01");
+                        // 设置患者证件号码(身份证号)
+                        cfxxList.get(0).setCertno(patientInfo.getSocialNo() != null ? 
+                            patientInfo.getSocialNo() : "");
+                        // 设置患者姓名
+                        cfxxList.get(0).setPsnName(patientInfo.getName() != null ? 
+                            patientInfo.getName() : cfxxList.get(0).getName());
+                    } else {
+                        // 如果查询不到患者信息,使用默认值
+                        cfxxList.get(0).setPsnCertType("01"); // 默认身份证
+                        cfxxList.get(0).setCertno(""); // 空字符串
+                        cfxxList.get(0).setPsnName(cfxxList.get(0).getName()); // 使用收费明细中的姓名
+                    }
+                }
 
                 // 查询门诊病人处方过敏史
                 List<PatientAllergenInfo> patientAllergenInfoList = patientAllergenInfoService.queryPatientAllergenInfoByPatNo(cfxxList.get(0).getPatientId());

+ 8 - 0
src/main/java/cn/hnthyy/thmz/vo/ChargeDetailInfoVo.java

@@ -69,4 +69,12 @@ public class ChargeDetailInfoVo {
     private String serial;
     //就诊结算类型 (1-医保结算 2-自费结算)
     private Integer mdtrtSetlType;
+    
+    // 患者相关参数(医保接口需要)
+    // 人员证件类型
+    private String psnCertType;
+    // 证件号码
+    private String certno;
+    // 人员姓名
+    private String psnName;
 }

+ 8 - 0
src/main/java/cn/hnthyy/thmz/vo/MzSendMedicineVo.java

@@ -141,4 +141,12 @@ public class MzSendMedicineVo implements Serializable {
     private String clFlag;
     //就诊结算类型 (1-医保结算 2-自费结算)
     private Integer mdtrtSetlType;
+    
+    // 患者相关参数(医保接口需要)
+    // 人员证件类型
+    private String psnCertType;
+    // 证件号码
+    private String certno;
+    // 人员姓名
+    private String psnName;
 }

+ 8 - 0
src/main/resources/static/js/mz/west_pharmacy_send.js

@@ -3260,6 +3260,14 @@ function callYbSaleGoodsItem(realNo, orderNo, receiptNo, times, patientId, name,
             // 拆零标志(0-否;1-是)
             trdnFlag: item.clFlag || '0',
             
+            // 患者相关参数(医保接口需要)
+            // 人员证件类型
+            psnCertType: item.psnCertType || '01',
+            // 证件号码
+            certno: item.certno || '',
+            // 人员姓名
+            psnName: item.psnName || item.name || name || '',
+            
         };
         // 追溯码信息
         let drugtracinfo = []