|
@@ -21,29 +21,21 @@ import java.util.regex.Pattern;
|
|
|
public class FIRP0201 extends QCCatalogue {
|
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
status.set("0");
|
|
|
- if (inputInfo.getFirstPageRecordDoc() != null && inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {//病案首页
|
|
|
+ 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 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);//获取新生儿入院体重
|
|
|
+ String newbornAdmisWeight = firstpageStructureMap.get(Content.newbornAdmisWeight);
|
|
|
if (CatalogueUtil.isEmpty(newbornAdmisWeight)){
|
|
|
status.set("-1");
|
|
|
}
|