AlayaCare External Integrations

Home

AlayaCare SQS Messaging Specifications

Schemas for the SQS message body in AlayaCare’s streaming event queues. Schemas are organized by queue.

Contents

Scheduler Queue Schemas

Visit Updated or Deleted Schema

{
  "examples": [
    {
      "event": "visit-updated",
      "external_id": null,
      "id": 10001,
      "request_id": "a55737bcaba1698ab64edc4da0a88487"
    }
  ],
  "properties": {
    "event": {
      "description": "Event type",
      "enum": [
        "visit-updated"
      ],
      "type": "string"
    },
    "external_id": {
      "description": "External id associated to the visit",
      "maxLength": 1000,
      "type": "string"
    },
    "id": {
      "description": "AlayaCare visit id",
      "type": "integer"
    },
    "request_id": {
      "description": "Request id that triggered this event.",
      "maxLength": 100,
      "type": "string"
    }
  },
  "required": [
    "event",
    "id",
    "external_id",
    "request_id"
  ],
  "type": "object"
}

Facility Visit Updated or Deleted Schema

{
  "examples": [
    {
      "event": "facility-visit-updated",
      "external_id": null,
      "id": 10001,
      "request_id": "a55737bcaba1698ab64edc4da0a88487"
    }
  ],
  "properties": {
    "event": {
      "description": "Event type",
      "enum": [
        "visit-updated",
        "visit-deleted",
        "facility-visit-updated",
        "facility-visit-deleted"
      ],
      "type": "string"
    },
    "external_id": {
      "description": "External id associated to the visit",
      "maxLength": 1000,
      "type": "string"
    },
    "id": {
      "description": "AlayaCare visit id",
      "type": "integer"
    },
    "request_id": {
      "description": "Request id that triggered this event.",
      "maxLength": 100,
      "type": "string"
    }
  },
  "required": [
    "event",
    "id",
    "external_id",
    "request_id"
  ],
  "type": "object"
}

Service Updated Schema

{
  "examples": [
    {
      "event": "service-updated",
      "external_id": "external_service_id_1",
      "id": 611,
      "request_id": "a55737bcaba1698ab64edc4da0a88487"
    }
  ],
  "properties": {
    "event": {
      "description": "Event type",
      "enum": [
        "service-updated"
      ],
      "type": "string"
    },
    "external_id": {
      "description": "External id associated to the service",
      "maxLength": 1000,
      "type": "string"
    },
    "id": {
      "description": "AlayaCare service id",
      "type": "integer"
    },
    "request_id": {
      "description": "Request id that triggered this event.",
      "maxLength": 100,
      "type": "string"
    }
  },
  "required": [
    "event",
    "id",
    "external_id",
    "request_id"
  ],
  "type": "object"
}

Visit Clock In Schema

{
  "examples": [
    {
      "event": "visit-clock-in",
      "external_id": "external_visit_id_1",
      "id": 101,
      "request_id": "a55737bcaba1698ab64edc4da0a88487"
    }
  ],
  "properties": {
    "event": {
      "description": "Event type",
      "enum": [
        "visit-clock-in"
      ],
      "type": "string"
    },
    "external_id": {
      "description": "External id associated to the visit",
      "maxLength": 1000,
      "type": "string"
    },
    "id": {
      "description": "AlayaCare visit id",
      "type": "integer"
    },
    "request_id": {
      "description": "Request id that triggered this event.",
      "maxLength": 100,
      "type": "string"
    }
  },
  "required": [
    "event",
    "id",
    "external_id",
    "request_id"
  ],
  "type": "object"
}

Visit Clock Out Schema

{
  "examples": [
    {
      "event": "visit-clock-out",
      "external_id": "external_visit_id_1",
      "id": 101,
      "request_id": "a55737bcaba1698ab64edc4da0a88487"
    }
  ],
  "properties": {
    "event": {
      "description": "Event type",
      "enum": [
        "visit-clock-out"
      ],
      "type": "string"
    },
    "external_id": {
      "description": "External id associated to the visit",
      "maxLength": 1000,
      "type": "string"
    },
    "id": {
      "description": "AlayaCare visit id",
      "type": "integer"
    },
    "request_id": {
      "description": "Request id that triggered this event.",
      "maxLength": 100,
      "type": "string"
    }
  },
  "required": [
    "event",
    "id",
    "external_id",
    "request_id"
  ],
  "type": "object"
}

Employee Queue Schemas

Employee Updated Schema

{
  "examples": [
    {
      "event": "employee-updated",
      "external_id": "external_employee_id_1",
      "id": 101,
      "request_id": "a55737bcaba1698ab64edc4da0a88487"
    }
  ],
  "properties": {
    "event": {
      "description": "Event type",
      "enum": [
        "employee-updated"
      ],
      "type": "string"
    },
    "external_id": {
      "description": "External id associated to the employee",
      "maxLength": 1000,
      "type": "string"
    },
    "id": {
      "description": "AlayaCare employee id",
      "type": "integer"
    },
    "request_id": {
      "description": "Request id that triggered this event.",
      "maxLength": 100,
      "type": "string"
    }
  },
  "required": [
    "event",
    "id",
    "external_id",
    "request_id"
  ],
  "type": "object"
}

