Overview
This node enables interaction with a FHIR (Fast Healthcare Interoperability Resources) server by performing various operations on FHIR resources. Specifically, the "Create" operation allows users to create new FHIR resources on the specified FHIR server.
Common scenarios for this node include:
- Automating the creation of patient records, observations, or other healthcare-related data in a FHIR-compliant system.
- Integrating healthcare applications with FHIR servers to programmatically add new resources.
- Facilitating workflows that require dynamic resource creation based on input data or external triggers.
Practical example:
- Creating a new Patient resource with demographic details provided as JSON in the node's body property.
- Adding an Observation resource representing a lab test result to the FHIR server.
Properties
| Name | Meaning |
|---|---|
| Authentication | The method used to authenticate requests 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 target FHIR server API where the resource will be created. |
| Resource Type | The type of FHIR resource to create (e.g., Patient, Observation, Condition). |
| Custom Resource Type | If "Resource Type" is set to "- Custom -", specify the custom resource type here. |
| Body | The JSON representation of the FHIR resource to create. This must be valid according to FHIR specifications. |
| Specify Query Parameters | How query parameters are specified for the request: either using key-value pairs or JSON. (More relevant for search operations.) |
| Query Parameters | Key-value pairs for query parameters if "Specify Query Parameters" is set to keypair. |
| JSON Query | JSON object for query parameters if "Specify Query Parameters" is set to JSON. |
| FHIR Path | A FHIRPath expression to extract specific data from the response output. |
| Ignore SSL Issues | Whether to ignore SSL certificate validation issues when connecting to the FHIR server. |
Output
The node outputs the JSON response from the FHIR server after creating the resource. The output includes the full resource as returned by the server, which typically contains the newly assigned resource ID and metadata.
If a FHIRPath expression is specified, the output will be the result of evaluating that expression against the response, allowing extraction of specific fields or values.
Binary data is not produced 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 standard HTTP methods and headers for communication.
- Optional: SSL certificate validation can be disabled via the "Ignore SSL Issues" property.
Troubleshooting
- Invalid JSON in Body: Ensure the JSON provided in the Body property is well-formed and complies with the FHIR resource structure.
- Authentication Errors: Verify that the selected authentication method is correctly configured and credentials are valid.
- Base URL Issues: Confirm the Base URL points to a reachable FHIR server endpoint.
- Error if More Than One Result: This setting applies to search operations; irrelevant for Create but may cause confusion if misconfigured.
- SSL Certificate Errors: If connecting to a server with self-signed certificates, enable "Ignore SSL Issues" to bypass validation.
- FHIRPath Evaluation Errors: Invalid FHIRPath expressions may cause errors or empty outputs; validate expressions carefully.
Common error messages:
- "The operation 'Create' is not supported": Indicates an unsupported operation was requested.
- "The search returned more than one result": Relevant for Search operation when expecting a single result.
- HTTP 4xx/5xx errors: Check server logs and request details for diagnosis.
Links and References
Summary
This node provides a flexible interface to create any FHIR resource on a specified FHIR server, supporting various authentication schemes and allowing fine control over request parameters and response processing through FHIRPath. It is ideal for healthcare automation workflows requiring integration with FHIR-compliant systems.