Announcement

Collapse
No announcement yet.

FHIR Listener connector - message validation

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • FHIR Listener connector - message validation

    Hi,
    Is it possible to validate a FHIR message against profiles?

    I've tried code below:
    Code:
    var ctx = Packages.ca.uhn.fhir.context.FhirContext.forR4();
    var validationSupportChain = new org.hl7.fhir.dstu3.hapi.validation.ValidationSuppo rtChain();
    validationSupportChain.addValidationSupport(new org.hl7.fhir.dstu3.hapi.ctx.DefaultProfileValidati onSupport());
    instanceValidator.setValidationSupport(validationS upportChain);
    
    // Create a validator and register the InstanceValidator module
    var val = ctx.newValidator();
    val.registerValidatorModule(instanceValidator);
    var result = val.validateWithResult(input);
    but uncaught JavaScript runtime exception: TypeError: [JavaPackage org.hl7.fhir.dstu3.hapi.validation.ValidationSuppo rtChain] is not a function, it is object occured.

    Is it possible to check if the input message is a valid FHIR message?

    I'm using mirth 3.11.0 and a fhir listener 3.11.9.b1424

    Thanks.

  • #2
    The error likely means that you do not have all required HAPI FHIR libraries. Bring all dependencies and try again. You also need a profile itself with related extensions, value sets, etc.

    Comment

    Working...
    X