Parcourir la source

恩泽:剖宫产手术记录crf模型逻辑增加

wangsy il y a 4 ans
Parent
commit
58b6f93a4e
38 fichiers modifiés avec 863 ajouts et 1 suppressions
  1. 2 0
      structure-center/src/main/java/com/lantone/structure/ai/AIAnalyze.java
  2. 88 0
      structure-center/src/main/java/com/lantone/structure/ai/CaesareanSectionAI.java
  3. 8 1
      structure-center/src/main/java/com/lantone/structure/ai/model/EntityEnum.java
  4. 8 0
      structure-center/src/main/java/com/lantone/structure/ai/process/EntityProcess.java
  5. 240 0
      structure-center/src/main/java/com/lantone/structure/ai/process/EntityProcessCaesareanSection.java
  6. 1 0
      structure-center/src/main/java/com/lantone/structure/model/Content.java
  7. 2 0
      structure-center/src/main/java/com/lantone/structure/model/InputInfo.java
  8. 16 0
      structure-center/src/main/java/com/lantone/structure/model/doc/CaesareanSectionDoc.java
  9. 17 0
      structure-center/src/main/java/com/lantone/structure/model/entity/AmnioticFluid.java
  10. 15 0
      structure-center/src/main/java/com/lantone/structure/model/entity/AmnioticFluidCharacter.java
  11. 15 0
      structure-center/src/main/java/com/lantone/structure/model/entity/AnesthesiaMethod.java
  12. 15 0
      structure-center/src/main/java/com/lantone/structure/model/entity/AnestheticEffect.java
  13. 16 0
      structure-center/src/main/java/com/lantone/structure/model/entity/ApgarScore.java
  14. 15 0
      structure-center/src/main/java/com/lantone/structure/model/entity/BloodPressure.java
  15. 17 0
      structure-center/src/main/java/com/lantone/structure/model/entity/CaputSuccedaneum.java
  16. 15 0
      structure-center/src/main/java/com/lantone/structure/model/entity/CaputSuccedaneumPart.java
  17. 15 0
      structure-center/src/main/java/com/lantone/structure/model/entity/ChildbirthCondition.java
  18. 15 0
      structure-center/src/main/java/com/lantone/structure/model/entity/ChildbirthWay.java
  19. 17 0
      structure-center/src/main/java/com/lantone/structure/model/entity/CordAroundBody.java
  20. 17 0
      structure-center/src/main/java/com/lantone/structure/model/entity/CordAroundNeck.java
  21. 15 0
      structure-center/src/main/java/com/lantone/structure/model/entity/CylinderNumber.java
  22. 15 0
      structure-center/src/main/java/com/lantone/structure/model/entity/Extent.java
  23. 16 0
      structure-center/src/main/java/com/lantone/structure/model/entity/FluidInfusion.java
  24. 16 0
      structure-center/src/main/java/com/lantone/structure/model/entity/Hemorrhage.java
  25. 17 0
      structure-center/src/main/java/com/lantone/structure/model/entity/Newborn.java
  26. 17 0
      structure-center/src/main/java/com/lantone/structure/model/entity/Placenta.java
  27. 15 0
      structure-center/src/main/java/com/lantone/structure/model/entity/PuerperaCondition.java
  28. 15 0
      structure-center/src/main/java/com/lantone/structure/model/entity/Score.java
  29. 16 0
      structure-center/src/main/java/com/lantone/structure/model/entity/Transfusion.java
  30. 17 0
      structure-center/src/main/java/com/lantone/structure/model/entity/UCAgent.java
  31. 16 0
      structure-center/src/main/java/com/lantone/structure/model/entity/UmbilicalCord.java
  32. 15 0
      structure-center/src/main/java/com/lantone/structure/model/entity/UterineCavityAbnormity.java
  33. 15 0
      structure-center/src/main/java/com/lantone/structure/model/entity/UterineCavityDispose.java
  34. 15 0
      structure-center/src/main/java/com/lantone/structure/model/entity/UterineWallSuture.java
  35. 15 0
      structure-center/src/main/java/com/lantone/structure/model/entity/UterusCondition.java
  36. 15 0
      structure-center/src/main/java/com/lantone/structure/model/entity/Volume.java
  37. 15 0
      structure-center/src/main/java/com/lantone/structure/model/entity/Weight.java
  38. 44 0
      structure-center/src/main/java/com/lantone/structure/model/label/CaesareanSectionLabel.java

+ 2 - 0
structure-center/src/main/java/com/lantone/structure/ai/AIAnalyze.java

