package com.yihu.ehr.analyze.config; import com.yihu.ehr.profile.EventType; import com.yihu.ehr.profile.exception.AnalyzerException; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.stereotype.Component; import java.util.ArrayList; import java.util.List; /** * 就诊事件必要数据集配置 * Created by progr1mmer on 2018/7/23. */ @Component @ConfigurationProperties(prefix = "ehr.require-data-sets") public class RequireDatasetsConfig { private List clinic = new ArrayList<>(); private List resident = new ArrayList<>(); private List medicalExam = new ArrayList<>(); private List maternalAndChild = new ArrayList<>(); public List getRequireDataset(EventType eventType) { switch (eventType) { case Clinic: return clinic; case Resident: return resident; case MedicalExam: return medicalExam; case MaternalAndChild: return maternalAndChild; default: throw new AnalyzerException("Unknown event type " + eventType); } } public List getClinic() { return clinic; } public List getResident() { return resident; } public List getMedicalExam() { return medicalExam; } public List getMaternalAndChild() { return maternalAndChild; } }