public class DefaultProfileValidationSupport extends Object implements IValidationSupport
IValidationSupport.CodeValidationResult| Constructor and Description |
|---|
DefaultProfileValidationSupport() |
| Modifier and Type | Method and Description |
|---|---|
ValueSet.ValueSetExpansionComponent |
expandValueSet(FhirContext theContext,
ValueSet.ConceptSetComponent theInclude)
Expands the given portion of a ValueSet
|
ValueSet |
fetchCodeSystem(FhirContext theContext,
String theSystem)
Fetch a code system by ID
|
<T extends IBaseResource> |
fetchResource(FhirContext theContext,
Class<T> theClass,
String theUri)
Loads a resource needed by the validation (a StructureDefinition, or a
ValueSet)
|
boolean |
isCodeSystemSupported(FhirContext theContext,
String theSystem)
Returns
true if codes in the given code system can be expanded
or validated |
IValidationSupport.CodeValidationResult |
validateCode(FhirContext theContext,
String theCodeSystem,
String theCode,
String theDisplay)
Validates that the given code exists and if possible returns a display
name.
|
public boolean isCodeSystemSupported(FhirContext theContext, String theSystem)
IValidationSupporttrue if codes in the given code system can be expanded
or validatedisCodeSystemSupported in interface IValidationSupporttheSystem - The URI for the code system, e.g. "http://loinc.org"true if codes in the given code system can be
validatedpublic <T extends IBaseResource> T fetchResource(FhirContext theContext, Class<T> theClass, String theUri)
IValidationSupportfetchResource in interface IValidationSupporttheContext - The HAPI FHIR Context object current in use by the validatortheClass - The type of the resource to loadtheUri - The resource URInull if no resource with the
given URI can be foundpublic IValidationSupport.CodeValidationResult validateCode(FhirContext theContext, String theCodeSystem, String theCode, String theDisplay)
IValidationSupportObservation.code in the default profile.validateCode in interface IValidationSupporttheCodeSystem - The code system, e.g. "http://loinc.org"theCode - The code, e.g. "1234-5"theDisplay - The display name, if it should also be validatedpublic ValueSet fetchCodeSystem(FhirContext theContext, String theSystem)
IValidationSupportfetchCodeSystem in interface IValidationSupporttheSystem - The code systempublic ValueSet.ValueSetExpansionComponent expandValueSet(FhirContext theContext, ValueSet.ConceptSetComponent theInclude)
IValidationSupportexpandValueSet in interface IValidationSupporttheInclude - The portion to includeCopyright © 2014–2015 University Health Network. All rights reserved.