Bladeren bron

Merge remote-tracking branch 'origin/his/xjshaya' into his/xjshaya

wangsy 5 maanden geleden
bovenliggende
commit
9eb6960cdf
1 gewijzigde bestanden met toevoegingen van 14 en 3 verwijderingen
  1. 14 3
      src/main/java/com/diagbot/process/OtherTipProcess.java

+ 14 - 3
src/main/java/com/diagbot/process/OtherTipProcess.java

@@ -70,6 +70,9 @@ public class OtherTipProcess {
     @Autowired
     private KlDiseaseFacade klDiseaseFacade;
 
+    private static final List<String> professionalTitles = Arrays.asList("医师","主治医师","副主任医师","主任医师");
+
+
     /**
      * 处理业务——化验
      *
@@ -355,6 +358,11 @@ public class OtherTipProcess {
         if (ListUtil.isEmpty(klDrugs)) {
             return;
         }
+
+        if (StringUtil.isEmpty(doctor.getProfessionalTitle()) || !professionalTitles.contains(doctor.getProfessionalTitle())) {
+            doctor.setProfessionalTitle("无");
+        }
+
         Map<Integer, List<KlDrug>> drugGradeListMap = klDrugs.stream().filter(e -> e.getDrugGrade() != null).collect(Collectors.groupingBy(KlDrug::getDrugGrade));
 
         if (Objects.equals(doctor.getProfessionalTitle(), "无") || Objects.equals(doctor.getProfessionalTitle(), "医师")){
@@ -366,10 +374,13 @@ public class OtherTipProcess {
                 List<Long> specialConceptIds = drugGradeListMap.get(2).stream().map(KlDrug::getConceptId).collect(Collectors.toList());
                 List<String> specialUniqueNames = specialConceptIds.stream().map(drugConceptIdNameMap::get).collect(Collectors.toList());
                 String specialName = specialUniqueNames.stream().map(drugNameMap::get).collect(Collectors.joining("、"));
-                String msg = "1、" +limitName + "为限制使用级药品,仅主治医师及以上级别可使用\n";
-                msg += "2、" + specialName + "为特殊使用级药品,仅副主任及以上级别可使用";
-                BillMsg billMsg = MsgUtil.getCommonOtherMsg(TypeEnum.other.getName(), msg, null, null, null);
+                String msg1 = limitName + "为限制使用级药品,仅主治医师及以上级别可使用";
+                BillMsg billMsg = MsgUtil.getCommonOtherMsg(TypeEnum.other.getName(), msg1, null, null, null);
                 CoreUtil.addBeanToList(otherList, billMsg);
+
+                String msg2 = specialName + "为特殊使用级药品,仅副主任及以上级别可使用";
+                BillMsg billMsg2 = MsgUtil.getCommonOtherMsg(TypeEnum.other.getName(), msg2, null, null, null);
+                CoreUtil.addBeanToList(otherList, billMsg2);
             }else if (drugGradeListMap.containsKey(1)){
                 List<Long> limitConceptIds = drugGradeListMap.get(1).stream().map(KlDrug::getConceptId).collect(Collectors.toList());
                 List<String> limitUniqueNames = limitConceptIds.stream().map(drugConceptIdNameMap::get).collect(Collectors.toList());