|
@@ -0,0 +1,60 @@
|
|
|
+package com.lantone.qc.kernel.catalogue.hospital.wenfuyi.firstpagerecord;
|
|
|
+
|
|
|
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
|
+import com.lantone.qc.kernel.util.CatalogueUtil;
|
|
|
+import com.lantone.qc.pub.Content;
|
|
|
+import com.lantone.qc.pub.model.InputInfo;
|
|
|
+import com.lantone.qc.pub.model.OutputInfo;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import java.util.Map;
|
|
|
+import java.util.regex.Matcher;
|
|
|
+import java.util.regex.Pattern;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @ClassName : FIRP0201
|
|
|
+ * @Description : 新生儿入院体重未填写
|
|
|
+ * @Author : 贺聪聪
|
|
|
+ * @Date: 2022-07-07 16:28
|
|
|
+ */
|
|
|
+@Component
|
|
|
+public class FIRP0201 extends QCCatalogue {
|
|
|
+ public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
+ status.set("0");
|
|
|
+ if (inputInfo.getFirstPageRecordDoc() != null && inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {//病案首页
|
|
|
+ Map<String, String> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
|
|
|
+ /*
|
|
|
+ String infantAgeMonths = firstpageStructureMap.get(Content.newbornAgeMonths);
|
|
|
+ String infantAgeDays = firstpageStructureMap.get(Content.newbornAgeDays);
|
|
|
+ if (CatalogueUtil.isEmpty(infantAgeMonths) && CatalogueUtil.isEmpty(infantAgeDays)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ */
|
|
|
+ //获取年龄
|
|
|
+ if (firstpageStructureMap.get(Content.age) == null || firstpageStructureMap.get(Content.age) == ""){
|
|
|
+ status.set("0");
|
|
|
+ }
|
|
|
+ if (firstpageStructureMap.get(Content.age) != null || firstpageStructureMap.get(Content.age) != ""){
|
|
|
+ String newbornAge = firstpageStructureMap.get(Content.age);//获取年龄
|
|
|
+ if (newbornAge.contains("周") || newbornAge.contains("天")){//判断年龄是否包含天、周
|
|
|
+ String regEx = "[^0-9]";
|
|
|
+ Pattern pattern = Pattern.compile(regEx);
|
|
|
+ Matcher matcher = pattern.matcher(newbornAge);
|
|
|
+ int ageNum = Integer.valueOf(matcher.replaceAll("").trim());
|
|
|
+ if (ageNum <= 28){
|
|
|
+ String newbornAdmisWeight = firstpageStructureMap.get(Content.newbornAdmisWeight);//获取新生儿入院体重
|
|
|
+ if (CatalogueUtil.isEmpty(newbornAdmisWeight)){
|
|
|
+ status.set("-1");
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ status.set("0");
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ status.set("0");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|