Class ChEmedEprHapiValidator
java.lang.Object
org.projecthusky.fhir.validation.impl.HuskyFhirValidatorImpl
org.projecthusky.fhir.emed.ch.epr.validator.ChEmedEprHapiValidator
- All Implemented Interfaces:
ChEmedEprValidator,HuskyFhirValidator
A HAPI based implementation of the
ChEmedEprValidator.-
Field Summary
Fields inherited from class org.projecthusky.fhir.validation.impl.HuskyFhirValidatorImpl
chain, logValidationOutcome, prepopulatedValidationSupport, validationResultLogger, validatorFields inherited from interface org.projecthusky.fhir.emed.ch.epr.validator.ChEmedEprValidator
packageResourceList -
Constructor Summary
ConstructorsConstructorDescriptionChEmedEprHapiValidator(ca.uhn.fhir.context.FhirContext context) Creates an instance of an offlineChEmedEprValidator, that is, a validator that will not try to use external terminology services, and that uses HAPI's validation engine.ChEmedEprHapiValidator(ca.uhn.fhir.context.FhirContext context, @Nullable String txServer) Creates an instance of a HAPI basedChEmedEprValidator. -
Method Summary
Modifier and TypeMethodDescriptionvalidateDocumentBundle(InputStream documentStream, ChEmedEprDocument document) Validates a CH-EMED-EPR document Bundle AND performs a logic validation of the content as well.Methods inherited from class org.projecthusky.fhir.validation.impl.HuskyFhirValidatorImpl
addValidationMessagePostProcessingInterceptor, getDefaultValidationResultLogger, getInterceptors, getLog, handleValidationResult, logValidationResult, setInterceptors, setLogValidationOutcome, setValidationResultLogger, validateDocumentBundle, validateResourceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.projecthusky.fhir.validation.HuskyFhirValidator
getLog, validateDocumentBundle, validateResource
-
Constructor Details
-
ChEmedEprHapiValidator
Creates an instance of an offlineChEmedEprValidator, that is, a validator that will not try to use external terminology services, and that uses HAPI's validation engine.- Parameters:
context- The FHIR context to be used.- Throws:
IOException- if the NPM packages can't be found in the classpath.
-
ChEmedEprHapiValidator
public ChEmedEprHapiValidator(ca.uhn.fhir.context.FhirContext context, @Nullable String txServer) throws IOException Creates an instance of a HAPI basedChEmedEprValidator.- Parameters:
context- The FHIR context to be used.txServer- The URL of the terminology server to be used. Ifnullor blank, no external terminology services will be used for validation.- Throws:
IOException- if the NPM packages can't be found in the classpath.
-
-
Method Details
-
validateDocumentBundle
public ValidationResult validateDocumentBundle(InputStream documentStream, ChEmedEprDocument document) throws IOException Description copied from interface:ChEmedEprValidatorValidates a CH-EMED-EPR document Bundle AND performs a logic validation of the content as well.- Specified by:
validateDocumentBundlein interfaceChEmedEprValidator- Parameters:
documentStream- The document Bundle to validate as a stream.document- The parsed CH EMED EPR document, for the logic validator.- Returns:
- the validation result.
- Throws:
IOException
-