Explorar el Código

如果原始文本中存在月经史,就把月经史替换掉

q821488037 hace 5 años
padre
commit
730b015b36

+ 9 - 2
trans/src/main/java/com/lantone/qc/trans/comsis/ModelDocGenerate.java

@@ -203,13 +203,20 @@ public class ModelDocGenerate {
 
         MaritalLabel maritalLabel = new MaritalLabel();
         if (structureMap.get("婚育史") != null) {
-            maritalLabel.setText("婚育史: " + structureMap.get("婚育史"));
+            maritalLabel.setText("婚育史" + structureMap.get("婚育史"));
         }
         beHospitalizedDoc.setMaritalLabel(maritalLabel);
         structureMap.remove("婚育史");
 
         MenstrualLabel menstrualLabel = new MenstrualLabel();
-        menstrualLabel.setText("月经史:" + structureMap.get("月经史"));
+        if(structureMap != null && structureMap.get("月经史") != null){
+            if(structureMap.get("月经史").contains("月 经 史")){
+                String text = structureMap.get("月经史");
+                structureMap.put("月经史",text.replace("月 经 史","").replace(":","").replace(":",""));
+            }
+
+        }
+        menstrualLabel.setText("月经史:" + structureMap.get("月经史"));
         beHospitalizedDoc.setMenstrualLabel(menstrualLabel);
         structureMap.remove("月经史");