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

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

import java.util.List;


/**
 * @ClassName : BEH0003
 * @Description : 主诉字数超过20个字
 * @Author : 楼辉荣
 * @Date: 2020-03-06 17:28
 */
@Component
public class BEH0003 extends QCCatalogue {
    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
        if(inputInfo.getBeHospitalizedDoc() == null){
            status.set("0");
            return;
        }
        String chief_text = inputInfo.getBeHospitalizedDoc().getChiefLabel().getText();
        int chief_text_length = chief_text.replaceAll("[\\p{Punct}\\pP]", "").length();
        if(chief_text_length<=20)
        {
            status.set("0");
        }
    }
}