Browse Source

Merge remote-tracking branch 'upstream/master'

hsh 2 years ago
parent
commit
c404771fb0

+ 1 - 1
pom.xml

@@ -10,7 +10,7 @@
     </parent>
     <groupId>thyyxxk</groupId>
     <artifactId>web-server</artifactId>
-    <version>10.11.3</version>
+    <version>10.11.4</version>
     <name>web-server</name>
     <description>server for yibao-web</description>
     <properties>

+ 0 - 1
src/main/java/thyyxxk/webserver/controller/inpatient/XiangMuLuRuController.java

@@ -120,7 +120,6 @@ public class XiangMuLuRuController {
         return service.weiGuiFeiYongFenXi(inpatientNo, execUnit);
     }
 
-
     @GetMapping("/huoQuZhenShuKePiPei")
     public ResultVo<List<ZyDetailCharge>> huoQuZhenShuKePiPei(@RequestParam("inpatientNo") String inpatientNo,
                                                               @RequestParam("admissTimes") Integer admissTimes,

+ 15 - 0
src/main/java/thyyxxk/webserver/dao/his/inpatient/casefrontsheet/CaseFrontSheetDao.java

@@ -239,6 +239,21 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
             "a.bah=#{bah} and a.zycs=#{times}")
     CaseFrontsheetMain getBatjBa2ForOutPatient(@Param("bah") String bah, @Param("times") int times);
 
+    @Select("select c.sheet_column as code,sum(a.charge_fee) as name " +
+            "from zy_detail_charge a,zd_charge_item b,zd_charge_ba_class c " +
+            "where inpatient_no=#{bah} and admiss_times=#{times} " +
+            "and a.charge_code_mx=b.code " +
+            "and b.zd_charge_ba_class=c.code " +
+            "group by c.sheet_column " +
+            "union " +
+            "select case when charge_code='BILL01' then 'westMedicineFee' when charge_code='BILL28' " +
+            "then 'chinesePatentMedicineFee' else 'chineseHerbalMedicineFee' end sheet_column, " +
+            "SUM(charge_fee) as name " +
+            "from zy_detail_charge " +
+            "where inpatient_no=#{bah} and admiss_times=#{times} and charge_code in ('BILL01','BILL02','BILL28') " +
+            "group by charge_code")
+    List<CodeName> selectPatCharges(String bah, int times);
+
     @Select("select no=rtrim(dis_diag_no), name=rtrim(dis_diag_comment), " +
             "code=rtrim(dis_diag), admissStatus=rtrim(admiss_status), " +
             "dismissStatus=rtrim(dis_diag_status) from ba_first_page1 with(nolock) " +

+ 1 - 1
src/main/java/thyyxxk/webserver/dao/his/zhuyuanyisheng/emr/EmrAuditDao.java

@@ -30,7 +30,7 @@ public interface EmrAuditDao {
             "       history " +
             "from emr_audit_detail" +
             " where emr_id = #{id}" +
-            " and history = 0 and final_control = #{finalControl}")
+            " and history = 0 and final_control = #{finalControl} and number_of_defects > 0 ")
     List<EmrAuditDetail> selectedMessage(String id, Integer finalControl);
 
     @Select("select count(1) " +

+ 1 - 1
src/main/java/thyyxxk/webserver/dao/his/zhuyuanyisheng/emr/EmrControlDaoV2.java

@@ -312,7 +312,7 @@ public interface EmrControlDaoV2 {
             "  and history = 0 " +
             "  and b.del_flag = 0 " +
             "  and doctor = #{doctor} " +
-            "  and remediation_status is null;")
+            "  and remediation_status is null and number_of_defects > 0 ;")
     List<EmrAuditDetail> getUnprocessedRecommendationsByDoctor(String doctor);
 
 }

+ 6 - 2
src/main/java/thyyxxk/webserver/service/hospitalizationCosts/HospitalizationCostsService.java

@@ -23,6 +23,9 @@ import thyyxxk.webserver.utils.*;
 import java.math.BigDecimal;
 import java.util.*;
 
