Class MhdValidator

All Implemented Interfaces:
FhirTransactionValidator

public class MhdValidator extends BaseValidator
Validator for MHD transactions.
Since:
4.8
Author:
Christian Ohr
  • Field Details

    • MHD_423_PACKAGE_PATH

      public static final String MHD_423_PACKAGE_PATH
      Classpath location of the MHD 4.2.3 implementation guide package.
      See Also:
    • MHD_424_PACKAGE_PATH

      public static final String MHD_424_PACKAGE_PATH
      Classpath location of the MHD 4.2.4 implementation guide package.
      See Also:
    • MHD_PACKAGE_PATH

      public static final String MHD_PACKAGE_PATH
      Classpath location of the implementation guide package this transaction validates against by default. Public so that the audit records of the transaction can be validated against the very same profiles, rather than against a second copy of the path.
      See Also:
  • Constructor Details

    • MhdValidator

      public MhdValidator(FhirContext fhirContext)
      Creates a validator for the default MHD version, i.e. MhdVersion.v424. The resources built by the IPF model classes satisfy the 4.2.3 profiles as well, because they carry both the Identifier.use of MHD 4.2.3 and the Identifier.type of MHD 4.2.4.
      Parameters:
      fhirContext - FhirContext
    • MhdValidator

      public MhdValidator(FhirContext fhirContext, MhdVersion version)
      Creates a validator for a specific MHD version.
      Parameters:
      fhirContext - FhirContext
      version - MHD version to validate against, either MhdVersion.v423 or MhdVersion.v424
  • Method Details

    • packagePathFor

      public static String packagePathFor(MhdVersion version)
      Parameters:
      version - MHD version
      Returns:
      classpath location of the implementation guide package of that MHD version
      Throws:
      IllegalArgumentException - if no implementation guide package is shipped for that version