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 : BEH02813
 * @Description :  手术外伤史未填写
 * @Author : 胡敬
 * @Date: 2020-06-16 10:04
 */
@Component
public class BEH02813 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");
            }
        }
    }
}