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

import com.lantone.qc.kernel.catalogue.QCCatalogue;
import com.lantone.qc.pub.Content;
import com.lantone.qc.pub.model.InputInfo;
import com.lantone.qc.pub.model.OutputInfo;
import com.lantone.qc.pub.util.ListUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @ClassName : FIRP0172
 * @Description :门（急）诊诊断未填写
 * @Author : 胡敬
 * @Date: 2020-03-16 13:10
 */
@Component
public class FIRP0172 extends QCCatalogue {
    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
        status.set("0");
        if (inputInfo.getFirstPageRecordDoc() != null && inputInfo.getFirstPageRecordDoc().getStructureMap() != null) {
            Map<String, Object> firstpageStructureMap = inputInfo.getFirstPageRecordDoc().getStructureExtMap();
            String outpatientEmergencyDiag = (String) firstpageStructureMap.get(Content.outpatientEmergencyDiag);
            if (StringUtils.isEmpty(outpatientEmergencyDiag)) {
                status.set("-1");
            }
        }
    }
}