+/**
+ * 项目录入退费
+ */
 @Service
 @Slf4j
 public class HospitalizationCostsService {
@@ -180,9 +183,10 @@ public class HospitalizationCostsService {
                     OrderInfo order = orderCacheOnce.get(orderNo, (key) -> dao.selectDrugClassByOrderNo(new BigDecimal(orderNo)));
 
                     if (order == null) {
-                        sb.append("没有查询到原药品对应的医嘱");
+                        if (!"refundOnly".equals(param.getRefundFlag())) {
+                            sb.append("没有查询到原药品对应的医嘱");
+                        }
                     } else {
-
                         if (!"refundOnly".equals(param.getRefundFlag())) {
                             // 口服药无法退费 包装规格是 09,盒,15,瓶 的可以退费
                             if ("1".equals(order.getClassCode())) {

+ 21 - 9
src/main/java/thyyxxk/webserver/service/inpatient/casefrontsheet/CaseFrontSheetMainService.java

@@ -28,6 +28,7 @@ import thyyxxk.webserver.service.zhuyuanyisheng.emr.EmrServer;
 import thyyxxk.webserver.utils.*;
 
 import java.lang.reflect.Field;
+import java.lang.reflect.Method;
 import java.util.*;
 import java.util.concurrent.ConcurrentHashMap;
 
@@ -139,14 +140,14 @@ public class CaseFrontSheetMainService {
      * @return 返回数据
      */
     public ResultVo<GetBasOverviewRet> getOutPatientForBas(GetOutSheet param) {
-        GetBasOverviewRet ret = new GetBasOverviewRet();
+        GetBasOverviewRet response = new GetBasOverviewRet();
         if (StringUtil.notBlank(param.getWard())) {
             int cd = dao.getCDBlfxCount(param.getWard());
             int all = dao.getAllDisPatientCount(param.getWard());
             if (cd == 0 || all == 0) {
-                ret.setCdPercentage("0.00%");
+                response.setCdPercentage("0.00%");
             } else {
-                ret.setCdPercentage(DecimalUtil.getPercent(cd, all));
+                response.setCdPercentage(DecimalUtil.getPercent(cd, all));
             }
         }
         if (StringUtil.notBlank(param.getStart())) {
@@ -174,8 +175,8 @@ public class CaseFrontSheetMainService {
             if (param.getLateFlag() != 3) {
                 list.removeIf(item -> !item.getLateFlag().equals(param.getLateFlag()));
             }
-            ret.setList(list);
-            return ResultVoUtil.success(ret);
+            response.setList(list);
+            return ResultVoUtil.success(response);
         }
         if (StringUtil.notBlank(param.getWard())) {
             if (param.getFileStatus() == 0) {
@@ -186,8 +187,8 @@ public class CaseFrontSheetMainService {
             if (param.getLateFlag() != 3) {
                 list.removeIf(item -> !item.getLateFlag().equals(param.getLateFlag()));
             }
-            ret.setList(list);
-            return ResultVoUtil.success(ret);
+            response.setList(list);
+            return ResultVoUtil.success(response);
         }
         if (param.getFileStatus() == 0) {
             list = basDao.selectPatientsForBasByFileStatus(param);
@@ -197,8 +198,8 @@ public class CaseFrontSheetMainService {
         if (param.getLateFlag() != 3) {
             list.removeIf(item -> !item.getLateFlag().equals(param.getLateFlag()));
         }
-        ret.setList(list);
-        return ResultVoUtil.success(ret);
+        response.setList(list);
+        return ResultVoUtil.success(response);
     }
 
     public ResultVo<CaseFrontsheetMain> getPatientInfo(SheetOverview overview) {
@@ -307,6 +308,17 @@ public class CaseFrontSheetMainService {
             sheet.setStandardAddress(standardAddressMember.makeStandardAddress());
             sheet.setLivePlaceCombo(standardAddressMember.makeAddressCombo() + sheet.getLivePlace());
         }
+        List<CodeName> patCharges = dao.selectPatCharges(bah, times);
+        for (CodeName item : patCharges) {
+            String code = String.valueOf(item.getCode().charAt(0)).toUpperCase() +
+                    item.getCode().substring(1);
+            try {
+                Method m = sheet.getClass().getMethod("set" + code, String.class);
+                m.invoke(sheet, item.getName());
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
         autoFillPart(sheet);
         return ResultVoUtil.success(sheet);
     }