lihong 9 сар өмнө
parent
commit
8d11e55f9c
31 өөрчлөгдсөн 328 нэмэгдсэн , 42 устгасан
  1. 37 0
      src/main/java/cn/hnthyy/thmz/Utils/Tools.java
  2. 13 1
      src/main/java/cn/hnthyy/thmz/controller/mz/MzBlRecordController.java
  3. 24 0
      src/main/java/cn/hnthyy/thmz/controller/mz/MzChargeDetailController.java
  4. 1 0
      src/main/java/cn/hnthyy/thmz/controller/mz/WorkspaceConfigController.java
  5. 9 0
      src/main/java/cn/hnthyy/thmz/controller/mz/YpMzFytjController.java
  6. 2 0
      src/main/java/cn/hnthyy/thmz/entity/his/mz/MzBlRecord.java
  7. 4 0
      src/main/java/cn/hnthyy/thmz/entity/his/yp/YpMzFytj.java
  8. 4 0
      src/main/java/cn/hnthyy/thmz/entity/thmz/WorkspaceConfig.java
  9. 7 4
      src/main/java/cn/hnthyy/thmz/mapper/his/mz/MzBlRecordMapper.java
  10. 1 1
      src/main/java/cn/hnthyy/thmz/mapper/his/mz/MzDepositFileMapper.java
  11. 3 3
      src/main/java/cn/hnthyy/thmz/mapper/his/yp/YpMzFytjMapper.java
  12. 1 1
      src/main/java/cn/hnthyy/thmz/mapper/his/yp/YpZdDictMapper.java
  13. 1 1
      src/main/java/cn/hnthyy/thmz/mapper/his/zd/ZdAllergenMapper.java
  14. 7 4
      src/main/java/cn/hnthyy/thmz/mapper/thmz/WorkspaceConfigMapper.java
  15. 8 0
      src/main/java/cn/hnthyy/thmz/service/his/mz/MzChargeDetailService.java
  16. 8 0
      src/main/java/cn/hnthyy/thmz/service/his/yp/YpZdDictService.java
  17. 17 0
      src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzChargeDetailServiceImpl.java
  18. 1 0
      src/main/java/cn/hnthyy/thmz/service/impl/his/yp/YpMzFytjServiceImpl.java
  19. 29 1
      src/main/java/cn/hnthyy/thmz/service/impl/his/yp/YpZdDictServiceImpl.java
  20. 1 1
      src/main/java/cn/hnthyy/thmz/service/impl/his/zd/ZdAllergenServiceImpl.java
  21. 2 0
      src/main/java/cn/hnthyy/thmz/vo/ChargeFeeParamsVo.java
  22. BIN
      src/main/resources/static/images/zydnew.png
  23. 35 4
      src/main/resources/static/js/mz/clinic.js
  24. 12 9
      src/main/resources/static/js/mz/mz_bl_record.js
  25. 6 1
      src/main/resources/static/js/mz/refund_medicine.js
  26. 5 0
      src/main/resources/static/js/mz/repeal_refund_medicine.js
  27. 2 0
      src/main/resources/static/js/mz/west_pharmacy_send.js
  28. 48 10
      src/main/resources/templates/mz/clinic.html
  29. 18 1
      src/main/resources/templates/mz/mz_bl_record.html
  30. 12 0
      src/main/resources/templates/mz/refund_medicine.html
  31. 10 0
      src/main/resources/templates/mz/west_pharmacy_send.html

+ 37 - 0
src/main/java/cn/hnthyy/thmz/Utils/Tools.java

@@ -808,5 +808,42 @@ public class Tools {
     public static void main(String[] args) {
         System.out.println(getAmPmDateDiff(DateUtil.parse("2025-01-14 17:30:00","yyyy-MM-dd HH:mm:ss"),"p"));
     }
+    /**
+     * @description: 获取药品编码
+     * @author: lihong
+     * @date: 2025/2/20 16:10
+     * @param: prescriptionDetail
+     * @return: java.util.List<java.lang.String>
+     **/
+    public static List<String> getYpCodes(String prescriptionDetail) {
+        Map<String,Object> map = (Map<String,Object>) JsonUtil.jsontoObject(prescriptionDetail, Map.class);
+        List<Map<String, Object>> zyPrescription = (List<Map<String, Object>>) map.get("zyPrescription");
+        List<String> codes = new ArrayList<>();
+        putCodes(zyPrescription, codes);
+        Map<String, Object> xyPrescription = (Map<String, Object>) map.get("xyPrescription");
+        List<Map<String, Object>> pyPrescription = (List<Map<String, Object>>)xyPrescription.get("pyPrescription");
+        putCodes(pyPrescription,codes);
+        List<Map<String, Object>> jePrescription = (List<Map<String, Object>>)xyPrescription.get("jePrescription");
+        putCodes(jePrescription,codes);
+        List<Map<String, Object>> mjPrescription = (List<Map<String, Object>>)xyPrescription.get("mjPrescription");
+        putCodes(mjPrescription,codes);
+        List<Map<String, Object>> ycPrescription = (List<Map<String, Object>>)xyPrescription.get("ycPrescription");
+        putCodes(ycPrescription,codes);
+        return codes;
+    }
 
+    private static void putCodes(List<Map<String, Object>> zyPrescription, List<String> codes) {
+        if(CollUtil.isNotEmpty(zyPrescription)){
+            for(Map<String, Object> tempMap :zyPrescription){
+                List<Map<String, Object>> detail = (List<Map<String, Object>>)tempMap.get("detail");
+                for(Map<String, Object> detailMap : detail){
+                    String orderCode = (String)detailMap.get("orderCode");
+                    if(StrUtil.isNotBlank(orderCode)){
+                        String code = orderCode.split("_")[0];
+                        codes.add(code);
+                    }
+                }
+            }
+        }
+    }
 }

+ 13 - 1
src/main/java/cn/hnthyy/thmz/controller/mz/MzBlRecordController.java

@@ -2,14 +2,18 @@ package cn.hnthyy.thmz.controller.mz;
 
 import cn.hnthyy.thmz.Utils.DateUtil;
 import cn.hnthyy.thmz.Utils.TokenUtil;
+import cn.hnthyy.thmz.Utils.Tools;
 import cn.hnthyy.thmz.comment.UserLoginToken;
 import cn.hnthyy.thmz.entity.his.mz.*;
 import cn.hnthyy.thmz.entity.thmz.User;
 import cn.hnthyy.thmz.enums.GenderEnum;
+import cn.hnthyy.thmz.enums.NumberEnum;
 import cn.hnthyy.thmz.service.his.mz.*;
 import cn.hnthyy.thmz.service.his.yp.YpZdDictService;
 import cn.hnthyy.thmz.service.his.zd.ZdAllergenService;
 import cn.hnthyy.thmz.service.his.zd.ZdUnitCodeService;
