|
@@ -1,8 +1,22 @@
|
|
|
package com.lantone.qc.trans.taizhou;
|
|
|
|
|
|
import com.google.common.collect.Lists;
|
|
|
+import com.google.common.collect.Maps;
|
|
|
import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
|
|
|
+import com.lantone.qc.pub.model.label.ChiefLabel;
|
|
|
+import com.lantone.qc.pub.model.label.DiagLabel;
|
|
|
+import com.lantone.qc.pub.model.label.FamilyLabel;
|
|
|
+import com.lantone.qc.pub.model.label.MaritalLabel;
|
|
|
+import com.lantone.qc.pub.model.label.MenstrualLabel;
|
|
|
+import com.lantone.qc.pub.model.label.PacsLabel;
|
|
|
+import com.lantone.qc.pub.model.label.PastLabel;
|
|
|
+import com.lantone.qc.pub.model.label.PersonalLabel;
|
|
|
+import com.lantone.qc.pub.model.label.PresentLabel;
|
|
|
+import com.lantone.qc.pub.model.label.VitalLabel;
|
|
|
+import com.lantone.qc.pub.model.label.VitalLabelSpecial;
|
|
|
import com.lantone.qc.pub.model.vo.MedrecVo;
|
|
|
+import com.lantone.qc.pub.util.DateUtil;
|
|
|
+import com.lantone.qc.pub.util.StringUtil;
|
|
|
import com.lantone.qc.trans.ModelDocTrans;
|
|
|
import com.lantone.qc.trans.comsis.OrdinaryAssistant;
|
|
|
import com.lantone.qc.trans.taizhou.util.TzXmlUtil;
|
|
@@ -17,14 +31,28 @@ import java.util.Map;
|
|
|
*/
|
|
|
public class TaiZhouBeHospitalizedDocTrans extends ModelDocTrans {
|
|
|
|
|
|
+ /**
|
|
|
+ * CRF规则:主诉、现病史
|
|
|
+ *
|
|
|
+ * @param medrecVo
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@Override
|
|
|
public BeHospitalizedDoc extract(MedrecVo medrecVo) {
|
|
|
String content = ((List<String>) medrecVo.getContent().get("content")).get(0);
|
|
|
|
|
|
- Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(TzXmlUtil.getXmlToMapForTZ(content), keyContrasts);
|
|
|
- BeHospitalizedDoc beHospitalizedDoc = new BeHospitalizedDoc();
|
|
|
- beHospitalizedDoc.setStructureMap(structureMap);
|
|
|
-
|
|
|
+ Map<String, String> sourceMap = TzXmlUtil.getXmlToMapForTZ(content); // xml原始数据给华卓
|
|
|
+ Map<String, String> sourceMapCopy = Maps.newHashMap();
|
|
|
+ sourceMapCopy.putAll(sourceMap);
|
|
|
+ // 年龄从生日转换
|
|
|
+ if (StringUtil.isBlank(sourceMapCopy.get("年龄")) && StringUtil.isNotBlank(sourceMapCopy.get("生日"))) {
|
|
|
+ int age = DateUtil.getAge(sourceMapCopy.get("生日"));
|
|
|
+ sourceMapCopy.put("年龄", String.valueOf(age));
|
|
|
+ }
|
|
|
+ Map<String, String> structureMap = OrdinaryAssistant.mapKeyContrast(sourceMapCopy, keyContrasts);
|
|
|
+ BeHospitalizedDoc beHospitalizedDoc = beHospitalizedDocGen(structureMap); // 不走共用
|
|
|
+ beHospitalizedDoc.setText(content);
|
|
|
+ beHospitalizedDoc.setPageData((Map)sourceMap);
|
|
|
return beHospitalizedDoc;
|
|
|
}
|
|
|
|
|
@@ -43,7 +71,7 @@ public class TaiZhouBeHospitalizedDocTrans extends ModelDocTrans {
|
|
|
"肾触及=",
|
|
|
"鼻体检=",
|
|
|
"神志水平=",
|
|
|
- "地址=",
|
|
|
+ "地址=联系地址",
|
|
|
"角膜=",
|
|
|
"肝边缘肋下=",
|
|
|
"心脏浊音界(右3肋间)=",
|
|
@@ -55,10 +83,10 @@ public class TaiZhouBeHospitalizedDocTrans extends ModelDocTrans {
|
|
|
"腋下=",
|
|
|
"深反射=",
|
|
|
"药物食物中毒史=",
|
|
|
- "本人姓名=",
|
|
|
+ "本人姓名=姓名",
|
|
|
"治疗=",
|
|
|
"周围血管征=",
|
|
|
- "出生地址=",
|
|
|
+ "出生地址=出生地",
|
|
|
"脉搏=",
|
|
|
"腹式呼吸=",
|
|
|
"预防接种史=",
|
|
@@ -133,7 +161,7 @@ public class TaiZhouBeHospitalizedDocTrans extends ModelDocTrans {
|
|
|
"经期天数=",
|
|
|
"心尖搏动位置=",
|
|
|
"定向力=",
|
|
|
- "生日=",
|
|
|
+ "生日=出生日期",
|
|
|
"心脏浊音界(左4肋间)=",
|
|
|
"四肢红肿=",
|
|
|
"耳体检=",
|
|
@@ -157,7 +185,7 @@ public class TaiZhouBeHospitalizedDocTrans extends ModelDocTrans {
|
|
|
"肝大小=",
|
|
|
"生命体征=",
|
|
|
"运动=",
|
|
|
- "本人电话=",
|
|
|
+ "本人电话=电话",
|
|
|
"桡动脉脉率=",
|
|
|
"肝边缘剑突下=",
|
|
|
"皮疹部位=",
|
|
@@ -228,7 +256,7 @@ public class TaiZhouBeHospitalizedDocTrans extends ModelDocTrans {
|
|
|
"浅感觉=",
|
|
|
"营养会诊=",
|
|
|
"肛门直肠=",
|
|
|
- "辅助检查结果=",
|
|
|
+ "辅助检查结果=辅助检查",
|
|
|
"脾质地=",
|
|
|
"绝经年龄=",
|
|
|
"肝脏疾病=",
|
|
@@ -253,7 +281,7 @@ public class TaiZhouBeHospitalizedDocTrans extends ModelDocTrans {
|
|
|
"乳房对称度=",
|
|
|
"传染病史=",
|
|
|
"表情=",
|
|
|
- "医生=",
|
|
|
+ "医生=医师签名",
|
|
|
"月经初潮年龄=",
|
|
|
"口腔体检=",
|
|
|
"Babinski征=",
|
|
@@ -362,7 +390,102 @@ public class TaiZhouBeHospitalizedDocTrans extends ModelDocTrans {
|
|
|
"视力粗测左=",
|
|
|
"运动系统:共济失调=",
|
|
|
"齿龈=",
|
|
|
- "心脏浊音界(右4肋间)="
|
|
|
+ "心脏浊音界(右4肋间)=",
|
|
|
+ "入院日期=",
|
|
|
+ "病史陈述者=",
|
|
|
+ "婚育史=",
|
|
|
+ "月经史="
|
|
|
);
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 入院记录不走CRF
|
|
|
+ *
|
|
|
+ * @param structureMap
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public static BeHospitalizedDoc beHospitalizedDocGen(Map<String, String> structureMap) {
|
|
|
+ BeHospitalizedDoc beHospitalizedDoc = new BeHospitalizedDoc();
|
|
|
+
|
|
|
+ ChiefLabel chiefLabel = new ChiefLabel();
|
|
|
+ chiefLabel.setText(structureMap.get("主诉"));
|
|
|
+ beHospitalizedDoc.setChiefLabel(chiefLabel);
|
|
|
+ structureMap.remove("主诉");
|
|
|
+
|
|
|
+ PresentLabel presentLabel = new PresentLabel();
|
|
|
+ presentLabel.setText(structureMap.get("现病史"));
|
|
|
+ beHospitalizedDoc.setPresentLabel(presentLabel);
|
|
|
+ structureMap.remove("现病史");
|
|
|
+
|
|
|
+ PastLabel pastLabel = new PastLabel();
|
|
|
+ pastLabel.setCrfLabel(false);
|
|
|
+ pastLabel.setText(structureMap.get("既往史"));
|
|
|
+ beHospitalizedDoc.setPastLabel(pastLabel);
|
|
|
+// structureMap.remove("既往史");
|
|
|
+
|
|
|
+ PersonalLabel personalLabel = new PersonalLabel();
|
|
|
+ personalLabel.setCrfLabel(false);
|
|
|
+ personalLabel.setText(structureMap.get("个人史"));
|
|
|
+ beHospitalizedDoc.setPersonalLabel(personalLabel);
|
|
|
+// structureMap.remove("个人史");
|
|
|
+
|
|
|
+ MaritalLabel maritalLabel = new MaritalLabel();
|
|
|
+ maritalLabel.setCrfLabel(false);
|
|
|
+ maritalLabel.setText("婚育史: " + structureMap.get("婚育史"));
|
|
|
+ beHospitalizedDoc.setMaritalLabel(maritalLabel);
|
|
|
+// structureMap.remove("婚育史");
|
|
|
+
|
|
|
+ MenstrualLabel menstrualLabel = new MenstrualLabel();
|
|
|
+ menstrualLabel.setCrfLabel(false);
|
|
|
+ menstrualLabel.setText("月经史:" + structureMap.get("月经史"));
|
|
|
+ beHospitalizedDoc.setMenstrualLabel(menstrualLabel);
|
|
|
+// structureMap.remove("月经史");
|
|
|
+
|
|
|
+ FamilyLabel familyLabel = new FamilyLabel();
|
|
|
+ familyLabel.setCrfLabel(false);
|
|
|
+ familyLabel.setText(structureMap.get("家族史"));
|
|
|
+ beHospitalizedDoc.setFamilyLabel(familyLabel);
|
|
|
+// structureMap.remove("家族史");
|
|
|
+
|
|
|
+ VitalLabel vitalLabel = new VitalLabel();
|
|
|
+ vitalLabel.setCrfLabel(false);
|
|
|
+ vitalLabel.setText(structureMap.get("体格检查"));
|
|
|
+ beHospitalizedDoc.setVitalLabel(vitalLabel);
|
|
|
+// structureMap.remove("体格检查");
|
|
|
+
|
|
|
+ VitalLabelSpecial vitalLabelSpecial = new VitalLabelSpecial();
|
|
|
+ vitalLabelSpecial.setCrfLabel(false);
|
|
|
+ vitalLabelSpecial.setText(structureMap.get("专科体格检查"));
|
|
|
+ beHospitalizedDoc.setVitalLabelSpecial(vitalLabelSpecial);
|
|
|
+// structureMap.remove("专科体格检查");
|
|
|
+
|
|
|
+ PacsLabel pacsLabel = new PacsLabel();
|
|
|
+ pacsLabel.setCrfLabel(false);
|
|
|
+ pacsLabel.setText(structureMap.get("辅助检查"));
|
|
|
+ beHospitalizedDoc.setPacsLabel(pacsLabel);
|
|
|
+// structureMap.remove("辅助检查");
|
|
|
+
|
|
|
+ DiagLabel initialDiagLabel = new DiagLabel();
|
|
|
+ initialDiagLabel.setCrfLabel(false);
|
|
|
+ initialDiagLabel.setText(structureMap.get("初步诊断"));
|
|
|
+ beHospitalizedDoc.setInitialDiagLabel(initialDiagLabel);
|
|
|
+// structureMap.remove("初步诊断");
|
|
|
+
|
|
|
+ DiagLabel revisedDiagLabel = new DiagLabel();
|
|
|
+ revisedDiagLabel.setCrfLabel(false);
|
|
|
+ revisedDiagLabel.setText(structureMap.get("修正诊断"));
|
|
|
+ beHospitalizedDoc.setRevisedDiagLabel(revisedDiagLabel);
|
|
|
+// structureMap.remove("修正诊断");
|
|
|
+
|
|
|
+ DiagLabel suppleDiagLabel = new DiagLabel();
|
|
|
+ suppleDiagLabel.setCrfLabel(false);
|
|
|
+ suppleDiagLabel.setText(structureMap.get("补充诊断"));
|
|
|
+ beHospitalizedDoc.setSuppleDiagLabel(suppleDiagLabel);
|
|
|
+// structureMap.remove("补充诊断");
|
|
|
+
|
|
|
+ beHospitalizedDoc.setStructureMap(structureMap);
|
|
|
+
|
|
|
+ return beHospitalizedDoc;
|
|
|
+ }
|
|
|
+
|
|
|
}
|