Webhook Guide
This document outlines the webhook system for the Azodha platform, detailing supported configurations and events.
Webhook Configuration
Before accessing Azodha services, you need to set up a webhook configuration in our system. This is done through our Webhook Configuration API.
Adds a new webhook configuration
Configuration Structure
organizationId: Your unique organization identifiersecret: Autogenerated secret for webhook authenticationattributes: Additional metadata (API key, organization code)webhookEventId: Identifier for the type of eventname: Descriptive name for the webhookurl: Endpoint where webhook data will be sentactive: Boolean to enable/disable the webhooksendOrganizationCode: Option to include organization code in payload
For additional information on the same you can review our API reference for external events
Supported Webhook Events
Azodha supports the following webhook events:
AppointmentToCareTaskActivityLog
InferenceToObservations
InferenceToKeyFindings
AssessmentResponseToWellbeingScore
BookAppointment
InferenceToCareTasks
HealthRecordCounter
Notification
HealthProgramActivated
UploadedFileAndTest
SurveyAssessment
OpenTele
Event Details
1. AppointmentToCareTaskActivityLog
Triggers when an appointment is created or updated, generating a care task activity log.
Sample payload:
2. InferenceToObservations
Parses uploaded PDF data, sends it to an LLM for inference, and returns observations.
Sample Header:
Sample payload:
Key Parameters:
fileId: Unique identifier for the file, including the organization ID prefix.mimeType: File type (currently only "application/pdf" is supported).event: Set to "InferenceToObservations" for this process.useCaseName: Specifies the context for inference.data: Additional metadata relevant to the inference process.model: Specifies the LLM to be used for inference.prompts: Array of prompt objects, each containing:promptId: Unique identifier for the prompt.text: The actual prompt text for the LLM.expectedOutputFormat: Format specification for the output (if applicable).
3. InferenceToKeyFindings
Analyses medical data and returns key findings.
Sample Header:
Sample payload:
Key Components:
inputData: Contains information about files (e.g., blood tests, body scans), survey responses, and observation codes.event: Specifies the event type as "InferenceToKeyFindings".data: Includes patient-specific information such as patientId, carePlanId, and preferred language.useCaseName: Indicates the purpose as "Key Findings Generation".model: Specifies the AI model to be used for inference.prompts: Contains the prompts for generating key findings across various health aspects.
4. AssessmentResponseToWellbeingScore
Calculates a wellbeing score based on assessment responses.
Sample payload:
Key Components:
eventName: Identifies the specific event type as "AssessmentResponseToWellbeingScore".patientId: A unique identifier for the patient whose wellbeing score is being calculated or updated.eventEntity: Specifies the type of entity involved, in this case, "Survey_Response".assessmentResponseId: A unique identifier for the specific assessment response being processed.
5. BookAppointment
Triggers when a new appointment is booked.
Sample Headers:
Sample payload:
Key Components:
Appointment Details: Includes
id,date,startTime,endTime,locationType, andstatus.Patient Information: Contains
patientId,firstName,lastName,email, andpatientMobileNumber.Appointment Type: Provides details about the type of appointment, including
name,description, anddurationInMinutes.Participants: Lists the healthcare providers involved in the appointment.
Attributes: Contains additional appointment details such as patient location, chief complaint, and workflow information.
Resources: Includes any additional resources booked for the appointment, such as follow-up consultations or tests.
6. InferenceToCareTasks
Generates care tasks based on inferred medical data.
Sample Header:
Sample Payload:
Key Components:
inputData: Contains information about files, survey responses, and observation codes.event: Specifies the event type (InferenceToCareTasks).useCaseName: Indicates the use case (File Ingestion).data: Includes patient-specific information, goals, and key findings.model: Specifies the AI model to be used for inference.prompts: Contains the prompts for generating recommendations.
7. HealthRecordCounter
Provides a count of health records for a patient.
Sample payload:
Key Components:
count: An integer representing the number of health records for the patient.eventName: The name of the event, set to "HealthRecordCounter".patientId: A unique identifier for the patient whose health records are being counted.
8. Notification
Sends various types of notifications.
Sample payload:
Key Components:
data.appointment: Contains comprehensive details about the telehealth appointment, including:Basic appointment information (id, date, time, status)
Patient details (name, email, phone, etc.)
Appointment attributes (status, patient time, chief complaint)
Telehealth-specific information (openTeleRoom)
Provider information (participants)
Appointment type details
data.patientName: The full name of the patient who joined the waiting room.Event metadata: Specifies the nature and context of the event (Notification for a patient joining the virtual waiting room).
9. HealthProgramActivated
Triggers when a patient is enrolled in a health program.
Sample payload:
Key Components:
data.duration: The duration of the health program (in a specified unit, e.g., days or weeks).data.patientId: A unique identifier for the patient.data.providers: An array of healthcare providers associated with the program, including their roles and contact information.data.patientName: The name of the patient for whom the health program is activated.
10. UploadedFileAndTest
Notifies when a file is uploaded and associated tests are completed.
Sample Header:
Sample payload:
Key Components:
data.patient: Contains essential patient information including demographics and health scores.data.file: Provides details about the uploaded file, including:File metadata (id, name, cloudId, etc.)
Client details extracted from the file
Archival status
data.providers: An array of healthcare providers associated with the organization, including their roles and contact information.Event metadata: Specifies the nature and context of the event.
11. SurveyAssessment
This event is triggered when a health assessment survey is completed, providing comprehensive patient data and assessment results.
Sample Header:
Sample payload:
Key Components:
data.patient: Contains comprehensive patient information, including personal details, contact information, and health scores.data.assessment: Includes details about the completed health assessment:Basic assessment information (ID, name, status, etc.)
assessmentQuestionnaireObject: Structure of the questionnaireassessmentResponseObject: Patient's responses to the questionnaireassignedServiceProviders: Healthcare providers assigned to the patient
Event Metadata:
eventName: "SurveyAssessment"eventType: "SURVEY"eventSubType: "ASSESSMENT_COMPLETED"userType: "serviceProvider"
12. OpenTele
Triggers for telemedicine-related events.
Sample payload:
Receiving Webhooks
Once your webhook configurations are set up, you will start receiving webhook payloads at the specified URL for the events you've subscribed to. Ensure your endpoint is capable of handling POST requests and processing the JSON payloads.
For security, validate the incoming webhooks using the secret provided in your webhook configuration.
Best Practices
Implement retry logic in case of temporary failures.
Process webhooks asynchronously to avoid blocking responses.
Verify the webhook signature using the provided secret.
Implement proper error handling and logging.
Consider setting up a test environment to simulate webhook events.
For any technical questions or issues with webhook integration, please contact our integration support team at [email protected].
Last updated