Employee Unavailability Updated Schema

{
  "examples": [
    {
      "event": "employee-unavailability-updated",
      "external_ids": {},
      "ids": [101],
      "request_id": "a55737bcaba1698ab64edc4da0a88487"
    }
  ],
  "properties": {
    "event": {
      "description": "Event type",
      "enum": [
        "employee-unavailability-updated"
      ],
      "type": "string"
    },
    "external_ids": {
      "description": "Always null"
    },
    "ids": {
      "description": "AlayaCare employee unavailability id",
      "type": "array"
    },
    "request_id": {
      "description": "Request id that triggered this event.",
      "maxLength": 100,
      "type": "string"
    }
  },
  "required": [
    "event",
    "id",
    "external_id",
    "request_id"
  ],
  "type": "object"
}

Employee Unavailability Deleted Schema

{
  "examples": [
    {
      "event": "employee-unavailability-deleted",
      "external_ids": {},
      "ids": [101],
      "request_id": "a55737bcaba1698ab64edc4da0a88487"
    }
  ],
  "properties": {
    "event": {
      "description": "Event type",
      "enum": [
        "employee-unavailability-deleted"
      ],
      "type": "string"
    },
    "external_ids": {
      "description": "Always null"
    },
    "ids": {
      "description": "AlayaCare employee unavailability id",
      "type": "array"
    },
    "request_id": {
      "description": "Request id that triggered this event.",
      "maxLength": 100,
      "type": "string"
    }
  },
  "required": [
    "event",
    "id",
    "external_id",
    "request_id"
  ],
  "type": "object"
}

Patient Queue Schemas

Patient Updated Schema

{
  "examples": [
    {
      "event": "client-updated",
      "external_id": "external_client_id_1",
      "id": 1001,
      "request_id": "a55737bcaba1698ab64edc4da0a88487"
    }
  ],
  "properties": {
    "event": {
      "description": "Event type",
      "enum": [
        "client-updated"
      ],
      "type": "string"
    },
    "external_id": {
      "description": "External id associated to the client",
      "maxLength": 1000,
      "type": "string"
    },
    "id": {
      "description": "AlayaCare client id",
      "type": "integer"
    },
    "request_id": {
      "description": "Request id that triggered this event.",
      "maxLength": 100,
      "type": "string"
    }
  },
  "required": [
    "event",
    "id",
    "external_id",
    "request_id"
  ],
  "type": "object"
}

Patient Status History Schema

{
  "examples": [
    {
      "event": "client-status-history-updated",
      "external_id": {"1001": "external_client_id_1"},
      "ids": [1001],
      "request_id": "a55737bcaba1698ab64edc4da0a88487"
    }
  ],
  "properties": {
    "event": {
      "description": "Event type",
      "enum": [
        "client-status-history-updated"
      ],
      "type": "string"
    },
    "external_id": {
      "description": "External id associated to the client",
      "maxLength": 1000,
      "type": "string"
    },
    "ids": {
      "description": "AlayaCare client id",
      "type": "integer"
    },
    "request_id": {
      "description": "Request id that triggered this event.",
      "maxLength": 100,
      "type": "string"
    }
  },
  "required": [
    "event",
    "id",
    "external_id",
    "request_id"
  ],
  "type": "object"
}

Task Queue Schemas

Task Updated Schema

{
  "examples": [
    {
      "event": "task-updated",
      "external_id": null,
      "id": 10001,
      "request_id": "a55737bcaba1698ab64edc4da0a88487"
    }
  ],
  "properties": {
    "event": {
      "description": "Event type",
      "enum": [
        "task-updated"
      ],
      "type": "string"
    },
    "id": {
      "description": "AlayaCare task id",
      "type": "integer"
    },
    "request_id": {
      "description": "Request id that triggered this event.",
      "maxLength": 100,
      "type": "string"
    }
  },
  "required": [
    "event",
    "id",
    "external_id",
    "request_id"
  ],
  "type": "object"
}

Clinical Queue Schemas

Progress Note Updated Schema

{
  "examples": [
	{
      "event": "progress-note-updated",
      "id": "653ab9ff-5acb-4b3c-8492-e8a191109ade",
      "external_id": null,
      "request_id": "a55737bcaba1698ab64edc4da0a88487"
	}
  ],
  "properties": {
    "event": {
      "description": "Event type",
      "enum": [
        "progress-note-updated"
      ],
      "type": "string"
    },
    "id": {
      "description": "AlayaCare progress note uuid",
      "type": "string"
    },
    "external_id": {
      "description": "Always null",
    },
    "request_id": {
      "description": "Request id that triggered this event.",
      "maxLength": 100,
      "type": "string"
	}
  },
  "required": [
    "event",
    "id",
    "external_id",
    "request_id"
  ],
  "type": "object"
}

