package com.lantone.qc.kernel.catalogue.behospitalized;

import com.lantone.qc.kernel.catalogue.QCCatalogue;
import com.lantone.qc.pub.model.InputInfo;
import com.lantone.qc.pub.model.OutputInfo;
import com.lantone.qc.pub.model.doc.BeHospitalizedDoc;
import com.lantone.qc.pub.model.entity.Clinical;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;


/**
 * @ClassName : BEH0448
 * @Description : 现病史症状缺少伴随症状
 * @Author : Mark
 * @Date: 2020-04-05 10:58
 */
@Component
public class BEH0448 extends QCCatalogue {
    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
        status.set("0");
        if (inputInfo.getBeHospitalizedDoc() == null) {
            return;
        }
        BeHospitalizedDoc beHospitalizedDoc = inputInfo.getBeHospitalizedDoc();
        if (beHospitalizedDoc != null) {
            List<Clinical> clinicals = beHospitalizedDoc.getPresentLabel().getClinicals();
            if (clinicals.size() < 2) {
                status.set("-1");
                return;
            }
        }
    }
}