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

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.FirstCourseRecordDoc;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @ClassName : FIRC0083
 * @Description : 病例特点与现病史内容雷同
 * @Author : 楼辉荣
 * @Date: 2020-03-06 17:28
 */
@Component
public class FIRC0083 extends QCCatalogue {
    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
        status.set("0");
        FirstCourseRecordDoc firstCourseRecordDoc = inputInfo.getFirstCourseRecordDoc();
        if (firstCourseRecordDoc == null || firstCourseRecordDoc.getCaseCharacteristicLabel() == null) {
            return;
        }
        double likeRate = firstCourseRecordDoc.getCaseCharacteristicLabel().getLikeRate();
        // 根据医学部要求将相似度阈值提高到85%
        if (likeRate > 0.95) {
            status.set("-1");
        }
    }
}