ValidateResource Example

The ValidateResource process validates a Patient FHIR resource, and provides an example of validation that has an Object, XML, or JSON input formats and Schema and Schematron, Structure Definition, and Strict Parser as validation types..

For more information about the FHIR palette Validate Resource activity, see Validate Resource.

ValidateResource Process

The ValidateResource process is illustrated here:

Process Definition

The process performs the following operations:
  1. The Timer activity starts the process.
  2. The ParsePatient activity parses the input, which is in XML format and creates a Patient object to be validated.
  3. The Patient object generated as the output of ParsePatient activity is provided as input to the ValidateObject activity. The Patient object is validated against SchemaAndSchematron validation type. The resource is validated.
  4. The validated Patient object is taken as input by the EncodeToXML activity and an XML output is returned.
  5. The XML output from EncodeToXML activity is passed as input to ValidateXML and is validated against StructureDefinition validation type. The resource is validated.
  6. The output of EncodeToXML activity is passed as input to the ParseResource and a Patient object is generated as output.
  7. The output of ParseResource activity is passed as input by the EncodeToJSON activity and returns a JSON string as output.
  8. The output of EncodeToJSON activity is passed as input to ValidateJSON activity with Strict Parser as validation type. The resource is validated.
  9. After the process executes successfully, a Success message is written to the Console. Select Window > Show Console in TIBCO Business Studio to view the log messages.

Process Output

Select the desired activity and click the Output tab.

  • The ValidateObject activity output displays an example of a validation with no errors:

    Note: The presence of the word true in the output means that the input provided is correct, and no errors are present.
  • The ValidateJSON activity output displays an example of validation with info level issues:

For fatal level issues, the OperationOutcome is populated on the Fault tab.