|
@@ -4,10 +4,10 @@ import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
|
|
import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
|
|
-import com.lantone.qc.pub.model.doc.FirstCourseRecordDoc;
|
|
|
|
import com.lantone.qc.pub.model.entity.Diag;
|
|
import com.lantone.qc.pub.model.entity.Diag;
|
|
import com.lantone.qc.pub.model.label.DiagLabel;
|
|
import com.lantone.qc.pub.model.label.DiagLabel;
|
|
-import com.lantone.qc.pub.util.ListUtil;
|
|
|
|
|
|
+import com.lantone.qc.pub.model.label.PastLabel;
|
|
|
|
+import com.lantone.qc.pub.model.label.PresentLabel;
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
@@ -24,32 +24,52 @@ import java.util.List;
|
|
@Component
|
|
@Component
|
|
public class FIRC0095 extends QCCatalogue {
|
|
public class FIRC0095 extends QCCatalogue {
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
- FirstCourseRecordDoc firstCourseRecordDoc = inputInfo.getFirstCourseRecordDoc();
|
|
|
|
|
|
+ // FirstCourseRecordDoc firstCourseRecordDoc = inputInfo.getFirstCourseRecordDoc();
|
|
BeHospitalizedDoc beHospitalizedDoc = inputInfo.getBeHospitalizedDoc();
|
|
BeHospitalizedDoc beHospitalizedDoc = inputInfo.getBeHospitalizedDoc();
|
|
- if (firstCourseRecordDoc == null || beHospitalizedDoc == null) {
|
|
|
|
|
|
+ if (beHospitalizedDoc == null) {
|
|
status.set("0");
|
|
status.set("0");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- DiagLabel initialDiagLabel = firstCourseRecordDoc.getInitialDiagLabel();
|
|
|
|
- DiagLabel initialDiagLabel1 = beHospitalizedDoc.getInitialDiagLabel();
|
|
|
|
- if (initialDiagLabel != null && initialDiagLabel1 != null) {
|
|
|
|
- List<Diag> diags = initialDiagLabel.getDiags();
|
|
|
|
- List<Diag> diags1 = initialDiagLabel1.getDiags();
|
|
|
|
- List<String> firstDiags = new ArrayList<>();
|
|
|
|
- List<String> bhDiags = new ArrayList<>();
|
|
|
|
- if (diags != null && diags.size() > 0) {
|
|
|
|
- copyDiag(diags, firstDiags);
|
|
|
|
- copyDiag(diags1, bhDiags);
|
|
|
|
- if (ListUtil.equals(firstDiags, bhDiags)) {
|
|
|
|
- status.set("0");
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ //DiagLabel initialDiagLabel = firstCourseRecordDoc.getInitialDiagLabel();
|
|
|
|
+ PresentLabel presentLabel = beHospitalizedDoc.getPresentLabel();
|
|
|
|
+ PastLabel pastLabel = beHospitalizedDoc.getPastLabel();
|
|
|
|
+ DiagLabel initialDiagLabel = beHospitalizedDoc.getInitialDiagLabel();
|
|
|
|
+
|
|
|
|
+ if (initialDiagLabel == null) {
|
|
|
|
+ status.set("0");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ List<String> bhDiags = new ArrayList<>();
|
|
|
|
+ /* 现病史诊断 */
|
|
|
|
+ if (presentLabel != null && presentLabel.getDiags() != null) {
|
|
|
|
+ List<Diag> presentDiags = presentLabel.getDiags();
|
|
|
|
+ copyDiag(presentDiags, bhDiags);
|
|
|
|
+ }
|
|
|
|
+ /* 既往史诊断 */
|
|
|
|
+ if (pastLabel != null && pastLabel.getDiags() != null) {
|
|
|
|
+ List<Diag> pastDiags = pastLabel.getDiags();
|
|
|
|
+ copyDiag(pastDiags, bhDiags);
|
|
|
|
+ }
|
|
|
|
+ /* 初步诊断 */
|
|
|
|
+ List<Diag> diags = initialDiagLabel.getDiags();
|
|
|
|
+ List<String> initDiags = new ArrayList<>();
|
|
|
|
+ if (diags != null) {
|
|
|
|
+ copyDiag(diags, initDiags);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //List<Diag> diags1 = initialDiagLabel1.getDiags();
|
|
|
|
+ /* 初步诊断包含现病史诊断和既往史诊断 */
|
|
|
|
+ if (initDiags.containsAll(bhDiags)) {
|
|
|
|
+ status.set("0");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
private void copyDiag(List<Diag> diags, List<String> diagList) {
|
|
private void copyDiag(List<Diag> diags, List<String> diagList) {
|
|
String hospitalDiagName, name;
|
|
String hospitalDiagName, name;
|
|
for (Diag diag : diags) {
|
|
for (Diag diag : diags) {
|
|
|
|
+ if (diag.getNegative() != null) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
hospitalDiagName = diag.getHospitalDiagName();
|
|
hospitalDiagName = diag.getHospitalDiagName();
|
|
name = diag.getName();
|
|
name = diag.getName();
|
|
if (StringUtil.isNotBlank(hospitalDiagName)) {
|
|
if (StringUtil.isNotBlank(hospitalDiagName)) {
|