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

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 com.lantone.qc.pub.model.doc.RescueDoc;
import com.lantone.qc.pub.util.ListUtil;
import org.springframework.stereotype.Component;

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

/**
 * @ClassName : THR0680
 * @Description : 抢救记录无病情变化情况
 * @Author : 胡敬
 * @Date: 2020-03-30 13:00
 */
@Component
public class THR0680 extends QCCatalogue {
    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
        status.set("0");
        List<RescueDoc> rescueDocs = inputInfo.getRescueDocs();
        if (ListUtil.isEmpty(rescueDocs)) {
            return;
        }
        for (RescueDoc rescueDoc : rescueDocs) {
            Map<String, String> rescueStructureMap = rescueDoc.getStructureMap();
            if (CatalogueUtil.isEmpty(rescueStructureMap.get("病情变化"))) {
                status.set("-1");
                return;
            }
        }
    }
}