Interface ChEmedEprValidator
- All Known Implementing Classes:
ChEmedEprHapiValidator
public interface ChEmedEprValidator
A CH-EMED-EPR validator. It doesn't use the Schema or Schematron validators but only the Instance one, which is built
upon the CH-EMED-EPR IG.
This interface should be independent of the actual validation engine being used. Engine-specific implementations of this interface should cover their specifics.
- Author:
- Quentin Ligier
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringDeprecated, for removal: This API element is subject to removal in a future version.Deprecated and marked for removal since Husky 3.2.2.static ValidationIssuemapIssue(org.hl7.fhir.r4.model.OperationOutcome.OperationOutcomeIssueComponent component) Maps anOperationOutcomeissue to Husky's own model of a validation issue.static ValidationResulttoHuskyValidationResult(org.hl7.fhir.r4.model.OperationOutcome operationOutcome) Translates a FHIR operation outcome to a Husky validation result.validateDocumentBundle(InputStream documentStream, ChEmedEprDocument document) Validates a CH-EMED-EPR document Bundle AND performs a logic validation of the content as well.validateDocumentBundle(org.hl7.fhir.r4.model.Bundle bundle, String profile) Validates a CH-EMED-EPR document Bundle.
-
Field Details
-
packageResourceList
-
-
Method Details
-
validateDocumentBundle
ValidationResult validateDocumentBundle(InputStream documentStream, ChEmedEprDocument document) throws IOException Validates a CH-EMED-EPR document Bundle AND performs a logic validation of the content as well.- 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- Implementation Note:
- We need the parsed document for the logical validator and the serialized document for the instance validator, because HAPI's parser messes with resource IDs.
-
validateDocumentBundle
ValidationResult validateDocumentBundle(org.hl7.fhir.r4.model.Bundle bundle, String profile) throws IOException Validates a CH-EMED-EPR document Bundle. No logic validation is performed on the content.- Parameters:
bundle- The document Bundle to be validated.profile- The profile to match the bundle against.- Returns:
- the validation result.
- Throws:
IOException
-
mapIssue
static ValidationIssue mapIssue(org.hl7.fhir.r4.model.OperationOutcome.OperationOutcomeIssueComponent component) Maps anOperationOutcomeissue to Husky's own model of a validation issue.- Parameters:
component- The FHIR operation outcome issue.- Returns:
- The translated Husky validation issue.
-
toHuskyValidationResult
static ValidationResult toHuskyValidationResult(org.hl7.fhir.r4.model.OperationOutcome operationOutcome) Translates a FHIR operation outcome to a Husky validation result. -
getProfileUrl
Deprecated, for removal: This API element is subject to removal in a future version.Deprecated and marked for removal since Husky 3.2.2. Useinstead.invalid reference
EmedDocumentType#getProfileEpr()Returns the profile URL from the eMed type.- Parameters:
type- The eMed type.- Returns:
- the profile URL.
-