Case Updates Webhook

If you provide CareValidate with an endpoint URL to call, along with an authentication header name and secret value, we will securely call your URL with updates on the patient's case as it progresses through our system, from initial creation, doctor's prescription, payment, and shipping. 


There are options for the webhook payload.

1. Full case data = With this option, every event payload will have full case details including all decisions, communications, documents, payments, activity logs.

2. Only event data = When a case has more interactions, the full payload size can be increased drastically. So this option will send only basic case info and event-related objects, based on the specific events that occur.


You can change the settings from Organization settings tab.


The following documents the format of the call that you will receive at your endpoint URL.


Supported Events

  • ADD_CASE_ASSIGNEE
  • ADD_CASE_ATTACHMENT
  • ADD_CASE_COMMENT
  • ADD_CASE_DECISION
  • ADD_FORM_RESPONSE
  • ADD_HR_REP
  • ADD_PAYMENT_INFO_USING_LINK
  • ARCHIVE_CASE
  • CALENDAR_EVENT_CANCELED
  • CALENDAR_EVENT_CREATED
  • CALENDAR_EVENT_NO_SHOW
  • CALENDAR_EVENT_NO_SHOW_REMOVED
  • CALENDAR_EVENT_RESCHEDULED
  • COMMENT_ACKNOWLEDGED
  • CREATE_CASE
  • DECISION_DELETED
  • DEESCALATE_CASE
  • DELETE_ATTACHMENT
  • DELETE_CASE_COMMENT
  • ESCALATE_CASE
  • FOLLOWUP_EMAIL
  • FOLLOWUP_FORM
  • IMPORT_CASE
  • INBOUND_EMAIL
  • NOTE_ACKNOWLEDGED
  • ORDER_CREATED
  • ORDER_STATUS_CHANGED
  • ORDER_TRACKING_ADDED
  • OUTBOUND_EMAIL
  • PAYMENT_ADDED
  • PAYMENT_COMPLETED
  • PAYMENT_INFO_LINK_SENT
  • REMOVE_CASE_ASSIGNEE
  • REMOVE_HR_REP
  • REOPEN_CASE
  • SMS_RECEIVED
  • SMS_SENT
  • SUPPORT_NOTE_ADDED
  • SUPPORT_NOTE_COMPLETED
  • SUPPORT_NOTE_UPDATED
  • TEXT_INFO
  • UPDATE_FORM_RESPONSE
  • VISIT_TYPE_CHANGED

Format for additional payload objects for different event types can be found here.


Example Payload


In the JSON response shown in the example, the questions and answers from the patient are located at:

  • payload -> case -> responses (array of forms) -> responses (array of questions on a form)


