|
@@ -21,28 +21,33 @@ import java.util.Map;
|
|
|
@Component
|
|
|
public class FIRP0190 extends QCCatalogue {
|
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
- status.set("0");
|
|
|
- if (inputInfo.getFirstPageRecordDoc() != null && inputInfo.getFirstPageRecordDoc().getStructureMap() != null
|
|
|
- && inputInfo.getClinicalBloodDocs().size() > 0) {
|
|
|
- Map<String, String> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
|
|
|
- List<ClinicalBloodDoc> clinicalBloodDocList = inputInfo.getClinicalBloodDocs();
|
|
|
- String rhFactor = firstpageStructureMap.get(Content.rhFactor);
|
|
|
- if (CatalogueUtil.isEmpty(rhFactor)) {
|
|
|
- return;
|
|
|
+ if (inputInfo.getFirstPageRecordDoc() == null || inputInfo.getFirstPageRecordDoc().getStructureMap() == null
|
|
|
+ || inputInfo.getClinicalBloodDocs().size() == 0) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Map<String, String> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
|
|
|
+ List<ClinicalBloodDoc> clinicalBloodDocList = inputInfo.getClinicalBloodDocs();
|
|
|
+ String rhFactor = firstpageStructureMap.get(Content.rhFactor);
|
|
|
+ if (CatalogueUtil.isEmpty(rhFactor)) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ for (ClinicalBloodDoc clinicalBloodDoc : clinicalBloodDocList) {
|
|
|
+ String bloodType = clinicalBloodDoc.getStructureMap().get("输注种类、血型、数量");
|
|
|
+ if (StringUtils.isEmpty(bloodType)) {
|
|
|
+ continue;
|
|
|
}
|
|
|
- status.set("-1");
|
|
|
- for (ClinicalBloodDoc clinicalBloodDoc : clinicalBloodDocList) {
|
|
|
- String bloodType = clinicalBloodDoc.getStructureMap().get("输注种类、血型、数量");
|
|
|
- if (StringUtils.isEmpty(bloodType)) {
|
|
|
- continue;
|
|
|
- }
|
|
|
- bloodType = bloodType.toUpperCase();
|
|
|
- String rh = Content.rhFactor.toUpperCase();
|
|
|
- if (bloodType.contains(rh) &&
|
|
|
- bloodType.contains(CatalogueUtil.removeSpecialChar(rhFactor))) {
|
|
|
- status.set("0");
|
|
|
- return;
|
|
|
- }
|
|
|
+ if (bloodType.contains("白蛋白")) {
|
|
|
+ status.set("0");
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ bloodType = bloodType.toUpperCase();
|
|
|
+ String rh = Content.rhFactor.toUpperCase();
|
|
|
+ if (!bloodType.contains(rh) ||
|
|
|
+ !bloodType.contains(CatalogueUtil.removeSpecialChar(rhFactor))) {
|
|
|
+ status.set("-1");
|
|
|
+ return;
|
|
|
}
|
|
|
}
|
|
|
}
|