Class ChEmedEprValidator

java.lang.Object
org.projecthusky.fhir.emed.ch.epr.validator.ChEmedEprValidator

public class ChEmedEprValidator extends Object
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 Details

  • 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.
    • getProfileUrl

      protected String getProfileUrl(EmedDocumentType type)
      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)