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

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 : DEAC0557
 * @Description :  死亡病例讨论无具体讨论意见
 * @Author :kwz
 * @Date: 2020-03-18 18:38
 */
@Component
public class DEAC0557 extends QCCatalogue {
    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
        status.set("0");
        if (inputInfo.getDeathRecordDoc() != null && inputInfo.getDeathRecordDoc().getStructureMap() != null) {
            if(inputInfo.getDeathCaseDiscussDoc() != null){
                Map<String, String> deathRecordStructureMap = inputInfo.getDeathCaseDiscussDoc().getStructureMap();
                String deathTime = deathRecordStructureMap.get("讨论内容");
                if (CatalogueUtil.isEmpty(deathTime)) {
                    status.set("-1");
                }
            }
        }
    }
}