|
@@ -33,40 +33,49 @@ public class GroupRule {
|
|
for (NodeNeoDTO node : group) {
|
|
for (NodeNeoDTO node : group) {
|
|
// 妊娠目前从诊断里判断,包含“妊娠”
|
|
// 妊娠目前从诊断里判断,包含“妊娠”
|
|
String symptom = wordCrfDTO.getSymptom(); // 现病史内容
|
|
String symptom = wordCrfDTO.getSymptom(); // 现病史内容
|
|
|
|
+ String chief = wordCrfDTO.getChief(); // 主诉
|
|
|
|
+ String menstrual = wordCrfDTO.getMenstrual(); // 月经史
|
|
|
|
+
|
|
switch (node.getName()) {
|
|
switch (node.getName()) {
|
|
case "妊娠":
|
|
case "妊娠":
|
|
- // 现病史包含“孕妇”
|
|
|
|
- if (symptom.contains("孕妇")) {
|
|
|
|
|
|
+ // 主诉、现病史、诊断包含“孕妇”,“妊娠”
|
|
|
|
+ boolean flag = false;
|
|
|
|
+ if (symptom.contains("孕妇") || chief.contains("孕妇")
|
|
|
|
+ || symptom.contains("妊娠") || chief.contains("妊娠")) {
|
|
|
|
+ flag = true;
|
|
|
|
+ } else {
|
|
|
|
+ // 主诉、现病史出现孕几周
|
|
|
|
+ String regex = ".*孕.{1,4}周.*"; // 孕xx周
|
|
|
|
+ if (symptom.matches(regex) || chief.matches(regex)) {
|
|
|
|
+ flag = true;
|
|
|
|
+ } else {
|
|
|
|
+ List<Item> diag = wordCrfDTO.getDiag();
|
|
|
|
+ for (Item item : diag) {
|
|
|
|
+ // 诊断出现“孕几周”,孕字必须是第一个
|
|
|
|
+ String regex1 = "孕.{1,4}周.*"; // 孕xx周
|
|
|
|
+ if (item.getUniqueName().matches(regex1) || item.getUniqueName().contains("孕妇")
|
|
|
|
+ || item.getUniqueName().contains("妊娠")) {
|
|
|
|
+ flag = true;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (flag) {
|
|
BillMsg commonBillMsg = MsgUtil.getCommonBillMsg(
|
|
BillMsg commonBillMsg = MsgUtil.getCommonBillMsg(
|
|
billNeoMaxDTO.getOrderName(), billNeoMaxDTO.getOrderStandName(),
|
|
billNeoMaxDTO.getOrderName(), billNeoMaxDTO.getOrderStandName(),
|
|
"妊娠", type, billNeoMaxDTO.getType());
|
|
"妊娠", type, billNeoMaxDTO.getType());
|
|
billMsgList.add(commonBillMsg);
|
|
billMsgList.add(commonBillMsg);
|
|
}
|
|
}
|
|
- // 诊断里包含“妊娠” 或者 包含“孕几周”
|
|
|
|
- List<Item> diag = wordCrfDTO.getDiag();
|
|
|
|
- for (Item item : diag) {
|
|
|
|
- if (item.getUniqueName().contains("妊娠")) {
|
|
|
|
- BillMsg commonBillMsg = MsgUtil.getCommonBillMsg(
|
|
|
|
- billNeoMaxDTO.getOrderName(), billNeoMaxDTO.getOrderStandName(),
|
|
|
|
- item.getUniqueName(), type, billNeoMaxDTO.getType());
|
|
|
|
- billMsgList.add(commonBillMsg);
|
|
|
|
- } else {
|
|
|
|
- String regex = "孕.{1,4}周.*"; // 孕xx周
|
|
|
|
- if (item.getUniqueName().matches(regex)) {
|
|
|
|
- BillMsg commonBillMsg = MsgUtil.getCommonBillMsg(
|
|
|
|
- billNeoMaxDTO.getOrderName(), billNeoMaxDTO.getOrderStandName(),
|
|
|
|
- item.getUniqueName(), type, billNeoMaxDTO.getType());
|
|
|
|
- billMsgList.add(commonBillMsg);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
break;
|
|
break;
|
|
case "月经期":
|
|
case "月经期":
|
|
String regex = "月经第(([零一二三四五六七八九十]{0,3})||([0-9]{0,2}))天";
|
|
String regex = "月经第(([零一二三四五六七八九十]{0,3})||([0-9]{0,2}))天";
|
|
Pattern pattern = Pattern.compile(regex);
|
|
Pattern pattern = Pattern.compile(regex);
|
|
Matcher matcher = pattern.matcher(symptom);
|
|
Matcher matcher = pattern.matcher(symptom);
|
|
boolean rs = matcher.find();
|
|
boolean rs = matcher.find();
|
|
- if (rs) {
|
|
|
|
|
|
+ Matcher matcher1 = pattern.matcher(menstrual);
|
|
|
|
+ boolean rs1 = matcher1.find();
|
|
|
|
+ if (rs || rs1 || symptom.contains("经期") || menstrual.contains("经期")) {
|
|
BillMsg commonBillMsg = MsgUtil.getCommonBillMsg(
|
|
BillMsg commonBillMsg = MsgUtil.getCommonBillMsg(
|
|
billNeoMaxDTO.getOrderName(), billNeoMaxDTO.getOrderStandName(),
|
|
billNeoMaxDTO.getOrderName(), billNeoMaxDTO.getOrderStandName(),
|
|
"月经期", type, billNeoMaxDTO.getType());
|
|
"月经期", type, billNeoMaxDTO.getType());
|