FHIR Delete
Deletes a specific FHIR resource by type and ID.
Inputs
Outputs
Details
This node performs a FHIR delete operation to remove a specific resource by its type and ID.
The node requires an access token to be provided in msg.payload.access_token.
This token should have appropriate permissions to delete the requested resource type.
Resource type and ID can be configured in the node or provided dynamically via the message. Message values take precedence over node configuration.
The node validates the resource type against the integration's configured scopes and displays a warning if the resource may not be accessible. However, it will still attempt the request, allowing the FHIR server to make the final authorization decision.
Scope Validation
The node checks if the selected resource type is included in the integration's scopes. Delete operations require write or delete permissions.
Scopes follow the format: [user|patient|system]/[ResourceType|*].[permissions]
For delete operations, valid permissions include:
d- Delete permissionworwrite- Write permission (includes delete)*- All permissions- Combined permissions like
crud,cud, etc.
Examples:
patient/*.d- Can delete all resource types in patient contextuser/Patient.write- Can write/delete Patient resources in user contextsystem/Observation.*- Can perform all operations on Observations
Examples
Delete Flow with Confirmation:
┌──────────┐ ┌─────────────┐ ┌─────────────┐ ┌───────────┐ │ Auth │──▶│ Confirm │──▶│ FHIR Delete │──▶│ Log │ │ Backend │ │ Delete │ │ │ │ Result │ └──────────┘ └─────────────┘ └─────────────┘ └───────────┘
Input Message:
msg.payload = {
access_token: "eyJhbGciOiJSUzI1NiIs...",
resourceType: "Observation",
resourceId: "obs-12345"
};
Output Example:
msg.payload = {
"success": true,
"message": "Resource deleted successfully"
};
msg.fhir = {
"operation": "delete",
"resourceType": "Observation",
"resourceId": "obs-12345"
};
Best Practices
- Always verify before deleting - deletions may be irreversible
- Consider soft-delete patterns when available
- Log all delete operations for audit purposes
- Handle 404 errors gracefully (resource may already be deleted)
- Test delete operations in non-production environments first
- Check for dependent resources before deleting