+import cn.hutool.core.convert.Convert;
+import cn.hutool.core.util.StrUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -50,7 +54,7 @@ public class MzBlRecordController {
      */
     @UserLoginToken
     @RequestMapping(value = "/getMzBlrecord", method = {RequestMethod.GET})
-    public Map<String, Object> getMzBlrecord(@RequestParam("patientId") String patientId, @RequestParam("times") Integer times) {
+    public Map<String, Object> getMzBlrecord(@RequestParam("patientId") String patientId, @RequestParam("times") Integer times,@RequestParam(required = false,value ="type" )Integer type) {
         Map<String, Object> results = new HashMap<>();
         if (StringUtils.isBlank(patientId)) {
             results.put("code", -1);
@@ -69,6 +73,14 @@ public class MzBlRecordController {
                 results.put("message", "查询门诊病历失败,没有对应的门诊病历数据");
                 return results;
             }
+            //1为编辑
+            if(!NumberEnum.ONE.getCode().equals(Convert.toStr(type, ""))){
+                List<String> codes = Tools.getYpCodes(mzBlRecord.getPrescriptionDetail());
+                String healthContent = ypZdDictService.getHealthContent(codes);
+                if(StrUtil.isNotBlank(healthContent)){
+                    mzBlRecord.setEmrJkjy(mzBlRecord.getEmrJkjy()+healthContent);
+                }
+            }
             results.put("code", 0);
             results.put("message", "查询门诊病历成功");
             results.put("mzBlRecord", mzBlRecord);

+ 24 - 0
src/main/java/cn/hnthyy/thmz/controller/mz/MzChargeDetailController.java

@@ -28,6 +28,7 @@ import cn.hnthyy.thmz.entity.thmz.Windows;
 import cn.hnthyy.thmz.enums.ClinicStatusEnum;
 import cn.hnthyy.thmz.enums.GenderEnum;
 import cn.hnthyy.thmz.enums.MzfzStatusEnum;
+import cn.hnthyy.thmz.enums.NumberEnum;
 import cn.hnthyy.thmz.enums.PayMarkEnum;
 import cn.hnthyy.thmz.enums.YesNoEnum;
 import cn.hnthyy.thmz.mapper.his.mz.MzOrderLockMapper;
@@ -1913,6 +1914,25 @@ public class MzChargeDetailController {
             if (mzPrescriptionVo.getMzBlRecord() != null && (StrUtil.isBlank(mzPrescriptionVo.getMzBlRecord().getEmrJkjy()) || mzPrescriptionVo.getMzBlRecord().getEmrJkjy().length() < 10)) {
                 throw new MzException("健康教育为必填且不能少于10个字符!");
             }
+            //一般项目体重,体温等是否必填 0 否 1是
+            String dictVlaue = dictDataService.queryDictVlaue("3.3", "ybxm_flag", "0");
+            if(NumberEnum.ONE.getCode().equals(dictVlaue)){
+                if(mzPrescriptionVo.getMzBlRecord() != null && mzPrescriptionVo.getMzBlRecord().getWeight() == null){
+                    throw new MzException("体重不能为空!");
+                }
+                if(mzPrescriptionVo.getMzBlRecord() != null && mzPrescriptionVo.getMzBlRecord().getTemperature() == null){
+                    throw new MzException("体温不能为空!");
+                }
+                if(mzPrescriptionVo.getMzBlRecord() != null && mzPrescriptionVo.getMzBlRecord().getSphygmus() == null){
+                    throw new MzException("脉搏不能为空!");
+                }
+                if(mzPrescriptionVo.getMzBlRecord() != null && mzPrescriptionVo.getMzBlRecord().getBreathe() == null){
+                    throw new MzException("呼吸不能为空!");
+                }
+                if(mzPrescriptionVo.getMzBlRecord() != null && (mzPrescriptionVo.getMzBlRecord().getPressureHigh() == null || mzPrescriptionVo.getMzBlRecord().getPressureFloor() == null)){
+                    throw new MzException("血压不能为空!");
+                }
+            }
             Clinic insertClinic = mzChargeDetailService.savePrescriptionAndCharge(mzPrescriptionVo, clinic);
             if (insertClinic != null && insertClinic.getId() != null) {
                 resultMap.put("code", 0);
@@ -2006,6 +2026,10 @@ public class MzChargeDetailController {
                     resultMap.put("discountWarningMessage",CollUtil.join(discountWarningMessageList,";"));
                 }
             }
+            String ypHealthEducation = mzChargeDetailService.getYpHealthEducation(mzPrescriptionVo.getMzChargeDetailList());
+            if(StrUtil.isNotBlank(ypHealthEducation)){
+                resultMap.put("ypHealthEducation", ypHealthEducation);
+            }
             resultMap.put("code", 0);
             resultMap.put("data",tempPrescription);
             resultMap.put("message", "计算临时处方的中药,西药,诊疗以及总金额成功");

+ 1 - 0
src/main/java/cn/hnthyy/thmz/controller/mz/WorkspaceConfigController.java

@@ -124,6 +124,7 @@ public class WorkspaceConfigController {
                 workspaceConfig.setCheckboxFlag(YesNoEnum.YES.code);
                 workspaceConfig.setZlPrintFlag(YesNoEnum.NO.code);
                 workspaceConfig.setFzZlFlag(YesNoEnum.NO.code);
+                workspaceConfig.setCrbHistoryFlag(YesNoEnum.NO.code);
             }
             resultMap.put("code", 0);
             resultMap.put("message", "查询当前医生的工作台配置成功");

+ 9 - 0
src/main/java/cn/hnthyy/thmz/controller/mz/YpMzFytjController.java

@@ -185,18 +185,27 @@ public class YpMzFytjController {
             if(StringUtils.isBlank(chargeFeeParamsVo.getSerialNo())){
                 resultMap.put("code", -1);
                 resultMap.put("message", "流水号不能为空");
+                return resultMap;
+            }
+            if(StringUtils.isBlank(chargeFeeParamsVo.getRefundMedicineRemark())){
+                resultMap.put("code", -1);
+                resultMap.put("message", "退药原因不能为空");
+                return resultMap;
             }
             if(StringUtils.isBlank(chargeFeeParamsVo.getGroupNoOut())){
                 resultMap.put("code", -1);
                 resultMap.put("message", "药房编码不能为空");
+                return resultMap;
             }
             if(StringUtils.isBlank(chargeFeeParamsVo.getOrderNo())){
                 resultMap.put("code", -1);
                 resultMap.put("message", "处方号不能为空");
+                return resultMap;
             }
             if(chargeFeeParamsVo.getChargeItemCodeAndDecAmounts()==null || chargeFeeParamsVo.getChargeItemCodeAndDecAmounts().size()==0){
                 resultMap.put("code", -1);
                 resultMap.put("message", "退药记录不能为空");
+                return resultMap;
             }
             User tokenUser = TokenUtil.getUser(httpServletRequest);
             chargeFeeParamsVo.setOpId(tokenUser.getUserIdCode());

+ 2 - 0
src/main/java/cn/hnthyy/thmz/entity/his/mz/MzBlRecord.java

@@ -73,6 +73,8 @@ public class MzBlRecord extends PageBean {
     private String personalHistory;
     //辅助资料
     private String fzZl;
+    //传染病史
+    private String crbHistory;
     //家族史
     private String familyHistory;
     //婚育史

+ 4 - 0
src/main/java/cn/hnthyy/thmz/entity/his/yp/YpMzFytj.java

@@ -69,6 +69,10 @@ public class YpMzFytj implements Serializable {
      * 标识:1已发药 2.待退药 3.已退药
      */
     private Integer confirmFlag;
+    /**
+     * 退药原因 refund_medicine_remark
+     */
+    private String refundMedicineRemark;
     //草药副数
     private Integer cyFy;
     //申请科室

+ 4 - 0
src/main/java/cn/hnthyy/thmz/entity/thmz/WorkspaceConfig.java

@@ -53,6 +53,10 @@ public class WorkspaceConfig  implements Serializable {
 	 * 辅助资料 是否展示  0 展示 1 不展示
 	 */
 	private Integer fzZlFlag;
+	/**
+	 * 传染病史 是否展示  0 展示 1 不展示
+	 */
+	private Integer crbHistoryFlag;
 
 	/**
 	 * 婚育史 是否展示  0 展示 1 不展示

+ 7 - 4
src/main/java/cn/hnthyy/thmz/mapper/his/mz/MzBlRecordMapper.java

@@ -12,12 +12,12 @@ import java.util.Map;
 public interface MzBlRecordMapper {
     @Insert("insert into mz_bl_record(patient_id,times,emr_no,emr_type,visit_date,doctor_code,dept_code,first_or_not,emr_chief_complaint,emr_hpi,emr_ps,emr_pe,emr_fzjc," +
             "emr_process,emr_xyy,emr_yypg,emr_gnpg,emr_jkjy,personal_history,family_history,obsterical_history,weight,temperature,sphygmus,breathe,pressure_high," +
-            "pressure_floor,pressure_high_left,pressure_floor_left,tentative_diagnosis,prescription_detail,fz_zl) VALUES (#{patientId,jdbcType=CHAR}," +
+            "pressure_floor,pressure_high_left,pressure_floor_left,tentative_diagnosis,prescription_detail,fz_zl,crb_history) VALUES (#{patientId,jdbcType=CHAR}," +
             "#{times,jdbcType=INTEGER},#{emrNo,jdbcType=VARCHAR},#{emrType,jdbcType=CHAR},#{visitDate,jdbcType=TIMESTAMP},#{doctorCode,jdbcType=CHAR}," +
             "#{deptCode,jdbcType=VARCHAR},#{firstOrNot,jdbcType=CHAR},#{emrChiefComplaint,jdbcType=VARCHAR},#{emrHpi,jdbcType=VARCHAR},#{emrPs,jdbcType=VARCHAR}," +
             "#{emrPe,jdbcType=VARCHAR},#{emrFzjc,jdbcType=VARCHAR},#{emrProcess,jdbcType=VARCHAR},#{emrXyy,jdbcType=VARCHAR},#{emrYypg,jdbcType=VARCHAR}," +
             "#{emrGnpg,jdbcType=VARCHAR},#{emrJkjy,jdbcType=VARCHAR},#{personalHistory},#{familyHistory},#{obstericalHistory},#{weight},#{temperature},#{sphygmus}" +
-            ",#{breathe},#{pressureHigh},#{pressureFloor},#{pressureHighLeft},#{pressureFloorLeft},#{tentativeDiagnosis},#{prescriptionDetail},#{fzZl})")
+            ",#{breathe},#{pressureHigh},#{pressureFloor},#{pressureHighLeft},#{pressureFloorLeft},#{tentativeDiagnosis},#{prescriptionDetail},#{fzZl},#{crbHistory})")
     int insertMzBlRecord(MzBlRecord mzBlRecord);
 
 
@@ -39,7 +39,7 @@ public interface MzBlRecordMapper {
      */
     @Select("select patient_id,times,emr_no,emr_type,visit_date,doctor_code,dept_code,first_or_not,emr_chief_complaint," +
             "emr_hpi,emr_ps,emr_pe,emr_fzjc,emr_process,emr_xyy,emr_yypg,emr_gnpg,emr_jkjy,personal_history,family_history," +
-            "obsterical_history,weight,temperature,sphygmus,breathe,pressure_high,pressure_floor,pressure_high_left,pressure_floor_left,tentative_diagnosis,prescription_detail,fz_zl " +
+            "obsterical_history,weight,temperature,sphygmus,breathe,pressure_high,pressure_floor,pressure_high_left,pressure_floor_left,tentative_diagnosis,prescription_detail,fz_zl,crb_history " +
             " from mz_bl_record WITH(NOLOCK) where patient_id= #{patientId,jdbcType=VARCHAR} and times =#{times}")
     MzBlRecord selectMzBlRecordByPatientIdAndTimes(@Param("patientId") String patientId,@Param("times") Integer times);
 
@@ -121,7 +121,7 @@ public interface MzBlRecordMapper {
     @Select({"<script>",
             "select top ${pageSize} patient_id,times,emr_no,emr_type,visit_date,doctor_code,dept_code,first_or_not,emr_chief_complaint,",
             "emr_hpi,emr_ps,emr_pe,emr_fzjc,emr_process,emr_xyy,emr_yypg,emr_gnpg,emr_jkjy,personal_history,family_history," ,
-                    "obsterical_history,weight,temperature,sphygmus,breathe,pressure_high,pressure_floor,pressure_high_left,pressure_floor_left,tentative_diagnosis,prescription_detail,fz_zl " ,
+                    "obsterical_history,weight,temperature,sphygmus,breathe,pressure_high,pressure_floor,pressure_high_left,pressure_floor_left,tentative_diagnosis,prescription_detail,fz_zl,crb_history " ,
             " FROM (SELECT ROW_NUMBER() OVER (ORDER BY mz_bl_record_page.visit_date desc) AS RowNumber,",
             "* from dbo.mz_bl_record mz_bl_record_page WITH(NOLOCK) where 1=1 ",
             "<when test='patientIds!=null'>",
@@ -218,6 +218,9 @@ public interface MzBlRecordMapper {
             "<when test='fzZl!=null'>",
             ",fz_zl =#{fzZl}",
             "</when>",
+            "<when test='crbHistory!=null'>",
+            ",crb_history =#{crbHistory}",
+            "</when>",
             "</trim>"
             , "</script>"})
     int updateMzBlRecordEmrProcess(MzBlRecord mzBlRecord);

+ 1 - 1
src/main/java/cn/hnthyy/thmz/mapper/his/mz/MzDepositFileMapper.java

@@ -245,7 +245,7 @@ public interface MzDepositFileMapper {
             "SELECT top ${pageSize} rtrim(patient_id) patient_id,times,receipt_no,rtrim(pay_mark) pay_mark,rtrim(cheque_type) cheque_type,rtrim(cheque_no) cheque_no,",
             "amount,charge_date,dcount_date,rtrim(dcount_no) dcount_no,rtrim(op_id) op_id,receipt_sn,serial_no,rtrim(responce_type) responce_type,yb_jlh,yb_ywh,dept_no,",
             "psordnum,agtordnum,hisrefundnum,contract_id,par_channel,trans_date,trace_no FROM (SELECT ROW_NUMBER() OVER (ORDER BY mz_deposit_file_page.${orderByCase} desc) ",
-            "AS RowNumber,* from ${tableName} mz_deposit_file_page WITH(NOLOCK) where 1=1 ",
+            "AS RowNumber,* from ${tableName} mz_deposit_file_page WITH(NOLOCK) where pay_mark != '2' ",
             "<when test='patientId!=null'>",
             " and patient_id =#{patientId}",
             "</when>",

+ 3 - 3
src/main/java/cn/hnthyy/thmz/mapper/his/yp/YpMzFytjMapper.java

@@ -61,14 +61,14 @@ public interface YpMzFytjMapper {
      */
     @Insert("INSERT INTO yp_mz_fytj(patient_id,times,receipt_no,order_no,item_no,charge_item_code,bill_item_code,quantity,unit_price,pay_mark,serial,charge_item_type,country_flag," +
             "drug_flag,serial_no,name,charge_date,group_no,confirm_time,input_id,input_time,drugname,specification,confirm_name,confirm_id,doctor_id,doctor_name,confirm_flag,cy_fy," +
-            "warn_dept,windows_no,win_no,input_date,group_no_out,response_type,self_flag,real_no) " +
+            "warn_dept,windows_no,win_no,input_date,group_no_out,response_type,self_flag,real_no,refund_medicine_remark) " +
             "VALUES(#{patientId,jdbcType=CHAR},#{times,jdbcType=INTEGER},#{receiptNo,jdbcType=SMALLINT},#{orderNo,jdbcType=TINYINT},#{itemNo,jdbcType=TINYINT}," +
             "#{chargeItemCode,jdbcType=CHAR},#{billItemCode,jdbcType=CHAR},#{quantity,jdbcType=DOUBLE},#{unitPrice,jdbcType=DECIMAL},#{payMark,jdbcType=CHAR}," +
             "#{serial,jdbcType=CHAR},#{chargeItemType,jdbcType=CHAR},#{countryFlag,jdbcType=CHAR},#{drugFlag,jdbcType=CHAR},#{serialNo,jdbcType=INTEGER},#{name,jdbcType=CHAR}," +
             "#{chargeDate,jdbcType=TIMESTAMP},#{groupNo,jdbcType=CHAR},#{confirmTime,jdbcType=TIMESTAMP},#{inputId,jdbcType=CHAR},#{inputTime,jdbcType=TIMESTAMP}," +
             "#{drugname,jdbcType=VARCHAR},#{specification,jdbcType=VARCHAR},#{confirmName,jdbcType=VARCHAR},#{confirmId,jdbcType=VARCHAR},#{doctorId,jdbcType=CHAR}," +
             "#{doctorName,jdbcType=VARCHAR},#{confirmFlag,jdbcType=INTEGER},#{cyFy,jdbcType=INTEGER},#{warnDept,jdbcType=CHAR},#{windowsNo,jdbcType=CHAR},#{winNo,jdbcType=CHAR}," +
-            "#{inputDate,jdbcType=TIMESTAMP},#{groupNoOut,jdbcType=CHAR},#{responseType,jdbcType=CHAR},#{selfFlag,jdbcType=CHAR},#{realNo,jdbcType=INTEGER})")
+            "#{inputDate,jdbcType=TIMESTAMP},#{groupNoOut,jdbcType=CHAR},#{responseType,jdbcType=CHAR},#{selfFlag,jdbcType=CHAR},#{realNo,jdbcType=INTEGER},#{refundMedicineRemark,jdbcType=VARCHAR})")
     int insertYpMzFytj(YpMzFytj ypMzFytj);
 
 
@@ -183,7 +183,7 @@ public interface YpMzFytjMapper {
      * @return
      */
     @Select({"<script>",
-            "select DISTINCT rtrim(patient_id) patient_id,times,receipt_no,order_no,rtrim(name) name,input_time,rtrim(group_no) group_no,confirm_time,rtrim(doctor_id) doctor_id,rtrim(doctor_name) doctor_name,real_no,manu_no from yp_mz_fytj WITH(NOLOCK) where receipt_no <![CDATA[<]]> 0 and confirm_flag =2 ",
+            "select DISTINCT rtrim(patient_id) patient_id,times,receipt_no,order_no,rtrim(name) name,input_time,rtrim(group_no) group_no,confirm_time,rtrim(doctor_id) doctor_id,rtrim(doctor_name) doctor_name,real_no,manu_no,refund_medicine_remark from yp_mz_fytj WITH(NOLOCK) where receipt_no <![CDATA[<]]> 0 and confirm_flag =2 ",
             "<when test='name!=null'>",
             " and name like #{name}",
             "</when>",

+ 1 - 1
src/main/java/cn/hnthyy/thmz/mapper/his/yp/YpZdDictMapper.java

@@ -279,7 +279,7 @@ public interface YpZdDictMapper {
      * @return
      */
     @Select({"<script>",
-            "select rtrim(code) code,rtrim(name) name from  yp_zd_dict WITH(NOLOCK)  ",
+            "select top 50 rtrim(code) code,rtrim(name) name from  yp_zd_dict WITH(NOLOCK)  ",
             "<when test='code!=null'>",
             " where (code like #{code} or name like #{code} or py_code like #{code} or d_code like #{code})",
             "</when>",

+ 1 - 1
src/main/java/cn/hnthyy/thmz/mapper/his/zd/ZdAllergenMapper.java

@@ -15,7 +15,7 @@ public interface ZdAllergenMapper {
      * @return
      */
     @Select({"<script>",
-            "select rtrim(code) code,rtrim(name) name from  zd_allergen WITH(NOLOCK)  ",
+            "select top 50 rtrim(code) code,rtrim(name) name from  zd_allergen WITH(NOLOCK)  ",
             "<when test='code!=null'>",
             " where (code like #{code} or name like #{code} or py_code like #{code} or wb_code like #{code})",
             "</when>",

+ 7 - 4
src/main/java/cn/hnthyy/thmz/mapper/thmz/WorkspaceConfigMapper.java

@@ -10,8 +10,8 @@ public interface WorkspaceConfigMapper {
      * @return
      */
     @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
-    @Insert("insert into t_workspace_config(user_id_code,symptom_flag,emr_hpi_flag,emr_ps_flag,personal_history_flag,family_history_flag,obsterical_history_flag,pressure_left_flag,tentative_diagnosis_flag,checkbox_flag,zl_print_flag,create_id,create_date,update_id,update_date,fz_zl_flag) " +
-            "values(#{userIdCode},#{symptomFlag},#{emrHpiFlag},#{emrPsFlag},#{personalHistoryFlag},#{familyHistoryFlag},#{obstericalHistoryFlag},#{pressureLeftFlag},#{tentativeDiagnosisFlag},#{checkboxFlag},#{zlPrintFlag},#{createId},#{createDate},#{updateId},#{updateDate},#{fzZlFlag})")
+    @Insert("insert into t_workspace_config(user_id_code,symptom_flag,emr_hpi_flag,emr_ps_flag,personal_history_flag,family_history_flag,obsterical_history_flag,pressure_left_flag,tentative_diagnosis_flag,checkbox_flag,zl_print_flag,create_id,create_date,update_id,update_date,fz_zl_flag,crb_history_flag) " +
+            "values(#{userIdCode},#{symptomFlag},#{emrHpiFlag},#{emrPsFlag},#{personalHistoryFlag},#{familyHistoryFlag},#{obstericalHistoryFlag},#{pressureLeftFlag},#{tentativeDiagnosisFlag},#{checkboxFlag},#{zlPrintFlag},#{createId},#{createDate},#{updateId},#{updateDate},#{fzZlFlag},#{crbHistoryFlag})")
     int insert(WorkspaceConfig workspaceConfig);
 
     /**
@@ -19,7 +19,7 @@ public interface WorkspaceConfigMapper {
      * @param id
      * @return
      */
-    @Select("select id,user_id_code,symptom_flag,emr_hpi_flag,emr_ps_flag,personal_history_flag,family_history_flag,obsterical_history_flag,pressure_left_flag,tentative_diagnosis_flag,checkbox_flag,zl_print_flag,create_id,create_date,update_id,update_date,fz_zl_flag from t_workspace_config where id = #{id}")
+    @Select("select id,user_id_code,symptom_flag,emr_hpi_flag,emr_ps_flag,personal_history_flag,family_history_flag,obsterical_history_flag,pressure_left_flag,tentative_diagnosis_flag,checkbox_flag,zl_print_flag,create_id,create_date,update_id,update_date,fz_zl_flag,crb_history_flag from t_workspace_config where id = #{id}")
     WorkspaceConfig selectWorkspaceConfigById(@Param("id") Long id);
 
 
@@ -28,7 +28,7 @@ public interface WorkspaceConfigMapper {
      * @param userIdCode
      * @return
      */
-    @Select("select id,user_id_code,symptom_flag,emr_hpi_flag,emr_ps_flag,personal_history_flag,family_history_flag,obsterical_history_flag,pressure_left_flag,tentative_diagnosis_flag,checkbox_flag,zl_print_flag,create_id,create_date,update_id,update_date,fz_zl_flag from t_workspace_config where user_id_code = #{userIdCode}")
+    @Select("select id,user_id_code,symptom_flag,emr_hpi_flag,emr_ps_flag,personal_history_flag,family_history_flag,obsterical_history_flag,pressure_left_flag,tentative_diagnosis_flag,checkbox_flag,zl_print_flag,create_id,create_date,update_id,update_date,fz_zl_flag,crb_history_flag from t_workspace_config where user_id_code = #{userIdCode}")
     WorkspaceConfig selectWorkspaceConfigByUserIdCode(@Param("userIdCode") String userIdCode);
 
 
@@ -61,6 +61,9 @@ public interface WorkspaceConfigMapper {
             "<when test='fzZlFlag!=null'>",
             ",fz_zl_flag =#{fzZlFlag}",
             "</when>",
+            "<when test='crbHistoryFlag!=null'>",
+            ",crb_history_flag =#{crbHistoryFlag}",
+            "</when>",
             "<when test='pressureLeftFlag!=null'>",
             ",pressure_left_flag =#{pressureLeftFlag}",
             "</when>",

+ 8 - 0
src/main/java/cn/hnthyy/thmz/service/his/mz/MzChargeDetailService.java

@@ -619,4 +619,12 @@ public interface MzChargeDetailService {
      * @return: java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
      **/
     List<Map<String, Object>> getChargeDetailForGuideCard(String patientId, Integer times);
+    /**
+     * @description: 获取药品健康教育
+     * @author: lihong
+     * @date: 2025/2/20 15:09
+     * @param: mzChargeDetailList
+     * @return: java.lang.String
+     **/
+    String getYpHealthEducation(List<MzChargeDetail> mzChargeDetailList);
 }

+ 8 - 0
src/main/java/cn/hnthyy/thmz/service/his/yp/YpZdDictService.java

@@ -115,5 +115,13 @@ public interface YpZdDictService {
      * @Date 2025/2/18 10:50
      */
     int saveDrugHealthFlag(String code, String healthFlag, String healthContent);
+    /**
+     * @description: 获取宣教内容
+     * @author: lihong
+     * @date: 2025/2/20 16:30
+     * @param: ypCodeList
+     * @return: java.lang.String
+     **/
+    String getHealthContent(List<String> ypCodeList);
 
 }

+ 17 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/mz/MzChargeDetailServiceImpl.java

@@ -7471,4 +7471,21 @@ public class MzChargeDetailServiceImpl implements MzChargeDetailService {
         }
         return result;
     }
+
+    /**
+     * @param mzChargeDetailList
+     * @description: 获取药品健康教育
+     * @author: lihong
+     * @date: 2025/2/20 15:09
+     * @param: mzChargeDetailList
+     * @return: java.lang.String
+     */
+    @Override
+    public String getYpHealthEducation(List<MzChargeDetail> mzChargeDetailList) {
+        if(CollUtil.isEmpty(mzChargeDetailList)) return null;
+        List<MzChargeDetail> collect = mzChargeDetailList.stream().filter(item -> !Constants.YJ_GROUP_NO.equals(item.getGroupNo())).collect(Collectors.toList());
+        if(CollUtil.isEmpty(collect)) return null;
+        List<String> ypCodeList = collect.stream().map(MzChargeDetail::getChargeItemCode).collect(Collectors.toList());
+        return ypZdDictService.getHealthContent(ypCodeList);
+    }
 }

+ 1 - 0
src/main/java/cn/hnthyy/thmz/service/impl/his/yp/YpMzFytjServiceImpl.java

@@ -88,6 +88,7 @@ public class YpMzFytjServiceImpl implements YpMzFytjService {
                 newYpMzFytj.setSerialNo(-newYpMzFytj.getSerialNo());
                 newYpMzFytj.setConfirmFlag(ConfirmFlagEnum.PRIENTED.code);
                 newYpMzFytj.setInputId(chargeFeeParamsVo.getOpId());
+                newYpMzFytj.setRefundMedicineRemark(chargeFeeParamsVo.getRefundMedicineRemark());
                 newYpMzFytj.setInputTime(now);
                 ypMzFytjMapper.insertYpMzFytj(newYpMzFytj);
             }

+ 29 - 1
src/main/java/cn/hnthyy/thmz/service/impl/his/yp/YpZdDictServiceImpl.java

@@ -8,12 +8,14 @@ import cn.hnthyy.thmz.entity.his.yp.YpBarInfo;
 import cn.hnthyy.thmz.entity.his.yp.YpBase;
 import cn.hnthyy.thmz.entity.his.yp.YpPrintName;
 import cn.hnthyy.thmz.entity.his.yp.YpZdDict;
+import cn.hnthyy.thmz.enums.NumberEnum;
 import cn.hnthyy.thmz.enums.UnitTypeEnum;
 import cn.hnthyy.thmz.enums.YpTypeNumberEnum;
 import cn.hnthyy.thmz.mapper.his.mz.EmployeeMapper;
 import cn.hnthyy.thmz.mapper.his.yp.*;
 import cn.hnthyy.thmz.service.his.yp.YpZdDictService;
 import cn.hnthyy.thmz.vo.YpZdDictVo;
+import cn.hutool.core.collection.CollUtil;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -27,6 +29,7 @@ import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 @Service
 public class YpZdDictServiceImpl implements YpZdDictService {
@@ -215,7 +218,7 @@ public class YpZdDictServiceImpl implements YpZdDictService {
         if(StringUtils.isBlank(code)){
             code=null;
         }else {
-            code="%"+code+"%";
+            code="%"+code.toUpperCase()+"%";
         }
         return ypZdDictMapper.selectYpZdDictList(code);
     }
@@ -263,4 +266,29 @@ public class YpZdDictServiceImpl implements YpZdDictService {
     public int saveDrugHealthFlag(String code, String healthFlag, String healthContent) {
         return ypZdDictMapper.saveDrugHealthFlag(code, healthFlag, healthContent);
     }
+
+    /**
+     * @param ypCodeList
+     * @description: 获取宣教内容
+     * @author: lihong
+     * @date: 2025/2/20 16:30
+     * @param: ypCodeList
+     * @return: java.lang.String
+     */
+    @Override
+    public String getHealthContent(List<String> ypCodeList) {
+        if(CollUtil.isEmpty(ypCodeList)) return null;
+        List<YpZdDict> ypZdDicts = queryYpZdDictByCodeList(ypCodeList);
+        if(CollUtil.isEmpty(ypZdDicts)) return null;
+        Map<String, List<YpZdDict>> codeMap = ypZdDicts.stream().collect(Collectors.groupingBy(YpZdDict::getCode));
+        String ypHealthEducation = "";
+        for(String code : codeMap.keySet()){
+            List<YpZdDict> ypZdDictList = codeMap.get(code);
+            if(NumberEnum.ONE.getCode().equals(ypZdDictList.get(0).getHealthFlag())){
+                String str = "药品【" + ypZdDictList.get(0).getName() +"】健康教育内容:" + ypZdDictList.get(0).getHealthContent() +";\n";
+                ypHealthEducation += str;
+            }
+        }
+        return ypHealthEducation;
+    }
 }

+ 1 - 1
src/main/java/cn/hnthyy/thmz/service/impl/his/zd/ZdAllergenServiceImpl.java

@@ -21,7 +21,7 @@ public class ZdAllergenServiceImpl implements ZdAllergenService {
         if(StringUtils.isBlank(code)){
             code=null;
         }else {
-            code="%"+code+"%";
+            code="%"+code.toUpperCase()+"%";
         }
         return zdAllergenMapper.selectZdAllergenList(code);
     }

+ 2 - 0
src/main/java/cn/hnthyy/thmz/vo/ChargeFeeParamsVo.java

@@ -34,6 +34,8 @@ public class ChargeFeeParamsVo extends PageBean {
 
     //病人姓名
     private String name;
+    //退药原因
+    private String refundMedicineRemark;
     //病人编号
     private String patientId;
     //收费机制号

BIN
src/main/resources/static/images/zydnew.png


+ 35 - 4
src/main/resources/static/js/mz/clinic.js

@@ -382,7 +382,7 @@ $(function () {
             //     }
             //     console.log("eleId=" + eleId);
             // } else
-            if (id == 'symptom' || id == 'emrHpi' || id == 'emrPs' || id == 'personalHistory' || id == 'familyHistory' || id == 'obstericalHistory' || id == 'otherCheck' || id == 'diagnose' || id == 'tentativeDiagnosis' || id == 'fzZl' ) {
+            if (id == 'symptom' || id == 'emrHpi' || id == 'emrPs' || id == 'personalHistory' || id == 'familyHistory' || id == 'obstericalHistory' || id == 'otherCheck' || id == 'diagnose' || id == 'tentativeDiagnosis' || id == 'fzZl' || id == 'crbHistory' ) {
                 console.log("1id=" + id);
                 if (id != $(customization[customization.length - 1]).attr("target-id")) {
                     var next = $("#" + id + "Flag").next();
@@ -2570,6 +2570,7 @@ function clearWorkSpaceExcludeUser(source) {
         $("#personalHistory").val(null);
         $("#familyHistory").val(null);
         $("#fzZl").val(null);
+        $("#crbHistory").val(null);
         $("#obstericalHistory").val(null);
         $("#weight").val(null);
         $("#temperature").val(null);
@@ -3338,6 +3339,7 @@ function editPrescription(jsonData, type) {
         $("#personalHistory").val(jsonData.mzBlRecord.personalHistory);
         $("#familyHistory").val(jsonData.mzBlRecord.familyHistory);
         $("#fzZl").val(jsonData.mzBlRecord.fzZl);
+        $("#crbHistory").val(jsonData.mzBlRecord.crbHistory);
         $("#obstericalHistory").val(jsonData.mzBlRecord.obstericalHistory);
         if (jsonData.mzBlRecord.weight != null && jsonData.mzBlRecord.weight != 0) {
             $("#weight").val(jsonData.mzBlRecord.weight);
@@ -6694,6 +6696,11 @@ function calculateTotalAmount(needRemoveLastObject) {
                 if(!stringIsBlank(res.discountWarningMessage)){
                     warningMesageSimaple(res.discountWarningMessage)
                 }
+                if(!stringIsBlank(res.ypHealthEducation)){
+                   $("#ypHealthEducation").val(res.ypHealthEducation)
+                }else {
+                    $("#ypHealthEducation").val(null)
+                }
                 $("#totalAmount").html(res.data.amount.toFixed(2));
                 var arrs = $("span.cf_amount");
                 for (var i = 0; i < arrs.length; i++) {
@@ -9689,6 +9696,18 @@ function initWorkspaceConfigForCurrent() {
                     }
                 }
 
+                if (res.data.crbHistoryFlag == 1) {
+                    $("#crbHistoryFlag").removeClass("in").addClass("hide");
+                    if ($("#crbHistoryFlagCheck").parent().hasClass("checked")) {
+                        $("#crbHistoryFlagCheck").parent().parent().click();//当前选中改为不选中
+                    }
+                } else if (res.data.crbHistoryFlag == 0) {
+                    $("#crbHistoryFlag").removeClass("hide").addClass("in");
+                    if (!$("#crbHistoryFlagCheck").parent().hasClass("checked")) {
+                        $("#crbHistoryFlagCheck").parent().parent().click();//当前不选中改为选中
+                    }
+                }
+
                 if (res.data.familyHistoryFlag == 1) {
                     $("#familyHistoryFlag").removeClass("in").addClass("hide");
                     if ($("#familyHistoryFlagCheck").parent().hasClass("checked")) {
@@ -9771,6 +9790,7 @@ function saveWorkspaceConfig() {
     var personalHistoryFlag = $("#personalHistoryFlagCheck").parent().hasClass("checked") == true ? 0 : 1;
     var familyHistoryFlag = $("#familyHistoryFlagCheck").parent().hasClass("checked") == true ? 0 : 1;
     var fzZlFlag = $("#fzZlFlagCheck").parent().hasClass("checked") == true ? 0 : 1;
+    var crbHistoryFlag = $("#crbHistoryFlagCheck").parent().hasClass("checked") == true ? 0 : 1;
     var obstericalHistoryFlag = $("#obstericalHistoryFlagCheck").parent().hasClass("checked") == true ? 0 : 1;
     var pressureLeftFlag = $("#pressureLeftFlagCheck").parent().hasClass("checked") == true ? 0 : 1;
     var tentativeDiagnosisFlag = $("#tentativeDiagnosisFlagCheck").parent().hasClass("checked") == true ? 0 : 1;
@@ -9788,6 +9808,7 @@ function saveWorkspaceConfig() {
             "personalHistoryFlag": personalHistoryFlag,
             "familyHistoryFlag": familyHistoryFlag,
             "fzZlFlag": fzZlFlag,
+            "crbHistoryFlag": crbHistoryFlag,
             "obstericalHistoryFlag": obstericalHistoryFlag,
             "pressureLeftFlag": pressureLeftFlag,
             "tentativeDiagnosisFlag": tentativeDiagnosisFlag,
@@ -9959,6 +9980,7 @@ function getParamsForpPrescription(type) {
         '"personalHistory": "",' +
         '"familyHistory": "",' +
         '"fzZl": "",' +
+        '"crbHistory": "",' +
         '"obstericalHistory": "",' +
         '"weight": "",' +
         '"temperature": "",' +
@@ -10030,6 +10052,7 @@ function getParamsForpPrescription(type) {
     jsonData.mzBlRecord.personalHistory = $("#personalHistory").val();
     jsonData.mzBlRecord.familyHistory = $("#familyHistory").val();
     jsonData.mzBlRecord.fzZl = $("#fzZl").val();
+    jsonData.mzBlRecord.crbHistory = $("#crbHistory").val();
     jsonData.mzBlRecord.obstericalHistory = $("#obstericalHistory").val();
     jsonData.mzBlRecord.weight = $("#weight").val();
     jsonData.mzBlRecord.temperature = $("#temperature").val();
@@ -12391,6 +12414,12 @@ function printBlRecord(patientId, times, printType) {
                 } else {
                     $("#fzZlBlrecord").parent().css("display", "none");
                 }
+                if (mzBlRecord.crbHistory != null && mzBlRecord.crbHistory != "") {
+                    $("#crbHistoryBlrecord").text(mzBlRecord.crbHistory);
+                } else {
+                    $("#crbHistoryBlrecord").text('无');
+                }
+
                 if (mzBlRecord.obstericalHistory != null && mzBlRecord.obstericalHistory != "") {
                     $("#obstericalHistoryBlrecord").text(mzBlRecord.obstericalHistory);
                     $("#obstericalHistoryBlrecord").parent().css("display", "block");
@@ -12409,9 +12438,8 @@ function printBlRecord(patientId, times, printType) {
                         }
                     }
                     $("#zdAllergenBlrecord").text(zdAllergen);
-                    $("#zdAllergenBlrecord").parent().css("display", "block");
                 } else {
-                    $("#zdAllergenBlrecord").parent().css("display", "none");
+                    $("#zdAllergenBlrecord").text('无');
                 }
                 var tz = getTz(mzBlRecord);
                 if (tz != null && tz != "") {
@@ -13314,7 +13342,7 @@ function initCertificateTypeSelect() {
 function showMzBlRecordModal(patientId, times, type) {
     $.ajax({
         type: "GET",
-        url: '/thmz/getMzBlrecord?patientId=' + patientId + '&times=' + times,
+        url: '/thmz/getMzBlrecord?patientId=' + patientId + '&times=' + times+'&type='+type,
         contentType: "application/json;charset=UTF-8",
         dataType: "json",
         headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
@@ -13336,6 +13364,7 @@ function showMzBlRecordModal(patientId, times, type) {
                 $("#editPersonalHistory").val(mzBlRecord.personalHistory == null ? "" : mzBlRecord.personalHistory);
                 $("#editFamilyHistory").val(mzBlRecord.familyHistory == null ? "" : mzBlRecord.familyHistory);
                 $("#editFzZl").val(mzBlRecord.fzZl == null ? "" : mzBlRecord.fzZl);
+                $("#editCrbHistory").val(mzBlRecord.crbHistory == null ? "" : mzBlRecord.crbHistory);
                 $("#editObstericalHistory").val(mzBlRecord.obstericalHistory == null ? "" : mzBlRecord.obstericalHistory);
                 $("#editQtjc").val(mzBlRecord.emrPe == null ? "" : mzBlRecord.emrPe);
                 setSelectedAttr("editZd", mzBlRecord.icdCode, mzBlRecord.icdText);
@@ -13458,6 +13487,7 @@ function clearInput() {
     $("#editPersonalHistory").val(null);
     $("#editFamilyHistory").val(null);
     $("#editFzZl").val(null);
+    $("#editCrbHistory").val(null);
     $("#editObstericalHistory").val(null);
     $("#bl_weight").val(null);
     $("#bl_sphygmus").val(null);
@@ -13547,6 +13577,7 @@ function sendEmrProcess() {
             "personalHistory": $("#editPersonalHistory").val(),
             "familyHistory": $("#editFamilyHistory").val(),
             "fzZl": $("#editFzZl").val(),
+            "crbHistory": $("#editCrbHistory").val(),
             "obstericalHistory": $("#editObstericalHistory").val(),
             "emrPe": $("#editQtjc").val(),
             "weight": $("#bl_weight").val(),

+ 12 - 9
src/main/resources/static/js/mz/mz_bl_record.js

@@ -361,18 +361,19 @@ function printBlRecord(patientId, times, printType) {
                     $("#fzZlBlrecord").parent().css("display", "none");
                 }
 
+                if (mzBlRecord.crbHistory != null && mzBlRecord.crbHistory != "") {
+                    $("#crbHistoryBlrecord").text(mzBlRecord.crbHistory);
+                    $("#crbHistoryBlrecord").parent().css("display", "block");
+                } else {
+                    $("#crbHistoryBlrecord").parent().css("display", "none");
+                }
+
                 if (mzBlRecord.familyHistory != null && mzBlRecord.familyHistory != "") {
                     $("#familyHistoryBlrecord").text(mzBlRecord.familyHistory);
                     $("#familyHistoryBlrecord").parent().css("display", "block");
                 } else {
                     $("#familyHistoryBlrecord").parent().css("display", "none");
                 }
-                if (mzBlRecord.fzZl != null && mzBlRecord.fzZl != "") {
-                    $("#fzZlBlrecord").text(mzBlRecord.fzZl);
-                    $("#fzZlBlrecord").parent().css("display", "block");
-                } else {
-                    $("#fzZlBlrecord").parent().css("display", "none");
-                }
 
                 if (mzBlRecord.obstericalHistory != null && mzBlRecord.obstericalHistory != "") {
                     $("#obstericalHistoryBlrecord").text(mzBlRecord.obstericalHistory);
@@ -392,9 +393,8 @@ function printBlRecord(patientId, times, printType) {
                         }
                     }
                     $("#zdAllergenBlrecord").text(zdAllergen);
-                    $("#zdAllergenBlrecord").parent().css("display", "block");
                 } else {
-                    $("#zdAllergenBlrecord").parent().css("display", "none");
+                    $("#zdAllergenBlrecord").text('无');
                 }
                 var tz = getTz(mzBlRecord);
                 if (tz != null && tz != "") {
@@ -553,7 +553,7 @@ function openMzEmr(patientId, times, type) {
 function showMzBlRecordModal(patientId, times, type) {
     $.ajax({
         type: "GET",
-        url: '/thmz/getMzBlrecord?patientId=' + patientId + '&times=' + times,
+        url: '/thmz/getMzBlrecord?patientId=' + patientId + '&times=' + times+'&type='+type,
         contentType: "application/json;charset=UTF-8",
         dataType: "json",
         headers: {'Accept': 'application/json', 'Authorization': 'Bearer ' + localStorage.getItem("token")},
@@ -574,6 +574,7 @@ function showMzBlRecordModal(patientId, times, type) {
                 $("#editEmrPs").val(mzBlRecord.emrPs == null ? "" : mzBlRecord.emrPs);
                 $("#editPersonalHistory").val(mzBlRecord.personalHistory == null ? "" : mzBlRecord.personalHistory);
                 $("#editFzZl").val(mzBlRecord.fzZl == null ? "" : mzBlRecord.fzZl);
+                $("#editCrbHistory").val(mzBlRecord.crbHistory == null ? "" : mzBlRecord.crbHistory);
                 $("#editFamilyHistory").val(mzBlRecord.familyHistory == null ? "" : mzBlRecord.familyHistory);
                 $("#editObstericalHistory").val(mzBlRecord.obstericalHistory == null ? "" : mzBlRecord.obstericalHistory);
                 $("#editQtjc").val(mzBlRecord.emrPe == null ? "" : mzBlRecord.emrPe);
@@ -922,6 +923,7 @@ function sendEmrProcess() {
             "emrPs": $("#editEmrPs").val(),
             "personalHistory": $("#editPersonalHistory").val(),
             "fzZl": $("#editFzZl").val(),
+            "crbHistory": $("#editCrbHistory").val(),
             "familyHistory": $("#editFamilyHistory").val(),
             "obstericalHistory": $("#editObstericalHistory").val(),
             "emrPe": $("#editQtjc").val(),
@@ -970,6 +972,7 @@ function clearInput() {
     $("#editEmrPs").val(null);
     $("#editPersonalHistory").val(null);
     $("#editFzZl").val(null);
+    $("#editCrbHistory").val(null);
     $("#editFamilyHistory").val(null);
     $("#editObstericalHistory").val(null);
     $("#bl_weight").val(null);

+ 6 - 1
src/main/resources/static/js/mz/refund_medicine.js

@@ -352,11 +352,16 @@ function fitfymx(patientId,times,receiptNo,orderNo,groupNoOut) {
  */
 function saveRefundMedicine() {
     var data= $table.bootstrapTable('getData');
-    var jsonData = JSON.parse('{"serialNo":"","groupNoOut":"","orderNo":"","chargeItemCodeAndDecAmounts":[]}');
+    var jsonData = JSON.parse('{"serialNo":"","groupNoOut":"","orderNo":"","refundMedicineRemark":"","chargeItemCodeAndDecAmounts":[]}');
     if(data!=null){
         jsonData.serialNo = data[0].serial_no;
         jsonData.groupNoOut = data[0].group_no;
         jsonData.orderNo = data[0].order_no;
+        jsonData.refundMedicineRemark = $("#refundMedicineRemark").val();
+        if(!stringNotBlank(jsonData.refundMedicineRemark)){
+            errorMesageSimaple('请选择退药原因')
+            return;
+        }
         for (var i=0;i<data.length;i++){
             var dec_amount=data[i].dec_amount;
             let quantity = data[i].quantity;

+ 5 - 0
src/main/resources/static/js/mz/repeal_refund_medicine.js

@@ -106,6 +106,11 @@ function initRepealRefundListByPatient() {
                     }
                     return "";
                 }
+            }, {
+                field: 'refundMedicineRemark',
+                title: '退药原因',
+                align: "center",
+                valign: 'middle',
             }
         ],
         onClickRow: function (row) {

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

@@ -1920,6 +1920,7 @@ function showMzBlRecordModal(patientId, times, type) {
                 $("#editEmrPs").val(mzBlRecord.emrPs == null ? "" : mzBlRecord.emrPs);
                 $("#editPersonalHistory").val(mzBlRecord.personalHistory == null ? "" : mzBlRecord.personalHistory);
                 $("#editFzZl").val(mzBlRecord.fzZl == null ? "" : mzBlRecord.fzZl);
+                $("#editCrbHistory").val(mzBlRecord.crbHistory == null ? "" : mzBlRecord.crbHistory);
                 $("#editFamilyHistory").val(mzBlRecord.familyHistory == null ? "" : mzBlRecord.familyHistory);
                 $("#editObstericalHistory").val(mzBlRecord.obstericalHistory == null ? "" : mzBlRecord.obstericalHistory);
                 $("#editQtjc").val(mzBlRecord.emrPe == null ? "" : mzBlRecord.emrPe);
@@ -2064,6 +2065,7 @@ function clearInput() {
     $("#editEmrPs").val(null);
     $("#editPersonalHistory").val(null);
     $("#editFzZl").val(null);
+    $("#editCrbHistory").val(null);
     $("#editFamilyHistory").val(null);
     $("#editObstericalHistory").val(null);
     $("#bl_weight").val(null);

+ 48 - 10
src/main/resources/templates/mz/clinic.html

@@ -448,6 +448,10 @@
                         <input id="personalHistory" class="form-control my_label_input"
                                placeholder="请输入" type="text" data-placement="bottom-right">
                     </div>
+                    <div class="item form-group customization" id="crbHistoryFlag" target-id="crbHistory">
+                        <label class="my_label">传染病史:</label>
+                        <textarea id="crbHistory" class="form-control my_label_input" placeholder="请输入"></textarea>
+                    </div>
                     <div class="item form-group customization" id="fzZlFlag" target-id="fzZl">
                         <label class="my_label">辅助资料:</label>
                         <textarea id="fzZl" class="form-control my_label_input" placeholder="请输入"></textarea>
@@ -481,7 +485,7 @@
                         </div>
                     </div>
                     <div class="item form-group customization" target-id="otherCheck" id="zdAllergenFlag">
-                        <label class="my_label">过敏:</label>
+                        <label class="my_label">过敏:</label>
                         <div style="width: calc((100% - 65px)/2);float: left;">
                             <select class="form-control selectpicker show-tick"
                                     title="常规过敏源" data-live-search="true"  multiple
@@ -1550,7 +1554,14 @@
                         <!--   <input id="emrHpi" class="form-control my_label_input"
                                   placeholder="请输入" type="text" data-placement="bottom-right">-->
                         <textarea id="healthEducation" class="form-control my_label_input" placeholder="请输入"
-                                  style="height: 250px;"></textarea>
+                                  style="height: 200px;"></textarea>
+                    </div>
+                    <div class="item form-group" style="margin-top: 5px;">
+                        <label class="my_label">特殊药品健康教育:</label>
+                        <!--   <input id="emrHpi" class="form-control my_label_input"
+                                  placeholder="请输入" type="text" data-placement="bottom-right">-->
+                        <textarea id="ypHealthEducation" class="form-control my_label_input"
+                                  style="height: 100px;" disabled></textarea>
                     </div>
                 </form>
             </div>
@@ -2605,6 +2616,9 @@
                             <label style="padding-left: 0px;" class="col-md-3 col-sm-3 col-xs-3">
                                 <input type="checkbox" class="flat" id="fzZlFlagCheck">&nbsp;&nbsp;辅助资料
                             </label>
+                            <label style="padding-left: 0px;" class="col-md-3 col-sm-3 col-xs-3">
+                                <input type="checkbox" class="flat" id="crbHistoryFlagCheck">&nbsp;&nbsp;传染病史
+                            </label>
                             <label style="padding-left: 0px;" class="col-md-3 col-sm-3 col-xs-3">
                                 <input type="checkbox" class="flat" id="obstericalHistoryFlagCheck">&nbsp;&nbsp;婚育史
                             </label>
@@ -2896,9 +2910,9 @@
                 <div style="float: left;width: 195px;">
                     <div style="margin-bottom: 10px">门&nbsp;诊&nbsp;号:<span id="patientIdGuideCard"></span></div>
                     <div style="margin-bottom: 10px">姓&nbsp;&nbsp;名:<span id="patientNameGuideCard"></span></div>
-                    <div style="margin-bottom: 10px">开嘱医生:<span id="doctorGuideCard"></span></div>
-                    <div style="margin-bottom: 10px">开嘱时间:<span id="patientDateGuideCard"></span></div>
-                    <div>单据金额:<span id="totalAmountGuideCard"></span></div>
+                    <div style="margin-bottom: 10px">接诊医生:<span id="doctorGuideCard"></span></div>
+                    <div style="margin-bottom: 10px">接诊时间:<span id="patientDateGuideCard"></span></div>
+                    <div>缴费金额:<span id="totalAmountGuideCard"></span></div>
                 </div>
                 <div  style="float: left;width: 320px;">
                     <div id="payQrcodeGuideCard" style="float: left;width: 150px;height:150px;text-align: center;padding: 3px">
@@ -2940,11 +2954,18 @@
             </tbody>
         </table>
         <div>
-            <div style="margin-top: 5px;">
-                <div style="float: left;height: 130px;text-align: center">
-                    <img src="/thmz/images/zydnew.png" style="height: 110px;width: 380px"/>
+            <div style="margin-top: 5px;display: flex">
+                <div style="height: 130px;text-align: center;margin-top: 25px">
+                    <img src="/thmz/images/zydnew.png" style="height: 80px;width: 180px;object-fit: cover"/>
+                    <div style="display: inline-block;text-align: center;width: 200px;font-size: 15px;font-weight: bold">
+                        <div style="margin-bottom: 3px">365天无假日医院</div>
+                        <div style="margin-bottom: 3px">如果您满意,请告诉别人</div>
+                        <div style="margin-bottom: 3px">如果您不满意,请告诉我们</div>
+                        <div style="margin-bottom: 3px">24小时帮助/投诉电话:</div>
+                        <div >88518888</div>
+                    </div>
                 </div>
-                <div id="healthEducationCard" style="float: right;width: 130px;height:130px;text-align: center;padding: 3px;margin-right: 3px">
+                <div id="healthEducationCard" style="width: 130px;height:130px;text-align: center;padding: 3px;margin-right: 3px;margin-top: 5px">
 
                 </div>
             </div>
@@ -3209,6 +3230,13 @@
                         <td colspan="7" id="familyHistoryBlrecord"
                             style="border:solid black; border-width:0px 1px 1px 0px; padding-left:10px;"></td>
                     </tr>
+                    <tr>
+                        <td style="border:solid black; border-width:0px 1px 1px 0px; padding-left:10px;min-height: 30px;">
+                            传染病史
+                        </td>
+                        <td colspan="7" id="crbHistoryBlrecord"
+                            style="border:solid black; border-width:0px 1px 1px 0px; padding-left:10px;"></td>
+                    </tr>
                     <tr>
                         <td style="border:solid black; border-width:0px 1px 1px 0px; padding-left:10px;min-height: 30px;">
                             辅助资料
@@ -3225,7 +3253,7 @@
                     </tr>
                     <tr>
                         <td style="border:solid black; border-width:0px 1px 1px 0px; padding-left:10px;min-height: 30px;">
-                            过敏
+                            过敏
                         </td>
                         <td colspan="7" id="zdAllergenBlrecord"
                             style="border:solid black; border-width:0px 1px 1px 0px; padding-left:10px;"></td>
@@ -3953,6 +3981,16 @@
                             </div>
                         </div>
                     </div>
+                    <div class="item form-group thmz_alert">
+                        <div class="col-md-12 col-sm-12 col-xs-12 item">
+                            <label class="control-label col-md-2 col-sm-2 col-xs-12" for="editCrbHistory">传染病史
+                            </label>
+                            <div class="col-md-8 col-sm-8 col-xs-12">
+                                <textarea id="editCrbHistory" class="form-control col-md-7 col-xs-12"
+                                          type="text"></textarea>
+                            </div>
+                        </div>
+                    </div>
                     <div class="item form-group thmz_alert">
                         <div class="col-md-12 col-sm-12 col-xs-12 item">
                             <label class="control-label col-md-2 col-sm-2 col-xs-12" for="editFzZl">辅助资料

+ 18 - 1
src/main/resources/templates/mz/mz_bl_record.html

@@ -122,6 +122,13 @@
                         <td colspan="7" id="personalHistoryBlrecord"
                             style="border:solid black; border-width:0px 1px 1px 0px; padding-left:10px;"></td>
                     </tr>
+                    <tr>
+                        <td style="border:solid black; border-width:0px 1px 1px 0px; padding-left:10px;min-height: 30px;">
+                            传染病史
+                        </td>
+                        <td colspan="7" id="crbHistoryBlrecord"
+                            style="border:solid black; border-width:0px 1px 1px 0px; padding-left:10px;"></td>
+                    </tr>
                     <tr>
                         <td style="border:solid black; border-width:0px 1px 1px 0px; padding-left:10px;min-height: 30px;">
                             辅助资料
@@ -152,7 +159,7 @@
                     <!--</tr>-->
                     <tr>
                         <td style="border:solid black; border-width:0px 1px 1px 0px; padding-left:10px;min-height: 30px;">
-                            过敏
+                            过敏
                         </td>
                         <td colspan="7" id="zdAllergenBlrecord"
                             style="border:solid black; border-width:0px 1px 1px 0px; padding-left:10px;"></td>
@@ -276,6 +283,16 @@
                             </div>
                         </div>
                     </div>
+                    <div class="item form-group thmz_alert">
+                        <div class="col-md-12 col-sm-12 col-xs-12 item">
+                            <label class="control-label col-md-2 col-sm-2 col-xs-12" for="editCrbHistory">传染病史
+                            </label>
+                            <div class="col-md-8 col-sm-8 col-xs-12">
+                                <textarea id="editCrbHistory" class="form-control col-md-7 col-xs-12"
+                                          type="text"></textarea>
+                            </div>
+                        </div>
+                    </div>
                     <div class="item form-group thmz_alert">
                         <div class="col-md-12 col-sm-12 col-xs-12 item">
                             <label class="control-label col-md-2 col-sm-2 col-xs-12" for="editFzZl">辅助资料

+ 12 - 0
src/main/resources/templates/mz/refund_medicine.html

@@ -67,6 +67,18 @@
                     <table id="tb_table"></table>
                 </div>
                 <div class="col-md-6 col-sm-6 col-xs-12">
+                    <label class="control-label col-md-1 col-sm-1 col-xs-12" for="refundMedicineRemark">退药原因
+                    </label>
+                    <div class="col-md-3 col-sm-3 col-xs-12">
+                        <select class="form-control selectpicker show-tick" title="请选择"
+                                id="refundMedicineRemark">
+                            <option value="病人自身原因需要退药">病人自身原因需要退药</option>
+                            <option value="药品不良反应退药">药品不良反应退药</option>
+                            <option value="病情变化不适宜用药">病情变化不适宜用药</option>
+                            <option value="沟通不到位退药">沟通不到位退药</option>
+                            <option value="其他原因">其他原因</option>
+                        </select>
+                    </div>
                     <table id="tb_table_right"></table>
                 </div>
             </div>

+ 10 - 0
src/main/resources/templates/mz/west_pharmacy_send.html

@@ -807,6 +807,16 @@
                             </div>
                         </div>
                     </div>
+                    <div class="item form-group thmz_alert">
+                        <div class="col-md-12 col-sm-12 col-xs-12 item">
+                            <label class="control-label col-md-2 col-sm-2 col-xs-12" for="editCrbHistory">传染病史
+                            </label>
+                            <div class="col-md-8 col-sm-8 col-xs-12">
+                                <textarea id="editCrbHistory" class="form-control col-md-7 col-xs-12"
+                                          type="text" disabled></textarea>
+                            </div>
+                        </div>
+                    </div>
                     <div class="item form-group thmz_alert">
                         <div class="col-md-12 col-sm-12 col-xs-12 item">
                             <label class="control-label col-md-2 col-sm-2 col-xs-12" for="editFzZl">辅助资料