Medication Updated Schema

{
  "examples": [
    {
      "event": "medication-updated",
      "id": "653ab9ff-5acb-4b3c-8492-e8a191109ade",
      "external_id": null,
      "request_id": "a55737bcaba1698ab64edc4da0a88487"
    }
  ],
  "properties": {
    "event": {
      "description": "Event type",
      "enum": [
        "medication-updated"
      ],
      "type": "string"
    },
    "id": {
      "description": "AlayaCare medication uuid",
      "type": "string"
    },
    "external_id": {
      "description": "Always null",
    },
    "request_id": {
      "description": "Request id that triggered this event.",
      "maxLength": 100,
      "type": "string"
    }
  },
  "required": [
    "event",
    "id",
    "external_id",
    "request_id"
  ],
  "type": "object"
}

Medication Administration Updated Schema

{
  "examples": [
    {
      "event": "medication-admin-updated",
      "id": "653ab9ff-5acb-4b3c-8492-e8a191109ade",
      "external_id": null,
      "request_id": "a55737bcaba1698ab64edc4da0a88487"
    }
  ],
  "properties": {
    "event": {
      "description": "Event type",
      "enum": [
        "medication-admin-updated"
      ],
      "type": "string"
    },
    "id": {
      "description": "AlayaCare medication uuid",
      "type": "string"
    },
    "external_id": {
      "description": "Always null",
    },
    "request_id": {
      "description": "Request id that triggered this event.",
      "maxLength": 100,
      "type": "string"
    }
  },
  "required": [
    "event",
    "id",
    "external_id",
    "request_id"
  ],
  "type": "object"
}

Vitals Updated Schema

{
  "examples": [
    {
      "event": "vitals-updated",
      "id": "653ab9ff-5acb-4b3c-8492-e8a191109ade",
      "external_id": null,
      "request_id": "a55737bcaba1698ab64edc4da0a88487"
    }
  ],
  "properties": {
    "event": {
      "description": "Event type",
      "enum": [
        "vitals-updated"
      ],
      "type": "string"
    },
    "id": {
      "description": "AlayaCare vital uuid",
      "type": "string"
    },
    "external_id": {
      "description": "Always null",
    },
    "request_id": {
      "description": "Request id that triggered this event.",
      "maxLength": 100,
      "type": "string"
    }
  },
  "required": [
    "event",
    "id",
    "external_id",
    "request_id"
  ],
  "type": "object"
}

485 Document Status Updated Schema

{
  "examples": [
    {
      "event": "cms-485-status-updated",
      "id": "653ab9ff-5acb-4b3c-8492-e8a191109ade",
      "request_id": "a55737bcaba1698ab64edc4da0a88487",
      "client_id": 1001,
      "status": "sent",
      "updated_at": "2024-08-15T17:53:41.753014+00:00"
    }
  ],
  "properties": {
    "event": {
      "description": "Event type",
      "enum": [
        "cms-485-status-updated"
      ],
      "type": "string"
    },
    "id": {
      "description": "485 document id",
      "type": "string"
    },
    "request_id": {
      "description": "Request id that triggered this event.",
      "maxLength": 100,
      "type": "string"
    },
    "client_id": {
      "type": "integer",
      "description": "Id of the client"
    },
    "status": {
      "type": "string",
      "description": "The new 485 status"
    },
    "updated_at": {
      "type": "string",
      "description": "Iso-format of the date and time it happened",
      "format": "date-time"
    }
  },
  "required": [
    "event",
    "id",
    "request_id"
  ],
  "type": "object"
}

Intake Queue Schemas

Referral Processed Schema

Note that in addition to the “referral-processed” event and request ID, the referral response also includes the following:

{
  "examples": [
    {
      "client": {
        "request_id": "077ea104-41e8-11ea-ba15-02509a291246",
        "external_id": null,
        "id": 1061,
        "event": "client-updated"
      },
      "event": "referral-processed",
      "service": {
        "request_id": "077ea104-41e8-11ea-ba15-02509a291246",
        "external_id": "7675601663",
        "id": 63,
        "event": "service-updated"
      },
      "request_id": "077ea104-41e8-11ea-ba15-02509a291246"
    }
  ],
  "properties": {
    "event": {
      "description": "Event type",
      "enum": [
        "referral-processed"
      ],
      "type": "string"
    },
    "external_id": {
      "description": "External id associated to the service",
      "maxLength": 1000,
      "type": "string"
    },
    "id": {
      "description": "AlayaCare service id",
      "type": "integer"
    },
    "request_id": {
      "description": "Request id that triggered this event.",
      "maxLength": 100,
      "type": "string"
    }
  },
  "required": [
    "event",
    "request_id"
  ],
  "type": "object"
}