lenovodn 2 lat temu
rodzic
commit
1b31fb60e5

+ 1 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/mapper/AfterwardsAuditMapper.java

@@ -88,6 +88,7 @@ public interface AfterwardsAuditMapper extends BaseMapper<AfterwardsAudit> {
      * @return
      */
     List<PatientInfoResponse> loadInpatientSettlementInfo(@Param("id") Integer id);
+    List<PatientInfoResponse> loadOutpatientSettlementInfo(@Param("id") Integer id);
 
     /**
      * 事后结算工单id,查询医保明细

+ 20 - 1
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/mapper/xml/AfterwardsAuditMapper.xml

@@ -298,7 +298,7 @@
             a.patient_name AS patientName, -- 患者姓名
             a.patient_id AS personalCode, -- 个人编码
             a.treatment_type,
-            a.hisid, -- 结算单据号
+            mab.hisid, -- 结算单据号
             mab.medfee_sumamt AS totalAmount -- 总发生金额
         FROM
             afterwards_audit AS a
@@ -307,6 +307,25 @@
             a.id = #{id, jdbcType=INTEGER}
 
     </select>
+
+    <select id="loadOutpatientSettlementInfo" resultType="org.jeecg.modules.medical.common.bo.PatientInfoResponse">
+        SELECT
+            a.id,
+            a.outpatient_number AS admissionNumber, -- 住院号
+            a.patient_name AS patientName, -- 患者姓名
+            a.patient_id AS personalCode, -- 个人编码
+            a.treatment_type,
+            mab.hisid, -- 结算单据号
+            mab.medfee_sumamt AS totalAmount -- 总发生金额
+        FROM
+            afterwards_audit AS a
+                LEFT JOIN outpatient_settle_bill AS mab ON mab.hisid = a.hisid
+        WHERE
+            a.id = #{id, jdbcType=INTEGER}
+
+    </select>
+
+
     <select id="loadMedicalInsuranceProjectDetails"
             resultType="org.jeecg.modules.medical.common.bo.MedicalInsuranceProjectDetailsResponse">
         SELECT

+ 1 - 0
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/medical/service/impl/AfterwardsAuditServiceImpl.java

@@ -594,6 +594,7 @@ public class AfterwardsAuditServiceImpl extends ServiceImpl<AfterwardsAuditMappe
         IPage<MedicalInsuranceProjectDetailsResponse> medicalInsuranceProjects = new Page<>();
         if(patientInfo.get(0).getTreatmentType().equals("2")){
             //门诊
+            patientInfo = baseMapper.loadOutpatientSettlementInfo(id);
             medicalInsuranceProjects = baseMapper.loadMedicalOutpatientProjectDetails(page, hisid);
         }else{
             medicalInsuranceProjects = baseMapper.loadMedicalInsuranceProjectDetails(page, hisid);