Bläddra i källkod

修复病种分值不对的问题

lighter 3 år sedan
förälder
incheckning
35d1538a7c

+ 1 - 1
pom.xml

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

+ 5 - 2
src/main/java/thyyxxk/webserver/dao/his/casefrontsheet/CaseFrontSheetDao.java

@@ -617,11 +617,14 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
     Integer selectFileStatus(@Param("bah") String bah,
                              @Param("admissTimes") Integer admissTimes);
 
+    @Select("select count(1) from t_yb_setl_modify_req where pat_no=#{bah} and times=#{times}")
+    Integer selectModified(@Param("bah") String bah, @Param("times") Integer times);
+
     @Select("select top 1 * from t_si_disefamily_diagnose with(nolock) where dise_code=#{code} or disefamily_code=#{code}")
     DisefamilyGrade selectDisefamilyGrade(@Param("code") String code);
 
-    @Select("select ssbm from batj_ba4 with(nolock) where zyh=#{bah} and zycs=#{times} and isnull(ssbm,'')!='' ")
-    List<String> selectPatientSurgeryCodes(@Param("bah") String bah, @Param("times") Integer times);
+    @Select("select ssbm from ${table} with(nolock) where zyh=#{bah} and zycs=#{times} and isnull(ssbm,'')!='' ")
+    List<String> selectPatientSurgeryCodes(@Param("bah") String bah, @Param("times") Integer times, @Param("table") String table);
 
     @Select("select * from t_si_operation_disefamily with(nolock) where disefamily_code=#{code}")
     List<OprnDisefamilyGrade> selectOperationDisefamilies(@Param("code") String code);

+ 2 - 2
src/main/java/thyyxxk/webserver/dao/lis/CovidExamDao.java

@@ -11,7 +11,7 @@ public interface CovidExamDao {
 
     @Select("select " +
             "a.ptnt_name as ptntName, a.id_card as idCard, c.itm_str_value as itmStrValue, " +
-            "b.audt_time as ordrCreateDate " +
+            "a.ptnt_no as ptntNo, b.audt_time as ordrCreateDate " +
             "from m_ordr_info(nolock) as a " +
             "inner join m_ordr(nolock) as b on a.ordr_info_id = b.ordr_info_id " +
             "inner join m_ordr_item(nolock) as c on b.ordr_id = c.ordr_id " +
@@ -25,7 +25,7 @@ public interface CovidExamDao {
 
     @Select("select " +
             "a.ptnt_name as ptntName, a.id_card as idCard, c.itm_str_value as itmStrValue, " +
-            "b.audt_time as ordrCreateDate " +
+            "a.ptnt_no as ptntNo, b.audt_time as ordrCreateDate " +
             "from m_ordr_info(nolock) as a " +
             "inner join m_ordr(nolock) as b on a.ordr_info_id = b.ordr_info_id " +
             "inner join m_ordr_item(nolock) as c on b.ordr_id = c.ordr_id " +

+ 1 - 0
src/main/java/thyyxxk/webserver/entity/examinations/covidexam/CovidExamResult.java

@@ -9,6 +9,7 @@ import java.util.List;
 
 @Data
 public class CovidExamResult {
+    private String ptntNo;
     private String ptntName;
     private String idCard;
     private String itmStrValue;

+ 3 - 1
src/main/java/thyyxxk/webserver/service/casefrontsheet/CaseFrontSheetService.java

@@ -638,7 +638,9 @@ public class CaseFrontSheetService {
         if (null == disefamilyGrade) {
             return ResultVoUtil.success("无对照的病种。");
         }
-        List<String> surgeries = dao.selectPatientSurgeryCodes(bah, times);
+        boolean hasModified = dao.selectModified(bah, times) > 0;
+        List<String> surgeries = hasModified ? dao.selectPatientSurgeryCodes(bah, times, "batj_ba4_modify")
+                : dao.selectPatientSurgeryCodes(bah, times, "batj_ba4");
         if (ListUtil.isBlank(surgeries)) {
             return ResultVoUtil.success("有对照的非手术分值:" + disefamilyGrade.getNoneOprnGrade());
         }

+ 9 - 0
src/main/java/thyyxxk/webserver/service/examinations/CovidExamService.java

@@ -12,8 +12,10 @@ import thyyxxk.webserver.entity.ResultVo;
 import thyyxxk.webserver.entity.examinations.covidexam.CovidExamResult;
 import thyyxxk.webserver.entity.examinations.covidexam.QueryCovidExamParam;
 import thyyxxk.webserver.utils.ResultVoUtil;
+import thyyxxk.webserver.utils.StringUtil;
 
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -33,6 +35,13 @@ public class CovidExamService {
         log.info("查询新冠检测结果:{}", JSON.toJSONString(param));
         Map<String, Object> map = new HashMap<>(Capacity.TWO);
         IPage<CovidExamResult> iPage = getCovidExamResultPage(param);
+        // TODO: 2022/4/8 查到混检的每个人
+//        List<CovidExamResult> list = iPage.getRecords();
+//        list.forEach(itm -> {
+//            if (StringUtil.notBlank(itm.getPtntNo()) && itm.getPtntNo().endsWith("-J")) {
+//
+//            }
+//        });
         map.put("totalSize", iPage.getTotal());
         map.put("list", iPage.getRecords());
         return ResultVoUtil.success(map);