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

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

import java.util.Map;

/**
 * @ClassName : FIRC0500
 * @Description : 首程主诉与入院记录主诉不一致
 * @Author : 楼辉荣
 * @Date: 2020-03-06 17:28
 */
@Component
public class FIRC0500 extends QCCatalogue {
    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
        status.set("0");
        FirstCourseRecordDoc firstCourseRecordDoc = inputInfo.getFirstCourseRecordDoc();
        BeHospitalizedDoc beHospitalizedDoc = inputInfo.getBeHospitalizedDoc();
        if(firstCourseRecordDoc != null && beHospitalizedDoc != null) {
            String chief_text = beHospitalizedDoc.getChiefLabel().getText();
            if(!firstCourseRecordDoc.getText().contains(chief_text)){
                status.set("-1");
            }
        }
    }
    }