|
@@ -7,6 +7,7 @@ import com.lantone.common.util.ListUtil;
|
|
|
import com.lantone.common.util.StringUtil;
|
|
|
import com.lantone.structure.facade.tran.util.CommonAnalysisUtil;
|
|
|
import com.lantone.structure.model.doc.CaesareanSectionDoc;
|
|
|
+import com.lantone.structure.model.entity.ApgarScore;
|
|
|
import com.lantone.structure.model.entity.Drug;
|
|
|
import com.lantone.structure.model.entity.UCAgent;
|
|
|
import com.lantone.structure.model.label.CaesareanSectionLabel;
|
|
@@ -42,6 +43,7 @@ public class CesareanSectionTran extends TargetTran {
|
|
|
private Map<String, String> cutWord(String text) {
|
|
|
Map<String, String> ret = Maps.newHashMap();
|
|
|
Map<String, String> sourceMap = Maps.newHashMap();
|
|
|
+ text = text.replace("第1次手术", "第1次手术:");
|
|
|
List<String> titles = CommonAnalysisUtil.sortTitles(
|
|
|
Lists.newArrayList("手术开始时间", "手术结束时间", "手术日期", "术前诊断", "手术名称", "术中诊断", "手 术 者",
|
|
|
"麻 醉 者", "手术标本", "术中并发症", "术中失血量", "手术经过", "第1次手术"),
|
|
@@ -50,7 +52,7 @@ public class CesareanSectionTran extends TargetTran {
|
|
|
CommonAnalysisUtil.cutByTitles(text, titles, 0, sourceMap);
|
|
|
opeTimeHandle(sourceMap, ret);
|
|
|
ret.put("术前诊断", sourceMap.get("术前诊断"));
|
|
|
- ret.put("剖宫产手术过程", sourceMap.get("手术经过"));
|
|
|
+ ret.put("剖宫产手术过程", sourceMap.get("手术经过").replace("(包括体位、切口处理经过,病理标本肉眼所见)", "").trim());
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
@@ -60,12 +62,12 @@ public class CesareanSectionTran extends TargetTran {
|
|
|
String opeEndTime = sourceMap.get("手术结束时间");
|
|
|
if (StringUtil.isNotBlank(sourceMap.get("手术日期"))) {
|
|
|
String[] arry = sourceMap.get("手术日期").split("-");
|
|
|
- opeStartTime = arry[0];
|
|
|
- opeEndTime = arry[1];
|
|
|
+ opeStartTime = StringUtil.removeBlank(arry[0].replaceAll("(开始时间)[::]",""));
|
|
|
+ opeEndTime = StringUtil.removeBlank(arry[1].replaceAll("(结束时间)[::]",""));
|
|
|
}
|
|
|
ret.put("手术开始日期时间", opeStartTime);
|
|
|
ret.put("手术结束日期时间", opeEndTime);
|
|
|
- ret.put("手术全程时间(min)", (DateUtil.parseDate(opeEndTime, DateUtil.FORMAT_LONG_CN_MI).getTime() - DateUtil.parseDate(opeStartTime, DateUtil.FORMAT_LONG_CN_MI).getTime()) / 60000 + "");
|
|
|
+ ret.put("手术全程时间(min)", (DateUtil.parseDate(opeEndTime, "yyyy年MM月dd日HH时mm分").getTime() - DateUtil.parseDate(opeStartTime, "yyyy年MM月dd日HH时mm分").getTime()) / 60000 + "");
|
|
|
} catch (Exception e) {
|
|
|
log.error(e.getMessage(), e);
|
|
|
}
|
|
@@ -84,14 +86,14 @@ public class CesareanSectionTran extends TargetTran {
|
|
|
StringBuffer value = new StringBuffer();
|
|
|
|
|
|
//手术指征
|
|
|
- if (ListUtil.isNotEmpty(caesareanSectionLabel.getDiagnosis())) {
|
|
|
- caesareanSectionLabel.getDiagnosis().stream().filter(i -> i != null && StringUtil.isNotBlank(i.getName())).forEach(i -> {
|
|
|
- value.append(i.getName()).append(";");
|
|
|
- ;
|
|
|
- });
|
|
|
- sourceMap.put("手术指征", value.toString());
|
|
|
- value.setLength(0);
|
|
|
- }
|
|
|
+// if (ListUtil.isNotEmpty(caesareanSectionLabel.getDiagnosis())) {
|
|
|
+// caesareanSectionLabel.getDiagnosis().stream().filter(i -> i != null && StringUtil.isNotBlank(i.getName())).forEach(i -> {
|
|
|
+// value.append(i.getName()).append(";");
|
|
|
+// ;
|
|
|
+// });
|
|
|
+// sourceMap.put("手术指征", value.toString());
|
|
|
+// value.setLength(0);
|
|
|
+// }
|
|
|
|
|
|
//麻醉体位
|
|
|
if (caesareanSectionLabel.getAnesthesiaMethod() != null) {
|
|
@@ -262,8 +264,14 @@ public class CesareanSectionTran extends TargetTran {
|
|
|
|
|
|
//Apgar评分值
|
|
|
if (ListUtil.isNotEmpty(caesareanSectionLabel.getApgarScores())) {
|
|
|
- caesareanSectionLabel.getApgarScores().stream().filter(i -> i != null && StringUtil.isNotBlank(i.getName())).forEach(i -> {
|
|
|
- value.append(i.getName()).append(";");
|
|
|
+ List<ApgarScore> apgarScores = caesareanSectionLabel.getApgarScores().stream()
|
|
|
+ .filter(i -> i != null && StringUtil.isNotBlank(i.getName()))
|
|
|
+ .collect(Collectors.toList());
|
|
|
+ apgarScores.forEach(i -> {
|
|
|
+ if (i.getScore() != null && StringUtil.isNotBlank(i.getScore().getName())) {
|
|
|
+ value.append(i.getName()).append(" ").append(i.getScore().getName());
|
|
|
+ }
|
|
|
+ value.append(";");
|
|
|
});
|
|
|
sourceMap.put("Apgar评分值", value.toString());
|
|
|
value.setLength(0);
|