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

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.model.doc.DoctorAdviceDoc;
import com.lantone.qc.pub.model.doc.NoticeOfConversationDoc;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
 * @ClassName : MEDI02888
 * @Description : 缺入院72小时内谈话记录
 * @Author : 胡敬
 * @Date: 2020-04-21 18:40
 */
@Component
public class MEDI02888 extends QCCatalogue {
    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
        status.set("0");
        NoticeOfConversationDoc noticeOfConversationDoc = inputInfo.getNoticeOfConversationDoc();
        if (noticeOfConversationDoc == null){
            return;
        }
        if(inputInfo.getOperationDocs() != null && inputInfo.getOperationDocs().size() != 0){//手术患者可以没无72
            return;
        }
        Map<String, String> structureMap = noticeOfConversationDoc.getStructureMap();
        if (!structureMap.containsKey("入院72小时内谈话记录")){
            status.set("-1");
        }
    }
}