@@ -19,6 +19,7 @@ public class AIAnalyze {
     ClinicalbloodAI clinicalbloodAI = new ClinicalbloodAI();
     StagesSummaryAI stagesSummaryAI = new StagesSummaryAI();
     RescueAI rescueAI = new RescueAI();
+    CaesareanSectionAI caesareanSectionAI = new CaesareanSectionAI();
 
     public AIAnalyze(CRFServiceClient crfService, SimilarityServiceClient similarityServiceClient) {
         this.crfServiceClient = crfService;
@@ -35,6 +36,7 @@ public class AIAnalyze {
         clinicalbloodAI.medrec(inputInfo, crfServiceClient);
         stagesSummaryAI.medrec(inputInfo, crfServiceClient);
         rescueAI.medrec(inputInfo, crfServiceClient);
+        caesareanSectionAI.medrec(inputInfo, crfServiceClient);
     }
 
 }

+ 88 - 0
structure-center/src/main/java/com/lantone/structure/ai/CaesareanSectionAI.java

@@ -0,0 +1,88 @@
+package com.lantone.structure.ai;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.google.common.collect.Lists;
+import com.lantone.common.util.CatalogueUtil;
+import com.lantone.common.util.StringUtil;
+import com.lantone.structure.ai.process.EntityProcessCaesareanSection;
+import com.lantone.structure.client.CRFServiceClient;
+import com.lantone.structure.model.Content;
+import com.lantone.structure.model.InputInfo;
+import com.lantone.structure.model.doc.CaesareanSectionDoc;
+import com.lantone.structure.model.label.CaesareanSectionLabel;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ClassName : CaesareanSectionAI
+ * @Description : 剖宫产手术
+ * @Author : wsy
+ * @Date: 2021-01-26 17:52
+ */
+public class CaesareanSectionAI extends ModelAI {
+
+    public static List<String> medicalTextType = Arrays.asList("Taizhou_Caesarean_section");
+    public static String entityRelationObject = "entity_relation_object";
+    public static String outputs = "outputs";
+    public static String content = "content";
+    public static List<String> mapKey = Lists.newArrayList("手术指征", "术中后诊断", "手术名称", "麻醉方式"
+            , "手术简要经过", "手术经过及处理", "术后注意事项");
+
+    public void medrec(InputInfo inputInfo, CRFServiceClient crfServiceClient) {
+        JSONArray crfContent = new JSONArray();
+        List<CaesareanSectionDoc> resultsDocs = inputInfo.getCaesareanSectionDocs();
+        for (int i = 0; i < resultsDocs.size(); i++) {
+            Map<String, String> structureMap = resultsDocs.get(i).getStructureMap();
+            String content = CatalogueUtil.structureMapJoin(structureMap, mapKey);
+            putContent(crfContent, medicalTextType.get(0), content, Content.caesareanSection);
+        }
+
+        JSONObject midData = loadAI(crfContent, crfServiceClient);//crf返回数据
+
+        for (int i = 0; i < resultsDocs.size(); i++) {
+            if (midData.get(Content.caesareanSection) == null) {
+                continue;
+            }
+            CaesareanSectionDoc caesareanSectionDoc = resultsDocs.get(i);
+            CaesareanSectionLabel caesareanSectionLabel = putCaesareanSectionCrfData(midData.getJSONObject(Content.caesareanSection));
+            if (caesareanSectionLabel != null) {
+                caesareanSectionDoc.setCaesareanSectionLabel(caesareanSectionLabel);
+            }
+        }
+    }
+
+    /**
+     * 处理剖宫产手术
+     *
+     * @param jsonObject
+     */
+    public CaesareanSectionLabel putCaesareanSectionCrfData(JSONObject jsonObject) {
+        CaesareanSectionLabel caesareanSectionLabel = new CaesareanSectionLabel();
+        if (jsonObject == null) {
+            return caesareanSectionLabel;
+        }
+        JSONObject aiOut = jsonObject.getJSONObject(entityRelationObject).getJSONObject(RescueAI.outputs);
+        if (aiOut == null) {
+            return caesareanSectionLabel;
+        }
+        EntityProcessCaesareanSection entityProcessCaesareanSection = new EntityProcessCaesareanSection();
+        caesareanSectionLabel = entityProcessCaesareanSection.extractEntity(aiOut);
+        return caesareanSectionLabel;
+    }
+
+    protected void putContent(JSONArray crfContent, String medicalTextType, String text, String sign) {
+        String move_text = CatalogueUtil.removeSpecialChar(text);
+        if (StringUtil.isEmpty(move_text)) {
+            return;
+        }
+        JSONObject detailContent = new JSONObject();
+        detailContent.put("medical_text_type", medicalTextType);
+        detailContent.put("content", move_text);
+        detailContent.put("detail_title", sign);
+        detailContent.put("originalText", text);
+        crfContent.add(detailContent);
+    }
+}

+ 8 - 1
structure-center/src/main/java/com/lantone/structure/ai/model/EntityEnum.java

@@ -35,7 +35,14 @@ public enum EntityEnum {
     RESPONSE_TYPE_BLOOD("输血反应类型"), FREQUENCY_BLOOD("输血次数"), NEGATIVE_BLOOD("否认"), DRUG_NAME("药品"),DIAGNOSIS_NAME("疾病诊断名称"),
     CONDITION("抢救病情"), OPERATION_OF_NAME("手术及操作名称"), OPERATION_OF_POSITION_NAME("手术及操作目标部位名称"), OPERATION_METHOD("操作方法"),
     OPERATION_COUNT("操作次数"), AUXILIARY_TEST("辅检名称"), AUXILIARY_RESULT("辅检结果"),AUXILIARY_QUANTITATIVE("辅检定量结果"), SALVAGE_DRUG("抢救药品"),
-    INTERVENTION("介入物名称");
+    INTERVENTION("介入物名称"), OPE_DIAGNOSIS_NAME("诊断名称"), ANESTHESIA_METHOD("麻醉方法"),ANESTHETIC_EFFECT("麻醉效果"), UTERUS_CONDITION("子宫情况"),
+    CHILDBIRTH_WAY("胎儿娩出方式"), AMNIOTIC_FLUID("羊水"), AMNIOTIC_FLUID_CHARACTER("羊水性状"),OPE_QUANTITY("量"), CHILDBIRTH_CONDITION("胎盘娩出情况"),
+    PLACENTA("胎盘"), VOLUME("体积"), WEIGHT("重量"),UMBILICALCORD("脐带"), EXTENT("长度"), CORD_AROUND_NECK("脐带绕颈"), CYLINDER_NUMBER("圈数"),
+    CORD_AROUND_BODY("脐带绕身"), UTERINE_WALL_SUTURE("子宫壁缝合情况"), UC_AGENT("宫缩剂名称"), UC_CONSUMPTION("宫缩剂用量"), UC_USAGE_WARD_ROUND("宫缩剂用法"),
+    UTERINE_CAVITY_ABNORMITY("宫腔探查异常情况描述"), UTERINE_CAVITY_DISPOSE("宫腔探查处理情况"), PUERPERA_CONDITION("手术时产妇情况"), HEMORRHAGE("术中出血"),
+    FLUID_INFUSION("补液"),BLOOD_PRESSURE("血压情况"), NEWBORN("新生儿"), APGAR_SCORE("Apgar评分"), SCORE("分数"), CAPUT_SUCCEDANEUM("产瘤"),
+    CAPUT_SUCCEDANEUM_PART("产瘤部位"), OPE_DRUG("手术用药名称"), OPE_CONSUMPTION("手术用药量"), OPE_USAGE_WARD_ROUND("手术用药方法"), TRANSFUSION("输血成分");
+
 
     private String value;
 

+ 8 - 0
structure-center/src/main/java/com/lantone/structure/ai/process/EntityProcess.java

@@ -237,6 +237,14 @@ public class EntityProcess {
         return null;
     }
 
+    protected <T> T findFirstT(List<Lemma> ListLemma, T t) throws Exception {
+        for (Lemma lemma : ListLemma) {
+            BeanUtils.copyProperty(t, "name", lemma.getText());
+            return t;
+        }
+        return null;
+    }
+
     /**
      * 只找出现在lemma实体位置之后的实体
      * @param detailLemma

+ 240 - 0
structure-center/src/main/java/com/lantone/structure/ai/process/EntityProcessCaesareanSection.java

@@ -0,0 +1,240 @@
+package com.lantone.structure.ai.process;
+
+
+import com.alibaba.fastjson.JSONObject;
+import com.lantone.structure.ai.model.EntityEnum;
+import com.lantone.structure.ai.model.Lemma;
+import com.lantone.structure.model.entity.*;
+import com.lantone.structure.model.label.CaesareanSectionLabel;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 剖宫产手术处理
+ */
+public class EntityProcessCaesareanSection extends EntityProcess {
+    private Logger logger = LoggerFactory.getLogger(EntityProcessCaesareanSection.class);
+
+    public CaesareanSectionLabel extractEntity(JSONObject aiOut) {
+        CaesareanSectionLabel caesareanSectionLabel = new CaesareanSectionLabel();
+        try {
+            //诊断名称
+            List<Lemma> diagnosisLemma = createEntityTree(aiOut, EntityEnum.OPE_DIAGNOSIS_NAME.toString());
+            List<Diagnosis> diagnosisList = new ArrayList<>();
+            for (Lemma lemma : diagnosisLemma) {
+                Diagnosis diagnosis = new Diagnosis();
+                diagnosis.setName(lemma.getText());
+                diagnosisList.add(diagnosis);
+            }
+            caesareanSectionLabel.setDiagnosis(diagnosisList);
+
+            //麻醉方法
+            caesareanSectionLabel.setAnesthesiaMethod(findFirstT(createEntityTree(aiOut, EntityEnum.ANESTHESIA_METHOD.toString()),new AnesthesiaMethod()));
+
+            //麻醉效果
+            caesareanSectionLabel.setAnestheticEffect(findFirstT(createEntityTree(aiOut, EntityEnum.ANESTHETIC_EFFECT.toString()),new AnestheticEffect()));
+
+            //子宫情况
+            List<Lemma> uterusConditionLemma = createEntityTree(aiOut, EntityEnum.UTERUS_CONDITION.toString());
+            List<UterusCondition> uterusConditionList = new ArrayList<>();
+            for (Lemma lemma : uterusConditionLemma) {
+                UterusCondition uterusCondition = new UterusCondition();
+                uterusCondition.setName(lemma.getText());
+                uterusConditionList.add(uterusCondition);
+            }
+            caesareanSectionLabel.setUterusConditions(uterusConditionList);
+
+            //胎儿娩出方式
+            caesareanSectionLabel.setChildbirthWay(findFirstT(createEntityTree(aiOut, EntityEnum.CHILDBIRTH_WAY.toString()),new ChildbirthWay()));
+
+            //羊水
+            List<Lemma> amnioticFluidLemma = createEntityTree(aiOut, EntityEnum.AMNIOTIC_FLUID.toString());
+            AmnioticFluid amnioticFluid = new AmnioticFluid();
+            for (Lemma lemma : amnioticFluidLemma) {
+                amnioticFluid.setName(lemma.getText());
+                amnioticFluid.setAmnioticFluidCharacter(findT(lemma, new AmnioticFluidCharacter(), EntityEnum.AMNIOTIC_FLUID_CHARACTER.toString()));
+                amnioticFluid.setQuantity(findT(lemma, new Quantity(), EntityEnum.OPE_QUANTITY.toString()));
+            }
+            caesareanSectionLabel.setAmnioticFluid(amnioticFluid);
+
+            //胎盘娩出情况
+            List<Lemma> childbirthConditionLemma = createEntityTree(aiOut, EntityEnum.CHILDBIRTH_CONDITION.toString());
+            List<ChildbirthCondition> ChildbirthConditionList = new ArrayList<>();
+            for (Lemma lemma : childbirthConditionLemma) {
+                ChildbirthCondition childbirthCondition = new ChildbirthCondition();
+                childbirthCondition.setName(lemma.getText());
+                ChildbirthConditionList.add(childbirthCondition);
+            }
+            caesareanSectionLabel.setChildbirthConditions(ChildbirthConditionList);
+
+            //胎盘
+            List<Lemma> PlacentaLemma = createEntityTree(aiOut, EntityEnum.PLACENTA.toString());
+            Placenta placenta = new Placenta();
+            for (Lemma lemma : PlacentaLemma) {
+                placenta.setName(lemma.getText());
+                placenta.setVolume(findT(lemma, new Volume(), EntityEnum.VOLUME.toString()));
+                placenta.setWeight(findT(lemma, new Weight(), EntityEnum.WEIGHT.toString()));
+            }
+            caesareanSectionLabel.setPlacenta(placenta);
+
+            //脐带
+            List<Lemma> umbilicalCordLemma = createEntityTree(aiOut, EntityEnum.UMBILICALCORD.toString());
+            UmbilicalCord umbilicalCord = new UmbilicalCord();
+            for (Lemma lemma : umbilicalCordLemma) {
+                umbilicalCord.setName(lemma.getText());
+                umbilicalCord.setExtent(findT(lemma, new Extent(), EntityEnum.EXTENT.toString()));
+            }
+            caesareanSectionLabel.setUmbilicalCord(umbilicalCord);
+
+            //脐带绕颈
+            List<Lemma> CordAroundNeckLemma = createEntityTree(aiOut, EntityEnum.CORD_AROUND_NECK.toString());
+            CordAroundNeck cordAroundNeck = new CordAroundNeck();
+            for (Lemma lemma : CordAroundNeckLemma) {
+                cordAroundNeck.setName(lemma.getText());
+                cordAroundNeck.setNegative(findT(lemma, new Negative(), EntityEnum.NEGATIVE.toString()));
+                cordAroundNeck.setCylinderNumber(findT(lemma, new CylinderNumber(), EntityEnum.CYLINDER_NUMBER.toString()));
+            }
+            caesareanSectionLabel.setCordAroundNeck(cordAroundNeck);
+
+            //脐带绕身
+            List<Lemma> cordAroundBodyLemma = createEntityTree(aiOut, EntityEnum.CORD_AROUND_BODY.toString());
+            CordAroundBody cordAroundBody = new CordAroundBody();
+            for (Lemma lemma : cordAroundBodyLemma) {
+                cordAroundBody.setName(lemma.getText());
+                cordAroundBody.setNegative(findT(lemma, new Negative(), EntityEnum.NEGATIVE.toString()));
+                cordAroundBody.setCylinderNumber(findT(lemma, new CylinderNumber(), EntityEnum.CYLINDER_NUMBER.toString()));
+            }
+            caesareanSectionLabel.setCordAroundBody(cordAroundBody);
+
+            //子宫壁缝合情况
+            List<Lemma> uterineWallSutureLemma = createEntityTree(aiOut, EntityEnum.UTERINE_WALL_SUTURE.toString());
+            List<UterineWallSuture> uterineWallSutureList = new ArrayList<>();
+            for (Lemma lemma : uterineWallSutureLemma) {
+                UterineWallSuture uterineWallSuture = new UterineWallSuture();
+                uterineWallSuture.setName(lemma.getText());
+                uterineWallSutureList.add(uterineWallSuture);
+            }
+            caesareanSectionLabel.setUterineWallSutures(uterineWallSutureList);
+
+            //宫缩剂名称
+            List<Lemma> uCAgentLemma = createEntityTree(aiOut, EntityEnum.UC_AGENT.toString());
+            List<UCAgent> uCAgentList = new ArrayList<>();
+            for (Lemma lemma : uCAgentLemma) {
+                UCAgent uCAgent = new UCAgent();
+                uCAgent.setName(lemma.getText());
+                uCAgent.setConsumption(findT(lemma, new Consumption(), EntityEnum.UC_CONSUMPTION.toString()));
+                uCAgent.setUsageWardRound(findT(lemma, new UsageWardRound(), EntityEnum.UC_USAGE_WARD_ROUND.toString()));
+                uCAgentList.add(uCAgent);
+            }
+            caesareanSectionLabel.setUCAgents(uCAgentList);
+
+            //宫腔探查异常情况描述
+            List<Lemma> uterineCavityAbnormityLemma = createEntityTree(aiOut, EntityEnum.UTERINE_CAVITY_ABNORMITY.toString());
+            List<UterineCavityAbnormity> uterineCavityAbnormityList = new ArrayList<>();
+            for (Lemma lemma : uterineCavityAbnormityLemma) {
+                UterineCavityAbnormity uterineCavityAbnormity = new UterineCavityAbnormity();
+                uterineCavityAbnormity.setName(lemma.getText());
+                uterineCavityAbnormityList.add(uterineCavityAbnormity);
+            }
+            caesareanSectionLabel.setUterineCavityAbnormity(uterineCavityAbnormityList);
+
+            //宫腔探查处理情况
+            List<Lemma> uterineCavityDisposeLemma = createEntityTree(aiOut, EntityEnum.UTERINE_CAVITY_DISPOSE.toString());
+            List<UterineCavityDispose> uterineCavityDisposeList = new ArrayList<>();
+            for (Lemma lemma : uterineCavityDisposeLemma) {
+                UterineCavityDispose uterineCavityDispose = new UterineCavityDispose();
+                uterineCavityDispose.setName(lemma.getText());
+                uterineCavityDisposeList.add(uterineCavityDispose);
+            }
+            caesareanSectionLabel.setUterineCavityDispose(uterineCavityDisposeList);
+
+            //手术时产妇情况
+            List<Lemma> puerperaConditionLemma = createEntityTree(aiOut, EntityEnum.PUERPERA_CONDITION.toString());
+            List<PuerperaCondition> puerperaConditionList = new ArrayList<>();
+            for (Lemma lemma : puerperaConditionLemma) {
+                PuerperaCondition puerperaCondition = new PuerperaCondition();
+                puerperaCondition.setName(lemma.getText());
+                puerperaConditionList.add(puerperaCondition);
+            }
+            caesareanSectionLabel.setPuerperaCondition(puerperaConditionList);
+
+            //术中出血
+            List<Lemma> hemorrhageLemma = createEntityTree(aiOut, EntityEnum.HEMORRHAGE.toString());
+            Hemorrhage hemorrhage = new Hemorrhage();
+            for (Lemma lemma : hemorrhageLemma) {
+                hemorrhage.setName(lemma.getText());
+                hemorrhage.setQuantity(findT(lemma, new Quantity(), EntityEnum.OPE_QUANTITY.toString()));
+            }
+            caesareanSectionLabel.setHemorrhage(hemorrhage);
+
+            //补液
+            List<Lemma> fluidInfusionLemma = createEntityTree(aiOut, EntityEnum.FLUID_INFUSION.toString());
+            FluidInfusion fluidInfusion = new FluidInfusion();
+            for (Lemma lemma : fluidInfusionLemma) {
+                fluidInfusion.setName(lemma.getText());
+                fluidInfusion.setQuantity(findT(lemma, new Quantity(), EntityEnum.OPE_QUANTITY.toString()));
+            }
+            caesareanSectionLabel.setFluidInfusion(fluidInfusion);
+
+            //血压情况
+            caesareanSectionLabel.setBloodPressure(findFirstT(createEntityTree(aiOut, EntityEnum.BLOOD_PRESSURE.toString()),new BloodPressure()));
+
+            //新生儿
+            List<Lemma> newbornLemma = createEntityTree(aiOut, EntityEnum.NEWBORN.toString());
+            Newborn newborn = new Newborn();
+            for (Lemma lemma : newbornLemma) {
+                newborn.setName(lemma.getText());
+                newborn.setWeight(findT(lemma, new Weight(), EntityEnum.WEIGHT.toString()));
+                newborn.setExtent(findT(lemma, new Extent(), EntityEnum.EXTENT.toString()));
+            }
+            caesareanSectionLabel.setNewborn(newborn);
+
+            //Apgar评分
+            List<Lemma> apgarScoreLemma = createEntityTree(aiOut, EntityEnum.APGAR_SCORE.toString());
+            ApgarScore apgarScore = new ApgarScore();
+            for (Lemma lemma : apgarScoreLemma) {
+                apgarScore.setName(lemma.getText());
+                apgarScore.setScore(findT(lemma, new Score(), EntityEnum.SCORE.toString()));
+            }
+            caesareanSectionLabel.setApgarScore(apgarScore);
+
+            //产瘤
+            List<Lemma> caputSuccedaneumLemma = createEntityTree(aiOut, EntityEnum.CAPUT_SUCCEDANEUM.toString());
+            CaputSuccedaneum caputSuccedaneum = new CaputSuccedaneum();
+            for (Lemma lemma : caputSuccedaneumLemma) {
+                caputSuccedaneum.setName(lemma.getText());
+                caputSuccedaneum.setVolume(findT(lemma, new Volume(), EntityEnum.VOLUME.toString()));
+                caputSuccedaneum.setCaputSuccedaneumPart(findT(lemma, new CaputSuccedaneumPart(), EntityEnum.CAPUT_SUCCEDANEUM_PART.toString()));
+            }
+            caesareanSectionLabel.setCaputSuccedaneum(caputSuccedaneum);
+
+            //手术用药名称
+            List<Lemma> drugLemma = createEntityTree(aiOut, EntityEnum.OPE_DRUG.toString());
+            List<Drug> drugList = new ArrayList<>();
+            for (Lemma lemma : drugLemma) {
+                Drug drug = new Drug();
+                drug.setName(lemma.getText());
+                drug.setConsumption(findT(lemma, new Consumption(), EntityEnum.OPE_CONSUMPTION.toString())); //(手术用药量)
+                drug.setUsageWardRound(findT(lemma, new UsageWardRound(), EntityEnum.OPE_USAGE_WARD_ROUND.toString())); //(手术用药方法)
+                drugList.add(drug);
+            }
+            caesareanSectionLabel.setDrugs(drugList);
+
+            //输血成分
+            List<Lemma> transfusionLemma = createEntityTree(aiOut, EntityEnum.TRANSFUSION.toString());
+            Transfusion transfusion = new Transfusion();
+            for (Lemma lemma : transfusionLemma) {
+                transfusion.setName(lemma.getText());
+                transfusion.setQuantity(findT(lemma, new Quantity(), EntityEnum.OPE_QUANTITY.toString()));
+            }
+            caesareanSectionLabel.setTransfusion(transfusion);
+        } catch (Exception e) {
+            e.printStackTrace();
+            logger.error(e.getMessage(), e);
+        }
+        return caesareanSectionLabel;
+    }
+}

+ 1 - 0
structure-center/src/main/java/com/lantone/structure/model/Content.java

@@ -254,6 +254,7 @@ public class Content {
     public static final String bloodRecord = "输血记录";
     public static final String stagesSummary = "阶段小结";
     public static final String rescue = "抢救记录";
+    public static final String caesareanSection = "剖宫产手术";
 
     public static String[] dateFormats = {
             "yyyy年MM月dd日HH时mm分",

+ 2 - 0
structure-center/src/main/java/com/lantone/structure/model/InputInfo.java

@@ -93,6 +93,8 @@ public class InputInfo {
     private List<PathologyShipDoc> pathologyShipDocs = new ArrayList<>();
     //诊疗合理性
     private List<ReasonableDiagnosisDoc> reasonableDiagnosisDocs = new ArrayList<>();
+    //剖宫产手术
+    private List<CaesareanSectionDoc> caesareanSectionDocs = new ArrayList<>();
     //日常病程录
     private List<DailyCourseRecordDoc> dailyCourseRecordDocs = Lists.newArrayList();
     //住院病历信息

+ 16 - 0
structure-center/src/main/java/com/lantone/structure/model/doc/CaesareanSectionDoc.java

@@ -0,0 +1,16 @@
+package com.lantone.structure.model.doc;
+
+import com.lantone.structure.model.label.CaesareanSectionLabel;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Description: 剖宫产手术
+ * @author: wsy
+ * @time: 2021/1/27 9:45
+ */
+@Getter
+@Setter
+public class CaesareanSectionDoc extends ModelDoc {
+    private CaesareanSectionLabel caesareanSectionLabel;
+}

+ 17 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/AmnioticFluid.java

@@ -0,0 +1,17 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : AmnioticFluid
+ * @Description : 羊水
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class AmnioticFluid extends General {
+    private AmnioticFluidCharacter amnioticFluidCharacter;  //羊水性状
+    private Quantity quantity;  //量
+}

+ 15 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/AmnioticFluidCharacter.java

@@ -0,0 +1,15 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : AmnioticFluidCharacter
+ * @Description : 羊水性状
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class AmnioticFluidCharacter extends General {
+}

+ 15 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/AnesthesiaMethod.java

@@ -0,0 +1,15 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : AnesthesiaMethod
+ * @Description : 麻醉方法
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class AnesthesiaMethod extends General {
+}

+ 15 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/AnestheticEffect.java

@@ -0,0 +1,15 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : AnestheticEffect
+ * @Description : 麻醉效果
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class AnestheticEffect extends General {
+}

+ 16 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/ApgarScore.java

@@ -0,0 +1,16 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : ApgarScore
+ * @Description : Apgar评分
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class ApgarScore extends General {
+    private Score score;      //分数
+}

+ 15 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/BloodPressure.java

@@ -0,0 +1,15 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : BloodPressure
+ * @Description : 血压情况
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class BloodPressure extends General {
+}

+ 17 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/CaputSuccedaneum.java

@@ -0,0 +1,17 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : CaputSuccedaneum
+ * @Description : 产瘤
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class CaputSuccedaneum extends General {
+    private Volume volume;                                  //体积
+    private CaputSuccedaneumPart caputSuccedaneumPart;      //产瘤部位
+}

+ 15 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/CaputSuccedaneumPart.java

@@ -0,0 +1,15 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : CaputSuccedaneumPart
+ * @Description : 产瘤部位
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class CaputSuccedaneumPart extends General {
+}

+ 15 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/ChildbirthCondition.java

@@ -0,0 +1,15 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : ChildbirthCondition
+ * @Description : 胎盘娩出情况
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class ChildbirthCondition extends General {
+}

+ 15 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/ChildbirthWay.java

@@ -0,0 +1,15 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : ChildbirthWay
+ * @Description : 胎儿娩出方式
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class ChildbirthWay extends General {
+}

+ 17 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/CordAroundBody.java

@@ -0,0 +1,17 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : CordAroundBody
+ * @Description : 脐带绕身
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class CordAroundBody extends General {
+    private Negative negative;              //否定
+    private CylinderNumber cylinderNumber;  //圈数
+}

+ 17 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/CordAroundNeck.java

@@ -0,0 +1,17 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : CordAroundNeck
+ * @Description : 脐带绕颈
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class CordAroundNeck extends General {
+    private Negative negative;              //否定
+    private CylinderNumber cylinderNumber;  //圈数
+}

+ 15 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/CylinderNumber.java

@@ -0,0 +1,15 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : CylinderNumber
+ * @Description : 圈数
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class CylinderNumber extends General {
+}

+ 15 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/Extent.java

@@ -0,0 +1,15 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : Extent
+ * @Description : 长度
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class Extent extends General {
+}

+ 16 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/FluidInfusion.java

@@ -0,0 +1,16 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : FluidInfusion
+ * @Description : 补液
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class FluidInfusion extends General {
+    private Quantity quantity;  //量
+}

+ 16 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/Hemorrhage.java

@@ -0,0 +1,16 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : Hemorrhage
+ * @Description : 术中出血
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class Hemorrhage extends General {
+    private Quantity quantity;  //量
+}

+ 17 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/Newborn.java

@@ -0,0 +1,17 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : Newborn
+ * @Description : 新生儿
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class Newborn extends General {
+    private Weight weight;      //重量
+    private Extent extent;      //长度
+}

+ 17 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/Placenta.java

@@ -0,0 +1,17 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : Placenta
+ * @Description : 胎盘
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class Placenta extends General {
+    private Volume volume;      //体积
+    private Weight weight;      //重量
+}

+ 15 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/PuerperaCondition.java

@@ -0,0 +1,15 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : PuerperaCondition
+ * @Description : 手术时产妇情况
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class PuerperaCondition extends General {
+}

+ 15 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/Score.java

@@ -0,0 +1,15 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : Score
+ * @Description : 分数
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class Score extends General {
+}

+ 16 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/Transfusion.java

@@ -0,0 +1,16 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : Transfusion
+ * @Description : 输血成分
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class Transfusion extends General {
+    private Quantity quantity;  //量
+}

+ 17 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/UCAgent.java

@@ -0,0 +1,17 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : UCAgent
+ * @Description : 宫缩剂名称
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class UCAgent extends General {
+    private Consumption consumption;        //宫缩剂用量
+    private UsageWardRound usageWardRound;  //宫缩剂用法
+}

+ 16 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/UmbilicalCord.java

@@ -0,0 +1,16 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : UmbilicalCord
+ * @Description : 脐带
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class UmbilicalCord extends General {
+    private Extent extent;      //长度
+}

+ 15 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/UterineCavityAbnormity.java

@@ -0,0 +1,15 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : UterineCavityAbnormity
+ * @Description : 宫腔探查异常情况描述
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class UterineCavityAbnormity extends General {
+}

+ 15 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/UterineCavityDispose.java

@@ -0,0 +1,15 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : UterineCavityDispose
+ * @Description : 宫腔探查处理情况
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class UterineCavityDispose extends General {
+}

+ 15 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/UterineWallSuture.java

@@ -0,0 +1,15 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : UterineWallSuture
+ * @Description : 子宫壁缝合情况
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class UterineWallSuture extends General {
+}

+ 15 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/UterusCondition.java

@@ -0,0 +1,15 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : UterusCondition
+ * @Description : 子宫情况
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class UterusCondition extends General {
+}

+ 15 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/Volume.java

@@ -0,0 +1,15 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : Volume
+ * @Description : 体积
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class Volume extends General {
+}

+ 15 - 0
structure-center/src/main/java/com/lantone/structure/model/entity/Weight.java

@@ -0,0 +1,15 @@
+package com.lantone.structure.model.entity;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @ClassName : Weight
+ * @Description : 重量
+ * @Author : wsy
+ * @Date: 2021-01-27 11:24
+ */
+@Setter
+@Getter
+public class Weight extends General {
+}

+ 44 - 0
structure-center/src/main/java/com/lantone/structure/model/label/CaesareanSectionLabel.java

@@ -0,0 +1,44 @@
+package com.lantone.structure.model.label;
+
+import com.lantone.structure.model.entity.*;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @ClassName : CaesareanSectionLabel
+ * @Description :
+ * @Author : wsy
+ * @Date: 2021-01-27 9:51
+ */
+@Getter
+@Setter
+public class CaesareanSectionLabel {
+    private List<Diagnosis> diagnosis = new ArrayList<>();                  //诊断名称
+    private AnesthesiaMethod anesthesiaMethod;                              //麻醉方法
+    private AnestheticEffect anestheticEffect;                              //麻醉效果
+    private List<UterusCondition> uterusConditions = new ArrayList<>();     //子宫情况
+    private ChildbirthWay childbirthWay;                                    //胎儿娩出方式
+    private AmnioticFluid amnioticFluid;                                    //羊水
+    private List<ChildbirthCondition> childbirthConditions = new ArrayList<>();                    //胎盘娩出情况
+    private Placenta placenta;                                              //胎盘
+    private UmbilicalCord umbilicalCord;                                    //脐带
+    private CordAroundNeck cordAroundNeck;                                  //脐带绕颈
+    private CordAroundBody cordAroundBody;                                  //脐带绕身
+    private List<UterineWallSuture> uterineWallSutures = new ArrayList<>(); //子宫壁缝合情况
+    private List<UCAgent> uCAgents;                                         //宫缩剂名称
+    private List<UterineCavityAbnormity> uterineCavityAbnormity = new ArrayList<>();               //宫腔探查异常情况描述
+    private List<UterineCavityDispose> uterineCavityDispose = new ArrayList<>();                   //宫腔探查处理情况
+    private List<PuerperaCondition> puerperaCondition = new ArrayList<>();                         //手术时产妇情况
+    private Hemorrhage hemorrhage;                                          //术中出血
+    private FluidInfusion fluidInfusion;                                    //补液
+    private BloodPressure bloodPressure;                                    //血压情况
+    private Newborn newborn;                                                //新生儿
+    private ApgarScore apgarScore;                                          //Apgar评分
+    private CaputSuccedaneum caputSuccedaneum;                              //产瘤
+    private List<Drug> drugs = new ArrayList<>();                           //手术用药名称
+    private Transfusion transfusion;                                        //输血成分
+
+}