Each question has the following JSON properties which may be relevant:

  • text (patient's answer)
  • question -> text (question asked)


General notes:

  • submitter is the patient
  • assignedTo is the doctor
  • hrRep is the point of contact (CareValidate support)
  • assignedBy is the person that chose the doctor (also CareValidate support)
  • parts of this example have been updated as new features have been added


{
    "event": "ORDER_TRACKING_ADDED",
    "order": {
      "id": "934c3044-096e-4abc-a67f-16eca9890543",
      "status": "SHIPPED",
      "trackingId": "1Z73W7720197837423",
      "message": "msg",
      "createdAt": "2024-08-22T14:39:55.927Z"
    },
    "payload": {
      "case": {
        "id": "a265d7a3-d9e2-48b5-b46b-b91e15f9b515",
        "type": "GLP",
        "title": "Case for Chris 2024-08-22 Ordering",
        "status": "APPROVED",
        "shortId": "ADA-TOSXM",
        "createdAt": "2024-08-22T18:24:53.118Z",
        "updatedAt": "2024-08-22T19:34:47.843Z",
        "assignedAt": "2024-08-22T18:28:02.579Z",
        "inProgressAt": "2024-08-22T18:51:15.233Z",
        "closedAt": "2024-08-22T19:34:47.842Z",
        "isArchived": false,
        "isEscalated": false,
        "isImported": false,
        "referralCode": null,
        "productBundle": {
          "name": "Wegovy Bundle"
        },
        "assignedTo": {
          "id": "o57NMEFpTKQzmCn5um56fJv6Lfy2",
          "firstName": "Chris",
          "lastName": "TPA Medical"
        },
        "hrRep": {
          "id": "o57NMEFpTKQzmCn5um56fJv6Lfy2",
          "firstName": "Chris",
          "lastName": "TPA Medical"
        },
        "assignedBy": {
          "id": "W6ZflkLk9oUQFYNEypUlqIeLlQW2",
          "firstName": "Chris",
          "lastName": "ExampleMan"
        },
        "assignees": [
          {
            "assignee": {
              "id": "o57NMEFpTKQzmCn5um56fJv6Lfy2",
              "firstName": "Chris",
              "lastName": "TPA Medical"
            }
          }
        ],
        "submitter": {
          "id": "y1fovBDTWzTZUnHBdrCMM3GkU663",
          "firstName": "Chris",
          "lastName": "2024-08-22 Ordering",
          "email": "chris.ExampleMan+2024-08-22-ordering@carevalidate.com",
          "dob": "2000-05-30T00:00:00.000Z",
          "gender": "MALE",
          "phoneNumber": "2258675309",
          "address": "93492 Peachtree Dr.",
          "city": "Baton Rouge",
          "state": "LA",
          "postalCode": "70360"
        },
        "activity": [
          {
            "id": "332eaa46-4f5f-4a34-8911-f6e7cda67469",
            "type": "CREATE_CASE",
            "isPHI": false,
            "isRestricted": false,
            "timestamp": "2024-08-22T18:24:53.118Z",
            "valueBefore": null,
            "valueAfter": null,
            "actor": {
              "id": "y1fovBDTWzTZUnHBdrCMM3GkU663",
              "firstName": "Chris",
              "lastName": "2024-08-22 Ordering"
            },
            "targetUser": null
          },
          {
            "id": "ced96f20-ada8-49ca-9499-808dd52b4af3",
            "type": "PAYMENT_ADDED",
            "isPHI": false,
            "isRestricted": false,
            "timestamp": "2024-08-22T18:24:56.692Z",
            "valueBefore": null,
            "valueAfter": "$350.00",
            "actor": {
              "id": "y1fovBDTWzTZUnHBdrCMM3GkU663",
              "firstName": "Chris",
              "lastName": "2024-08-22 Ordering"
            },
            "targetUser": null
          },
          {
            "id": "dcf26926-ffca-47ab-bf24-d020c3e1843d",
            "type": "ADD_CASE_DECISION",
            "isPHI": false,
            "isRestricted": false,
            "timestamp": "2024-08-22T19:34:48.344Z",
            "valueBefore": null,
            "valueAfter": "APPROVED",
            "actor": {
              "id": "o57NMEFpTKQzmCn5um56fJv6Lfy2",
              "firstName": "Chris",
              "lastName": "TPA Medical"
            },
            "targetUser": null
          },
          {
            "id": "0cdf2ec5-7711-4127-b673-09019c91796e",
            "type": "FOLLOWUP_EMAIL",
            "isPHI": false,
            "isRestricted": false,
            "timestamp": "2024-08-22T20:00:08.965Z",
            "valueBefore": null,
            "valueAfter": null,
            "actor": null,
            "targetUser": null
          },
          {
            "id": "26b44dbd-34c2-42d0-a037-3e99cedb7c89",
            "type": "PAYMENT_COMPLETED",
            "isPHI": false,
            "isRestricted": false,
            "timestamp": "2024-07-11T16:48:05.000Z",
            "valueBefore": null,
            "valueAfter": "A $350.00 USD payment was processed using a visa ending in 4242",
            "actor": {
              "id": "W6ZflkLk9oUQFYNEypUlqIeLlQW2",
              "firstName": "Chris",
              "lastName": "ExampleMan"
            },
            "targetUser": null
          },
          {
            "id": "b3b2bee6-81e7-40a4-98f1-159e3fa1d97a",
            "type": "ORDER_CREATED",
            "isPHI": false,
            "isRestricted": false,
            "timestamp": "2024-08-22T20:18:19.645Z",
            "valueBefore": null,
            "valueAfter": null,
            "actor": {
              "id": "W6ZflkLk9oUQFYNEypUlqIeLlQW2",
              "firstName": "Chris",
              "lastName": "ExampleMan"
            },
            "targetUser": null
          },
          {
            "id": "71f53bc6-d8c2-490c-9d5a-fecaef297ba1",
            "type": "ADD_CASE_ATTACHMENT",
            "isPHI": false,
            "isRestricted": false,
            "timestamp": "2024-08-22T20:18:22.317Z",
            "valueBefore": null,
            "valueAfter": "prescription-order-2024-08-22T20:18:21.297+00:00.pdf",
            "actor": {
              "id": "W6ZflkLk9oUQFYNEypUlqIeLlQW2",
              "firstName": "Chris",
              "lastName": "ExampleMan"
            },
            "targetUser": null
          },
          {
            "id": "78ed599f-6321-4411-a570-7e3cb1f5b040",
            "type": "ORDER_STATUS_CHANGED",
            "isPHI": false,
            "isRestricted": false,
            "timestamp": "2024-08-22T13:39:39.336Z",
            "valueBefore": null,
            "valueAfter": "SHIPPED",
            "actor": null,
            "targetUser": null
          },
          {
            "id": "a21f3d85-5ca0-4a51-a31f-9ac9e5316cd2",
            "type": "ORDER_TRACKING_ADDED",
            "isPHI": false,
            "isRestricted": false,
            "timestamp": "2024-08-22T14:39:55.927Z",
            "valueBefore": null,
            "valueAfter": "1Z73W7720197837423",
            "actor": null,
            "targetUser": null
          },
          {
            "id": "3f8fe233-b17f-4001-ae98-4e6342998683",
            "type": "ORDER_STATUS_CHANGED",
            "isPHI": false,
            "isRestricted": false,
            "timestamp": "2024-08-25T13:40:49.689Z",
            "valueBefore": null,
            "valueAfter": "DELIVERED",
            "actor": null,
            "targetUser": null
          },
          {
            "id": "9cec0cb6-d59d-4cec-88b1-07fc2f925db6",
            "type": "ORDER_STATUS_CHANGED",
            "isPHI": false,
            "isRestricted": false,
            "timestamp": "2024-08-25T16:36:34.893Z",
            "valueBefore": null,
            "valueAfter": "TRANSIT_FAILURE",
            "actor": null,
            "targetUser": null
          },
          {
            "id": "4e42aa57-9919-4851-bf51-bb8575df4630",
            "type": "ORDER_STATUS_CHANGED",
            "isPHI": false,
            "isRestricted": false,
            "timestamp": "2024-08-30T15:54:35.235Z",
            "valueBefore": null,
            "valueAfter": "RETURNED",
            "actor": null,
            "targetUser": null
          }
        ],
        "decisions": [
          {
            "id": "598d9070-943f-41d3-b9c5-560b36536074",
            "isApproved": true,
            "isNoDecision": false,
            "startDate": "2024-08-22T00:00:00.000Z",
            "endDate": "2024-07-18T00:00:00.000Z",
            "decisionText": "",
            "category": null,
            "cost": null,
            "createdAt": "2024-08-22T19:34:48.344Z",
            "isPaid": false,
            "medInfo": [
              {
                "id": "c53fd5f0-5bab-47d5-9a5e-3df2e95ad273",
                "medicine": "Saxenda",
                "dosage": "Injection 0.6mg",
                "refillCount": 0,
                "pharmacyInstructions": "",
                "dosingFrequency": "Daily"
              }
            ],
            "addedBy": {
              "id": "o57NMEFpTKQzmCn5um56fJv6Lfy2",
              "firstName": "Chris",
              "lastName": "TPA Medical"
            }
          }
        ],
        "comments": [],
        "payments": [
          {
            "id": "d3f6a0b2-eeda-4586-9bab-ec12c2f7b980",
            "isDeleted": false,
            "description": "Initial payment for 'Wegovy Bundle'",
            "amount": "350",
            "status": "PAID",
            "dueDate": "2024-08-22T18:24:56.692Z",
            "paymentDate": "2024-07-11T16:48:05.000Z",
            "cancellationDate": null,
            "isScheduled": false,
            "schedulePosition": null,
            "isAutoCreated": false,
            "createdAt": "2024-08-22T18:24:56.692Z",
            "updatedAt": "2024-07-11T16:48:06.615Z",
            "createdBy": {
              "id": "y1fovBDTWzTZUnHBdrCMM3GkU663",
              "firstName": "Chris",
              "lastName": "2024-08-22 Ordering",
              "email": "chris.ExampleMan+2024-08-22-ordering@carevalidate.com"
            }
          }
        ],
        "attachments": [
          {
            "id": "2e5e6304-c565-4d87-b1a6-8ecfe04ccf1f",
            "isRestricted": false,
            "isPHI": false,
            "fileName": "prescription-order-2024-08-22T20:18:21.297+00:00.pdf",
            "isDeleted": false,
            "createdAt": "2024-08-22T20:18:22.317Z",
            "uploadedBy": {
              "firstName": "Chris",
              "lastName": "ExampleMan"
            },
            "content": "JVBERi0xLjMKJf////8KOS..."
          }
        ],
        "closedBy": "o57NMEFpTKQzmCn5um56fJv6Lfy2",
        "inProgressBy": "o57NMEFpTKQzmCn5um56fJv6Lfy2",
        "responses": [
          {
            "id": "f4d430c8-7e11-4374-9d4e-369a7038e127",
            "isDraft": false,
            "form": {
              "id": "18dc40ed-9885-494d-bea9-12fccb06049b",
              "name": "GLP Weight Loss Intake Form"
            },
            "responses": [
              {
                "id": "bf7ccf24-a608-417e-a6f9-3b4706bf7324",
                "isArchived": false,
                "question": {
                  "index": 1,
                  "type": "SINGLESELECT",
                  "text": "What was your gender at birth?",
                  "isPHI": false,
                  "options": ["Male", "Female", "Other"],
                  "required": false
                },
                "text": "Male",
                "createdAt": "2024-08-22T18:24:53.118Z",
                "respondent": {
                  "id": "y1fovBDTWzTZUnHBdrCMM3GkU663",
                  "firstName": "Chris",
                  "lastName": "2024-08-22 Ordering"
                }
              },
              {
                "id": "a0752699-4405-40db-a0d1-75cad169b675",
                "isArchived": false,
                "question": {
                  "index": 2,
                  "type": "DATE",
                  "text": "What is your date of birth?",
                  "isPHI": false,
                  "options": [],
                  "required": true
                },
                "text": "2024/06/05",
                "createdAt": "2024-08-22T18:24:53.118Z",
                "respondent": {
                  "id": "y1fovBDTWzTZUnHBdrCMM3GkU663",
                  "firstName": "Chris",
                  "lastName": "2024-08-22 Ordering"
                }
              }
            ]
          }
        ],
        "notes": []
      },
      "activity": {
        "id": "26b44dbd-34c2-42d0-a037-3e99cedb7c89",
        "type": "PAYMENT_COMPLETED",
        "isPHI": false,
        "isRestricted": false,
        "timestamp": "2024-07-11T16:48:05.000Z",
        "valueBefore": null,
        "valueAfter": "A $350.00 USD payment was processed using a visa ending in 4242",
        "actor": {
          "id": "W6ZflkLk9oUQFYNEypUlqIeLlQW2",
          "firstName": "Chris",
          "lastName": "ExampleMan",
          "email": "chris.ExampleMan@carevalidate.com"
        },
        "targetUser": null
      },
      "payment": {
        "id": "d3f6a0b2-eeda-4586-9bab-ec12c2f7b980",
        "isDeleted": false,
        "description": "Initial payment for 'Wegovy Bundle'",
        "amount": "350",
        "status": "PAID",
        "dueDate": "2024-08-22T18:24:56.692Z",
        "paymentDate": "2024-07-11T16:48:05.000Z",
        "cancellationDate": null,
        "isScheduled": false,
        "schedulePosition": null,
        "isAutoCreated": false,
        "createdAt": "2024-08-22T18:24:56.692Z",
        "updatedAt": "2024-07-11T16:48:06.615Z",
        "createdBy": {
          "id": "y1fovBDTWzTZUnHBdrCMM3GkU663",
          "firstName": "Chris",
          "lastName": "2024-08-22 Ordering",
          "email": "chris.ExampleMan+2024-08-22-ordering@carevalidate.com"
        }
      }
    }
  }


Example of  payment info object for ADD_PAYMENT_INFO_USING_LINK

{
  "type": "ADD_PAYMENT_INFO_USING_LINK",
  ...EXISTING_PAYLOAD,
  "paymentInfo": {
    "cardBrand": "visa",
    "maskedCardNumber": "4242",
    "shippingAddress": {
      "addressLine1": "1234 Abc Street",
      "addressLine2": "1001 Apt",
      "city": "Alpharetta",
      "state": "GA",
      "postalCode": "30000",
      "country": "US"
    }
  }
}

Example of order object for ORDER_TRACKING_ADDED event:

{
  "event": "ORDER_TRACKING_ADDED",
  "payload": {
    <...>
    "order": {
      "id": "1b266eaf-d282-4831-9d3c-572265b28394",
      "status": "SHIPPED",
      "trackingId": "1Z73W7724497173000",
      "message": "Test",
      "createdAt": "2024-11-06T14:56:35.749Z"
    }
  }
}


Case Decision

The CaseDecision model is a core entity in the system, representing the medical decisions made by healthcare professionals in response to specific patient cases. In the context of prescriptions, a CaseDecision is created whenever a doctor approves a medicine for a patient. This model serves as the authoritative record for tracking not only the approval or rejection of prescribed medications, but also the relevant medical details.


Data Model

The CaseDecision model encapsulates the details of a medical decision made in response to a patient's case, particularly focusing on prescription approvals. This model is designed to provide a comprehensive record of the decision, including its status, associated medication information, and relevant timestamps.


FieldTypeDescription

id

string

Unique identifier for the case decision.

isApproved

boolean

Indicates if the decision resulted in approval of the prescription (true/false).

isNoDecision

boolean

Indicates if no decision was made (e.g., deferred or pending further information).

startDate

timestamp

The date and time when the decision process started.

endDate

timestamp

The date and time when the decision process concluded.

decisionText

string

Free-text explanation or rationale for the decision.

category

string

Category of the decision (e.g., medication Approved, Denied, No Decision).

medInfo

object

Nested object containing additional metadata about the prescribed medicine.

createdAt

timestamp

The timestamp when the CaseDecision record was created in the system.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article