|
@@ -5,6 +5,7 @@ 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 com.lantone.qc.pub.model.doc.DeathRecordDoc;
|
|
|
import com.lantone.qc.pub.model.entity.Diag;
|
|
|
import com.lantone.qc.pub.model.label.DiagLabel;
|
|
|
import com.lantone.qc.pub.util.ListUtil;
|
|
@@ -24,29 +25,32 @@ public class LEA0514 extends QCCatalogue {
|
|
|
@Override
|
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
status.set("0");
|
|
|
- if (inputInfo.getLeaveHospitalDoc() != null || inputInfo.getFirstPageRecordDoc() != null) {
|
|
|
- DiagLabel leaveDiagLabel = inputInfo.getLeaveHospitalDoc().getLeaveDiagLabel();
|
|
|
- Map<String, Object> firstPageRecordStructureExtMap = inputInfo.getFirstPageRecordDoc().getStructureExtMap();
|
|
|
- List<Map<String, String>> dischargeDiagStructure = (List<Map<String, String>>) firstPageRecordStructureExtMap.get(Content.dischargeDiag);
|
|
|
- if (ListUtil.isEmpty(dischargeDiagStructure)){
|
|
|
- return;
|
|
|
- }
|
|
|
- //首页出院诊断
|
|
|
- List<Diag> dischargeDiags = new ArrayList<>();
|
|
|
- for (Map<String, String> dischargeDiagMap:dischargeDiagStructure) {
|
|
|
- String diagnoseName = dischargeDiagMap.get(Content.diagnoseName);
|
|
|
- if (CatalogueUtil.isEmpty(diagnoseName)){
|
|
|
- continue;
|
|
|
+ DeathRecordDoc deathRecordDoc = inputInfo.getDeathRecordDoc();
|
|
|
+ if (deathRecordDoc.getText() == null) {
|
|
|
+ if (inputInfo.getLeaveHospitalDoc() != null || inputInfo.getFirstPageRecordDoc() != null) {
|
|
|
+ DiagLabel leaveDiagLabel = inputInfo.getLeaveHospitalDoc().getLeaveDiagLabel();
|
|
|
+ Map<String, Object> firstPageRecordStructureExtMap = inputInfo.getFirstPageRecordDoc().getStructureExtMap();
|
|
|
+ List<Map<String, String>> dischargeDiagStructure = (List<Map<String, String>>) firstPageRecordStructureExtMap.get(Content.dischargeDiag);
|
|
|
+ if (ListUtil.isEmpty(dischargeDiagStructure)) {
|
|
|
+ return;
|
|
|
}
|
|
|
- Diag diag = new Diag();
|
|
|
- diag.setName(diagnoseName);
|
|
|
- dischargeDiags.add(diag);
|
|
|
- }
|
|
|
- if (leaveDiagLabel != null) {
|
|
|
- //出院记录出院诊断
|
|
|
- List<Diag> beHospitalizedDiags = leaveDiagLabel.getDiags();
|
|
|
- if (!ListUtil.equals(beHospitalizedDiags, dischargeDiags)) {
|
|
|
- status.set("-1");
|
|
|
+ //首页出院诊断
|
|
|
+ List<Diag> dischargeDiags = new ArrayList<>();
|
|
|
+ for (Map<String, String> dischargeDiagMap : dischargeDiagStructure) {
|
|
|
+ String diagnoseName = dischargeDiagMap.get(Content.diagnoseName);
|
|
|
+ if (CatalogueUtil.isEmpty(diagnoseName)) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ Diag diag = new Diag();
|
|
|
+ diag.setName(diagnoseName);
|
|
|
+ dischargeDiags.add(diag);
|
|
|
+ }
|
|
|
+ if (leaveDiagLabel != null) {
|
|
|
+ //出院记录出院诊断
|
|
|
+ List<Diag> beHospitalizedDiags = leaveDiagLabel.getDiags();
|
|
|
+ if (!ListUtil.equals(beHospitalizedDiags, dischargeDiags)) {
|
|
|
+ status.set("-1");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|