Overview
This node, named "bonFHIR," is designed to perform various operations on FHIR (Fast Healthcare Interoperability Resources) resources by interacting with a FHIR server API. It supports common FHIR operations such as Create, Read, Update, Delete, Patch, History retrieval, Versioned Read (VRead), Search, and Resolve references within FHIR resources.
The node is beneficial in healthcare automation workflows where integration with FHIR-compliant servers is required. For example, it can be used to:
- Create new patient records or other clinical resources.
- Retrieve specific resources or their versions.
- Update or patch existing resources.
- Search for resources based on query parameters.
- Resolve references within resources to fetch related data.
Practical examples include:
- Automating patient data synchronization between systems.
- Querying clinical observations or medication requests.
- Managing resource histories for audit purposes.
- Performing complex searches with pagination support.
Properties
Name | Meaning |
---|---|
Authentication | The method of authentication to use when connecting to 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, MedicationRequest). |
Custom Resource Type | If "Resource Type" is set to custom, this string specifies the custom resource type name. |
Patch Parameters | A collection of JSON Patch operations (op, from, path, value) used when specifying a patch body via fields. |
Specify Query Parameters | How to specify query parameters for search operations: either using key-value pairs or a JSON object. |
Query Parameters | Key-value pairs for query parameters if "Using Fields Below" is selected. |
JSON | JSON object for query parameters if "Using JSON" is selected. |
FHIR Path | A 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 certificates). |
Output
The node outputs an array of items, each containing a json
field representing the FHIR resource(s) returned by the operation. When the operation returns a Bundle (e.g., from a Search), the node extracts individual resources from the bundle entries and outputs them separately, preserving pairing information with the input item index.
If a FHIRPath expression is specified, the node evaluates it against the response and outputs the resulting data instead of the full resource.
The node does not output binary data.
Dependencies
- Requires access to a FHIR server API endpoint.
- Supports multiple authentication methods; appropriate credentials must be configured in n8n.
- Uses internal libraries for HTTP requests with authentication handling.
- Utilizes a FHIRPath evaluation library to process FHIRPath expressions.
- May require environment variables or n8n credential configurations for authentication tokens or keys depending on the chosen authentication method.
Troubleshooting
- Error if More than One Result: When performing a Search operation with this option enabled, if the search returns more than one matching resource, the node throws an error. To resolve, either disable this option or refine the search query to return a single result.
- Invalid JSON in Query or Body: If specifying query parameters or request bodies as JSON strings, ensure they are valid JSON. Invalid JSON will cause parsing errors.
- SSL Certificate Issues: If connecting to a FHIR server with a self-signed or invalid SSL certificate, enable "Ignore SSL Issues" to bypass certificate validation.
- Authentication Failures: Ensure that the correct authentication method is selected and that corresponding credentials are properly configured.
- Pagination Handling: When retrieving all pages of search results, be cautious as large datasets may impact performance or memory usage.
- Unsupported Operation: Using an unsupported operation name will throw an error indicating the operation is not supported.
Links and References
- FHIR Specification
- FHIRPath Specification
- JSON Patch RFC 6902
- n8n Documentation - Creating Custom Nodes
- UCUM Units of Measure
Summary
This node provides comprehensive interaction capabilities with FHIR servers, supporting standard CRUD and search operations along with advanced features like patching and reference resolution. It integrates FHIRPath for flexible data extraction and supports various authentication schemes, making it suitable for diverse healthcare integration scenarios.