Class ChEmedEprValidator
java.lang.Object
org.projecthusky.fhir.emed.ch.epr.validator.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.
- Author:
- Quentin Ligier
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
Returns the profile URL from the eMed type.protected ValidationIssue
mapIssue
(org.hl7.fhir.r4.model.OperationOutcome.OperationOutcomeIssueComponent component) validateDocumentBundle
(InputStream documentStream, ChEmedEprDocument document, org.hl7.fhir.r5.elementmodel.Manager.FhirFormat streamFormat) Validates a CH-EMED-EPR document Bundle.validateDocumentBundle
(org.hl7.fhir.r4.model.Bundle bundle, String profile)
-
Constructor Details
-
ChEmedEprValidator
Constructor.- Throws:
IOException
- if the NPM packages can't be found in the classpath.URISyntaxException
-
-
Method Details
-
validateDocumentBundle
public ValidationResult validateDocumentBundle(InputStream documentStream, ChEmedEprDocument document, org.hl7.fhir.r5.elementmodel.Manager.FhirFormat streamFormat) throws org.hl7.fhir.r5.utils.EOperationOutcome, IOException Validates a CH-EMED-EPR document Bundle.- Parameters:
documentStream
- The document Bundle to validate as a stream.- Returns:
- the validation result.
- Throws:
org.hl7.fhir.r5.utils.EOperationOutcome
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
public ValidationResult validateDocumentBundle(org.hl7.fhir.r4.model.Bundle bundle, String profile) throws org.hl7.fhir.r5.utils.EOperationOutcome, IOException - Throws:
org.hl7.fhir.r5.utils.EOperationOutcome
IOException
-
getProfileUrl
Returns the profile URL from the eMed type.- Parameters:
type
- The eMed type.- Returns:
- the profile URL.
-
mapIssue
protected ValidationIssue mapIssue(org.hl7.fhir.r4.model.OperationOutcome.OperationOutcomeIssueComponent component)
-