|
@@ -7,6 +7,7 @@ import com.lantone.qc.pub.model.OutputInfo;
|
|
|
import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
|
|
|
import com.lantone.qc.pub.model.doc.DoctorAdviceDoc;
|
|
|
import com.lantone.qc.pub.model.doc.LisDoc;
|
|
|
+import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
|
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
@@ -78,9 +79,9 @@ public class THR03044 extends QCCatalogue {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- //体温大于38度也不报错
|
|
|
- double temperature = getTemperature(inputInfo);
|
|
|
- if (temperature > 38) {
|
|
|
+ //体温大于37.3度也不报错
|
|
|
+ boolean fever = isFever(inputInfo);
|
|
|
+ if (fever) {
|
|
|
return;
|
|
|
}
|
|
|
|
|
@@ -227,8 +228,10 @@ public class THR03044 extends QCCatalogue {
|
|
|
return b;
|
|
|
}
|
|
|
|
|
|
- private double getTemperature(InputInfo inputInfo) {
|
|
|
+ private boolean isFever(InputInfo inputInfo) {
|
|
|
double temp = 0d;
|
|
|
+ boolean rever = false;
|
|
|
+ //入院记录找体温是否大于37.3℃
|
|
|
BeHospitalizedDoc beHospitalizedDoc = inputInfo.getBeHospitalizedDoc();
|
|
|
if (beHospitalizedDoc != null) {
|
|
|
Map<String, String> beHStructureMap = beHospitalizedDoc.getStructureMap();
|
|
@@ -238,13 +241,45 @@ public class THR03044 extends QCCatalogue {
|
|
|
}
|
|
|
String special = beHStructureMap.get("专科小结");
|
|
|
if (temp == 0 && StringUtil.isNotBlank(special)) {
|
|
|
- Pattern p = Pattern.compile("T[1-9]\\d*\\.?\\d*℃");
|
|
|
- Matcher matcher = p.matcher(special);
|
|
|
- if (matcher.find()) {
|
|
|
- temp = Double.parseDouble(getNum(matcher.group(0)));
|
|
|
+ temp = getTemperature(special);
|
|
|
+ }
|
|
|
+ if (temp > 37.3) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //查房记录找体温是否大于37.3℃
|
|
|
+ List<ThreeLevelWardDoc> threeLevelWardDocs = inputInfo.getThreeLevelWardDocs();
|
|
|
+ if (threeLevelWardDocs.size() > 0) {
|
|
|
+ List<ThreeLevelWardDoc> allDoctorWradDocs = threeLevelWardDocs.get(0).getAllDoctorWradDocs();
|
|
|
+ List<String> content = allDoctorWradDocs
|
|
|
+ .stream()
|
|
|
+ .map(ThreeLevelWardDoc::getStructureMap)
|
|
|
+ .map(x -> x.get("病情记录"))
|
|
|
+ .collect(Collectors.toList());
|
|
|
+
|
|
|
+ for (String str : content) {
|
|
|
+ temp = getTemperature(str);
|
|
|
+ if (temp > 37.3) {
|
|
|
+ return true;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 从文本中取体温
|
|
|
+ * @param content 文本
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ private double getTemperature(String content) {
|
|
|
+ double temp = 0d;
|
|
|
+ Pattern p = Pattern.compile("[1-9]\\d*\\.?\\d*℃");
|
|
|
+ Matcher matcher = p.matcher(content);
|
|
|
+ if (matcher.find()) {
|
|
|
+ temp = Double.parseDouble(getNum(matcher.group(0)));
|
|
|
+ }
|
|
|
return temp;
|
|
|
}
|
|
|
}
|