Selaa lähdekoodia

HQMS病案导出

lighter 1 vuosi sitten
vanhempi
commit
e81323c14c

+ 4 - 2
src/main/java/thyyxxk/webserver/controller/inpatient/casefrontsheet/FrontSheetExportController.java

@@ -8,6 +8,7 @@ import thyyxxk.webserver.entity.casefrontsheet.CaseFrontsheetMain;
 import thyyxxk.webserver.entity.casefrontsheet.request.ExportDclRequest;
 import thyyxxk.webserver.entity.casefrontsheet.request.ExportHistorySheets;
 import thyyxxk.webserver.entity.casefrontsheet.response.ExportDclResponse;
+import thyyxxk.webserver.entity.casefrontsheet.response.SheetForHqms;
 import thyyxxk.webserver.service.inpatient.casefrontsheet.CaseFrontSheetExportService;
 import thyyxxk.webserver.utils.ResultVoUtil;
 
@@ -25,8 +26,9 @@ public class FrontSheetExportController {
     }
 
     @GetMapping("/fetchSheets")
-    public ResultVo<List<CaseFrontsheetMain>> fetchSheets(@RequestParam("month") String month) {
-        List<CaseFrontsheetMain> list = service.fetchSheets(month);
+    public ResultVo<List<SheetForHqms>> fetchSheets(@RequestParam("month") String month,
+                                                          @RequestParam("isHqms") boolean isHqms) {
+        List<SheetForHqms> list = service.fetchSheets(month, isHqms);
         if (null == list || list.isEmpty()) {
             return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST);
         }

+ 102 - 1
src/main/java/thyyxxk/webserver/dao/his/inpatient/casefrontsheet/FrontSheetExportDao.java

@@ -8,6 +8,7 @@ import thyyxxk.webserver.entity.casefrontsheet.CaseFrontsheetMain;
 import thyyxxk.webserver.entity.casefrontsheet.CaseFrontsheetSurgery;
 import thyyxxk.webserver.entity.casefrontsheet.response.ExportDclResponse;
 import thyyxxk.webserver.entity.casefrontsheet.response.HistorySheet;
+import thyyxxk.webserver.entity.casefrontsheet.response.SheetForHqms;
 
 import java.util.List;
 
@@ -63,7 +64,107 @@ public interface FrontSheetExportDao {
             "clinicDiagCode=(select top 1 rtrim(code) from zd_icd_code_new where yb_code=clinic_diag_code), " +
             "clinicDiagStr=(select top 1 rtrim(name) from zd_icd_code_new where yb_code=clinic_diag_code) " +
             "from t_case_frontsheet_main where dismiss_date>=#{begin} and dismiss_date<=#{end}")
-    List<CaseFrontsheetMain> fetchSheets(@Param("begin") String begin, @Param("end") String end);
+    List<SheetForHqms> fetchSheets(@Param("begin") String begin, @Param("end") String end);
+
+    @Select("select " +
+            "bah,admiss_times,pay_method=isnull(pay_method,'-'),health_card_no=isnull(health_card_no,'-'), " +
+            "name,sex=isnull(sex,'-'),birth_date,quality_control_date,admiss_date,dismiss_date, " +
+            "age=isnull(age,'-'),country=isnull(country,'-'),age_days=isnull(age_days,'-'), " +
+            "new_born_weight=isnull(new_born_weight,'-'),new_born_admiss_weight=isnull(new_born_admiss_weight,'-'), " +
+            "birth_place=isnull(birth_place,'-'),birth_place_name=isnull(birth_place_name,'-'), " +
+            "native_place=isnull(native_place,'-'),native_place_name=isnull(native_place_name,'-'), " +
+            "nation=isnull(nation,'-'),social_no=isnull(social_no,'-'), " +
+            "occupation=isnull(occupation,'-'),marriage=isnull(marriage,'-'), " +
+            "live_place=isnull(live_place,'-'),phone=isnull(phone,'-'), " +
+            "addr_zip_code=isnull(addr_zip_code,'-'),hk_place=isnull(hk_place,'-'), " +
+            "hk_place_name=isnull(hk_place_name,'-'),hk_zip_code=isnull(hk_zip_code,'-'), " +
+            "unit_name=isnull(unit_name,'-'),unit_place=isnull(unit_place,'-'), " +
+            "unit_phone=isnull(unit_phone,'-'),unit_zip_code=isnull(unit_zip_code,'-'), " +
+            "contact_name=isnull(contact_name,'-'),contact_relation=isnull(contact_relation,'-'), " +
+            "contact_addr=isnull(contact_addr,'-'),contact_addr_name=isnull(contact_addr_name,'-'), " +
+            "contact_phone=isnull(contact_phone,'-'), " +
+            "zy_admiss_way=isnull(zy_admiss_way,'-'),has_surgery=isnull(has_surgery,'-'), " +
+            "admiss_dept=isnull(admiss_dept,'-'), " +
+            "admiss_ward=isnull(admiss_ward,'-'),trans_dept=isnull(trans_dept,'-'), " +
+            "dismiss_dept=isnull(dismiss_dept,'-'), " +
+            "dismiss_ward=isnull(dismiss_ward,'-'),admiss_days=isnull(admiss_days,'-'), " +
+            "hurt_reason_name=isnull(hurt_reason_name,'-'),hurt_reason_code=isnull(hurt_reason_code,'-'), " +
+            "pathologic_diag_str=isnull(pathologic_diag_str,'-'),main_disdiag_status=isnull(main_disdiag_status,'-'), " +
+            "pathologic_diag_code=isnull(pathologic_diag_code,'-'),blh=isnull(blh,'-'),allergy=isnull(allergy,'-'), " +
+            "allergic_medicine=isnull(allergic_medicine,'-'),autopsy=isnull(autopsy,'-'),hbs_ag=isnull(hbs_ag,'-'), " +
+            "hcv_ab=isnull(hcv_ab,'-'),hiv_ab=isnull(hiv_ab,'-'),tp_ab=isnull(tp_ab,'-'), " +
+            "blood_type=isnull(blood_type,'-'),rh=isnull(rh,'-'), " +
+            "dept_leader=isnull(dept_leader,'-'),leader_doctor=isnull(leader_doctor,'-'), " +
+            "main_doctor=isnull(main_doctor,'-'),admiss_doctor=isnull(admiss_doctor,'-'), " +
+            "duty_nurse=isnull(duty_nurse,'-'),study_doctor=isnull(study_doctor,'-'), " +
+            "internship_doctor=isnull(internship_doctor,'-'),coder=isnull(coder,'-'), " +
+            "dept_leader_name=isnull(dept_leader_name,'-'),leader_doctor_name=isnull(leader_doctor_name,'-'), " +
+            "main_doctor_name=isnull(main_doctor_name,'-'),admiss_doctor_name=isnull(admiss_doctor_name,'-'), " +
+            "duty_nurse_name=isnull(duty_nurse_name,'-'),study_doctor_name=isnull(study_doctor_name,'-'), " +
+            "internship_doctor_name=isnull(internship_doctor_name,'-'),coder_name=isnull(coder_name,'-'), " +
+            "quality_control_level=isnull(quality_control_level,'-'),quality_control_doctor=isnull(quality_control_doctor,'-'), " +
+            "quality_control_nurse=isnull(quality_control_nurse,'-'), " +
+            "quality_control_doctor_name=isnull(quality_control_doctor_name,'-'), " +
+            "quality_control_nurse_name=isnull(quality_control_nurse_name,'-'), " +
+            "zy_dismiss_way=isnull(zy_dismiss_way,'-'), " +
+            "dismiss_destination=isnull(dismiss_destination,'-'), " +
+            "admiss_again_in_one_month=isnull(admiss_again_in_one_month,'-'), " +
+            "admiss_again_purpose=isnull(admiss_again_purpose,'-'), " +
+            "coma_days_before_admiss=isnull(coma_days_before_admiss,'-'), " +
+            "coma_hours_before_admiss=isnull(coma_hours_before_admiss,'-'), " +
+            "coma_minutes_before_admiss=isnull(coma_minutes_before_admiss,'-'), " +
+            "coma_days_after_admiss=isnull(coma_days_after_admiss,'-'), " +
+            "coma_hours_after_admiss=isnull(coma_hours_after_admiss,'-'), " +
+            "coma_minutes_after_admiss=isnull(coma_minutes_after_admiss,'-'), " +
+            "total_cost=cast(isnull(total_cost,0) as decimal(16,2)), " +
+            "self_pay=cast(isnull(self_pay,0) as decimal(16,2)), " +
+            "general_medical_service_fee=cast(isnull(general_medical_service_fee,0) as decimal(16,2)), " +
+            "general_treatment_operating_fee=cast(isnull(general_treatment_operating_fee,0) as decimal(16,2)), " +
+            "care_fee=cast(isnull(care_fee,0) as decimal(16,2)),else_fee=cast(isnull(else_fee,0) as decimal(16,2)), " +
+            "pathologic_diag_fee=cast(isnull(pathologic_diag_fee,0) as decimal(16,2)), " +
+            "experiment_diag_fee=cast(isnull(experiment_diag_fee,0) as decimal(16,2)), " +
+            "ct_diag_fee=cast(isnull(ct_diag_fee,0) as decimal(16,2)), " +
+            "clinical_diag_fee=cast(isnull(clinical_diag_fee,0) as decimal(16,2)), " +
+            "not_surgical_fee=cast(isnull(not_surgical_fee,0) as decimal(16,2)), " +
+            "clinical_physical_fee=cast(isnull(clinical_physical_fee,0) as decimal(16,2)), " +
+            "surgical_fee=cast(isnull(surgical_fee,0) as decimal(16,2)), " +
+            "anesthetize_fee=cast(isnull(anesthetize_fee,0) as decimal(16,2)), " +
+            "surgery_fee=cast(isnull(surgery_fee,0) as decimal(16,2)), " +
+            "recover_fee=cast(isnull(recover_fee,0) as decimal(16,2)), " +
+            "tcm_treatment_fee=cast(isnull(tcm_treatment_fee,0) as decimal(16,2)), " +
+            "west_medicine_fee=cast(isnull(west_medicine_fee,0) as decimal(16,2)), " +
+            "chinese_patent_medicine_fee=cast(isnull(chinese_patent_medicine_fee,0) as decimal(16,2)), " +
+            "chinese_herbal_medicine_fee=cast(isnull(chinese_herbal_medicine_fee,0) as decimal(16,2)), " +
+            "blood_fee=cast(isnull(blood_fee,0) as decimal(16,2)), " +
+            "albumin_products_fee=cast(isnull(albumin_products_fee,0) as decimal(16,2)), " +
+            "globulin_products_fee=cast(isnull(globulin_products_fee,0) as decimal(16,2)), " +
+            "coagulation_factor_products_fee=cast(isnull(coagulation_factor_products_fee,0) as decimal(16,2)), " +
+            "cytokine_products_fee=cast(isnull(cytokine_products_fee,0) as decimal(16,2)), " +
+            "cost_of_disposable_medical_materials_for_examination=cast(isnull(cost_of_disposable_medical_materials_for_examination,0) as decimal(16,2)), " +
+            "cost_of_disposable_medical_materials_for_treatment=cast(isnull(cost_of_disposable_medical_materials_for_treatment,0) as decimal(16,2)), " +
+            "cost_of_disposable_medical_materials_for_operation=cast(isnull(cost_of_disposable_medical_materials_for_operation,0) as decimal(16,2)), " +
+            "other_fees=cast(isnull(other_fees,0) as decimal(16,2)), " +
+            "diag_conform1=isnull(diag_conform1,'-'),diag_conform2=isnull(diag_conform2,'-'),diag_conform3=isnull(diag_conform3,'-'), " +
+            "diag_conform4=isnull(diag_conform4,'-'),diag_conform5=isnull(diag_conform5,'-'),rescue_times=isnull(rescue_times,'-'), " +
+            "rescue_success_times=isnull(rescue_success_times,'-'),case_classification=isnull(case_classification,'-'), " +
+            "has_icu=isnull(has_icu,'-'),icu_days=isnull(icu_days,'-'), " +
+            "icu_hours=isnull(icu_hours,'-'),monopathy_management=isnull(monopathy_management,'-'), " +
+            "clinical_pathway_management=isnull(clinical_pathway_management,'-'), " +
+            "drgs_management=isnull(drgs_management,'-'),use_antibiotic=isnull(use_antibiotic,'-'), " +
+            "bacilliculture=isnull(bacilliculture,'-'), " +
+            "statutory_epidemic=isnull(statutory_epidemic,'-'),tumor_level_t=isnull(tumor_level_t,'-'), " +
+            "tumor_level_n=isnull(tumor_level_n,'-'),tumor_level_m=isnull(tumor_level_m,'-'), " +
+            "tumor_level=isnull(tumor_level,'-'),xxe_apgar=isnull(xxe_apgar,'-'),responce_type=isnull(responce_type,'-'), " +
+            "responce_type_name=isnull(responce_type_name,'-'),yb_type=isnull(yb_type,'-'), " +
+            "yb_type_name=isnull(yb_type_name,'-'),treat_type=isnull(treat_type,'-'),treat_type_name=isnull(treat_type_name,'-'), " +
+            "has_infant=isnull(has_infant,'-'),med_type=isnull(med_type,'-'), " +
+            "admiss_dept_code=isnull(admiss_dept_code,'-'),admiss_ward_code=isnull(admiss_ward_code,'-'), " +
+            "trans_dept_code=isnull(trans_dept_code,'-'),dismiss_dept_code=isnull(dismiss_dept_code,'-'), " +
+            "dismiss_ward_code=isnull(dismiss_ward_code,'-'),live_place_combo=isnull(live_place_combo,'-'), " +
+            "clinicDiagCode=(select top 1 rtrim(isnull(code,'-')) from zd_icd_code_new where yb_code=clinic_diag_code), " +
+            "clinicDiagStr=(select top 1 rtrim(isnull(name,'-')) from zd_icd_code_new where yb_code=clinic_diag_code) " +
+            "from t_case_frontsheet_main where dismiss_date>=#{begin} and dismiss_date<=#{end} ")
+    List<SheetForHqms> fetchSheets2(@Param("begin") String begin, @Param("end") String end);
 
     @Select("select no,code,name,admiss_status,dismiss_status from t_case_frontsheet_disdiag where bah=#{bah} and times=#{times}")
     List<CaseFrontsheetDisdiag> fetchDiags(@Param("bah") String bah, @Param("times") int times);

+ 794 - 0
src/main/java/thyyxxk/webserver/entity/casefrontsheet/response/SheetForHqms.java

@@ -0,0 +1,794 @@
+package thyyxxk.webserver.entity.casefrontsheet.response;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+import thyyxxk.webserver.entity.casefrontsheet.CaseFrontsheetDisdiag;
+import thyyxxk.webserver.entity.casefrontsheet.CaseFrontsheetSurgery;
+import thyyxxk.webserver.entity.casefrontsheet.StandardAddressMember;
+
+import java.util.Date;
+import java.util.List;
+
+
+@Data
+public class SheetForHqms {
+    /**
+     * 病案号,和住院号一样
+     */
+    private String bah;
+
+    /**
+     * 住院次数
+     */
+    private Integer admissTimes;
+
+    /**
+     * 医疗付费方式
+     */
+    private String payMethod;
+
+    /**
+     * 健康卡号
+     */
+    private String healthCardNo;
+
+    private String name;
+
+    private String sex;
+
+    /**
+     * 出生日期
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date birthDate;
+
+    private String age;
+
+    /**
+     * 国籍
+     */
+    private String country;
+
+    /**
+     * 出生天数
+     */
+    private String ageDays;
+
+    /**
+     * 新生儿体重
+     */
+    private String newBornWeight;
+
+    /**
+     * 新生儿入院体重
+     */
+    private String newBornAdmissWeight;
+
+    /**
+     * 出生地编码
+     */
+    private String birthPlace;
+
+    /**
+     * 出生地名称
+     */
+    private String birthPlaceName;
+
+    /**
+     * 籍贯编码
+     */
+    private String nativePlace;
+
+    /**
+     * 籍贯名称
+     */
+    private String nativePlaceName;
+
+    /**
+     * 民族
+     */
+    private String nation;
+
+    /**
+     * 身份证
+     */
+    private String socialNo;
+
+    /**
+     * 职业
+     */
+    private String occupation;
+
+    /**
+     * 婚姻情况
+     */
+    private String marriage;
+
+    /**
+     * 三级地址代码
+     * */
+    @TableField(exist = false)
+    private String[] standardAddress;
+
+    /**
+     * 现住址
+     */
+    private String livePlace;
+
+    /**
+     * 住址拼接
+     * */
+    private String livePlaceCombo;
+
+    /**
+     * 手机号
+     */
+    private String phone;
+
+    /**
+     * 居住他邮编
+     */
+    private String addrZipCode;
+
+    /**
+     * 户口地址编码
+     */
+    private String hkPlace;
+
+    /**
+     * 户口地址
+     */
+    private String hkPlaceName;
+
+    /**
+     * 户口地址邮编
+     */
+    private String hkZipCode;
+
+    /**
+     * 工作单位
+     */
+    private String unitName;
+
+    /**
+     * 工作单位地址
+     */
+    private String unitPlace;
+
+    /**
+     * 工作单位电话
+     */
+    private String unitPhone;
+
+    /**
+     * 工作单位邮编
+     */
+    private String unitZipCode;
+
+    /**
+     * 联系人姓名
+     */
+    private String contactName;
+
+    /**
+     * 联系人关系
+     */
+    private String contactRelation;
+
+    /**
+     * 联系人地址
+     */
+    private String contactAddrName;
+
+    /**
+     * 联系人电话
+     */
+    private String contactPhone;
+
+    /**
+     * 联系人地址编码
+     */
+    private String contactAddr;
+
+    /**
+     * 入院方式
+     */
+    private String zyAdmissWay;
+
+    /**
+     * 是否有手术
+     */
+    private String hasSurgery;
+
+    /**
+     * 入院日期
+     */
+    private Date admissDate;
+
+    /**
+     * 入院科室
+     */
+    private String admissDept;
+    private String admissDeptCode;
+
+    /**
+     * 入院病房
+     */
+    private String admissWard;
+    private String admissWardCode;
+
+    /**
+     * 转科科室
+     */
+    private String transDept;
+    private String transDeptCode;
+
+    /**
+     * 出院日期
+     */
+    private Date dismissDate;
+
+    /**
+     * 出院科室
+     */
+    private String dismissDept;
+    private String dismissDeptCode;
+
+    /**
+     * 出院病房
+     */
+    private String dismissWard;
+    private String dismissWardCode;
+
+    /**
+     * 住院天数
+     */
+    private String admissDays;
+
+    /**
+     * 门诊诊断编码
+     */
+    private String clinicDiagCode;
+
+    /**
+     * 是否正确门诊诊断编码(0-否,其他-是)
+     * */
+    @TableField(exist = false)
+    private String validClinicDiag;
+
+    /**
+     * 门诊诊断名称
+     */
+    private String clinicDiagStr;
+
+    /**
+     * 意外伤害名称
+     */
+    private String hurtReasonName;
+
+    /**
+     * 意外伤害编码
+     */
+    private String hurtReasonCode;
+
+    /**
+     * 病理诊断名称
+     */
+    private String pathologicDiagStr;
+
+    /**
+     * 病理诊断编码
+     */
+    private String pathologicDiagCode;
+
+    /**
+     * 病历号
+     */
+    private String blh;
+
+    /**
+     * 是否有过敏
+     */
+    private String allergy;
+
+    /**
+     * 过敏药物
+     */
+    private String allergicMedicine;
+
+    /**
+     * 是否进行过尸检
+     */
+    private String autopsy;
+
+    /**
+     * 输血前四项(HbsAg)
+     */
+    private String hbsAg;
+
+    /**
+     * 输血前四项(HCV-Ab)
+     */
+    private String hcvAb;
+
+    /**
+     * 输血前四项(HIV-Ab)
+     */
+    private String hivAb;
+
+    /**
+     * 输血前四项(TP-Ab)
+     */
+    private String tpAb;
+
+    /**
+     * 血型
+     */
+    private String bloodType;
+
+    /**
+     * Rh
+     */
+    private String rh;
+
+    /**
+     * 科室主任
+     */
+    private String deptLeader;
+
+    /**
+     * 主任(副主任)医师
+     */
+    private String leaderDoctor;
+
+    /**
+     * 主治医师
+     */
+    private String mainDoctor;
+
+    /**
+     * 住院医师
+     */
+    private String admissDoctor;
+
+    /**
+     * 责任护士
+     */
+    private String dutyNurse;
+
+    /**
+     * 进修医师
+     */
+    private String studyDoctor;
+
+    /**
+     * 实习医师
+     */
+    private String internshipDoctor;
+
+    /**
+     * 编码员
+     */
+    private String coder;
+
+    /**
+     * 科室主任姓名
+     */
+    private String deptLeaderName;
+
+    /**
+     * 主任(副主任)医师姓名
+     */
+    private String leaderDoctorName;
+
+    /**
+     * 主治医师姓名
+     */
+    private String mainDoctorName;
+
+    /**
+     * 住院医师姓名
+     */
+    private String admissDoctorName;
+
+    /**
+     * 责任护士姓名
+     */
+    private String dutyNurseName;
+
+    /**
+     * 进修医师姓名
+     */
+    private String studyDoctorName;
+
+    /**
+     * 实习医师姓名
+     */
+    private String internshipDoctorName;
+
+    /**
+     * 编码员姓名
+     */
+    private String coderName;
+
+    /**
+     * 病案质量
+     */
+    private String qualityControlLevel;
+
+    /**
+     * 质控医师
+     */
+    private String qualityControlDoctor;
+
+    /**
+     * 质控护士
+     */
+    private String qualityControlNurse;
+
+    /**
+     * 质控医师姓名
+     */
+    private String qualityControlDoctorName;
+
+    /**
+     * 质控护士姓名
+     */
+    private String qualityControlNurseName;
+
+    /**
+     * 质控日期
+     */
+    @DateTimeFormat(pattern = "yyyy-MM-dd")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private Date qualityControlDate;
+
+    /**
+     * 离院方式
+     */
+    private String zyDismissWay;
+
+    /**
+     * 拟接收医疗机构名称
+     */
+    private String dismissDestination;
+
+    /**
+     * 是否有出院31天内再住院计划
+     */
+    private String admissAgainInOneMonth;
+
+    /**
+     * 出院31天内再住院目的
+     */
+    private String admissAgainPurpose;
+
+    /**
+     * 颅脑损伤患者入院前昏迷时间(天)
+     */
+    private String comaDaysBeforeAdmiss;
+
+    /**
+     * 颅脑损伤患者入院前昏迷时间(小时)
+     */
+    private String comaHoursBeforeAdmiss;
+
+    /**
+     * 颅脑损伤患者入院前昏迷时间(分钟)
+     */
+    private String comaMinutesBeforeAdmiss;
+
+    /**
+     * 颅脑损伤患者入院后昏迷时间(天)
+     */
+    private String comaDaysAfterAdmiss;
+
+    /**
+     * 颅脑损伤患者入院后昏迷时间(小时)
+     */
+    private String comaHoursAfterAdmiss;
+
+    /**
+     * 颅脑损伤患者入院后昏迷时间(分钟)
+     */
+    private String comaMinutesAfterAdmiss;
+
+    /**
+     * 住院总费用
+     */
+    private String totalCost;
+
+    /**
+     * 住院自费金额
+     */
+    private String selfPay;
+
+    /**
+     * 一般医疗服务费
+     */
+    private String generalMedicalServiceFee;
+
+    /**
+     * 一般治疗操作费
+     */
+    private String generalTreatmentOperatingFee;
+
+    /**
+     * 护理费
+     */
+    private String careFee;
+
+    /**
+     * 其他费
+     */
+    private String elseFee;
+
+    /**
+     * 病理诊断费
+     */
+    private String pathologicDiagFee;
+
+    /**
+     * 实验室诊断费
+     */
+    private String experimentDiagFee;
+
+    /**
+     * 影像学诊断费
+     */
+    private String ctDiagFee;
+
+    /**
+     * 临床诊断项目费
+     */
+    private String clinicalDiagFee;
+
+    /**
+     * 非手术治疗项目费
+     */
+    private String notSurgicalFee;
+
+    /**
+     * 临床物理治疗费
+     */
+    private String clinicalPhysicalFee;
+
+    /**
+     * 手术治疗费
+     */
+    private String surgicalFee;
+
+    /**
+     * 麻醉费
+     */
+    private String anesthetizeFee;
+
+    /**
+     * 手术费
+     */
+    private String surgeryFee;
+
+    /**
+     * 康复费
+     */
+    private String recoverFee;
+
+    /**
+     * 中医治疗费
+     */
+    private String tcmTreatmentFee = "0.00";
+
+    /**
+     * 西药费
+     */
+    private String westMedicineFee;
+
+    /**
+     * 中成药费
+     */
+    private String chinesePatentMedicineFee;
+
+    /**
+     * 中草药费
+     */
+    private String chineseHerbalMedicineFee;
+
+    /**
+     * 血费
+     */
+    private String bloodFee;
+
+    /**
+     * 白蛋白类制品费
+     */
+    private String albuminProductsFee;
+
+    /**
+     * 球蛋白类制品费
+     */
+    private String globulinProductsFee;
+
+    /**
+     * 凝血因子类制品费
+     */
+    private String coagulationFactorProductsFee;
+
+    /**
+     * 细胞因子类制品费
+     */
+    private String cytokineProductsFee;
+
+    /**
+     * 检查用一次性医用材料费
+     */
+    private String costOfDisposableMedicalMaterialsForExamination;
+
+    /**
+     * 治疗用一次性医用材料费
+     */
+    private String costOfDisposableMedicalMaterialsForTreatment;
+
+    /**
+     * 手术用一次性医用材料费
+     */
+    private String costOfDisposableMedicalMaterialsForOperation;
+
+    /**
+     * 其他费
+     */
+    private String otherFees;
+
+    /**
+     * 门诊与出院
+     */
+    private String diagConform1;
+
+    /**
+     * 入院与出院
+     */
+    private String diagConform2;
+
+    /**
+     * 术前与术后
+     */
+    private String diagConform3;
+
+    /**
+     * 临床与病理
+     */
+    private String diagConform4;
+
+    /**
+     * 放射与病理
+     */
+    private String diagConform5;
+
+    /**
+     * 抢救次数
+     */
+    private String rescueTimes;
+
+    /**
+     * 抢救成功次数
+     */
+    private String rescueSuccessTimes;
+
+    /**
+     * 病例分型
+     */
+    private String caseClassification;
+
+    /**
+     * 是否实施重症监护
+     */
+    private String hasIcu;
+
+    /**
+     * 重症监护时间(天)
+     */
+    private String icuDays;
+
+    /**
+     * 重症监护时间(小时)
+     */
+    private String icuHours;
+
+    /**
+     * 单病种管理
+     */
+    private String monopathyManagement;
+
+    /**
+     * 临床路径管理
+     */
+    private String clinicalPathwayManagement;
+
+    /**
+     * DRGs管理
+     */
+    private String drgsManagement;
+
+    /**
+     * 抗生素使用(1是 2否)
+     */
+    private String useAntibiotic;
+
+    /**
+     * 细菌培养标本送检(1是 2否)
+     */
+    private String bacilliculture;
+
+    /**
+     * 法定传染病
+     */
+    private String statutoryEpidemic;
+
+    /**
+     * 肿瘤分期(T)
+     */
+    private String tumorLevelT;
+
+    /**
+     * 肿瘤分期(N)
+     */
+    private String tumorLevelN;
+
+    /**
+     * 肿瘤分期(M)
+     */
+    private String tumorLevelM;
+
+    /**
+     * 肿瘤分期
+     */
+    private String tumorLevel;
+
+    /**
+     * 新生儿Apgar评分
+     */
+    private String xxeApgar;
+
+    /**
+     * 医疗类别
+     */
+    private String medType;
+
+    /**
+     * 是否有婴儿
+     */
+    private String hasInfant;
+
+    /**
+     *
+     */
+    private String zkWardCode;
+
+    /**
+     * 出院主诊断治愈好转率
+     * */
+    private String mainDisdiagStatus;
+
+    /**
+     * 诊断列表
+     */
+    @TableField(exist = false)
+    private List<CaseFrontsheetDisdiag> disdiagList;
+
+    /**
+     * 手术列表
+     */
+    @TableField(exist = false)
+    private List<CaseFrontsheetSurgery> surgeryList;
+
+    /**
+     * 医疗类别名称
+     */
+    @TableField(exist = false)
+    private String medTypeName;
+
+    @TableField(exist = false)
+    private StandardAddressMember addressMember;
+}

+ 18 - 8
src/main/java/thyyxxk/webserver/service/inpatient/casefrontsheet/CaseFrontSheetExportService.java

@@ -17,6 +17,7 @@ import thyyxxk.webserver.entity.casefrontsheet.request.ExportDclRequest;
 import thyyxxk.webserver.entity.casefrontsheet.request.ExportHistorySheets;
 import thyyxxk.webserver.entity.casefrontsheet.response.ExportDclResponse;
 import thyyxxk.webserver.entity.casefrontsheet.response.HistorySheet;
+import thyyxxk.webserver.entity.casefrontsheet.response.SheetForHqms;
 import thyyxxk.webserver.entity.dictionary.CodeName;
 import thyyxxk.webserver.entity.login.UserInfo;
 import thyyxxk.webserver.service.redislike.RedisLikeService;
@@ -39,13 +40,14 @@ public class CaseFrontSheetExportService {
         this.redis = redis;
     }
 
-    public List<CaseFrontsheetMain> fetchSheets(String month) {
+    public List<SheetForHqms> fetchSheets(String month, boolean isHqms) {
         String begin = month + "-01 00:00:00.000";
         String end = DateUtil.getMonthEndtime(month);
-        List<CaseFrontsheetMain> list = dao.fetchSheets(begin, end);
-        for (CaseFrontsheetMain sheet : list) {
+        List<SheetForHqms> list =  isHqms ? dao.fetchSheets2(begin, end) : dao.fetchSheets(begin, end);
+        for (SheetForHqms sheet : list) {
             sheet.setSurgicalFee(DecimalUtil.add(sheet.getAnesthetizeFee(), sheet.getSurgeryFee()));
-            sheet.setSurgeryList(selectSurgeries(sheet.getBah(), sheet.getAdmissTimes()));
+            sheet.setSurgeryList(selectSurgeries(sheet.getBah(), sheet.getAdmissTimes(), isHqms));
+            sheet.setDisdiagList(selectDiags(sheet.getBah(), sheet.getAdmissTimes()));
             sheet.setZyDismissWay(DismissWay.getWjwCodeByHisCode(sheet.getZyDismissWay()));
             sheet.setHbsAg(Hbsag.getWjwCodeByHisCode(sheet.getHbsAg()));
             String ntvplc = sheet.getNativePlace().substring(0, 2);
@@ -57,10 +59,8 @@ public class CaseFrontSheetExportService {
             sheet.setZkWardCode(redis.getWjwDepartment(sheet.getZkWardCode()));
             sheet.setDismissDeptCode(redis.getWjwDepartment(sheet.getDismissDeptCode()));
             sheet.setNation(redis.getWjwNation(sheet.getNation()));
-            sheet.setDisdiagList(selectDiags(sheet.getBah(), sheet.getAdmissTimes()));
         }
-        list.removeIf(item -> item.getPathologicDiagStr().contains(",")
-                || item.getClinicDiagStr().contains(",") || item.getDisdiagList().isEmpty());
+        list.removeIf(item -> item.getPathologicDiagStr().contains(",") || item.getDisdiagList().isEmpty());
         return list;
     }
 
@@ -70,7 +70,7 @@ public class CaseFrontSheetExportService {
         return diags;
     }
 
-    private List<CaseFrontsheetSurgery> selectSurgeries(String bah, int times) {
+    private List<CaseFrontsheetSurgery> selectSurgeries(String bah, int times, boolean isHqms) {
         List<CaseFrontsheetSurgery> surgeries = dao.fetchSurgeries(bah, times);
         surgeries.removeIf(item -> StringUtil.isBlank(item.getName()) || item.getName().contains(","));
         for (CaseFrontsheetSurgery s : surgeries) {
@@ -89,6 +89,16 @@ public class CaseFrontSheetExportService {
                 int wjwCutHeal = (cut - 1) * cut + heal + negationCalculatingResidue(cut);
                 s.setWjwCutHeal(wjwCutHeal);
             }
+            if (isHqms) {
+                StringUtil.nullIf(s.getLevel(), "-");
+                StringUtil.nullIf(s.getAssistantOne(), "-");
+                StringUtil.nullIf(s.getAssistantOneName(), "-");
+                StringUtil.nullIf(s.getAssistantTwo(), "-");
+                StringUtil.nullIf(s.getAssistantTwoName(), "-");
+                StringUtil.nullIf(s.getAnaesthesia(), "-");
+                StringUtil.nullIf(s.getAnaesthesiaor(), "-");
+                StringUtil.nullIf(s.getAnaesthesiaorName(), "-");
+            }
         }
         return surgeries;
     }