Package org.hl7.fhir.r4.hapi.ctx
Class DefaultProfileValidationSupport
- java.lang.Object
-
- org.hl7.fhir.r4.hapi.ctx.DefaultProfileValidationSupport
-
- All Implemented Interfaces:
ca.uhn.fhir.context.support.IContextValidationSupport<ValueSet.ConceptSetComponent,ValueSetExpander.ValueSetExpansionOutcome,StructureDefinition,CodeSystem,CodeSystem.ConceptDefinitionComponent,org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity>,IValidationSupport
public class DefaultProfileValidationSupport extends Object implements IValidationSupport
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ca.uhn.fhir.context.support.IContextValidationSupport
ca.uhn.fhir.context.support.IContextValidationSupport.BaseConceptProperty, ca.uhn.fhir.context.support.IContextValidationSupport.CodeValidationResult, ca.uhn.fhir.context.support.IContextValidationSupport.CodingConceptProperty, ca.uhn.fhir.context.support.IContextValidationSupport.ConceptDesignation, ca.uhn.fhir.context.support.IContextValidationSupport.LookupCodeResult, ca.uhn.fhir.context.support.IContextValidationSupport.StringConceptProperty
-
-
Constructor Summary
Constructors Constructor Description DefaultProfileValidationSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValueSetExpander.ValueSetExpansionOutcomeexpandValueSet(ca.uhn.fhir.context.FhirContext theContext, ValueSet.ConceptSetComponent theInclude)Expands the given portion of a ValueSetList<org.hl7.fhir.instance.model.api.IBaseResource>fetchAllConformanceResources(ca.uhn.fhir.context.FhirContext theContext)List<StructureDefinition>fetchAllStructureDefinitions(ca.uhn.fhir.context.FhirContext theContext)Load and return all possible structure definitionsCodeSystemfetchCodeSystem(ca.uhn.fhir.context.FhirContext theContext, String theSystem)Fetch a code system by Uri<T extends org.hl7.fhir.instance.model.api.IBaseResource>
TfetchResource(ca.uhn.fhir.context.FhirContext theContext, Class<T> theClass, String theUri)Loads a resource needed by the validation (a StructureDefinition, or a ValueSet)StructureDefinitionfetchStructureDefinition(ca.uhn.fhir.context.FhirContext theContext, String theUrl)ValueSetfetchValueSet(ca.uhn.fhir.context.FhirContext theContext, String uri)Fetch a valueset by Urivoidflush()StructureDefinitiongenerateSnapshot(StructureDefinition theInput, String theUrl, String theWebUrl, String theProfileName)Generate a snapshot from the given differential profile.booleanisCodeSystemSupported(ca.uhn.fhir.context.FhirContext theContext, String theSystem)Returnstrueif codes in the given code system can be expanded or validatedbooleanisValueSetSupported(ca.uhn.fhir.context.FhirContext theContext, String theValueSetUrl)Returnstrueif the given valueset can be validated by the given validation support moduleca.uhn.fhir.context.support.IContextValidationSupport.LookupCodeResultlookupCode(ca.uhn.fhir.context.FhirContext theContext, String theSystem, String theCode)ca.uhn.fhir.context.support.IContextValidationSupport.CodeValidationResultvalidateCode(ca.uhn.fhir.context.FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl)
-
-
-
Constructor Detail
-
DefaultProfileValidationSupport
public DefaultProfileValidationSupport()
-
-
Method Detail
-
expandValueSet
public ValueSetExpander.ValueSetExpansionOutcome expandValueSet(ca.uhn.fhir.context.FhirContext theContext, ValueSet.ConceptSetComponent theInclude)
Description copied from interface:IValidationSupportExpands the given portion of a ValueSet- Specified by:
expandValueSetin interfaceca.uhn.fhir.context.support.IContextValidationSupport<ValueSet.ConceptSetComponent,ValueSetExpander.ValueSetExpansionOutcome,StructureDefinition,CodeSystem,CodeSystem.ConceptDefinitionComponent,org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity>- Specified by:
expandValueSetin interfaceIValidationSupporttheInclude- The portion to include- Returns:
- The expansion
-
fetchAllConformanceResources
public List<org.hl7.fhir.instance.model.api.IBaseResource> fetchAllConformanceResources(ca.uhn.fhir.context.FhirContext theContext)
- Specified by:
fetchAllConformanceResourcesin interfaceca.uhn.fhir.context.support.IContextValidationSupport<ValueSet.ConceptSetComponent,ValueSetExpander.ValueSetExpansionOutcome,StructureDefinition,CodeSystem,CodeSystem.ConceptDefinitionComponent,org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity>
-
fetchAllStructureDefinitions
public List<StructureDefinition> fetchAllStructureDefinitions(ca.uhn.fhir.context.FhirContext theContext)
Description copied from interface:IValidationSupportLoad and return all possible structure definitions- Specified by:
fetchAllStructureDefinitionsin interfaceca.uhn.fhir.context.support.IContextValidationSupport<ValueSet.ConceptSetComponent,ValueSetExpander.ValueSetExpansionOutcome,StructureDefinition,CodeSystem,CodeSystem.ConceptDefinitionComponent,org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity>- Specified by:
fetchAllStructureDefinitionsin interfaceIValidationSupport
-
fetchCodeSystem
public CodeSystem fetchCodeSystem(ca.uhn.fhir.context.FhirContext theContext, String theSystem)
Description copied from interface:IValidationSupportFetch a code system by Uri- Specified by:
fetchCodeSystemin interfaceca.uhn.fhir.context.support.IContextValidationSupport<ValueSet.ConceptSetComponent,ValueSetExpander.ValueSetExpansionOutcome,StructureDefinition,CodeSystem,CodeSystem.ConceptDefinitionComponent,org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity>- Specified by:
fetchCodeSystemin interfaceIValidationSupporttheSystem- Canonical Uri of the code system- Returns:
- The valueset (must not be null, but can be an empty ValueSet)
-
fetchResource
public <T extends org.hl7.fhir.instance.model.api.IBaseResource> T fetchResource(ca.uhn.fhir.context.FhirContext theContext, Class<T> theClass, String theUri)
Description copied from interface:IValidationSupportLoads a resource needed by the validation (a StructureDefinition, or a ValueSet)- Specified by:
fetchResourcein interfaceca.uhn.fhir.context.support.IContextValidationSupport<ValueSet.ConceptSetComponent,ValueSetExpander.ValueSetExpansionOutcome,StructureDefinition,CodeSystem,CodeSystem.ConceptDefinitionComponent,org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity>- Specified by:
fetchResourcein interfaceIValidationSupport- Parameters:
theContext- The HAPI FHIR Context object current in use by the validatortheClass- The type of the resource to loadtheUri- The resource URI- Returns:
- Returns the resource, or
nullif no resource with the given URI can be found
-
fetchStructureDefinition
public StructureDefinition fetchStructureDefinition(ca.uhn.fhir.context.FhirContext theContext, String theUrl)
- Specified by:
fetchStructureDefinitionin interfaceca.uhn.fhir.context.support.IContextValidationSupport<ValueSet.ConceptSetComponent,ValueSetExpander.ValueSetExpansionOutcome,StructureDefinition,CodeSystem,CodeSystem.ConceptDefinitionComponent,org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity>- Specified by:
fetchStructureDefinitionin interfaceIValidationSupport
-
fetchValueSet
public ValueSet fetchValueSet(ca.uhn.fhir.context.FhirContext theContext, String uri)
Description copied from interface:IValidationSupportFetch a valueset by Uri- Specified by:
fetchValueSetin interfaceca.uhn.fhir.context.support.IContextValidationSupport<ValueSet.ConceptSetComponent,ValueSetExpander.ValueSetExpansionOutcome,StructureDefinition,CodeSystem,CodeSystem.ConceptDefinitionComponent,org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity>- Specified by:
fetchValueSetin interfaceIValidationSupporturi- Canonical Uri of the ValueSet- Returns:
- The valueset (must not be null, but can be an empty ValueSet)
-
flush
public void flush()
-
isCodeSystemSupported
public boolean isCodeSystemSupported(ca.uhn.fhir.context.FhirContext theContext, String theSystem)
Description copied from interface:IValidationSupportReturnstrueif codes in the given code system can be expanded or validated- Specified by:
isCodeSystemSupportedin interfaceca.uhn.fhir.context.support.IContextValidationSupport<ValueSet.ConceptSetComponent,ValueSetExpander.ValueSetExpansionOutcome,StructureDefinition,CodeSystem,CodeSystem.ConceptDefinitionComponent,org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity>- Specified by:
isCodeSystemSupportedin interfaceIValidationSupporttheSystem- The URI for the code system, e.g."http://loinc.org"- Returns:
- Returns
trueif codes in the given code system can be validated
-
isValueSetSupported
public boolean isValueSetSupported(ca.uhn.fhir.context.FhirContext theContext, String theValueSetUrl)
Description copied from interface:IValidationSupportReturnstrueif the given valueset can be validated by the given validation support module- Specified by:
isValueSetSupportedin interfaceIValidationSupport- Parameters:
theContext- The FHIR contexttheValueSetUrl- The URL
-
generateSnapshot
public StructureDefinition generateSnapshot(StructureDefinition theInput, String theUrl, String theWebUrl, String theProfileName)
Description copied from interface:IValidationSupportGenerate a snapshot from the given differential profile.- Specified by:
generateSnapshotin interfaceIValidationSupport- Returns:
- Returns null if this module does not know how to handle this request
-
validateCode
public ca.uhn.fhir.context.support.IContextValidationSupport.CodeValidationResult validateCode(ca.uhn.fhir.context.FhirContext theContext, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl)
- Specified by:
validateCodein interfaceca.uhn.fhir.context.support.IContextValidationSupport<ValueSet.ConceptSetComponent,ValueSetExpander.ValueSetExpansionOutcome,StructureDefinition,CodeSystem,CodeSystem.ConceptDefinitionComponent,org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity>
-
lookupCode
public ca.uhn.fhir.context.support.IContextValidationSupport.LookupCodeResult lookupCode(ca.uhn.fhir.context.FhirContext theContext, String theSystem, String theCode)
- Specified by:
lookupCodein interfaceca.uhn.fhir.context.support.IContextValidationSupport<ValueSet.ConceptSetComponent,ValueSetExpander.ValueSetExpansionOutcome,StructureDefinition,CodeSystem,CodeSystem.ConceptDefinitionComponent,org.hl7.fhir.utilities.validation.ValidationMessage.IssueSeverity>
-
-