001package org.hl7.fhir.r5.terminologies.providers; 002 003import java.util.List; 004 005import org.hl7.fhir.r5.model.Extension; 006import org.hl7.fhir.r5.model.Parameters; 007import org.hl7.fhir.r5.model.ValueSet; 008import org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent; 009import org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionComponent; 010import org.hl7.fhir.r5.model.ValueSet.ValueSetExpansionPropertyComponent; 011 012/** 013 * For special code systems where the code system resource isn't enough, but we can support them internall 014 * Usually, small grammar based code systems 015 * 016 * @author grahamegrieve 017 * 018 */ 019public abstract class CodeSystemProvider { 020 021 public static CodeSystemProvider factory(String system) { 022 switch (system) { 023 case "http://hl7.org/fhir/color-rgb" : return new ColorRGBProvider(); 024 default: 025 return null; 026 } 027 } 028 029 public abstract void includeCodes(ConceptSetComponent inc, boolean heirarchical, ValueSetExpansionComponent exp, 030 List<ValueSet> imports, Parameters expParams, List<Extension> extensions, boolean noInactive, 031 List<ValueSetExpansionPropertyComponent> vsProps) throws CodeSystemProviderExtension; 032 033 public abstract Boolean checkCode(String code); 034 035}