Actions4
- Patient Actions
Overview
This node integrates with the Gravity API to perform various operations on healthcare-related resources. Specifically, for the Patient Update operation, it updates an existing patient's information in the Gravity system. This is useful in scenarios where patient data needs to be kept current, such as updating contact details, demographics, or identifiers after receiving new information from external systems or user input.
Practical examples include:
- Updating a patient's address or phone number after they move or change contact info.
- Correcting or adding missing demographic details like birth date or gender.
- Adding metadata or tags to patients for categorization or filtering purposes.
Properties
| Name | Meaning |
|---|---|
| Tenant | Identifier for the tenant or organization under which the patient record exists. |
| Id | Unique identifier of the patient to update. |
| First Name | Patient's first name. |
| Last Name | Patient's last name. |
| Middle Name | Patient's middle name. |
| Birth Date | Patient's date of birth (string format). |
| Gender | Patient's gender. |
| Address | Patient's physical address. |
| Generated At | Timestamp or date when the patient record was generated. |
| Language | Patient's preferred language. |
| Link | JSON array representing links related to the patient (e.g., related records or references). |
| Tag | A tag or label associated with the patient for categorization. |
| Telecom | JSON array containing telecom contact points (phone, email, etc.) for the patient. |
| Metadata | JSON object containing additional metadata about the patient. |
| Identifiers | JSON array of identifiers associated with the patient (e.g., medical record numbers). |
| Do Not Contact | Boolean flag indicating if the patient should not be contacted. |
| Updated | Timestamp or date when the patient record was last updated. |
| Updated By | Identifier or name of the user who last updated the patient record. |
Output
The node outputs a JSON object representing the updated patient record as returned by the Gravity API. This typically includes all patient fields after the update has been applied, reflecting the current state of the patient resource.
If an error occurs during the update request, the output will contain an error field with details about the failure, including messages returned by the API.
Dependencies
- Requires an API key credential for authenticating requests to the Gravity API.
- Uses AWS Signature Version 4 signing for request authentication.
- The base URL for the API is
https://api.dev.jit.care. - Axios HTTP client is used for making requests.
- The node expects proper configuration of credentials and environment variables for access keys and tokens.
Troubleshooting
Common issues:
- Invalid or missing API credentials will cause authentication failures.
- Providing an incorrect patient ID will result in "not found" errors.
- Malformed JSON inputs for properties like
link,telecom,metadata, oridentifierscan cause parsing errors. - Missing required fields such as
tenantoridwill prevent the update from proceeding.
Error messages:
"Unsupported HTTP method": Indicates a misconfiguration in the operation setup; ensure the correct HTTP method is used.- API response errors are passed through and may include validation errors or permission denials; check the error message for specifics.
Resolution tips:
- Verify that all required fields are provided and correctly formatted.
- Ensure the API credentials have sufficient permissions.
- Validate JSON inputs before passing them to the node.
- Check network connectivity and API endpoint availability.
Links and References
- Gravity API Documentation (assumed base URL)
- AWS Signature Version 4 Signing Process
- Axios HTTP Client