bonFHIR icon

bonFHIR

Perform operations on FHIR resources

Overview

This node provides integration with FHIR (Fast Healthcare Interoperability Resources) servers, allowing users to perform various operations on FHIR resources. Specifically, the "Read" operation for the "Default" resource type enables retrieving a specific FHIR resource by its type and ID from a FHIR server.

Common scenarios where this node is beneficial include:

  • Fetching patient records or clinical data from a FHIR server.
  • Retrieving specific healthcare resources such as Observations, Conditions, or Medications by their unique identifiers.
  • Integrating FHIR-based healthcare data into automated workflows for analysis, reporting, or further processing.

Practical example:

  • A workflow that reads a Patient resource by ID to obtain demographic information before proceeding with other healthcare automation tasks.
  • Retrieving an Observation resource to analyze lab results in real-time.

Properties

Name Meaning
Authentication The method used to authenticate with the FHIR server. Options: Basic Auth, Custom Auth, Digest Auth, Header Auth, None, OAuth1, OAuth2, Query Auth.
Base URL The base URL of the FHIR server API to which requests will be sent.
Resource Type The type of FHIR resource to operate on (e.g., Patient, Observation, Condition).
Custom Resource Type If "Resource Type" is set to "- Custom -", specify the custom resource type string here.
ID The unique identifier of the resource to read. Required for operations like Read, Delete, Update, Patch, History, VRead.
Specify Query Parameters How query parameters are specified: either using key-value pairs or JSON format.
Query Parameters Key-value pairs of query parameters to include in the request URI.
JSON JSON object specifying query parameters if "Using JSON" option is selected.
FHIR Path Optional FHIRPath expression to extract specific data from the response output.
Ignore SSL Issues Whether to allow connections even if SSL certificate validation fails (useful for self-signed certs).

Additional properties exist for other operations (Create, Update, Patch, Search, etc.) but are not relevant for the "Read" operation.

Output

The node outputs the JSON representation of the requested FHIR resource(s) in the json field of the output items. If the response is a FHIR Bundle (e.g., search results), it processes entries accordingly.

If a FHIRPath expression is provided, the node evaluates it against the response and outputs the extracted data instead of the full resource.

Binary data output is not indicated for this node.

Dependencies

  • Requires access to a FHIR server endpoint specified by the Base URL.
  • Supports multiple authentication methods; appropriate credentials must be configured in n8n for the chosen authentication type.
  • Uses standard HTTP methods (GET for Read).
  • Optionally uses FHIRPath evaluation for extracting data from responses.
  • No additional external services beyond the FHIR server and authentication credentials are required.

Troubleshooting

  • Error if More than One Result: When performing a search operation with this flag enabled, if more than one result is returned, the node throws an error. For the Read operation, this does not apply.
  • Invalid Resource Type or ID: Ensure the Resource Type and ID are correctly specified; otherwise, the FHIR server may return errors or no data.
  • Authentication Failures: Verify that the correct authentication method and credentials are configured.
  • SSL Certificate Issues: If connecting to a server with self-signed certificates, enable "Ignore SSL Issues" to avoid connection failures.
  • FHIRPath Errors: Invalid FHIRPath expressions can cause evaluation errors; verify syntax correctness.
  • Network or Server Errors: Check connectivity and server availability.

Links and References

Summary

This node's "Read" operation for the "Default" resource type allows fetching a specific FHIR resource by its type and ID from a FHIR server, supporting various authentication methods and optional FHIRPath extraction. It is useful for integrating healthcare data retrieval into automated workflows.

Discussion