Overview
This node provides a comprehensive interface to interact with FHIR (Fast Healthcare Interoperability Resources) servers, supporting various operations on FHIR resources. Specifically, the VRead
operation allows users to retrieve a specific version of a FHIR resource by its ID and version ID. This is useful in healthcare scenarios where historical versions of patient data or other clinical information need to be accessed for auditing, compliance, or analysis purposes.
Common use cases include:
- Accessing a particular version of a patient's record to review changes over time.
- Retrieving historical data for clinical decision support or research.
- Auditing modifications to healthcare resources for regulatory compliance.
For example, a user might want to fetch version 3 of a Patient resource with ID "12345" from a FHIR server at "http://example.com/fhir".
Properties
Name | Meaning |
---|---|
Authentication | The method used to authenticate with the FHIR server. Options include: 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. Example: http://example.com/fhir . |
Resource Type | The type of FHIR resource to operate on, e.g., Patient, Observation, MedicationRequest, etc. A comprehensive list of standard FHIR resource types is provided, plus an option for custom resource types. |
Custom Resource Type | If "Resource Type" is set to "- Custom -", this string specifies the custom resource type name. |
ID | The unique identifier of the resource instance to target. Required for operations like Delete, History, Patch, Read, Update, VRead. |
Version ID | The specific version ID of the resource to retrieve. Required for the VRead operation. |
Patch Parameters | For the Patch operation, a collection of JSON Patch parameters specifying operations like add, copy, move, remove, replace, and test, each with associated paths and values. |
Specify Query Parameters | How query parameters are specified: either as key-value pairs or as a raw JSON object. |
Query Parameters | A collection of key-value pairs representing query parameters to include in the request URL. |
JSON | Raw JSON object representing query parameters when "Specify Query Parameters" is set to JSON. |
FHIR Path | An optional FHIRPath expression to extract specific data from the response output. |
Ignore SSL Issues | Whether to allow connections even if SSL certificate validation fails (e.g., self-signed certificates). |
Output
The node outputs the JSON response from the FHIR server corresponding to the requested operation. For the VRead
operation, this will be the JSON representation of the specific version of the requested FHIR resource.
If a FHIRPath expression is provided, the output will be the result of evaluating that expression against the response, potentially returning a subset or transformed data.
The output includes paired items linking back to the input item index for traceability.
Binary data is not explicitly handled or returned by this node.
Dependencies
- Requires access to a FHIR server endpoint specified by the Base URL.
- Supports multiple authentication methods; appropriate credentials or tokens must be configured in n8n.
- Uses internal libraries for HTTP requests and FHIRPath evaluation.
- No external environment variables are required beyond those needed for authentication credentials.
Troubleshooting
- Invalid Base URL: Ensure the Base URL is correct and accessible from the n8n instance.
- Authentication Errors: Verify that the selected authentication method is correctly configured and credentials are valid.
- Resource Not Found: Check that the resource ID and version ID exist on the server.
- Multiple Results Error: When using Search with "Error if More than One Result" enabled, ensure the search query returns only one resource.
- SSL Certificate Issues: If connecting to servers with self-signed certificates, enable "Ignore SSL Issues".
- Malformed Query Parameters: When specifying JSON query parameters, ensure valid JSON syntax.
- FHIRPath Evaluation Errors: Invalid FHIRPath expressions may cause errors or empty results; validate expressions before use.
Links and References
Summary
This node's execute()
method performs the selected FHIR operation (VRead
in this case) by constructing appropriate HTTP requests to the specified FHIR server, handling authentication, sending the request, optionally processing paginated results, applying FHIRPath expressions if provided, and returning the processed data as output. It supports detailed configuration of resource types, IDs, version IDs, query parameters, and patch operations, making it a versatile tool for interacting with FHIR APIs within n8n workflows.