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.util.StringUtil;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @ClassName : BEH0464
 * @Description :  既往史缺呼吸系统疾病史描述
 * @Author : 胡敬
 * @Date: 2020-03-27 10:27
 */
@Component
public class BEH0464 extends QCCatalogue {
    @Override
    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
        status.set("0");
        if (inputInfo.getBeHospitalizedDoc() == null) {
            return;
        }
        if (inputInfo.getBeHospitalizedDoc() != null) {
            Map<String, String> beHospitalStructureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
            if (StringUtil.isBlank(beHospitalStructureMap.get("呼吸系统疾病"))) {
                status.set("-1");
            }
        }
    }
}