Class CommonCodeSystemsTerminologyService
java.lang.Object
org.hl7.fhir.common.hapi.validation.support.CommonCodeSystemsTerminologyService
- All Implemented Interfaces:
ca.uhn.fhir.context.support.IValidationSupport
public class CommonCodeSystemsTerminologyService
extends Object
implements ca.uhn.fhir.context.support.IValidationSupport
This
validation support module
can be used to validate codes against common
CodeSystems that are commonly used, but are not distriuted with the FHIR specification for various reasons
(size, complexity, etc.).
See CommonCodeSystemsTerminologyService in the HAPI FHIR documentation for details about what is and isn't covered by this class.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ca.uhn.fhir.context.support.IValidationSupport
ca.uhn.fhir.context.support.IValidationSupport.BaseConceptProperty, ca.uhn.fhir.context.support.IValidationSupport.CodeValidationIssue, ca.uhn.fhir.context.support.IValidationSupport.CodeValidationIssueCode, ca.uhn.fhir.context.support.IValidationSupport.CodeValidationIssueCoding, ca.uhn.fhir.context.support.IValidationSupport.CodeValidationIssueDetails, ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult, ca.uhn.fhir.context.support.IValidationSupport.CodingConceptProperty, ca.uhn.fhir.context.support.IValidationSupport.ConceptDesignation, ca.uhn.fhir.context.support.IValidationSupport.GroupConceptProperty, ca.uhn.fhir.context.support.IValidationSupport.IssueSeverity, ca.uhn.fhir.context.support.IValidationSupport.LookupCodeResult, ca.uhn.fhir.context.support.IValidationSupport.StringConceptProperty, ca.uhn.fhir.context.support.IValidationSupport.TranslateCodeRequest, ca.uhn.fhir.context.support.IValidationSupport.ValueSetExpansionOutcome
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from interface ca.uhn.fhir.context.support.IValidationSupport
TYPE_CODING, TYPE_GROUP, TYPE_STRING, URL_PREFIX_VALUE_SET
-
Constructor Summary
ConstructorDescriptionCommonCodeSystemsTerminologyService
(ca.uhn.fhir.context.FhirContext theFhirContext) Constructor -
Method Summary
Modifier and TypeMethodDescriptionorg.hl7.fhir.instance.model.api.IBaseResource
fetchCodeSystem
(String theSystem) static String
getCodeSystemUrl
(ca.uhn.fhir.context.FhirContext theFhirContext, org.hl7.fhir.instance.model.api.IBaseResource theCodeSystem) protected String
getErrorMessage
(String errorCode, String theFirstParam, String theSecondParam) ca.uhn.fhir.context.FhirContext
static ca.uhn.fhir.context.FhirVersionEnum
getFhirVersionEnum
(ca.uhn.fhir.context.FhirContext theFhirContext, org.hl7.fhir.instance.model.api.IBaseResource theResource) N.B.: We are keeping this as a shim due to the upgrade we did to core 5.6.97+getName()
protected ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult
getValidateCodeResultError
(String theMessage) protected ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult
getValidateCodeResultInError
(String errorCode, String theFirstParam, String theSecondParam) protected ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult
getValidateCodeResultOk
(String theCode, String theDisplay) static String
getValueSetUrl
(ca.uhn.fhir.context.FhirContext theFhirContext, org.hl7.fhir.instance.model.api.IBaseResource theValueSet) static String
getValueSetVersion
(ca.uhn.fhir.context.FhirContext theFhirContext, org.hl7.fhir.instance.model.api.IBaseResource theValueSet) boolean
isCodeSystemSupported
(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, String theSystem) boolean
isValueSetSupported
(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, String theValueSetUrl) ca.uhn.fhir.context.support.IValidationSupport.LookupCodeResult
lookupCode
(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, ca.uhn.fhir.context.support.LookupCodeRequest theLookupCodeRequest) ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult
validateCode
(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, ca.uhn.fhir.context.support.ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult
validateCodeInValueSet
(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, ca.uhn.fhir.context.support.ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, org.hl7.fhir.instance.model.api.IBaseResource theValueSet) ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult
validateCodeUsingSystemLookup
(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, String theCode, String theSystem) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ca.uhn.fhir.context.support.IValidationSupport
expandValueSet, expandValueSet, fetchAllConformanceResources, fetchAllNonBaseStructureDefinitions, fetchAllSearchParameters, fetchAllStructureDefinitions, fetchBinary, fetchResource, fetchStructureDefinition, fetchValueSet, generateSnapshot, invalidateCaches, isCodeableConceptValidationSuccessfulIfNotAllCodingsAreValid, isRemoteTerminologyServiceConfigured, lookupCode, lookupCode, translateConcept
-
Field Details
-
LANGUAGES_VALUESET_URL
- See Also:
-
LANGUAGES_CODESYSTEM_URL
- See Also:
-
MIMETYPES_VALUESET_URL
- See Also:
-
MIMETYPES_CODESYSTEM_URL
- See Also:
-
CURRENCIES_CODESYSTEM_URL
- See Also:
-
CURRENCIES_VALUESET_URL
- See Also:
-
COUNTRIES_CODESYSTEM_URL
- See Also:
-
UCUM_CODESYSTEM_URL
- See Also:
-
UCUM_VALUESET_URL
- See Also:
-
ALL_LANGUAGES_VALUESET_URL
- See Also:
-
USPS_CODESYSTEM_URL
- See Also:
-
USPS_VALUESET_URL
- See Also:
-
-
Constructor Details
-
CommonCodeSystemsTerminologyService
Constructor
-
-
Method Details
-
getName
- Specified by:
getName
in interfaceca.uhn.fhir.context.support.IValidationSupport
-
validateCodeInValueSet
public ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult validateCodeInValueSet(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, ca.uhn.fhir.context.support.ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, @Nonnull org.hl7.fhir.instance.model.api.IBaseResource theValueSet) - Specified by:
validateCodeInValueSet
in interfaceca.uhn.fhir.context.support.IValidationSupport
-
validateCode
public ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult validateCode(@Nonnull ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, @Nonnull ca.uhn.fhir.context.support.ConceptValidationOptions theOptions, String theCodeSystem, String theCode, String theDisplay, String theValueSetUrl) - Specified by:
validateCode
in interfaceca.uhn.fhir.context.support.IValidationSupport
-
getValidateCodeResultInError
protected ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult getValidateCodeResultInError(String errorCode, String theFirstParam, String theSecondParam) -
getValidateCodeResultOk
protected ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult getValidateCodeResultOk(String theCode, String theDisplay) -
getValidateCodeResultError
protected ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult getValidateCodeResultError(String theMessage) -
validateCodeUsingSystemLookup
@Nullable public ca.uhn.fhir.context.support.IValidationSupport.CodeValidationResult validateCodeUsingSystemLookup(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, String theCode, String theSystem) -
lookupCode
public ca.uhn.fhir.context.support.IValidationSupport.LookupCodeResult lookupCode(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, @Nonnull ca.uhn.fhir.context.support.LookupCodeRequest theLookupCodeRequest) - Specified by:
lookupCode
in interfaceca.uhn.fhir.context.support.IValidationSupport
-
fetchCodeSystem
- Specified by:
fetchCodeSystem
in interfaceca.uhn.fhir.context.support.IValidationSupport
-
isCodeSystemSupported
public boolean isCodeSystemSupported(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, String theSystem) - Specified by:
isCodeSystemSupported
in interfaceca.uhn.fhir.context.support.IValidationSupport
-
isValueSetSupported
public boolean isValueSetSupported(ca.uhn.fhir.context.support.ValidationSupportContext theValidationSupportContext, String theValueSetUrl) - Specified by:
isValueSetSupported
in interfaceca.uhn.fhir.context.support.IValidationSupport
-
getFhirContext
- Specified by:
getFhirContext
in interfaceca.uhn.fhir.context.support.IValidationSupport
-
getValueSetUrl
public static String getValueSetUrl(ca.uhn.fhir.context.FhirContext theFhirContext, @Nonnull org.hl7.fhir.instance.model.api.IBaseResource theValueSet) -
getCodeSystemUrl
public static String getCodeSystemUrl(@Nonnull ca.uhn.fhir.context.FhirContext theFhirContext, @Nonnull org.hl7.fhir.instance.model.api.IBaseResource theCodeSystem) -
getValueSetVersion
public static String getValueSetVersion(@Nonnull ca.uhn.fhir.context.FhirContext theFhirContext, @Nonnull org.hl7.fhir.instance.model.api.IBaseResource theValueSet) -
getFhirVersionEnum
public static ca.uhn.fhir.context.FhirVersionEnum getFhirVersionEnum(@Nonnull ca.uhn.fhir.context.FhirContext theFhirContext, @Nonnull org.hl7.fhir.instance.model.api.IBaseResource theResource) N.B.: We are keeping this as a shim due to the upgrade we did to core 5.6.97+ -
getErrorMessage
-