Actions4
- Patient Actions
Overview
This node integrates with the Gravity API to perform various operations on healthcare-related resources. Specifically, for the Patient List operation under the Patient resource, it retrieves a list of patients filtered and paginated according to provided criteria. This is useful in scenarios where you need to fetch patient records from a healthcare system, such as for reporting, data synchronization, or further processing within an automation workflow.
Practical examples include:
- Retrieving all patients registered under a specific tenant.
- Searching patients by first name, last name, or contact number.
- Filtering patients by birth date or tags.
- Paginating through large patient datasets.
- Sorting patient lists by creation or update timestamps in ascending or descending order.
Properties
| Name | Meaning |
|---|---|
| Tenant | Identifier for the tenant (organization or client) whose patients are being queried. |
| First Name | Filter patients by their first name. |
| Last Name | Filter patients by their last name. |
| Birth Date | Filter patients by their birth date. Format expected depends on API specification. |
| Contact Number | Filter patients by their contact phone number. |
| Tag | Filter patients by associated tag(s). |
| Page | Pagination page number (starting at 0). |
| Limit | Maximum number of patient records to return per page. |
| Id | JSON array of patient IDs to filter by specific patients. |
| Search | General search string to match against patient records. |
| Order | Sort order direction: Asc (ascending), Desc (descending), or no selection. |
| Order By | Field to sort by: Created (creation timestamp), Updated (last update timestamp), or no selection. |
Output
The node outputs a JSON object containing the response data from the Gravity API's patient list endpoint. The structure typically includes an array of patient objects matching the query parameters, along with any metadata such as pagination info if provided by the API.
No binary data output is indicated for this operation.
Example output snippet (conceptual):
{
"patients": [
{
"id": "123",
"firstName": "John",
"lastName": "Doe",
"birthDate": "1980-01-01",
"contactNumber": "+1234567890",
"tags": ["diabetic"],
...
},
...
],
"page": 0,
"limit": 20,
"total": 100
}
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 internally for making requests.
- The node expects proper configuration of credentials including access key ID, secret access key, and optionally a session token.
Troubleshooting
Common issues:
- Invalid or missing API credentials will cause authentication failures.
- Incorrect tenant identifier may result in empty or unauthorized responses.
- Providing invalid filter values (e.g., malformed dates) might cause API errors.
- Pagination parameters out of range could lead to empty results.
Error messages:
- Errors returned from the API are captured and returned in the output under an
errorfield. - Typical error messages include HTTP 401 Unauthorized (invalid credentials), 400 Bad Request (invalid parameters), or 404 Not Found (resource not found).
- Errors returned from the API are captured and returned in the output under an
Resolution tips:
- Verify that the API credentials are correctly set up and have necessary permissions.
- Double-check input property values for correctness and format.
- Use logging or debug mode to inspect the constructed request URL and parameters.
- Ensure network connectivity to the API endpoint.
Links and References
- Gravity API Documentation (Assumed based on base URL; replace with actual docs if available)
- AWS Signature Version 4 Signing Process
- Axios HTTP Client