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

import com.lantone.qc.kernel.catalogue.QCCatalogue;
import com.lantone.qc.kernel.util.CatalogueUtil;
import com.lantone.qc.pub.model.InputInfo;
import com.lantone.qc.pub.model.OutputInfo;
import org.springframework.stereotype.Component;

import java.util.Map;


/**
 * @ClassName : BEH0484
 * @Description : 外生殖器检查未填写
 * @Author : 胡敬
 * @Date: 2020-03-26 19:54
 */
@Component
public class BEH0484 extends QCCatalogue {
    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
        status.set("0");
        if (inputInfo.getBeHospitalizedDoc() == null) {
            return;
        }
        Map<String, String> structureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
        if (structureMap != null) {
            if (CatalogueUtil.isEmpty(structureMap.get("外生殖器"))) {
                status.set("-1");
            }
        }
    }
}