mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-12 14:16:12 +00:00
test(medications): pin the today list, the compliance buckets and the status update before they move
One walk through GET and POST /api/medications/intake: today's list with its projection and every status a row reads as, the compliance buckets cold and cached, a take in place, a take that re-binds to another slot, a pin and a pin that is no slot, a skip, both snoozes, the not-found answers, the record-only rule both ways, the injection-site refusal and an allowed site, the schema refusals, and a delegate marking an open dose and refused a snooze and a correction.
This commit is contained in:
1 parent
c4ee519012
commit
baa1ba018d
27 files changed
+20087
No files matched your search
+685
@@ -0,0 +1,685 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"data": [
|
||||
{
|
||||
"id": "<id:1>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledAt": "2026-10-15T06:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"status": "missed",
|
||||
"snoozedUntil": null
|
||||
},
|
||||
{
|
||||
"id": "<id:3>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledAt": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"status": "snoozed",
|
||||
"snoozedUntil": "2026-10-15T12:30:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "<id:5>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledAt": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"status": "pending",
|
||||
"snoozedUntil": null
|
||||
},
|
||||
{
|
||||
"id": "<id:7>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledAt": "2026-10-15T10:00:00.000Z",
|
||||
"takenAt": "2026-10-15T10:05:00.000Z",
|
||||
"status": "taken",
|
||||
"snoozedUntil": null
|
||||
},
|
||||
{
|
||||
"id": "<id:8>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledAt": "2026-10-15T13:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"status": "skipped",
|
||||
"snoozedUntil": null
|
||||
},
|
||||
{
|
||||
"id": "<id:9>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledAt": "2026-10-15T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"status": "snoozed",
|
||||
"snoozedUntil": "2026-10-15T12:30:00.000Z"
|
||||
}
|
||||
],
|
||||
"error": null
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"status": 200,
|
||||
"action": {
|
||||
"name": "medications.intake.today"
|
||||
},
|
||||
"meta": {
|
||||
"count": 6,
|
||||
"projected": 6,
|
||||
"backfilled": 0
|
||||
},
|
||||
"warnings": null,
|
||||
"error": null
|
||||
}
|
||||
],
|
||||
"effects": [],
|
||||
"stored": {
|
||||
"medications": [
|
||||
{
|
||||
"id": "<id:6>",
|
||||
"userId": "<id:10>",
|
||||
"name": "Daily pen",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT",
|
||||
"ABDOMEN_RIGHT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:11>",
|
||||
"userId": "<id:10>",
|
||||
"name": "Record only",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": null,
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": false,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:2>",
|
||||
"userId": "<id:10>",
|
||||
"name": "Three times",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:4>",
|
||||
"userId": "<id:10>",
|
||||
"name": "Twice daily",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": "2026-10-15T12:30:00.000Z",
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"schedules": [
|
||||
{
|
||||
"id": "<id:12>",
|
||||
"medicationId": "<id:2>",
|
||||
"windowStart": "06:00",
|
||||
"windowEnd": "07:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"06:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:13>",
|
||||
"medicationId": "<id:11>",
|
||||
"windowStart": "07:00",
|
||||
"windowEnd": "08:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"07:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:14>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "08:00",
|
||||
"windowEnd": "10:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"08:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:15>",
|
||||
"medicationId": "<id:6>",
|
||||
"windowStart": "09:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"09:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:16>",
|
||||
"medicationId": "<id:2>",
|
||||
"windowStart": "10:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"10:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:17>",
|
||||
"medicationId": "<id:2>",
|
||||
"windowStart": "13:00",
|
||||
"windowEnd": "14:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"13:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:18>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "20:00",
|
||||
"windowEnd": "22:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"20:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
}
|
||||
],
|
||||
"revisions": [],
|
||||
"pauseEras": [],
|
||||
"courses": [],
|
||||
"intakes": [
|
||||
{
|
||||
"id": "<id:19>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-09T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "2026-10-09T09:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "<id:20>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-10T08:00:00.000Z",
|
||||
"takenAt": "2026-10-10T08:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:21>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-11T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:22>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-12T08:00:00.000Z",
|
||||
"takenAt": "2026-10-12T08:10:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:23>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:11>",
|
||||
"scheduledFor": "2026-10-13T07:00:00.000Z",
|
||||
"takenAt": "2026-10-13T07:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:24>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-13T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:25>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:11>",
|
||||
"scheduledFor": "2026-10-14T07:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:26>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-14T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledFor": "2026-10-15T06:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": true,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:3>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:5>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:7>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledFor": "2026-10-15T10:00:00.000Z",
|
||||
"takenAt": "2026-10-15T10:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:8>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledFor": "2026-10-15T13:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:9>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
}
|
||||
],
|
||||
"doseChanges": [],
|
||||
"inventoryItems": [
|
||||
{
|
||||
"id": "<id:27>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"state": "ACTIVE",
|
||||
"containerType": "OTHER",
|
||||
"unitsTotal": "30",
|
||||
"unitsRemaining": "30",
|
||||
"firstUseAt": null,
|
||||
"expiresAt": null,
|
||||
"printedExpiry": null,
|
||||
"purchasedAt": "2026-10-01T06:00:00.000Z",
|
||||
"manufacturer": null,
|
||||
"doseStrength": null,
|
||||
"notes": null,
|
||||
"notesEncrypted": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"inventoryEvents": [],
|
||||
"categories": [],
|
||||
"ingredients": [],
|
||||
"audit": [],
|
||||
"idempotency": []
|
||||
}
|
||||
}
|
||||
+673
@@ -0,0 +1,673 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"data": [
|
||||
{
|
||||
"date": "2026-10-09",
|
||||
"scheduled": 6,
|
||||
"taken": 0
|
||||
},
|
||||
{
|
||||
"date": "2026-10-10",
|
||||
"scheduled": 6,
|
||||
"taken": 1
|
||||
},
|
||||
{
|
||||
"date": "2026-10-11",
|
||||
"scheduled": 6,
|
||||
"taken": 0
|
||||
},
|
||||
{
|
||||
"date": "2026-10-12",
|
||||
"scheduled": 6,
|
||||
"taken": 1
|
||||
},
|
||||
{
|
||||
"date": "2026-10-13",
|
||||
"scheduled": 6,
|
||||
"taken": 0
|
||||
},
|
||||
{
|
||||
"date": "2026-10-14",
|
||||
"scheduled": 6,
|
||||
"taken": 0
|
||||
},
|
||||
{
|
||||
"date": "2026-10-15",
|
||||
"scheduled": 5,
|
||||
"taken": 1
|
||||
}
|
||||
],
|
||||
"error": null
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"status": 200,
|
||||
"action": {
|
||||
"name": "medications.intake.compliance"
|
||||
},
|
||||
"meta": {
|
||||
"cache.medicationsIntake.outcome": "miss",
|
||||
"cache.medicationsIntake.key_hash": "<key_hash>",
|
||||
"days": 7,
|
||||
"count": 7
|
||||
},
|
||||
"warnings": null,
|
||||
"error": null
|
||||
}
|
||||
],
|
||||
"effects": [],
|
||||
"stored": {
|
||||
"medications": [
|
||||
{
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Daily pen",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT",
|
||||
"ABDOMEN_RIGHT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:3>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Record only",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": null,
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": false,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:4>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Three times",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:5>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Twice daily",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": "2026-10-15T12:30:00.000Z",
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"schedules": [
|
||||
{
|
||||
"id": "<id:6>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "06:00",
|
||||
"windowEnd": "07:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"06:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:7>",
|
||||
"medicationId": "<id:3>",
|
||||
"windowStart": "07:00",
|
||||
"windowEnd": "08:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"07:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:8>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "08:00",
|
||||
"windowEnd": "10:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"08:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:9>",
|
||||
"medicationId": "<id:1>",
|
||||
"windowStart": "09:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"09:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "10:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"10:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:11>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "13:00",
|
||||
"windowEnd": "14:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"13:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:12>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "20:00",
|
||||
"windowEnd": "22:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"20:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
}
|
||||
],
|
||||
"revisions": [],
|
||||
"pauseEras": [],
|
||||
"courses": [],
|
||||
"intakes": [
|
||||
{
|
||||
"id": "<id:13>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-09T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "2026-10-09T09:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "<id:14>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-10T08:00:00.000Z",
|
||||
"takenAt": "2026-10-10T08:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:15>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-11T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:16>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-12T08:00:00.000Z",
|
||||
"takenAt": "2026-10-12T08:10:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:17>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-13T07:00:00.000Z",
|
||||
"takenAt": "2026-10-13T07:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:18>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:19>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-14T07:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:20>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:21>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T06:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": true,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:22>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:23>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:1>",
|
||||
"scheduledFor": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:24>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T10:00:00.000Z",
|
||||
"takenAt": "2026-10-15T10:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:25>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T13:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:26>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
}
|
||||
],
|
||||
"doseChanges": [],
|
||||
"inventoryItems": [
|
||||
{
|
||||
"id": "<id:27>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"state": "ACTIVE",
|
||||
"containerType": "OTHER",
|
||||
"unitsTotal": "30",
|
||||
"unitsRemaining": "30",
|
||||
"firstUseAt": null,
|
||||
"expiresAt": null,
|
||||
"printedExpiry": null,
|
||||
"purchasedAt": "2026-10-01T06:00:00.000Z",
|
||||
"manufacturer": null,
|
||||
"doseStrength": null,
|
||||
"notes": null,
|
||||
"notesEncrypted": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"inventoryEvents": [],
|
||||
"categories": [],
|
||||
"ingredients": [],
|
||||
"audit": [],
|
||||
"idempotency": []
|
||||
}
|
||||
}
|
||||
+673
@@ -0,0 +1,673 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"data": [
|
||||
{
|
||||
"date": "2026-10-09",
|
||||
"scheduled": 6,
|
||||
"taken": 0
|
||||
},
|
||||
{
|
||||
"date": "2026-10-10",
|
||||
"scheduled": 6,
|
||||
"taken": 1
|
||||
},
|
||||
{
|
||||
"date": "2026-10-11",
|
||||
"scheduled": 6,
|
||||
"taken": 0
|
||||
},
|
||||
{
|
||||
"date": "2026-10-12",
|
||||
"scheduled": 6,
|
||||
"taken": 1
|
||||
},
|
||||
{
|
||||
"date": "2026-10-13",
|
||||
"scheduled": 6,
|
||||
"taken": 0
|
||||
},
|
||||
{
|
||||
"date": "2026-10-14",
|
||||
"scheduled": 6,
|
||||
"taken": 0
|
||||
},
|
||||
{
|
||||
"date": "2026-10-15",
|
||||
"scheduled": 5,
|
||||
"taken": 1
|
||||
}
|
||||
],
|
||||
"error": null
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"status": 200,
|
||||
"action": {
|
||||
"name": "medications.intake.compliance"
|
||||
},
|
||||
"meta": {
|
||||
"cache.medicationsIntake.outcome": "hit",
|
||||
"cache.medicationsIntake.key_hash": "<key_hash>",
|
||||
"days": 7,
|
||||
"count": 7
|
||||
},
|
||||
"warnings": null,
|
||||
"error": null
|
||||
}
|
||||
],
|
||||
"effects": [],
|
||||
"stored": {
|
||||
"medications": [
|
||||
{
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Daily pen",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT",
|
||||
"ABDOMEN_RIGHT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:3>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Record only",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": null,
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": false,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:4>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Three times",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:5>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Twice daily",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": "2026-10-15T12:30:00.000Z",
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"schedules": [
|
||||
{
|
||||
"id": "<id:6>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "06:00",
|
||||
"windowEnd": "07:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"06:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:7>",
|
||||
"medicationId": "<id:3>",
|
||||
"windowStart": "07:00",
|
||||
"windowEnd": "08:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"07:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:8>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "08:00",
|
||||
"windowEnd": "10:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"08:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:9>",
|
||||
"medicationId": "<id:1>",
|
||||
"windowStart": "09:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"09:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "10:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"10:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:11>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "13:00",
|
||||
"windowEnd": "14:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"13:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:12>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "20:00",
|
||||
"windowEnd": "22:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"20:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
}
|
||||
],
|
||||
"revisions": [],
|
||||
"pauseEras": [],
|
||||
"courses": [],
|
||||
"intakes": [
|
||||
{
|
||||
"id": "<id:13>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-09T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "2026-10-09T09:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "<id:14>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-10T08:00:00.000Z",
|
||||
"takenAt": "2026-10-10T08:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:15>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-11T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:16>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-12T08:00:00.000Z",
|
||||
"takenAt": "2026-10-12T08:10:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:17>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-13T07:00:00.000Z",
|
||||
"takenAt": "2026-10-13T07:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:18>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:19>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-14T07:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:20>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:21>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T06:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": true,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:22>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:23>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:1>",
|
||||
"scheduledFor": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:24>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T10:00:00.000Z",
|
||||
"takenAt": "2026-10-15T10:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:25>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T13:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:26>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
}
|
||||
],
|
||||
"doseChanges": [],
|
||||
"inventoryItems": [
|
||||
{
|
||||
"id": "<id:27>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"state": "ACTIVE",
|
||||
"containerType": "OTHER",
|
||||
"unitsTotal": "30",
|
||||
"unitsRemaining": "30",
|
||||
"firstUseAt": null,
|
||||
"expiresAt": null,
|
||||
"printedExpiry": null,
|
||||
"purchasedAt": "2026-10-01T06:00:00.000Z",
|
||||
"manufacturer": null,
|
||||
"doseStrength": null,
|
||||
"notes": null,
|
||||
"notesEncrypted": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"inventoryEvents": [],
|
||||
"categories": [],
|
||||
"ingredients": [],
|
||||
"audit": [],
|
||||
"idempotency": []
|
||||
}
|
||||
}
|
||||
+653
@@ -0,0 +1,653 @@
|
||||
{
|
||||
"status": 422,
|
||||
"body": {
|
||||
"data": null,
|
||||
"error": "Validation failed",
|
||||
"details": {
|
||||
"issues": [
|
||||
{
|
||||
"path": "scope",
|
||||
"code": "invalid_value",
|
||||
"message": "Invalid option: expected one of \"today\"|\"compliance\""
|
||||
},
|
||||
{
|
||||
"path": "days",
|
||||
"code": "too_small",
|
||||
"message": "Too small: expected number to be >=1"
|
||||
}
|
||||
]
|
||||
},
|
||||
"meta": {
|
||||
"errorCode": "http.invalid",
|
||||
"requestId": "<requestId>"
|
||||
}
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"status": 422,
|
||||
"action": {
|
||||
"name": "medications.intake.list.validation-failed"
|
||||
},
|
||||
"meta": {
|
||||
"issue_count": 2,
|
||||
"rejected_attempt": "medications.intake.list.validation-failed"
|
||||
},
|
||||
"warnings": null,
|
||||
"error": null
|
||||
}
|
||||
],
|
||||
"effects": [],
|
||||
"stored": {
|
||||
"medications": [
|
||||
{
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Daily pen",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT",
|
||||
"ABDOMEN_RIGHT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:3>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Record only",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": null,
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": false,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:4>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Three times",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:5>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Twice daily",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": "2026-10-15T12:30:00.000Z",
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"schedules": [
|
||||
{
|
||||
"id": "<id:6>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "06:00",
|
||||
"windowEnd": "07:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"06:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:7>",
|
||||
"medicationId": "<id:3>",
|
||||
"windowStart": "07:00",
|
||||
"windowEnd": "08:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"07:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:8>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "08:00",
|
||||
"windowEnd": "10:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"08:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:9>",
|
||||
"medicationId": "<id:1>",
|
||||
"windowStart": "09:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"09:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "10:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"10:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:11>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "13:00",
|
||||
"windowEnd": "14:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"13:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:12>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "20:00",
|
||||
"windowEnd": "22:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"20:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
}
|
||||
],
|
||||
"revisions": [],
|
||||
"pauseEras": [],
|
||||
"courses": [],
|
||||
"intakes": [
|
||||
{
|
||||
"id": "<id:13>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-09T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "2026-10-09T09:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "<id:14>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-10T08:00:00.000Z",
|
||||
"takenAt": "2026-10-10T08:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:15>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-11T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:16>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-12T08:00:00.000Z",
|
||||
"takenAt": "2026-10-12T08:10:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:17>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-13T07:00:00.000Z",
|
||||
"takenAt": "2026-10-13T07:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:18>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:19>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-14T07:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:20>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:21>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T06:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": true,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:22>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:23>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:1>",
|
||||
"scheduledFor": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:24>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T10:00:00.000Z",
|
||||
"takenAt": "2026-10-15T10:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:25>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T13:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:26>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
}
|
||||
],
|
||||
"doseChanges": [],
|
||||
"inventoryItems": [
|
||||
{
|
||||
"id": "<id:27>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"state": "ACTIVE",
|
||||
"containerType": "OTHER",
|
||||
"unitsTotal": "30",
|
||||
"unitsRemaining": "30",
|
||||
"firstUseAt": null,
|
||||
"expiresAt": null,
|
||||
"printedExpiry": null,
|
||||
"purchasedAt": "2026-10-01T06:00:00.000Z",
|
||||
"manufacturer": null,
|
||||
"doseStrength": null,
|
||||
"notes": null,
|
||||
"notesEncrypted": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"inventoryEvents": [],
|
||||
"categories": [],
|
||||
"ingredients": [],
|
||||
"audit": [],
|
||||
"idempotency": []
|
||||
}
|
||||
}
|
||||
+685
@@ -0,0 +1,685 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"data": [
|
||||
{
|
||||
"id": "<id:1>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledAt": "2026-10-15T06:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"status": "missed",
|
||||
"snoozedUntil": null
|
||||
},
|
||||
{
|
||||
"id": "<id:3>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledAt": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"status": "snoozed",
|
||||
"snoozedUntil": "2026-10-15T12:30:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "<id:5>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledAt": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"status": "pending",
|
||||
"snoozedUntil": null
|
||||
},
|
||||
{
|
||||
"id": "<id:7>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledAt": "2026-10-15T10:00:00.000Z",
|
||||
"takenAt": "2026-10-15T10:05:00.000Z",
|
||||
"status": "taken",
|
||||
"snoozedUntil": null
|
||||
},
|
||||
{
|
||||
"id": "<id:8>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledAt": "2026-10-15T13:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"status": "skipped",
|
||||
"snoozedUntil": null
|
||||
},
|
||||
{
|
||||
"id": "<id:9>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledAt": "2026-10-15T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"status": "snoozed",
|
||||
"snoozedUntil": "2026-10-15T12:30:00.000Z"
|
||||
}
|
||||
],
|
||||
"error": null
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"status": 200,
|
||||
"action": {
|
||||
"name": "medications.intake.today"
|
||||
},
|
||||
"meta": {
|
||||
"count": 6,
|
||||
"projected": 6,
|
||||
"backfilled": 0
|
||||
},
|
||||
"warnings": null,
|
||||
"error": null
|
||||
}
|
||||
],
|
||||
"effects": [],
|
||||
"stored": {
|
||||
"medications": [
|
||||
{
|
||||
"id": "<id:6>",
|
||||
"userId": "<id:10>",
|
||||
"name": "Daily pen",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT",
|
||||
"ABDOMEN_RIGHT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:11>",
|
||||
"userId": "<id:10>",
|
||||
"name": "Record only",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": null,
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": false,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:2>",
|
||||
"userId": "<id:10>",
|
||||
"name": "Three times",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:4>",
|
||||
"userId": "<id:10>",
|
||||
"name": "Twice daily",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": "2026-10-15T12:30:00.000Z",
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"schedules": [
|
||||
{
|
||||
"id": "<id:12>",
|
||||
"medicationId": "<id:2>",
|
||||
"windowStart": "06:00",
|
||||
"windowEnd": "07:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"06:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:13>",
|
||||
"medicationId": "<id:11>",
|
||||
"windowStart": "07:00",
|
||||
"windowEnd": "08:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"07:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:14>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "08:00",
|
||||
"windowEnd": "10:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"08:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:15>",
|
||||
"medicationId": "<id:6>",
|
||||
"windowStart": "09:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"09:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:16>",
|
||||
"medicationId": "<id:2>",
|
||||
"windowStart": "10:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"10:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:17>",
|
||||
"medicationId": "<id:2>",
|
||||
"windowStart": "13:00",
|
||||
"windowEnd": "14:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"13:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:18>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "20:00",
|
||||
"windowEnd": "22:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"20:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
}
|
||||
],
|
||||
"revisions": [],
|
||||
"pauseEras": [],
|
||||
"courses": [],
|
||||
"intakes": [
|
||||
{
|
||||
"id": "<id:19>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-09T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "2026-10-09T09:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "<id:20>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-10T08:00:00.000Z",
|
||||
"takenAt": "2026-10-10T08:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:21>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-11T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:22>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-12T08:00:00.000Z",
|
||||
"takenAt": "2026-10-12T08:10:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:23>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:11>",
|
||||
"scheduledFor": "2026-10-13T07:00:00.000Z",
|
||||
"takenAt": "2026-10-13T07:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:24>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-13T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:25>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:11>",
|
||||
"scheduledFor": "2026-10-14T07:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:26>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-14T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledFor": "2026-10-15T06:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": true,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:3>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:5>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:7>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledFor": "2026-10-15T10:00:00.000Z",
|
||||
"takenAt": "2026-10-15T10:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:8>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledFor": "2026-10-15T13:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:9>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
}
|
||||
],
|
||||
"doseChanges": [],
|
||||
"inventoryItems": [
|
||||
{
|
||||
"id": "<id:27>",
|
||||
"userId": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"state": "ACTIVE",
|
||||
"containerType": "OTHER",
|
||||
"unitsTotal": "30",
|
||||
"unitsRemaining": "30",
|
||||
"firstUseAt": null,
|
||||
"expiresAt": null,
|
||||
"printedExpiry": null,
|
||||
"purchasedAt": "2026-10-01T06:00:00.000Z",
|
||||
"manufacturer": null,
|
||||
"doseStrength": null,
|
||||
"notes": null,
|
||||
"notesEncrypted": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"inventoryEvents": [],
|
||||
"categories": [],
|
||||
"ingredients": [],
|
||||
"audit": [],
|
||||
"idempotency": []
|
||||
}
|
||||
}
|
||||
+637
@@ -0,0 +1,637 @@
|
||||
{
|
||||
"status": 401,
|
||||
"body": {
|
||||
"data": null,
|
||||
"error": "Not authenticated",
|
||||
"meta": {
|
||||
"errorCode": "auth.missing",
|
||||
"requestId": "<requestId>"
|
||||
}
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"status": 401,
|
||||
"action": null,
|
||||
"meta": null,
|
||||
"warnings": null,
|
||||
"error": {
|
||||
"type": "HttpError",
|
||||
"message": "Not authenticated"
|
||||
}
|
||||
}
|
||||
],
|
||||
"effects": [],
|
||||
"stored": {
|
||||
"medications": [
|
||||
{
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Daily pen",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT",
|
||||
"ABDOMEN_RIGHT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:3>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Record only",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": null,
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": false,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:4>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Three times",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:5>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Twice daily",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": "2026-10-15T12:30:00.000Z",
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"schedules": [
|
||||
{
|
||||
"id": "<id:6>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "06:00",
|
||||
"windowEnd": "07:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"06:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:7>",
|
||||
"medicationId": "<id:3>",
|
||||
"windowStart": "07:00",
|
||||
"windowEnd": "08:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"07:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:8>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "08:00",
|
||||
"windowEnd": "10:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"08:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:9>",
|
||||
"medicationId": "<id:1>",
|
||||
"windowStart": "09:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"09:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "10:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"10:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:11>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "13:00",
|
||||
"windowEnd": "14:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"13:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:12>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "20:00",
|
||||
"windowEnd": "22:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"20:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
}
|
||||
],
|
||||
"revisions": [],
|
||||
"pauseEras": [],
|
||||
"courses": [],
|
||||
"intakes": [
|
||||
{
|
||||
"id": "<id:13>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-09T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "2026-10-09T09:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "<id:14>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-10T08:00:00.000Z",
|
||||
"takenAt": "2026-10-10T08:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:15>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-11T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:16>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-12T08:00:00.000Z",
|
||||
"takenAt": "2026-10-12T08:10:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:17>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-13T07:00:00.000Z",
|
||||
"takenAt": "2026-10-13T07:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:18>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:19>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-14T07:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:20>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:21>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T06:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": true,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:22>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:23>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:1>",
|
||||
"scheduledFor": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:24>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T10:00:00.000Z",
|
||||
"takenAt": "2026-10-15T10:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:25>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T13:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:26>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
}
|
||||
],
|
||||
"doseChanges": [],
|
||||
"inventoryItems": [
|
||||
{
|
||||
"id": "<id:27>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"state": "ACTIVE",
|
||||
"containerType": "OTHER",
|
||||
"unitsTotal": "30",
|
||||
"unitsRemaining": "30",
|
||||
"firstUseAt": null,
|
||||
"expiresAt": null,
|
||||
"printedExpiry": null,
|
||||
"purchasedAt": "2026-10-01T06:00:00.000Z",
|
||||
"manufacturer": null,
|
||||
"doseStrength": null,
|
||||
"notes": null,
|
||||
"notesEncrypted": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"inventoryEvents": [],
|
||||
"categories": [],
|
||||
"ingredients": [],
|
||||
"audit": [],
|
||||
"idempotency": []
|
||||
}
|
||||
}
|
||||
+716
@@ -0,0 +1,716 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"data": {
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": "2026-10-15T08:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
"error": null
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"status": 200,
|
||||
"action": {
|
||||
"name": "medications.intake.update"
|
||||
},
|
||||
"meta": {
|
||||
"medication_id": "<id:3>",
|
||||
"units": 1,
|
||||
"item_ids": [
|
||||
"<id:4>"
|
||||
],
|
||||
"auto_opened": 1,
|
||||
"intakeId": "<id:1>",
|
||||
"status": "taken"
|
||||
},
|
||||
"warnings": null,
|
||||
"error": null
|
||||
}
|
||||
],
|
||||
"effects": [
|
||||
{
|
||||
"effect": "queueMedicationIntakeSync",
|
||||
"args": [
|
||||
{
|
||||
"userId": "<id:2>",
|
||||
"originDeviceToken": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"effect": "countOutstandingDosesToday",
|
||||
"args": [
|
||||
"<id:2>",
|
||||
"UTC"
|
||||
]
|
||||
},
|
||||
{
|
||||
"effect": "notifyDelegatedIntake",
|
||||
"args": [
|
||||
{
|
||||
"ownerId": "<id:2>",
|
||||
"actorId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"status": "taken"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"effect": "dispatchMedicationIntakeWebClear",
|
||||
"args": [
|
||||
{
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"badgeCount": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"stored": {
|
||||
"medications": [
|
||||
{
|
||||
"id": "<id:5>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Daily pen",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT",
|
||||
"ABDOMEN_RIGHT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:6>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Record only",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": null,
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": false,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:7>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Three times",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:3>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Twice daily",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"schedules": [
|
||||
{
|
||||
"id": "<id:8>",
|
||||
"medicationId": "<id:7>",
|
||||
"windowStart": "06:00",
|
||||
"windowEnd": "07:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"06:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:9>",
|
||||
"medicationId": "<id:6>",
|
||||
"windowStart": "07:00",
|
||||
"windowEnd": "08:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"07:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:10>",
|
||||
"medicationId": "<id:3>",
|
||||
"windowStart": "08:00",
|
||||
"windowEnd": "10:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"08:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:11>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "09:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"09:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:12>",
|
||||
"medicationId": "<id:7>",
|
||||
"windowStart": "10:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"10:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:13>",
|
||||
"medicationId": "<id:7>",
|
||||
"windowStart": "13:00",
|
||||
"windowEnd": "14:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"13:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:14>",
|
||||
"medicationId": "<id:3>",
|
||||
"windowStart": "20:00",
|
||||
"windowEnd": "22:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"20:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
}
|
||||
],
|
||||
"revisions": [],
|
||||
"pauseEras": [],
|
||||
"courses": [],
|
||||
"intakes": [
|
||||
{
|
||||
"id": "<id:15>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-09T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "2026-10-09T09:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "<id:16>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-10T08:00:00.000Z",
|
||||
"takenAt": "2026-10-10T08:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:17>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-11T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:18>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-12T08:00:00.000Z",
|
||||
"takenAt": "2026-10-12T08:10:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:19>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-13T07:00:00.000Z",
|
||||
"takenAt": "2026-10-13T07:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:20>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-13T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:21>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-14T07:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:22>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-14T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:23>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:7>",
|
||||
"scheduledFor": "2026-10-15T06:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": true,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": "2026-10-15T08:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:4>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:24>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:25>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:7>",
|
||||
"scheduledFor": "2026-10-15T10:00:00.000Z",
|
||||
"takenAt": "2026-10-15T10:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:26>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:7>",
|
||||
"scheduledFor": "2026-10-15T13:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:27>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-15T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
}
|
||||
],
|
||||
"doseChanges": [],
|
||||
"inventoryItems": [
|
||||
{
|
||||
"id": "<id:4>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"state": "IN_USE",
|
||||
"containerType": "OTHER",
|
||||
"unitsTotal": "30",
|
||||
"unitsRemaining": "29",
|
||||
"firstUseAt": "2026-10-15T08:30:00.000Z",
|
||||
"expiresAt": null,
|
||||
"printedExpiry": null,
|
||||
"purchasedAt": "2026-10-01T06:00:00.000Z",
|
||||
"manufacturer": null,
|
||||
"doseStrength": null,
|
||||
"notes": null,
|
||||
"notesEncrypted": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"inventoryEvents": [],
|
||||
"categories": [],
|
||||
"ingredients": [],
|
||||
"audit": [
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:1>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
}
|
||||
],
|
||||
"idempotency": []
|
||||
}
|
||||
}
|
||||
+740
@@ -0,0 +1,740 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"data": {
|
||||
"id": "<id:1>",
|
||||
"takenAt": "2026-10-14T20:30:00.000Z",
|
||||
"skipped": false,
|
||||
"idempotencyKey": null,
|
||||
"scheduledFor": "2026-10-14T20:00:00.000Z",
|
||||
"source": "WEB",
|
||||
"createdAt": "<createdAt>"
|
||||
},
|
||||
"error": null
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"status": 200,
|
||||
"action": {
|
||||
"name": "medications.intake.update"
|
||||
},
|
||||
"meta": {
|
||||
"medication_id": "<id:2>",
|
||||
"units": 1,
|
||||
"item_ids": [
|
||||
"<id:3>"
|
||||
],
|
||||
"auto_opened": 0,
|
||||
"intakeId": "<id:4>",
|
||||
"status": "taken"
|
||||
},
|
||||
"warnings": null,
|
||||
"error": null
|
||||
}
|
||||
],
|
||||
"effects": [
|
||||
{
|
||||
"effect": "queueMedicationIntakeSync",
|
||||
"args": [
|
||||
{
|
||||
"userId": "<id:5>",
|
||||
"originDeviceToken": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"effect": "countOutstandingDosesToday",
|
||||
"args": [
|
||||
"<id:5>",
|
||||
"UTC"
|
||||
]
|
||||
},
|
||||
{
|
||||
"effect": "notifyDelegatedIntake",
|
||||
"args": [
|
||||
{
|
||||
"ownerId": "<id:5>",
|
||||
"actorId": "<id:5>",
|
||||
"medicationId": "<id:2>",
|
||||
"status": "taken"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"effect": "dispatchMedicationIntakeWebClear",
|
||||
"args": [
|
||||
{
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledFor": "2026-10-14T20:00:00.000Z",
|
||||
"badgeCount": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"stored": {
|
||||
"medications": [
|
||||
{
|
||||
"id": "<id:6>",
|
||||
"userId": "<id:5>",
|
||||
"name": "Daily pen",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT",
|
||||
"ABDOMEN_RIGHT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:7>",
|
||||
"userId": "<id:5>",
|
||||
"name": "Record only",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": null,
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": false,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:8>",
|
||||
"userId": "<id:5>",
|
||||
"name": "Three times",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:2>",
|
||||
"userId": "<id:5>",
|
||||
"name": "Twice daily",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"schedules": [
|
||||
{
|
||||
"id": "<id:9>",
|
||||
"medicationId": "<id:8>",
|
||||
"windowStart": "06:00",
|
||||
"windowEnd": "07:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"06:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:10>",
|
||||
"medicationId": "<id:7>",
|
||||
"windowStart": "07:00",
|
||||
"windowEnd": "08:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"07:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:11>",
|
||||
"medicationId": "<id:2>",
|
||||
"windowStart": "08:00",
|
||||
"windowEnd": "10:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"08:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:12>",
|
||||
"medicationId": "<id:6>",
|
||||
"windowStart": "09:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"09:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:13>",
|
||||
"medicationId": "<id:8>",
|
||||
"windowStart": "10:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"10:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:14>",
|
||||
"medicationId": "<id:8>",
|
||||
"windowStart": "13:00",
|
||||
"windowEnd": "14:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"13:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:15>",
|
||||
"medicationId": "<id:2>",
|
||||
"windowStart": "20:00",
|
||||
"windowEnd": "22:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"20:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
}
|
||||
],
|
||||
"revisions": [],
|
||||
"pauseEras": [],
|
||||
"courses": [],
|
||||
"intakes": [
|
||||
{
|
||||
"id": "<id:16>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledFor": "2026-10-09T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "2026-10-09T09:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "<id:17>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledFor": "2026-10-10T08:00:00.000Z",
|
||||
"takenAt": "2026-10-10T08:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:18>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledFor": "2026-10-11T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:19>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledFor": "2026-10-12T08:00:00.000Z",
|
||||
"takenAt": "2026-10-12T08:10:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:20>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:7>",
|
||||
"scheduledFor": "2026-10-13T07:00:00.000Z",
|
||||
"takenAt": "2026-10-13T07:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:21>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledFor": "2026-10-13T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:22>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:7>",
|
||||
"scheduledFor": "2026-10-14T07:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:4>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledFor": "2026-10-14T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledFor": "2026-10-14T20:00:00.000Z",
|
||||
"takenAt": "2026-10-14T20:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:3>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:23>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:8>",
|
||||
"scheduledFor": "2026-10-15T06:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": true,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:24>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": "2026-10-15T08:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:3>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:25>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:26>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:8>",
|
||||
"scheduledFor": "2026-10-15T10:00:00.000Z",
|
||||
"takenAt": "2026-10-15T10:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:27>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:8>",
|
||||
"scheduledFor": "2026-10-15T13:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:28>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledFor": "2026-10-15T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
}
|
||||
],
|
||||
"doseChanges": [],
|
||||
"inventoryItems": [
|
||||
{
|
||||
"id": "<id:3>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:2>",
|
||||
"state": "IN_USE",
|
||||
"containerType": "OTHER",
|
||||
"unitsTotal": "30",
|
||||
"unitsRemaining": "28",
|
||||
"firstUseAt": "2026-10-15T08:30:00.000Z",
|
||||
"expiresAt": null,
|
||||
"printedExpiry": null,
|
||||
"purchasedAt": "2026-10-01T06:00:00.000Z",
|
||||
"manufacturer": null,
|
||||
"doseStrength": null,
|
||||
"notes": null,
|
||||
"notesEncrypted": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"inventoryEvents": [],
|
||||
"categories": [],
|
||||
"ingredients": [],
|
||||
"audit": [
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:5>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:24>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:5>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:4>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
}
|
||||
],
|
||||
"idempotency": []
|
||||
}
|
||||
}
|
||||
+776
@@ -0,0 +1,776 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"data": {
|
||||
"id": "<id:1>",
|
||||
"takenAt": "2026-10-13T11:00:00.000Z",
|
||||
"skipped": false,
|
||||
"idempotencyKey": null,
|
||||
"scheduledFor": "2026-10-13T08:00:00.000Z",
|
||||
"source": "WEB",
|
||||
"createdAt": "<createdAt>"
|
||||
},
|
||||
"error": null
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"status": 200,
|
||||
"action": {
|
||||
"name": "medications.intake.update"
|
||||
},
|
||||
"meta": {
|
||||
"medication_id": "<id:2>",
|
||||
"units": 1,
|
||||
"item_ids": [
|
||||
"<id:3>"
|
||||
],
|
||||
"auto_opened": 0,
|
||||
"intakeId": "<id:4>",
|
||||
"status": "taken"
|
||||
},
|
||||
"warnings": null,
|
||||
"error": null
|
||||
}
|
||||
],
|
||||
"effects": [
|
||||
{
|
||||
"effect": "queueMedicationIntakeSync",
|
||||
"args": [
|
||||
{
|
||||
"userId": "<id:5>",
|
||||
"originDeviceToken": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"effect": "countOutstandingDosesToday",
|
||||
"args": [
|
||||
"<id:5>",
|
||||
"UTC"
|
||||
]
|
||||
},
|
||||
{
|
||||
"effect": "notifyDelegatedIntake",
|
||||
"args": [
|
||||
{
|
||||
"ownerId": "<id:5>",
|
||||
"actorId": "<id:5>",
|
||||
"medicationId": "<id:2>",
|
||||
"status": "taken"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"effect": "dispatchMedicationIntakeWebClear",
|
||||
"args": [
|
||||
{
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledFor": "2026-10-13T08:00:00.000Z",
|
||||
"badgeCount": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"stored": {
|
||||
"medications": [
|
||||
{
|
||||
"id": "<id:6>",
|
||||
"userId": "<id:5>",
|
||||
"name": "Daily pen",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT",
|
||||
"ABDOMEN_RIGHT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:7>",
|
||||
"userId": "<id:5>",
|
||||
"name": "Record only",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": null,
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": false,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:8>",
|
||||
"userId": "<id:5>",
|
||||
"name": "Three times",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:2>",
|
||||
"userId": "<id:5>",
|
||||
"name": "Twice daily",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"schedules": [
|
||||
{
|
||||
"id": "<id:9>",
|
||||
"medicationId": "<id:8>",
|
||||
"windowStart": "06:00",
|
||||
"windowEnd": "07:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"06:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:10>",
|
||||
"medicationId": "<id:7>",
|
||||
"windowStart": "07:00",
|
||||
"windowEnd": "08:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"07:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:11>",
|
||||
"medicationId": "<id:2>",
|
||||
"windowStart": "08:00",
|
||||
"windowEnd": "10:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"08:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:12>",
|
||||
"medicationId": "<id:6>",
|
||||
"windowStart": "09:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"09:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:13>",
|
||||
"medicationId": "<id:8>",
|
||||
"windowStart": "10:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"10:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:14>",
|
||||
"medicationId": "<id:8>",
|
||||
"windowStart": "13:00",
|
||||
"windowEnd": "14:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"13:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:15>",
|
||||
"medicationId": "<id:2>",
|
||||
"windowStart": "20:00",
|
||||
"windowEnd": "22:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"20:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
}
|
||||
],
|
||||
"revisions": [],
|
||||
"pauseEras": [],
|
||||
"courses": [],
|
||||
"intakes": [
|
||||
{
|
||||
"id": "<id:16>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledFor": "2026-10-09T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "2026-10-09T09:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "<id:17>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledFor": "2026-10-10T08:00:00.000Z",
|
||||
"takenAt": "2026-10-10T08:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:18>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledFor": "2026-10-11T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:19>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledFor": "2026-10-12T08:00:00.000Z",
|
||||
"takenAt": "2026-10-12T08:10:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:20>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:7>",
|
||||
"scheduledFor": "2026-10-13T07:00:00.000Z",
|
||||
"takenAt": "2026-10-13T07:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledFor": "2026-10-13T08:00:00.000Z",
|
||||
"takenAt": "2026-10-13T11:00:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:3>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:4>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledFor": "2026-10-13T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:21>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:7>",
|
||||
"scheduledFor": "2026-10-14T07:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:22>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledFor": "2026-10-14T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:23>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledFor": "2026-10-14T20:00:00.000Z",
|
||||
"takenAt": "2026-10-14T20:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:3>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:24>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:8>",
|
||||
"scheduledFor": "2026-10-15T06:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": true,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:25>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": "2026-10-15T08:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:3>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:26>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:27>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:8>",
|
||||
"scheduledFor": "2026-10-15T10:00:00.000Z",
|
||||
"takenAt": "2026-10-15T10:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:28>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:8>",
|
||||
"scheduledFor": "2026-10-15T13:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:29>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:2>",
|
||||
"scheduledFor": "2026-10-15T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
}
|
||||
],
|
||||
"doseChanges": [],
|
||||
"inventoryItems": [
|
||||
{
|
||||
"id": "<id:3>",
|
||||
"userId": "<id:5>",
|
||||
"medicationId": "<id:2>",
|
||||
"state": "IN_USE",
|
||||
"containerType": "OTHER",
|
||||
"unitsTotal": "30",
|
||||
"unitsRemaining": "27",
|
||||
"firstUseAt": "2026-10-15T08:30:00.000Z",
|
||||
"expiresAt": null,
|
||||
"printedExpiry": null,
|
||||
"purchasedAt": "2026-10-01T06:00:00.000Z",
|
||||
"manufacturer": null,
|
||||
"doseStrength": null,
|
||||
"notes": null,
|
||||
"notesEncrypted": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"inventoryEvents": [],
|
||||
"categories": [],
|
||||
"ingredients": [],
|
||||
"audit": [
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:5>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:25>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:5>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:22>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:5>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:4>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
}
|
||||
],
|
||||
"idempotency": []
|
||||
}
|
||||
}
|
||||
+727
@@ -0,0 +1,727 @@
|
||||
{
|
||||
"status": 422,
|
||||
"body": {
|
||||
"data": null,
|
||||
"error": "forceSlotInstant is not a scheduled slot of this medication",
|
||||
"meta": {
|
||||
"errorCode": "medications.intake.force_slot.invalid",
|
||||
"requestId": "<requestId>"
|
||||
}
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"status": 422,
|
||||
"action": {
|
||||
"name": "medication.intake.force_slot.invalid"
|
||||
},
|
||||
"meta": {
|
||||
"medication_id": "<id:1>",
|
||||
"intake_id": "<id:2>"
|
||||
},
|
||||
"warnings": null,
|
||||
"error": null
|
||||
}
|
||||
],
|
||||
"effects": [],
|
||||
"stored": {
|
||||
"medications": [
|
||||
{
|
||||
"id": "<id:3>",
|
||||
"userId": "<id:4>",
|
||||
"name": "Daily pen",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT",
|
||||
"ABDOMEN_RIGHT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:5>",
|
||||
"userId": "<id:4>",
|
||||
"name": "Record only",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": null,
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": false,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:6>",
|
||||
"userId": "<id:4>",
|
||||
"name": "Three times",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:4>",
|
||||
"name": "Twice daily",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"schedules": [
|
||||
{
|
||||
"id": "<id:7>",
|
||||
"medicationId": "<id:6>",
|
||||
"windowStart": "06:00",
|
||||
"windowEnd": "07:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"06:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:8>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "07:00",
|
||||
"windowEnd": "08:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"07:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:9>",
|
||||
"medicationId": "<id:1>",
|
||||
"windowStart": "08:00",
|
||||
"windowEnd": "10:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"08:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:10>",
|
||||
"medicationId": "<id:3>",
|
||||
"windowStart": "09:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"09:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:11>",
|
||||
"medicationId": "<id:6>",
|
||||
"windowStart": "10:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"10:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:12>",
|
||||
"medicationId": "<id:6>",
|
||||
"windowStart": "13:00",
|
||||
"windowEnd": "14:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"13:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:13>",
|
||||
"medicationId": "<id:1>",
|
||||
"windowStart": "20:00",
|
||||
"windowEnd": "22:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"20:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
}
|
||||
],
|
||||
"revisions": [],
|
||||
"pauseEras": [],
|
||||
"courses": [],
|
||||
"intakes": [
|
||||
{
|
||||
"id": "<id:14>",
|
||||
"userId": "<id:4>",
|
||||
"medicationId": "<id:1>",
|
||||
"scheduledFor": "2026-10-09T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "2026-10-09T09:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "<id:15>",
|
||||
"userId": "<id:4>",
|
||||
"medicationId": "<id:1>",
|
||||
"scheduledFor": "2026-10-10T08:00:00.000Z",
|
||||
"takenAt": "2026-10-10T08:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:2>",
|
||||
"userId": "<id:4>",
|
||||
"medicationId": "<id:1>",
|
||||
"scheduledFor": "2026-10-11T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:16>",
|
||||
"userId": "<id:4>",
|
||||
"medicationId": "<id:1>",
|
||||
"scheduledFor": "2026-10-12T08:00:00.000Z",
|
||||
"takenAt": "2026-10-12T08:10:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:17>",
|
||||
"userId": "<id:4>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T07:00:00.000Z",
|
||||
"takenAt": "2026-10-13T07:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:18>",
|
||||
"userId": "<id:4>",
|
||||
"medicationId": "<id:1>",
|
||||
"scheduledFor": "2026-10-13T08:00:00.000Z",
|
||||
"takenAt": "2026-10-13T11:00:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:20>",
|
||||
"userId": "<id:4>",
|
||||
"medicationId": "<id:1>",
|
||||
"scheduledFor": "2026-10-13T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:21>",
|
||||
"userId": "<id:4>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T07:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:22>",
|
||||
"userId": "<id:4>",
|
||||
"medicationId": "<id:1>",
|
||||
"scheduledFor": "2026-10-14T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:23>",
|
||||
"userId": "<id:4>",
|
||||
"medicationId": "<id:1>",
|
||||
"scheduledFor": "2026-10-14T20:00:00.000Z",
|
||||
"takenAt": "2026-10-14T20:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:24>",
|
||||
"userId": "<id:4>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-15T06:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": true,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:25>",
|
||||
"userId": "<id:4>",
|
||||
"medicationId": "<id:1>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": "2026-10-15T08:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:26>",
|
||||
"userId": "<id:4>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:27>",
|
||||
"userId": "<id:4>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-15T10:00:00.000Z",
|
||||
"takenAt": "2026-10-15T10:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:28>",
|
||||
"userId": "<id:4>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-15T13:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:29>",
|
||||
"userId": "<id:4>",
|
||||
"medicationId": "<id:1>",
|
||||
"scheduledFor": "2026-10-15T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
}
|
||||
],
|
||||
"doseChanges": [],
|
||||
"inventoryItems": [
|
||||
{
|
||||
"id": "<id:19>",
|
||||
"userId": "<id:4>",
|
||||
"medicationId": "<id:1>",
|
||||
"state": "IN_USE",
|
||||
"containerType": "OTHER",
|
||||
"unitsTotal": "30",
|
||||
"unitsRemaining": "27",
|
||||
"firstUseAt": "2026-10-15T08:30:00.000Z",
|
||||
"expiresAt": null,
|
||||
"printedExpiry": null,
|
||||
"purchasedAt": "2026-10-01T06:00:00.000Z",
|
||||
"manufacturer": null,
|
||||
"doseStrength": null,
|
||||
"notes": null,
|
||||
"notesEncrypted": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"inventoryEvents": [],
|
||||
"categories": [],
|
||||
"ingredients": [],
|
||||
"audit": [
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:4>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:25>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:4>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:22>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:4>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:20>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
}
|
||||
],
|
||||
"idempotency": []
|
||||
}
|
||||
}
|
||||
+792
@@ -0,0 +1,792 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"data": {
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-12T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
"error": null
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"status": 200,
|
||||
"action": {
|
||||
"name": "medications.intake.update"
|
||||
},
|
||||
"meta": {
|
||||
"intakeId": "<id:1>",
|
||||
"status": "skipped"
|
||||
},
|
||||
"warnings": null,
|
||||
"error": null
|
||||
}
|
||||
],
|
||||
"effects": [
|
||||
{
|
||||
"effect": "queueMedicationIntakeSync",
|
||||
"args": [
|
||||
{
|
||||
"userId": "<id:2>",
|
||||
"originDeviceToken": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"effect": "countOutstandingDosesToday",
|
||||
"args": [
|
||||
"<id:2>",
|
||||
"UTC"
|
||||
]
|
||||
},
|
||||
{
|
||||
"effect": "notifyDelegatedIntake",
|
||||
"args": [
|
||||
{
|
||||
"ownerId": "<id:2>",
|
||||
"actorId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"status": "skipped"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"effect": "dispatchMedicationIntakeWebClear",
|
||||
"args": [
|
||||
{
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-12T08:00:00.000Z",
|
||||
"badgeCount": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"stored": {
|
||||
"medications": [
|
||||
{
|
||||
"id": "<id:4>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Daily pen",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT",
|
||||
"ABDOMEN_RIGHT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:5>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Record only",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": null,
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": false,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:6>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Three times",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:3>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Twice daily",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"schedules": [
|
||||
{
|
||||
"id": "<id:7>",
|
||||
"medicationId": "<id:6>",
|
||||
"windowStart": "06:00",
|
||||
"windowEnd": "07:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"06:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:8>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "07:00",
|
||||
"windowEnd": "08:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"07:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:9>",
|
||||
"medicationId": "<id:3>",
|
||||
"windowStart": "08:00",
|
||||
"windowEnd": "10:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"08:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "09:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"09:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:11>",
|
||||
"medicationId": "<id:6>",
|
||||
"windowStart": "10:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"10:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:12>",
|
||||
"medicationId": "<id:6>",
|
||||
"windowStart": "13:00",
|
||||
"windowEnd": "14:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"13:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:13>",
|
||||
"medicationId": "<id:3>",
|
||||
"windowStart": "20:00",
|
||||
"windowEnd": "22:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"20:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
}
|
||||
],
|
||||
"revisions": [],
|
||||
"pauseEras": [],
|
||||
"courses": [],
|
||||
"intakes": [
|
||||
{
|
||||
"id": "<id:14>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-09T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "2026-10-09T09:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "<id:15>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-10T08:00:00.000Z",
|
||||
"takenAt": "2026-10-10T08:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:16>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-11T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-12T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:17>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T07:00:00.000Z",
|
||||
"takenAt": "2026-10-13T07:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:18>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-13T08:00:00.000Z",
|
||||
"takenAt": "2026-10-13T11:00:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:20>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-13T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:21>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T07:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:22>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-14T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:23>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-14T20:00:00.000Z",
|
||||
"takenAt": "2026-10-14T20:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:24>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-15T06:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": true,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:25>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": "2026-10-15T08:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:26>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:27>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-15T10:00:00.000Z",
|
||||
"takenAt": "2026-10-15T10:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:28>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-15T13:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:29>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-15T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
}
|
||||
],
|
||||
"doseChanges": [],
|
||||
"inventoryItems": [
|
||||
{
|
||||
"id": "<id:19>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"state": "IN_USE",
|
||||
"containerType": "OTHER",
|
||||
"unitsTotal": "30",
|
||||
"unitsRemaining": "27",
|
||||
"firstUseAt": "2026-10-15T08:30:00.000Z",
|
||||
"expiresAt": null,
|
||||
"printedExpiry": null,
|
||||
"purchasedAt": "2026-10-01T06:00:00.000Z",
|
||||
"manufacturer": null,
|
||||
"doseStrength": null,
|
||||
"notes": null,
|
||||
"notesEncrypted": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"inventoryEvents": [],
|
||||
"categories": [],
|
||||
"ingredients": [],
|
||||
"audit": [
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:1>",
|
||||
"status": "skipped"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:25>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:22>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:20>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
}
|
||||
],
|
||||
"idempotency": []
|
||||
}
|
||||
}
|
||||
+784
@@ -0,0 +1,784 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"data": {
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-11T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
"error": null
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"status": 200,
|
||||
"action": {
|
||||
"name": "medications.intake.update"
|
||||
},
|
||||
"meta": {
|
||||
"intakeId": "<id:1>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"warnings": null,
|
||||
"error": null
|
||||
}
|
||||
],
|
||||
"effects": [
|
||||
{
|
||||
"effect": "queueMedicationIntakeSync",
|
||||
"args": [
|
||||
{
|
||||
"userId": "<id:2>",
|
||||
"originDeviceToken": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"effect": "notifyDelegatedIntake",
|
||||
"args": [
|
||||
{
|
||||
"ownerId": "<id:2>",
|
||||
"actorId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"status": "snoozed"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"stored": {
|
||||
"medications": [
|
||||
{
|
||||
"id": "<id:4>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Daily pen",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT",
|
||||
"ABDOMEN_RIGHT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:5>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Record only",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": null,
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": false,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:6>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Three times",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:3>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Twice daily",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": "2026-10-15T13:00:00.000Z",
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"schedules": [
|
||||
{
|
||||
"id": "<id:7>",
|
||||
"medicationId": "<id:6>",
|
||||
"windowStart": "06:00",
|
||||
"windowEnd": "07:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"06:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:8>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "07:00",
|
||||
"windowEnd": "08:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"07:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:9>",
|
||||
"medicationId": "<id:3>",
|
||||
"windowStart": "08:00",
|
||||
"windowEnd": "10:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"08:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "09:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"09:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:11>",
|
||||
"medicationId": "<id:6>",
|
||||
"windowStart": "10:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"10:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:12>",
|
||||
"medicationId": "<id:6>",
|
||||
"windowStart": "13:00",
|
||||
"windowEnd": "14:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"13:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:13>",
|
||||
"medicationId": "<id:3>",
|
||||
"windowStart": "20:00",
|
||||
"windowEnd": "22:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"20:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
}
|
||||
],
|
||||
"revisions": [],
|
||||
"pauseEras": [],
|
||||
"courses": [],
|
||||
"intakes": [
|
||||
{
|
||||
"id": "<id:14>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-09T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "2026-10-09T09:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "<id:15>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-10T08:00:00.000Z",
|
||||
"takenAt": "2026-10-10T08:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-11T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:16>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-12T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:17>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T07:00:00.000Z",
|
||||
"takenAt": "2026-10-13T07:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:18>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-13T08:00:00.000Z",
|
||||
"takenAt": "2026-10-13T11:00:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:20>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-13T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:21>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T07:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:22>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-14T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:23>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-14T20:00:00.000Z",
|
||||
"takenAt": "2026-10-14T20:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:24>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-15T06:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": true,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:25>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": "2026-10-15T08:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:26>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:27>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-15T10:00:00.000Z",
|
||||
"takenAt": "2026-10-15T10:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:28>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-15T13:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:29>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-15T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
}
|
||||
],
|
||||
"doseChanges": [],
|
||||
"inventoryItems": [
|
||||
{
|
||||
"id": "<id:19>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"state": "IN_USE",
|
||||
"containerType": "OTHER",
|
||||
"unitsTotal": "30",
|
||||
"unitsRemaining": "27",
|
||||
"firstUseAt": "2026-10-15T08:30:00.000Z",
|
||||
"expiresAt": null,
|
||||
"printedExpiry": null,
|
||||
"purchasedAt": "2026-10-01T06:00:00.000Z",
|
||||
"manufacturer": null,
|
||||
"doseStrength": null,
|
||||
"notes": null,
|
||||
"notesEncrypted": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"inventoryEvents": [],
|
||||
"categories": [],
|
||||
"ingredients": [],
|
||||
"audit": [
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:16>",
|
||||
"status": "skipped"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:1>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:25>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:22>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:20>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
}
|
||||
],
|
||||
"idempotency": []
|
||||
}
|
||||
}
|
||||
+794
@@ -0,0 +1,794 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"data": {
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-11T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
"error": null
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"status": 200,
|
||||
"action": {
|
||||
"name": "medications.intake.update"
|
||||
},
|
||||
"meta": {
|
||||
"intakeId": "<id:1>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"warnings": null,
|
||||
"error": null
|
||||
}
|
||||
],
|
||||
"effects": [
|
||||
{
|
||||
"effect": "queueMedicationIntakeSync",
|
||||
"args": [
|
||||
{
|
||||
"userId": "<id:2>",
|
||||
"originDeviceToken": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"effect": "notifyDelegatedIntake",
|
||||
"args": [
|
||||
{
|
||||
"ownerId": "<id:2>",
|
||||
"actorId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"status": "snoozed"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"stored": {
|
||||
"medications": [
|
||||
{
|
||||
"id": "<id:4>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Daily pen",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT",
|
||||
"ABDOMEN_RIGHT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:5>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Record only",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": null,
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": false,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:6>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Three times",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:3>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Twice daily",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": "2026-10-15T12:30:00.000Z",
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"schedules": [
|
||||
{
|
||||
"id": "<id:7>",
|
||||
"medicationId": "<id:6>",
|
||||
"windowStart": "06:00",
|
||||
"windowEnd": "07:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"06:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:8>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "07:00",
|
||||
"windowEnd": "08:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"07:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:9>",
|
||||
"medicationId": "<id:3>",
|
||||
"windowStart": "08:00",
|
||||
"windowEnd": "10:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"08:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "09:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"09:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:11>",
|
||||
"medicationId": "<id:6>",
|
||||
"windowStart": "10:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"10:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:12>",
|
||||
"medicationId": "<id:6>",
|
||||
"windowStart": "13:00",
|
||||
"windowEnd": "14:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"13:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:13>",
|
||||
"medicationId": "<id:3>",
|
||||
"windowStart": "20:00",
|
||||
"windowEnd": "22:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"20:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
}
|
||||
],
|
||||
"revisions": [],
|
||||
"pauseEras": [],
|
||||
"courses": [],
|
||||
"intakes": [
|
||||
{
|
||||
"id": "<id:14>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-09T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "2026-10-09T09:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "<id:15>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-10T08:00:00.000Z",
|
||||
"takenAt": "2026-10-10T08:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-11T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:16>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-12T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:17>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T07:00:00.000Z",
|
||||
"takenAt": "2026-10-13T07:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:18>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-13T08:00:00.000Z",
|
||||
"takenAt": "2026-10-13T11:00:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:20>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-13T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:21>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T07:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:22>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-14T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:23>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-14T20:00:00.000Z",
|
||||
"takenAt": "2026-10-14T20:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:24>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-15T06:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": true,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:25>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": "2026-10-15T08:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:26>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:27>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-15T10:00:00.000Z",
|
||||
"takenAt": "2026-10-15T10:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:28>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-15T13:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:29>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-15T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
}
|
||||
],
|
||||
"doseChanges": [],
|
||||
"inventoryItems": [
|
||||
{
|
||||
"id": "<id:19>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"state": "IN_USE",
|
||||
"containerType": "OTHER",
|
||||
"unitsTotal": "30",
|
||||
"unitsRemaining": "27",
|
||||
"firstUseAt": "2026-10-15T08:30:00.000Z",
|
||||
"expiresAt": null,
|
||||
"printedExpiry": null,
|
||||
"purchasedAt": "2026-10-01T06:00:00.000Z",
|
||||
"manufacturer": null,
|
||||
"doseStrength": null,
|
||||
"notes": null,
|
||||
"notesEncrypted": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"inventoryEvents": [],
|
||||
"categories": [],
|
||||
"ingredients": [],
|
||||
"audit": [
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:16>",
|
||||
"status": "skipped"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:1>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:1>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:25>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:22>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:20>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
}
|
||||
],
|
||||
"idempotency": []
|
||||
}
|
||||
}
|
||||
+752
@@ -0,0 +1,752 @@
|
||||
{
|
||||
"status": 404,
|
||||
"body": {
|
||||
"data": null,
|
||||
"error": "Intake event not found",
|
||||
"meta": {
|
||||
"errorCode": "http.not_found",
|
||||
"requestId": "<requestId>"
|
||||
}
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"status": 404,
|
||||
"action": null,
|
||||
"meta": null,
|
||||
"warnings": null,
|
||||
"error": null
|
||||
}
|
||||
],
|
||||
"effects": [],
|
||||
"stored": {
|
||||
"medications": [
|
||||
{
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Daily pen",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT",
|
||||
"ABDOMEN_RIGHT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:3>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Record only",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": null,
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": false,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:4>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Three times",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:5>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Twice daily",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": "2026-10-15T12:30:00.000Z",
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"schedules": [
|
||||
{
|
||||
"id": "<id:6>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "06:00",
|
||||
"windowEnd": "07:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"06:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:7>",
|
||||
"medicationId": "<id:3>",
|
||||
"windowStart": "07:00",
|
||||
"windowEnd": "08:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"07:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:8>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "08:00",
|
||||
"windowEnd": "10:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"08:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:9>",
|
||||
"medicationId": "<id:1>",
|
||||
"windowStart": "09:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"09:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "10:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"10:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:11>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "13:00",
|
||||
"windowEnd": "14:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"13:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:12>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "20:00",
|
||||
"windowEnd": "22:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"20:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
}
|
||||
],
|
||||
"revisions": [],
|
||||
"pauseEras": [],
|
||||
"courses": [],
|
||||
"intakes": [
|
||||
{
|
||||
"id": "<id:13>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-09T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "2026-10-09T09:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "<id:14>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-10T08:00:00.000Z",
|
||||
"takenAt": "2026-10-10T08:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:15>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-11T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:16>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-12T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:17>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-13T07:00:00.000Z",
|
||||
"takenAt": "2026-10-13T07:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:18>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T08:00:00.000Z",
|
||||
"takenAt": "2026-10-13T11:00:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:20>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:21>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-14T07:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:22>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:23>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T20:00:00.000Z",
|
||||
"takenAt": "2026-10-14T20:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:24>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T06:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": true,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:25>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": "2026-10-15T08:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:26>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:1>",
|
||||
"scheduledFor": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:27>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T10:00:00.000Z",
|
||||
"takenAt": "2026-10-15T10:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:28>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T13:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:29>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
}
|
||||
],
|
||||
"doseChanges": [],
|
||||
"inventoryItems": [
|
||||
{
|
||||
"id": "<id:19>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"state": "IN_USE",
|
||||
"containerType": "OTHER",
|
||||
"unitsTotal": "30",
|
||||
"unitsRemaining": "27",
|
||||
"firstUseAt": "2026-10-15T08:30:00.000Z",
|
||||
"expiresAt": null,
|
||||
"printedExpiry": null,
|
||||
"purchasedAt": "2026-10-01T06:00:00.000Z",
|
||||
"manufacturer": null,
|
||||
"doseStrength": null,
|
||||
"notes": null,
|
||||
"notesEncrypted": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"inventoryEvents": [],
|
||||
"categories": [],
|
||||
"ingredients": [],
|
||||
"audit": [
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:16>",
|
||||
"status": "skipped"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:15>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:15>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:25>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:22>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:20>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
}
|
||||
],
|
||||
"idempotency": []
|
||||
}
|
||||
}
|
||||
+752
@@ -0,0 +1,752 @@
|
||||
{
|
||||
"status": 404,
|
||||
"body": {
|
||||
"data": null,
|
||||
"error": "Intake event not found",
|
||||
"meta": {
|
||||
"errorCode": "http.not_found",
|
||||
"requestId": "<requestId>"
|
||||
}
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"status": 404,
|
||||
"action": null,
|
||||
"meta": null,
|
||||
"warnings": null,
|
||||
"error": null
|
||||
}
|
||||
],
|
||||
"effects": [],
|
||||
"stored": {
|
||||
"medications": [
|
||||
{
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Daily pen",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT",
|
||||
"ABDOMEN_RIGHT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:3>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Record only",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": null,
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": false,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:4>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Three times",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:5>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Twice daily",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": "2026-10-15T12:30:00.000Z",
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"schedules": [
|
||||
{
|
||||
"id": "<id:6>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "06:00",
|
||||
"windowEnd": "07:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"06:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:7>",
|
||||
"medicationId": "<id:3>",
|
||||
"windowStart": "07:00",
|
||||
"windowEnd": "08:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"07:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:8>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "08:00",
|
||||
"windowEnd": "10:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"08:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:9>",
|
||||
"medicationId": "<id:1>",
|
||||
"windowStart": "09:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"09:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "10:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"10:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:11>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "13:00",
|
||||
"windowEnd": "14:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"13:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:12>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "20:00",
|
||||
"windowEnd": "22:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"20:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
}
|
||||
],
|
||||
"revisions": [],
|
||||
"pauseEras": [],
|
||||
"courses": [],
|
||||
"intakes": [
|
||||
{
|
||||
"id": "<id:13>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-09T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "2026-10-09T09:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "<id:14>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-10T08:00:00.000Z",
|
||||
"takenAt": "2026-10-10T08:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:15>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-11T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:16>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-12T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:17>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-13T07:00:00.000Z",
|
||||
"takenAt": "2026-10-13T07:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:18>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T08:00:00.000Z",
|
||||
"takenAt": "2026-10-13T11:00:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:20>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:21>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-14T07:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:22>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:23>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T20:00:00.000Z",
|
||||
"takenAt": "2026-10-14T20:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:24>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T06:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": true,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:25>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": "2026-10-15T08:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:26>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:1>",
|
||||
"scheduledFor": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:27>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T10:00:00.000Z",
|
||||
"takenAt": "2026-10-15T10:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:28>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T13:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:29>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
}
|
||||
],
|
||||
"doseChanges": [],
|
||||
"inventoryItems": [
|
||||
{
|
||||
"id": "<id:19>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"state": "IN_USE",
|
||||
"containerType": "OTHER",
|
||||
"unitsTotal": "30",
|
||||
"unitsRemaining": "27",
|
||||
"firstUseAt": "2026-10-15T08:30:00.000Z",
|
||||
"expiresAt": null,
|
||||
"printedExpiry": null,
|
||||
"purchasedAt": "2026-10-01T06:00:00.000Z",
|
||||
"manufacturer": null,
|
||||
"doseStrength": null,
|
||||
"notes": null,
|
||||
"notesEncrypted": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"inventoryEvents": [],
|
||||
"categories": [],
|
||||
"ingredients": [],
|
||||
"audit": [
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:16>",
|
||||
"status": "skipped"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:15>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:15>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:25>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:22>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:20>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
}
|
||||
],
|
||||
"idempotency": []
|
||||
}
|
||||
}
|
||||
+752
@@ -0,0 +1,752 @@
|
||||
{
|
||||
"status": 404,
|
||||
"body": {
|
||||
"data": null,
|
||||
"error": "Intake event not found",
|
||||
"meta": {
|
||||
"errorCode": "http.not_found",
|
||||
"requestId": "<requestId>"
|
||||
}
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"status": 404,
|
||||
"action": null,
|
||||
"meta": null,
|
||||
"warnings": null,
|
||||
"error": null
|
||||
}
|
||||
],
|
||||
"effects": [],
|
||||
"stored": {
|
||||
"medications": [
|
||||
{
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Daily pen",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT",
|
||||
"ABDOMEN_RIGHT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:3>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Record only",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": null,
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": false,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:4>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Three times",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:5>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Twice daily",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": "2026-10-15T12:30:00.000Z",
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"schedules": [
|
||||
{
|
||||
"id": "<id:6>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "06:00",
|
||||
"windowEnd": "07:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"06:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:7>",
|
||||
"medicationId": "<id:3>",
|
||||
"windowStart": "07:00",
|
||||
"windowEnd": "08:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"07:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:8>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "08:00",
|
||||
"windowEnd": "10:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"08:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:9>",
|
||||
"medicationId": "<id:1>",
|
||||
"windowStart": "09:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"09:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "10:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"10:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:11>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "13:00",
|
||||
"windowEnd": "14:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"13:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:12>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "20:00",
|
||||
"windowEnd": "22:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"20:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
}
|
||||
],
|
||||
"revisions": [],
|
||||
"pauseEras": [],
|
||||
"courses": [],
|
||||
"intakes": [
|
||||
{
|
||||
"id": "<id:13>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-09T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "2026-10-09T09:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "<id:14>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-10T08:00:00.000Z",
|
||||
"takenAt": "2026-10-10T08:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:15>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-11T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:16>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-12T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:17>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-13T07:00:00.000Z",
|
||||
"takenAt": "2026-10-13T07:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:18>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T08:00:00.000Z",
|
||||
"takenAt": "2026-10-13T11:00:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:20>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:21>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-14T07:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:22>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:23>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T20:00:00.000Z",
|
||||
"takenAt": "2026-10-14T20:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:24>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T06:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": true,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:25>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": "2026-10-15T08:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:26>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:1>",
|
||||
"scheduledFor": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:27>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T10:00:00.000Z",
|
||||
"takenAt": "2026-10-15T10:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:28>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T13:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:29>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
}
|
||||
],
|
||||
"doseChanges": [],
|
||||
"inventoryItems": [
|
||||
{
|
||||
"id": "<id:19>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"state": "IN_USE",
|
||||
"containerType": "OTHER",
|
||||
"unitsTotal": "30",
|
||||
"unitsRemaining": "27",
|
||||
"firstUseAt": "2026-10-15T08:30:00.000Z",
|
||||
"expiresAt": null,
|
||||
"printedExpiry": null,
|
||||
"purchasedAt": "2026-10-01T06:00:00.000Z",
|
||||
"manufacturer": null,
|
||||
"doseStrength": null,
|
||||
"notes": null,
|
||||
"notesEncrypted": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"inventoryEvents": [],
|
||||
"categories": [],
|
||||
"ingredients": [],
|
||||
"audit": [
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:16>",
|
||||
"status": "skipped"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:15>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:15>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:25>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:22>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:20>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
}
|
||||
],
|
||||
"idempotency": []
|
||||
}
|
||||
}
|
||||
+752
@@ -0,0 +1,752 @@
|
||||
{
|
||||
"status": 422,
|
||||
"body": {
|
||||
"data": null,
|
||||
"error": "This medication is kept as a record; its intake is not tracked",
|
||||
"meta": {
|
||||
"errorCode": "medication.intake.notTracked",
|
||||
"requestId": "<requestId>"
|
||||
}
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"status": 422,
|
||||
"action": null,
|
||||
"meta": null,
|
||||
"warnings": null,
|
||||
"error": null
|
||||
}
|
||||
],
|
||||
"effects": [],
|
||||
"stored": {
|
||||
"medications": [
|
||||
{
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Daily pen",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT",
|
||||
"ABDOMEN_RIGHT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:3>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Record only",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": null,
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": false,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:4>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Three times",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:5>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Twice daily",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": "2026-10-15T12:30:00.000Z",
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"schedules": [
|
||||
{
|
||||
"id": "<id:6>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "06:00",
|
||||
"windowEnd": "07:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"06:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:7>",
|
||||
"medicationId": "<id:3>",
|
||||
"windowStart": "07:00",
|
||||
"windowEnd": "08:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"07:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:8>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "08:00",
|
||||
"windowEnd": "10:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"08:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:9>",
|
||||
"medicationId": "<id:1>",
|
||||
"windowStart": "09:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"09:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "10:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"10:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:11>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "13:00",
|
||||
"windowEnd": "14:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"13:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:12>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "20:00",
|
||||
"windowEnd": "22:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"20:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
}
|
||||
],
|
||||
"revisions": [],
|
||||
"pauseEras": [],
|
||||
"courses": [],
|
||||
"intakes": [
|
||||
{
|
||||
"id": "<id:13>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-09T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "2026-10-09T09:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "<id:14>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-10T08:00:00.000Z",
|
||||
"takenAt": "2026-10-10T08:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:15>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-11T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:16>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-12T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:17>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-13T07:00:00.000Z",
|
||||
"takenAt": "2026-10-13T07:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:18>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T08:00:00.000Z",
|
||||
"takenAt": "2026-10-13T11:00:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:20>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:21>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-14T07:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:22>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:23>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T20:00:00.000Z",
|
||||
"takenAt": "2026-10-14T20:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:24>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T06:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": true,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:25>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": "2026-10-15T08:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:26>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:1>",
|
||||
"scheduledFor": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:27>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T10:00:00.000Z",
|
||||
"takenAt": "2026-10-15T10:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:28>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T13:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:29>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
}
|
||||
],
|
||||
"doseChanges": [],
|
||||
"inventoryItems": [
|
||||
{
|
||||
"id": "<id:19>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"state": "IN_USE",
|
||||
"containerType": "OTHER",
|
||||
"unitsTotal": "30",
|
||||
"unitsRemaining": "27",
|
||||
"firstUseAt": "2026-10-15T08:30:00.000Z",
|
||||
"expiresAt": null,
|
||||
"printedExpiry": null,
|
||||
"purchasedAt": "2026-10-01T06:00:00.000Z",
|
||||
"manufacturer": null,
|
||||
"doseStrength": null,
|
||||
"notes": null,
|
||||
"notesEncrypted": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"inventoryEvents": [],
|
||||
"categories": [],
|
||||
"ingredients": [],
|
||||
"audit": [
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:16>",
|
||||
"status": "skipped"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:15>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:15>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:25>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:22>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:20>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
}
|
||||
],
|
||||
"idempotency": []
|
||||
}
|
||||
}
|
||||
+822
@@ -0,0 +1,822 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"data": {
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-13T07:00:00.000Z",
|
||||
"takenAt": "2026-10-13T07:20:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
"error": null
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"status": 200,
|
||||
"action": {
|
||||
"name": "medications.intake.update"
|
||||
},
|
||||
"meta": {
|
||||
"intakeId": "<id:1>",
|
||||
"status": "taken"
|
||||
},
|
||||
"warnings": null,
|
||||
"error": null
|
||||
}
|
||||
],
|
||||
"effects": [
|
||||
{
|
||||
"effect": "queueMedicationIntakeSync",
|
||||
"args": [
|
||||
{
|
||||
"userId": "<id:2>",
|
||||
"originDeviceToken": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"effect": "countOutstandingDosesToday",
|
||||
"args": [
|
||||
"<id:2>",
|
||||
"UTC"
|
||||
]
|
||||
},
|
||||
{
|
||||
"effect": "notifyDelegatedIntake",
|
||||
"args": [
|
||||
{
|
||||
"ownerId": "<id:2>",
|
||||
"actorId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"status": "taken"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"effect": "dispatchMedicationIntakeWebClear",
|
||||
"args": [
|
||||
{
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-13T07:00:00.000Z",
|
||||
"badgeCount": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"stored": {
|
||||
"medications": [
|
||||
{
|
||||
"id": "<id:4>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Daily pen",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT",
|
||||
"ABDOMEN_RIGHT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:3>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Record only",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": null,
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": false,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:5>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Three times",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:6>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Twice daily",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": "2026-10-15T12:30:00.000Z",
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"schedules": [
|
||||
{
|
||||
"id": "<id:7>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "06:00",
|
||||
"windowEnd": "07:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"06:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:8>",
|
||||
"medicationId": "<id:3>",
|
||||
"windowStart": "07:00",
|
||||
"windowEnd": "08:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"07:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:9>",
|
||||
"medicationId": "<id:6>",
|
||||
"windowStart": "08:00",
|
||||
"windowEnd": "10:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"08:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "09:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"09:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:11>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "10:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"10:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:12>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "13:00",
|
||||
"windowEnd": "14:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"13:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:13>",
|
||||
"medicationId": "<id:6>",
|
||||
"windowStart": "20:00",
|
||||
"windowEnd": "22:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"20:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
}
|
||||
],
|
||||
"revisions": [],
|
||||
"pauseEras": [],
|
||||
"courses": [],
|
||||
"intakes": [
|
||||
{
|
||||
"id": "<id:14>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-09T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "2026-10-09T09:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "<id:15>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-10T08:00:00.000Z",
|
||||
"takenAt": "2026-10-10T08:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:16>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-11T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:17>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-12T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-13T07:00:00.000Z",
|
||||
"takenAt": "2026-10-13T07:20:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:18>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-13T08:00:00.000Z",
|
||||
"takenAt": "2026-10-13T11:00:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:20>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-13T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:21>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-14T07:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:22>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-14T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:23>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-14T20:00:00.000Z",
|
||||
"takenAt": "2026-10-14T20:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:24>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T06:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": true,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:25>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": "2026-10-15T08:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:26>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:27>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T10:00:00.000Z",
|
||||
"takenAt": "2026-10-15T10:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:28>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T13:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:29>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-15T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
}
|
||||
],
|
||||
"doseChanges": [],
|
||||
"inventoryItems": [
|
||||
{
|
||||
"id": "<id:19>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"state": "IN_USE",
|
||||
"containerType": "OTHER",
|
||||
"unitsTotal": "30",
|
||||
"unitsRemaining": "27",
|
||||
"firstUseAt": "2026-10-15T08:30:00.000Z",
|
||||
"expiresAt": null,
|
||||
"printedExpiry": null,
|
||||
"purchasedAt": "2026-10-01T06:00:00.000Z",
|
||||
"manufacturer": null,
|
||||
"doseStrength": null,
|
||||
"notes": null,
|
||||
"notesEncrypted": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"inventoryEvents": [],
|
||||
"categories": [],
|
||||
"ingredients": [],
|
||||
"audit": [
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:17>",
|
||||
"status": "skipped"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:16>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:16>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:25>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:22>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:20>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:1>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
}
|
||||
],
|
||||
"idempotency": []
|
||||
}
|
||||
}
|
||||
+767
@@ -0,0 +1,767 @@
|
||||
{
|
||||
"status": 422,
|
||||
"body": {
|
||||
"data": null,
|
||||
"error": "Injection site is not allowed for this medication",
|
||||
"meta": {
|
||||
"errorCode": "medications.intake.injection_site.disallowed",
|
||||
"requestId": "<requestId>"
|
||||
}
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"status": 422,
|
||||
"action": {
|
||||
"name": "medication.intake.injection_site.disallowed"
|
||||
},
|
||||
"meta": {
|
||||
"medication_id": "<id:1>",
|
||||
"site": "ABDOMEN_RIGHT"
|
||||
},
|
||||
"warnings": null,
|
||||
"error": null
|
||||
}
|
||||
],
|
||||
"effects": [],
|
||||
"stored": {
|
||||
"medications": [
|
||||
{
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Daily pen",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT",
|
||||
"ABDOMEN_RIGHT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:3>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Record only",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": null,
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": false,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:4>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Three times",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:5>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Twice daily",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": "2026-10-15T12:30:00.000Z",
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"schedules": [
|
||||
{
|
||||
"id": "<id:6>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "06:00",
|
||||
"windowEnd": "07:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"06:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:7>",
|
||||
"medicationId": "<id:3>",
|
||||
"windowStart": "07:00",
|
||||
"windowEnd": "08:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"07:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:8>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "08:00",
|
||||
"windowEnd": "10:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"08:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:9>",
|
||||
"medicationId": "<id:1>",
|
||||
"windowStart": "09:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"09:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "10:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"10:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:11>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "13:00",
|
||||
"windowEnd": "14:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"13:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:12>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "20:00",
|
||||
"windowEnd": "22:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"20:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
}
|
||||
],
|
||||
"revisions": [],
|
||||
"pauseEras": [],
|
||||
"courses": [],
|
||||
"intakes": [
|
||||
{
|
||||
"id": "<id:13>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-09T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "2026-10-09T09:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "<id:14>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-10T08:00:00.000Z",
|
||||
"takenAt": "2026-10-10T08:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:15>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-11T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:16>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-12T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:17>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-13T07:00:00.000Z",
|
||||
"takenAt": "2026-10-13T07:20:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:18>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T08:00:00.000Z",
|
||||
"takenAt": "2026-10-13T11:00:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:20>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:21>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-14T07:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:22>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:23>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T20:00:00.000Z",
|
||||
"takenAt": "2026-10-14T20:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:24>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T06:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": true,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:25>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": "2026-10-15T08:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:26>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:1>",
|
||||
"scheduledFor": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:27>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T10:00:00.000Z",
|
||||
"takenAt": "2026-10-15T10:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:28>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T13:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:29>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
}
|
||||
],
|
||||
"doseChanges": [],
|
||||
"inventoryItems": [
|
||||
{
|
||||
"id": "<id:19>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"state": "IN_USE",
|
||||
"containerType": "OTHER",
|
||||
"unitsTotal": "30",
|
||||
"unitsRemaining": "27",
|
||||
"firstUseAt": "2026-10-15T08:30:00.000Z",
|
||||
"expiresAt": null,
|
||||
"printedExpiry": null,
|
||||
"purchasedAt": "2026-10-01T06:00:00.000Z",
|
||||
"manufacturer": null,
|
||||
"doseStrength": null,
|
||||
"notes": null,
|
||||
"notesEncrypted": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"inventoryEvents": [],
|
||||
"categories": [],
|
||||
"ingredients": [],
|
||||
"audit": [
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:16>",
|
||||
"status": "skipped"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:15>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:15>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:25>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:22>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:20>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:17>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
}
|
||||
],
|
||||
"idempotency": []
|
||||
}
|
||||
}
|
||||
+836
@@ -0,0 +1,836 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"data": {
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": "2026-10-15T09:15:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
"error": null
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"status": 200,
|
||||
"action": {
|
||||
"name": "medications.intake.update"
|
||||
},
|
||||
"meta": {
|
||||
"medication_id": "<id:3>",
|
||||
"units": 0,
|
||||
"item_ids": [],
|
||||
"auto_opened": 0,
|
||||
"intakeId": "<id:1>",
|
||||
"status": "taken"
|
||||
},
|
||||
"warnings": null,
|
||||
"error": null
|
||||
}
|
||||
],
|
||||
"effects": [
|
||||
{
|
||||
"effect": "queueMedicationIntakeSync",
|
||||
"args": [
|
||||
{
|
||||
"userId": "<id:2>",
|
||||
"originDeviceToken": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"effect": "countOutstandingDosesToday",
|
||||
"args": [
|
||||
"<id:2>",
|
||||
"UTC"
|
||||
]
|
||||
},
|
||||
{
|
||||
"effect": "notifyDelegatedIntake",
|
||||
"args": [
|
||||
{
|
||||
"ownerId": "<id:2>",
|
||||
"actorId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"status": "taken"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"effect": "dispatchMedicationIntakeWebClear",
|
||||
"args": [
|
||||
{
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-15T09:00:00.000Z",
|
||||
"badgeCount": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"stored": {
|
||||
"medications": [
|
||||
{
|
||||
"id": "<id:3>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Daily pen",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT",
|
||||
"ABDOMEN_RIGHT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:4>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Record only",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": null,
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": false,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:5>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Three times",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:6>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Twice daily",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": "2026-10-15T12:30:00.000Z",
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"schedules": [
|
||||
{
|
||||
"id": "<id:7>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "06:00",
|
||||
"windowEnd": "07:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"06:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:8>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "07:00",
|
||||
"windowEnd": "08:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"07:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:9>",
|
||||
"medicationId": "<id:6>",
|
||||
"windowStart": "08:00",
|
||||
"windowEnd": "10:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"08:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:10>",
|
||||
"medicationId": "<id:3>",
|
||||
"windowStart": "09:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"09:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:11>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "10:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"10:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:12>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "13:00",
|
||||
"windowEnd": "14:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"13:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:13>",
|
||||
"medicationId": "<id:6>",
|
||||
"windowStart": "20:00",
|
||||
"windowEnd": "22:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"20:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
}
|
||||
],
|
||||
"revisions": [],
|
||||
"pauseEras": [],
|
||||
"courses": [],
|
||||
"intakes": [
|
||||
{
|
||||
"id": "<id:14>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-09T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "2026-10-09T09:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "<id:15>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-10T08:00:00.000Z",
|
||||
"takenAt": "2026-10-10T08:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:16>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-11T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:17>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-12T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:18>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-13T07:00:00.000Z",
|
||||
"takenAt": "2026-10-13T07:20:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:19>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-13T08:00:00.000Z",
|
||||
"takenAt": "2026-10-13T11:00:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:20>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:21>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-13T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:22>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-14T07:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:23>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-14T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:24>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-14T20:00:00.000Z",
|
||||
"takenAt": "2026-10-14T20:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:20>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:25>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T06:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": true,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:26>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": "2026-10-15T08:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:20>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": "2026-10-15T09:15:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:27>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T10:00:00.000Z",
|
||||
"takenAt": "2026-10-15T10:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:28>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T13:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:29>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-15T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
}
|
||||
],
|
||||
"doseChanges": [],
|
||||
"inventoryItems": [
|
||||
{
|
||||
"id": "<id:20>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:6>",
|
||||
"state": "IN_USE",
|
||||
"containerType": "OTHER",
|
||||
"unitsTotal": "30",
|
||||
"unitsRemaining": "27",
|
||||
"firstUseAt": "2026-10-15T08:30:00.000Z",
|
||||
"expiresAt": null,
|
||||
"printedExpiry": null,
|
||||
"purchasedAt": "2026-10-01T06:00:00.000Z",
|
||||
"manufacturer": null,
|
||||
"doseStrength": null,
|
||||
"notes": null,
|
||||
"notesEncrypted": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"inventoryEvents": [],
|
||||
"categories": [],
|
||||
"ingredients": [],
|
||||
"audit": [
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:17>",
|
||||
"status": "skipped"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:16>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:16>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:26>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:23>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:21>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:18>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:1>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
}
|
||||
],
|
||||
"idempotency": []
|
||||
}
|
||||
}
|
||||
+791
@@ -0,0 +1,791 @@
|
||||
{
|
||||
"status": 422,
|
||||
"body": {
|
||||
"data": null,
|
||||
"error": "Validation failed",
|
||||
"details": {
|
||||
"issues": [
|
||||
{
|
||||
"path": "intakeId",
|
||||
"code": "too_small",
|
||||
"message": "Too small: expected string to have >=1 characters"
|
||||
},
|
||||
{
|
||||
"path": "status",
|
||||
"code": "invalid_value",
|
||||
"message": "Invalid option: expected one of \"taken\"|\"skipped\"|\"snoozed\""
|
||||
}
|
||||
]
|
||||
},
|
||||
"meta": {
|
||||
"errorCode": "http.invalid",
|
||||
"requestId": "<requestId>"
|
||||
}
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"status": 422,
|
||||
"action": {
|
||||
"name": "medications.intake.update.validation-failed"
|
||||
},
|
||||
"meta": {
|
||||
"issue_count": 2,
|
||||
"rejected_attempt": "medications.intake.update.validation-failed"
|
||||
},
|
||||
"warnings": null,
|
||||
"error": null
|
||||
}
|
||||
],
|
||||
"effects": [],
|
||||
"stored": {
|
||||
"medications": [
|
||||
{
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Daily pen",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT",
|
||||
"ABDOMEN_RIGHT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:3>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Record only",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": null,
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": false,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:4>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Three times",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:5>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Twice daily",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": "2026-10-15T12:30:00.000Z",
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"schedules": [
|
||||
{
|
||||
"id": "<id:6>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "06:00",
|
||||
"windowEnd": "07:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"06:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:7>",
|
||||
"medicationId": "<id:3>",
|
||||
"windowStart": "07:00",
|
||||
"windowEnd": "08:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"07:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:8>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "08:00",
|
||||
"windowEnd": "10:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"08:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:9>",
|
||||
"medicationId": "<id:1>",
|
||||
"windowStart": "09:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"09:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "10:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"10:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:11>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "13:00",
|
||||
"windowEnd": "14:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"13:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:12>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "20:00",
|
||||
"windowEnd": "22:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"20:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
}
|
||||
],
|
||||
"revisions": [],
|
||||
"pauseEras": [],
|
||||
"courses": [],
|
||||
"intakes": [
|
||||
{
|
||||
"id": "<id:13>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-09T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "2026-10-09T09:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "<id:14>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-10T08:00:00.000Z",
|
||||
"takenAt": "2026-10-10T08:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:15>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-11T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:16>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-12T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:17>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-13T07:00:00.000Z",
|
||||
"takenAt": "2026-10-13T07:20:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:18>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T08:00:00.000Z",
|
||||
"takenAt": "2026-10-13T11:00:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:20>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:21>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-14T07:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:22>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:23>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T20:00:00.000Z",
|
||||
"takenAt": "2026-10-14T20:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:24>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T06:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": true,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:25>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": "2026-10-15T08:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:26>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:1>",
|
||||
"scheduledFor": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": "2026-10-15T09:15:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:27>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T10:00:00.000Z",
|
||||
"takenAt": "2026-10-15T10:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:28>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T13:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:29>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
}
|
||||
],
|
||||
"doseChanges": [],
|
||||
"inventoryItems": [
|
||||
{
|
||||
"id": "<id:19>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"state": "IN_USE",
|
||||
"containerType": "OTHER",
|
||||
"unitsTotal": "30",
|
||||
"unitsRemaining": "27",
|
||||
"firstUseAt": "2026-10-15T08:30:00.000Z",
|
||||
"expiresAt": null,
|
||||
"printedExpiry": null,
|
||||
"purchasedAt": "2026-10-01T06:00:00.000Z",
|
||||
"manufacturer": null,
|
||||
"doseStrength": null,
|
||||
"notes": null,
|
||||
"notesEncrypted": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"inventoryEvents": [],
|
||||
"categories": [],
|
||||
"ingredients": [],
|
||||
"audit": [
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:16>",
|
||||
"status": "skipped"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:15>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:15>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:25>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:22>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:20>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:17>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:26>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
}
|
||||
],
|
||||
"idempotency": []
|
||||
}
|
||||
}
|
||||
+830
@@ -0,0 +1,830 @@
|
||||
{
|
||||
"status": 200,
|
||||
"body": {
|
||||
"data": {
|
||||
"id": "<id:1>",
|
||||
"takenAt": "<now>",
|
||||
"skipped": false,
|
||||
"idempotencyKey": null,
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"source": "REMINDER",
|
||||
"createdAt": "<createdAt>"
|
||||
},
|
||||
"error": null
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"status": 200,
|
||||
"action": {
|
||||
"name": "medications.intake.update"
|
||||
},
|
||||
"meta": {
|
||||
"intakeId": "<id:2>",
|
||||
"status": "taken"
|
||||
},
|
||||
"warnings": null,
|
||||
"error": null
|
||||
}
|
||||
],
|
||||
"effects": [
|
||||
{
|
||||
"effect": "queueMedicationIntakeSync",
|
||||
"args": [
|
||||
{
|
||||
"userId": "<id:3>",
|
||||
"originDeviceToken": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"effect": "countOutstandingDosesToday",
|
||||
"args": [
|
||||
"<id:3>",
|
||||
"UTC"
|
||||
]
|
||||
},
|
||||
{
|
||||
"effect": "notifyDelegatedIntake",
|
||||
"args": [
|
||||
{
|
||||
"ownerId": "<id:3>",
|
||||
"actorId": "<id:4>",
|
||||
"medicationId": "<id:5>",
|
||||
"status": "taken"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"effect": "dispatchMedicationIntakeWebClear",
|
||||
"args": [
|
||||
{
|
||||
"userId": "<id:3>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"badgeCount": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"stored": {
|
||||
"medications": [
|
||||
{
|
||||
"id": "<id:6>",
|
||||
"userId": "<id:3>",
|
||||
"name": "Daily pen",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT",
|
||||
"ABDOMEN_RIGHT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:7>",
|
||||
"userId": "<id:3>",
|
||||
"name": "Record only",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": null,
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": false,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:8>",
|
||||
"userId": "<id:3>",
|
||||
"name": "Three times",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:5>",
|
||||
"userId": "<id:3>",
|
||||
"name": "Twice daily",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"schedules": [
|
||||
{
|
||||
"id": "<id:9>",
|
||||
"medicationId": "<id:8>",
|
||||
"windowStart": "06:00",
|
||||
"windowEnd": "07:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"06:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:10>",
|
||||
"medicationId": "<id:7>",
|
||||
"windowStart": "07:00",
|
||||
"windowEnd": "08:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"07:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:11>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "08:00",
|
||||
"windowEnd": "10:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"08:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:12>",
|
||||
"medicationId": "<id:6>",
|
||||
"windowStart": "09:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"09:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:13>",
|
||||
"medicationId": "<id:8>",
|
||||
"windowStart": "10:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"10:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:14>",
|
||||
"medicationId": "<id:8>",
|
||||
"windowStart": "13:00",
|
||||
"windowEnd": "14:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"13:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:15>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "20:00",
|
||||
"windowEnd": "22:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"20:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
}
|
||||
],
|
||||
"revisions": [],
|
||||
"pauseEras": [],
|
||||
"courses": [],
|
||||
"intakes": [
|
||||
{
|
||||
"id": "<id:16>",
|
||||
"userId": "<id:3>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-09T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "2026-10-09T09:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "<id:17>",
|
||||
"userId": "<id:3>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-10T08:00:00.000Z",
|
||||
"takenAt": "2026-10-10T08:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:18>",
|
||||
"userId": "<id:3>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-11T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:19>",
|
||||
"userId": "<id:3>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-12T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:20>",
|
||||
"userId": "<id:3>",
|
||||
"medicationId": "<id:7>",
|
||||
"scheduledFor": "2026-10-13T07:00:00.000Z",
|
||||
"takenAt": "2026-10-13T07:20:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:21>",
|
||||
"userId": "<id:3>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T08:00:00.000Z",
|
||||
"takenAt": "2026-10-13T11:00:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:22>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:23>",
|
||||
"userId": "<id:3>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:24>",
|
||||
"userId": "<id:3>",
|
||||
"medicationId": "<id:7>",
|
||||
"scheduledFor": "2026-10-14T07:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:25>",
|
||||
"userId": "<id:3>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:26>",
|
||||
"userId": "<id:3>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T20:00:00.000Z",
|
||||
"takenAt": "2026-10-14T20:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:22>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:27>",
|
||||
"userId": "<id:3>",
|
||||
"medicationId": "<id:8>",
|
||||
"scheduledFor": "2026-10-15T06:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": true,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:3>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": "<now>",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:22>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:28>",
|
||||
"userId": "<id:3>",
|
||||
"medicationId": "<id:6>",
|
||||
"scheduledFor": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": "2026-10-15T09:15:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:29>",
|
||||
"userId": "<id:3>",
|
||||
"medicationId": "<id:8>",
|
||||
"scheduledFor": "2026-10-15T10:00:00.000Z",
|
||||
"takenAt": "2026-10-15T10:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:30>",
|
||||
"userId": "<id:3>",
|
||||
"medicationId": "<id:8>",
|
||||
"scheduledFor": "2026-10-15T13:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:2>",
|
||||
"userId": "<id:3>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
}
|
||||
],
|
||||
"doseChanges": [],
|
||||
"inventoryItems": [
|
||||
{
|
||||
"id": "<id:22>",
|
||||
"userId": "<id:3>",
|
||||
"medicationId": "<id:5>",
|
||||
"state": "IN_USE",
|
||||
"containerType": "OTHER",
|
||||
"unitsTotal": "30",
|
||||
"unitsRemaining": "27",
|
||||
"firstUseAt": "2026-10-15T08:30:00.000Z",
|
||||
"expiresAt": null,
|
||||
"printedExpiry": null,
|
||||
"purchasedAt": "2026-10-01T06:00:00.000Z",
|
||||
"manufacturer": null,
|
||||
"doseStrength": null,
|
||||
"notes": null,
|
||||
"notesEncrypted": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"inventoryEvents": [],
|
||||
"categories": [],
|
||||
"ingredients": [],
|
||||
"audit": [
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:3>",
|
||||
"actorUserId": "<id:4>",
|
||||
"details": {
|
||||
"intakeId": "<id:2>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:3>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:19>",
|
||||
"status": "skipped"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:3>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:18>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:3>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:18>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:3>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:1>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:3>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:25>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:3>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:23>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:3>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:20>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:3>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:28>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
}
|
||||
],
|
||||
"idempotency": []
|
||||
}
|
||||
}
|
||||
+797
@@ -0,0 +1,797 @@
|
||||
{
|
||||
"status": 403,
|
||||
"body": {
|
||||
"data": null,
|
||||
"error": "Snoozing a reminder is not part of shared access",
|
||||
"meta": {
|
||||
"errorCode": "sharing.not_permitted",
|
||||
"requestId": "<requestId>"
|
||||
}
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"status": 403,
|
||||
"action": {
|
||||
"name": "medications.intake.update.refused"
|
||||
},
|
||||
"meta": {
|
||||
"reason": "snooze"
|
||||
},
|
||||
"warnings": null,
|
||||
"error": null
|
||||
}
|
||||
],
|
||||
"effects": [],
|
||||
"stored": {
|
||||
"medications": [
|
||||
{
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Daily pen",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT",
|
||||
"ABDOMEN_RIGHT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:3>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Record only",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": null,
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": false,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:4>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Three times",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:5>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Twice daily",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"schedules": [
|
||||
{
|
||||
"id": "<id:6>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "06:00",
|
||||
"windowEnd": "07:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"06:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:7>",
|
||||
"medicationId": "<id:3>",
|
||||
"windowStart": "07:00",
|
||||
"windowEnd": "08:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"07:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:8>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "08:00",
|
||||
"windowEnd": "10:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"08:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:9>",
|
||||
"medicationId": "<id:1>",
|
||||
"windowStart": "09:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"09:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "10:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"10:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:11>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "13:00",
|
||||
"windowEnd": "14:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"13:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:12>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "20:00",
|
||||
"windowEnd": "22:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"20:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
}
|
||||
],
|
||||
"revisions": [],
|
||||
"pauseEras": [],
|
||||
"courses": [],
|
||||
"intakes": [
|
||||
{
|
||||
"id": "<id:13>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-09T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "2026-10-09T09:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "<id:14>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-10T08:00:00.000Z",
|
||||
"takenAt": "2026-10-10T08:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:15>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-11T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:16>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-12T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:17>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-13T07:00:00.000Z",
|
||||
"takenAt": "2026-10-13T07:20:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:18>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T08:00:00.000Z",
|
||||
"takenAt": "2026-10-13T11:00:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:20>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:21>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-14T07:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:22>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:23>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T20:00:00.000Z",
|
||||
"takenAt": "2026-10-14T20:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:24>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T06:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": true,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:25>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": "<now>",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:26>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:1>",
|
||||
"scheduledFor": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": "2026-10-15T09:15:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:27>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T10:00:00.000Z",
|
||||
"takenAt": "2026-10-15T10:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:28>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T13:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:29>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
}
|
||||
],
|
||||
"doseChanges": [],
|
||||
"inventoryItems": [
|
||||
{
|
||||
"id": "<id:19>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"state": "IN_USE",
|
||||
"containerType": "OTHER",
|
||||
"unitsTotal": "30",
|
||||
"unitsRemaining": "27",
|
||||
"firstUseAt": "2026-10-15T08:30:00.000Z",
|
||||
"expiresAt": null,
|
||||
"printedExpiry": null,
|
||||
"purchasedAt": "2026-10-01T06:00:00.000Z",
|
||||
"manufacturer": null,
|
||||
"doseStrength": null,
|
||||
"notes": null,
|
||||
"notesEncrypted": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"inventoryEvents": [],
|
||||
"categories": [],
|
||||
"ingredients": [],
|
||||
"audit": [
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": "<id:30>",
|
||||
"details": {
|
||||
"intakeId": "<id:29>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:16>",
|
||||
"status": "skipped"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:15>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:15>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:25>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:22>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:20>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:17>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:26>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update.refused",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": "<id:30>",
|
||||
"details": {
|
||||
"intakeId": "<id:15>",
|
||||
"status": "snoozed",
|
||||
"reason": "snooze"
|
||||
},
|
||||
"ipAddress": null
|
||||
}
|
||||
],
|
||||
"idempotency": []
|
||||
}
|
||||
}
|
||||
+808
@@ -0,0 +1,808 @@
|
||||
{
|
||||
"status": 403,
|
||||
"body": {
|
||||
"data": null,
|
||||
"error": "Changing a dose that is already recorded is not part of shared access",
|
||||
"meta": {
|
||||
"errorCode": "sharing.not_permitted",
|
||||
"requestId": "<requestId>"
|
||||
}
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"status": 403,
|
||||
"action": {
|
||||
"name": "medications.intake.update.refused"
|
||||
},
|
||||
"meta": {
|
||||
"reason": "resolved_event"
|
||||
},
|
||||
"warnings": null,
|
||||
"error": null
|
||||
}
|
||||
],
|
||||
"effects": [],
|
||||
"stored": {
|
||||
"medications": [
|
||||
{
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Daily pen",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT",
|
||||
"ABDOMEN_RIGHT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:3>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Record only",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": null,
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": false,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:4>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Three times",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:5>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Twice daily",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"schedules": [
|
||||
{
|
||||
"id": "<id:6>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "06:00",
|
||||
"windowEnd": "07:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"06:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:7>",
|
||||
"medicationId": "<id:3>",
|
||||
"windowStart": "07:00",
|
||||
"windowEnd": "08:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"07:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:8>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "08:00",
|
||||
"windowEnd": "10:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"08:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:9>",
|
||||
"medicationId": "<id:1>",
|
||||
"windowStart": "09:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"09:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "10:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"10:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:11>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "13:00",
|
||||
"windowEnd": "14:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"13:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:12>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "20:00",
|
||||
"windowEnd": "22:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"20:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
}
|
||||
],
|
||||
"revisions": [],
|
||||
"pauseEras": [],
|
||||
"courses": [],
|
||||
"intakes": [
|
||||
{
|
||||
"id": "<id:13>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-09T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "2026-10-09T09:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "<id:14>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-10T08:00:00.000Z",
|
||||
"takenAt": "2026-10-10T08:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:15>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-11T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:16>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-12T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:17>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-13T07:00:00.000Z",
|
||||
"takenAt": "2026-10-13T07:20:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:18>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T08:00:00.000Z",
|
||||
"takenAt": "2026-10-13T11:00:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:20>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:21>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-14T07:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:22>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:23>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T20:00:00.000Z",
|
||||
"takenAt": "2026-10-14T20:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:24>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T06:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": true,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:25>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": "<now>",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:26>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:1>",
|
||||
"scheduledFor": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": "2026-10-15T09:15:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:27>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T10:00:00.000Z",
|
||||
"takenAt": "2026-10-15T10:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:28>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T13:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:29>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
}
|
||||
],
|
||||
"doseChanges": [],
|
||||
"inventoryItems": [
|
||||
{
|
||||
"id": "<id:19>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"state": "IN_USE",
|
||||
"containerType": "OTHER",
|
||||
"unitsTotal": "30",
|
||||
"unitsRemaining": "27",
|
||||
"firstUseAt": "2026-10-15T08:30:00.000Z",
|
||||
"expiresAt": null,
|
||||
"printedExpiry": null,
|
||||
"purchasedAt": "2026-10-01T06:00:00.000Z",
|
||||
"manufacturer": null,
|
||||
"doseStrength": null,
|
||||
"notes": null,
|
||||
"notesEncrypted": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"inventoryEvents": [],
|
||||
"categories": [],
|
||||
"ingredients": [],
|
||||
"audit": [
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": "<id:30>",
|
||||
"details": {
|
||||
"intakeId": "<id:29>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:16>",
|
||||
"status": "skipped"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:15>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:15>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:25>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:22>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:20>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:17>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:26>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update.refused",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": "<id:30>",
|
||||
"details": {
|
||||
"intakeId": "<id:14>",
|
||||
"status": "skipped",
|
||||
"reason": "resolved_event"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update.refused",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": "<id:30>",
|
||||
"details": {
|
||||
"intakeId": "<id:15>",
|
||||
"status": "snoozed",
|
||||
"reason": "snooze"
|
||||
},
|
||||
"ipAddress": null
|
||||
}
|
||||
],
|
||||
"idempotency": []
|
||||
}
|
||||
}
|
||||
+809
@@ -0,0 +1,809 @@
|
||||
{
|
||||
"status": 403,
|
||||
"body": {
|
||||
"data": null,
|
||||
"error": "Account access denied",
|
||||
"meta": {
|
||||
"errorCode": "sharing.access.denied",
|
||||
"requestId": "<requestId>"
|
||||
}
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"status": 403,
|
||||
"action": null,
|
||||
"meta": {
|
||||
"sharing_refusal": "insufficient_access"
|
||||
},
|
||||
"warnings": null,
|
||||
"error": {
|
||||
"type": "SharingAccessDeniedError",
|
||||
"message": "Account access denied"
|
||||
}
|
||||
}
|
||||
],
|
||||
"effects": [],
|
||||
"stored": {
|
||||
"medications": [
|
||||
{
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Daily pen",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT",
|
||||
"ABDOMEN_RIGHT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:3>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Record only",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": null,
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": false,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:4>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Three times",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:5>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Twice daily",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"schedules": [
|
||||
{
|
||||
"id": "<id:6>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "06:00",
|
||||
"windowEnd": "07:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"06:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:7>",
|
||||
"medicationId": "<id:3>",
|
||||
"windowStart": "07:00",
|
||||
"windowEnd": "08:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"07:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:8>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "08:00",
|
||||
"windowEnd": "10:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"08:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:9>",
|
||||
"medicationId": "<id:1>",
|
||||
"windowStart": "09:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"09:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "10:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"10:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:11>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "13:00",
|
||||
"windowEnd": "14:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"13:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:12>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "20:00",
|
||||
"windowEnd": "22:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"20:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
}
|
||||
],
|
||||
"revisions": [],
|
||||
"pauseEras": [],
|
||||
"courses": [],
|
||||
"intakes": [
|
||||
{
|
||||
"id": "<id:13>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-09T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "2026-10-09T09:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "<id:14>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-10T08:00:00.000Z",
|
||||
"takenAt": "2026-10-10T08:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:15>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-11T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:16>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-12T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:17>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-13T07:00:00.000Z",
|
||||
"takenAt": "2026-10-13T07:20:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:18>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T08:00:00.000Z",
|
||||
"takenAt": "2026-10-13T11:00:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:20>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:21>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-14T07:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:22>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:23>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T20:00:00.000Z",
|
||||
"takenAt": "2026-10-14T20:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:24>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T06:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": true,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:25>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": "<now>",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:26>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:1>",
|
||||
"scheduledFor": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": "2026-10-15T09:15:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:27>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T10:00:00.000Z",
|
||||
"takenAt": "2026-10-15T10:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:28>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T13:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:29>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
}
|
||||
],
|
||||
"doseChanges": [],
|
||||
"inventoryItems": [
|
||||
{
|
||||
"id": "<id:19>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"state": "IN_USE",
|
||||
"containerType": "OTHER",
|
||||
"unitsTotal": "30",
|
||||
"unitsRemaining": "27",
|
||||
"firstUseAt": "2026-10-15T08:30:00.000Z",
|
||||
"expiresAt": null,
|
||||
"printedExpiry": null,
|
||||
"purchasedAt": "2026-10-01T06:00:00.000Z",
|
||||
"manufacturer": null,
|
||||
"doseStrength": null,
|
||||
"notes": null,
|
||||
"notesEncrypted": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"inventoryEvents": [],
|
||||
"categories": [],
|
||||
"ingredients": [],
|
||||
"audit": [
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": "<id:30>",
|
||||
"details": {
|
||||
"intakeId": "<id:29>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:16>",
|
||||
"status": "skipped"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:15>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:15>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:25>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:22>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:20>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:17>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:26>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update.refused",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": "<id:30>",
|
||||
"details": {
|
||||
"intakeId": "<id:14>",
|
||||
"status": "skipped",
|
||||
"reason": "resolved_event"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update.refused",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": "<id:30>",
|
||||
"details": {
|
||||
"intakeId": "<id:15>",
|
||||
"status": "snoozed",
|
||||
"reason": "snooze"
|
||||
},
|
||||
"ipAddress": null
|
||||
}
|
||||
],
|
||||
"idempotency": []
|
||||
}
|
||||
}
|
||||
+807
@@ -0,0 +1,807 @@
|
||||
{
|
||||
"status": 401,
|
||||
"body": {
|
||||
"data": null,
|
||||
"error": "Not authenticated",
|
||||
"meta": {
|
||||
"errorCode": "auth.missing",
|
||||
"requestId": "<requestId>"
|
||||
}
|
||||
},
|
||||
"events": [
|
||||
{
|
||||
"status": 401,
|
||||
"action": null,
|
||||
"meta": null,
|
||||
"warnings": null,
|
||||
"error": {
|
||||
"type": "HttpError",
|
||||
"message": "Not authenticated"
|
||||
}
|
||||
}
|
||||
],
|
||||
"effects": [],
|
||||
"stored": {
|
||||
"medications": [
|
||||
{
|
||||
"id": "<id:1>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Daily pen",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT",
|
||||
"ABDOMEN_RIGHT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:3>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Record only",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": null,
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": false,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:4>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Three times",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "ORAL",
|
||||
"trackInjectionSites": false,
|
||||
"allowedInjectionSites": [],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
},
|
||||
{
|
||||
"id": "<id:5>",
|
||||
"userId": "<id:2>",
|
||||
"name": "Twice daily",
|
||||
"dose": "10mg",
|
||||
"treatmentClass": "GENERIC",
|
||||
"dosesPerUnit": null,
|
||||
"unitsPerDose": "1",
|
||||
"active": true,
|
||||
"notificationsEnabled": true,
|
||||
"pausedAt": null,
|
||||
"snoozedUntil": null,
|
||||
"startsOn": "2026-10-01T00:00:00.000Z",
|
||||
"endsOn": null,
|
||||
"oneShot": false,
|
||||
"asNeeded": false,
|
||||
"trackIntake": true,
|
||||
"autoMarkTaken": false,
|
||||
"autoMarkTakenSince": null,
|
||||
"deliveryForm": "INJECTION",
|
||||
"trackInjectionSites": true,
|
||||
"allowedInjectionSites": [
|
||||
"ABDOMEN_LEFT"
|
||||
],
|
||||
"liveActivityEnabled": false,
|
||||
"criticalAlarmEnabled": false,
|
||||
"atcCode": null,
|
||||
"rxNormCode": null,
|
||||
"lowStockNotifiedAt": null,
|
||||
"lowStockNotifiedThresholdDays": null,
|
||||
"reorderLeadDays": null,
|
||||
"externalSource": null,
|
||||
"externalId": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"schedules": [
|
||||
{
|
||||
"id": "<id:6>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "06:00",
|
||||
"windowEnd": "07:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"06:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:7>",
|
||||
"medicationId": "<id:3>",
|
||||
"windowStart": "07:00",
|
||||
"windowEnd": "08:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"07:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:8>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "08:00",
|
||||
"windowEnd": "10:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"08:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:9>",
|
||||
"medicationId": "<id:1>",
|
||||
"windowStart": "09:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"09:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:10>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "10:00",
|
||||
"windowEnd": "11:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"10:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:11>",
|
||||
"medicationId": "<id:4>",
|
||||
"windowStart": "13:00",
|
||||
"windowEnd": "14:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"13:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
},
|
||||
{
|
||||
"id": "<id:12>",
|
||||
"medicationId": "<id:5>",
|
||||
"windowStart": "20:00",
|
||||
"windowEnd": "22:00",
|
||||
"label": null,
|
||||
"dose": null,
|
||||
"unitsPerDose": null,
|
||||
"daysOfWeek": null,
|
||||
"timesOfDay": [
|
||||
"20:00"
|
||||
],
|
||||
"reminderGraceMinutes": null,
|
||||
"rrule": "FREQ=DAILY",
|
||||
"rollingIntervalDays": null,
|
||||
"scheduleType": "SCHEDULED",
|
||||
"cyclicOnWeeks": null,
|
||||
"cyclicOffWeeks": null,
|
||||
"doseWindows": null
|
||||
}
|
||||
],
|
||||
"revisions": [],
|
||||
"pauseEras": [],
|
||||
"courses": [],
|
||||
"intakes": [
|
||||
{
|
||||
"id": "<id:13>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-09T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "2026-10-09T09:00:00.000Z"
|
||||
},
|
||||
{
|
||||
"id": "<id:14>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-10T08:00:00.000Z",
|
||||
"takenAt": "2026-10-10T08:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:15>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-11T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:16>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-12T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:17>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-13T07:00:00.000Z",
|
||||
"takenAt": "2026-10-13T07:20:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:18>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T08:00:00.000Z",
|
||||
"takenAt": "2026-10-13T11:00:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:20>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-13T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:21>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:3>",
|
||||
"scheduledFor": "2026-10-14T07:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:22>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T08:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
},
|
||||
{
|
||||
"id": "<id:23>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-14T20:00:00.000Z",
|
||||
"takenAt": "2026-10-14T20:30:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "WEB",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:24>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T06:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": true,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:25>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T08:00:00.000Z",
|
||||
"takenAt": "<now>",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [
|
||||
{
|
||||
"units": 1,
|
||||
"itemId": "<id:19>"
|
||||
}
|
||||
],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:26>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:1>",
|
||||
"scheduledFor": "2026-10-15T09:00:00.000Z",
|
||||
"takenAt": "2026-10-15T09:15:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": "ABDOMEN_LEFT",
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": [],
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:27>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T10:00:00.000Z",
|
||||
"takenAt": "2026-10-15T10:05:00.000Z",
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:28>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:4>",
|
||||
"scheduledFor": "2026-10-15T13:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": true,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": null
|
||||
},
|
||||
{
|
||||
"id": "<id:29>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"scheduledFor": "2026-10-15T20:00:00.000Z",
|
||||
"takenAt": null,
|
||||
"skipped": false,
|
||||
"autoMissed": false,
|
||||
"autoRecorded": false,
|
||||
"attributionSource": "AUTO",
|
||||
"source": "REMINDER",
|
||||
"idempotencyKey": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"injectionSite": null,
|
||||
"doseTaken": null,
|
||||
"inventoryConsumption": null,
|
||||
"externalId": null,
|
||||
"updatedAt": "<updatedAt>",
|
||||
"syncVersion": "<syncVersion>",
|
||||
"deletedAt": "<now>"
|
||||
}
|
||||
],
|
||||
"doseChanges": [],
|
||||
"inventoryItems": [
|
||||
{
|
||||
"id": "<id:19>",
|
||||
"userId": "<id:2>",
|
||||
"medicationId": "<id:5>",
|
||||
"state": "IN_USE",
|
||||
"containerType": "OTHER",
|
||||
"unitsTotal": "30",
|
||||
"unitsRemaining": "27",
|
||||
"firstUseAt": "2026-10-15T08:30:00.000Z",
|
||||
"expiresAt": null,
|
||||
"printedExpiry": null,
|
||||
"purchasedAt": "2026-10-01T06:00:00.000Z",
|
||||
"manufacturer": null,
|
||||
"doseStrength": null,
|
||||
"notes": null,
|
||||
"notesEncrypted": null,
|
||||
"createdAt": "<createdAt>",
|
||||
"updatedAt": "<updatedAt>"
|
||||
}
|
||||
],
|
||||
"inventoryEvents": [],
|
||||
"categories": [],
|
||||
"ingredients": [],
|
||||
"audit": [
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": "<id:30>",
|
||||
"details": {
|
||||
"intakeId": "<id:29>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:16>",
|
||||
"status": "skipped"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:15>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:15>",
|
||||
"status": "snoozed"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:25>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:22>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:20>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:17>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": null,
|
||||
"details": {
|
||||
"intakeId": "<id:26>",
|
||||
"status": "taken"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update.refused",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": "<id:30>",
|
||||
"details": {
|
||||
"intakeId": "<id:14>",
|
||||
"status": "skipped",
|
||||
"reason": "resolved_event"
|
||||
},
|
||||
"ipAddress": null
|
||||
},
|
||||
{
|
||||
"action": "medications.intake.update.refused",
|
||||
"userId": "<id:2>",
|
||||
"actorUserId": "<id:30>",
|
||||
"details": {
|
||||
"intakeId": "<id:15>",
|
||||
"status": "snoozed",
|
||||
"reason": "snooze"
|
||||
},
|
||||
"ipAddress": null
|
||||
}
|
||||
],
|
||||
"idempotency": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,477 @@
|
||||
/**
|
||||
* Parity for `GET` and `POST /api/medications/intake` while the today list,
|
||||
* the compliance buckets and the status update move into
|
||||
* `src/lib/medications/`.
|
||||
*
|
||||
* One record walks through the cases the route tells apart, in order, each
|
||||
* request seeing what the earlier ones stored. The reads: today's list (with
|
||||
* the projection it runs, and every status a row can read as), the
|
||||
* compliance buckets cold and from the cache, a query the schema refuses, a
|
||||
* reading delegate and nobody. The updates: a take in place, a take that
|
||||
* re-binds to another slot (tombstone and converge, the recorded site
|
||||
* carried), a pinned take and a pin that is no slot, a skip over a recorded
|
||||
* dose, a snooze with and without its end, the not-found answers (an unknown
|
||||
* event, another account's, a tombstoned one), the record-only rule both
|
||||
* ways, the injection-site refusal and an allowed site, a body the schema
|
||||
* refuses, and a delegate who marks an open dose, is refused a snooze and a
|
||||
* correction, a reader and nobody.
|
||||
*
|
||||
* After each request the snapshot holds the response, the wide event, the
|
||||
* recorded tails and every medication row of the accounts. The clock is
|
||||
* pinned (`Date` only), so the snapshot is the same on every day it runs.
|
||||
*/
|
||||
import { afterAll, beforeAll, describe, it, vi } from "vitest";
|
||||
|
||||
import { GET, POST } from "@/app/api/medications/intake/route";
|
||||
|
||||
import { anonymous, type RouteAuth } from "../../../kit/call-route";
|
||||
import { makeMedication, makeSession, makeUser } from "../../../kit/factories";
|
||||
import { getPrismaClient, truncateAllTables } from "../../setup";
|
||||
import { delegateOf, parityStep } from "./medication-state";
|
||||
|
||||
vi.mock("@/lib/logging/transports", async (importOriginal) => {
|
||||
const actual =
|
||||
await importOriginal<typeof import("@/lib/logging/transports")>();
|
||||
const { wideEventRecorder: recorder } = await import("../../../kit/parity");
|
||||
return {
|
||||
...actual,
|
||||
emitIfSampled: (event: (typeof recorder.events)[number]) => {
|
||||
recorder.events.push(event);
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
// The tails the route starts without awaiting them (the cross-device push,
|
||||
// the web-push dose clear with its badge count, the owner's notification of a
|
||||
// delegated dose), recorded instead of run (see `effectRecorder`).
|
||||
vi.mock(
|
||||
"@/lib/notifications/medication-intake-sync",
|
||||
async (importOriginal) => {
|
||||
const actual =
|
||||
await importOriginal<
|
||||
typeof import("@/lib/notifications/medication-intake-sync")
|
||||
>();
|
||||
const { effectRecorder } = await import("../../../kit/parity");
|
||||
return {
|
||||
...actual,
|
||||
queueMedicationIntakeSync: (...args: unknown[]) => {
|
||||
effectRecorder.record("queueMedicationIntakeSync", args);
|
||||
},
|
||||
};
|
||||
},
|
||||
);
|
||||
vi.mock("@/lib/notifications/web-push-clear", async (importOriginal) => {
|
||||
const actual =
|
||||
await importOriginal<typeof import("@/lib/notifications/web-push-clear")>();
|
||||
const { effectRecorder } = await import("../../../kit/parity");
|
||||
return {
|
||||
...actual,
|
||||
dispatchMedicationIntakeWebClear: async (...args: unknown[]) => {
|
||||
effectRecorder.record("dispatchMedicationIntakeWebClear", args);
|
||||
},
|
||||
};
|
||||
});
|
||||
vi.mock("@/lib/medications/outstanding-doses", async (importOriginal) => {
|
||||
const actual =
|
||||
await importOriginal<
|
||||
typeof import("@/lib/medications/outstanding-doses")
|
||||
>();
|
||||
const { effectRecorder } = await import("../../../kit/parity");
|
||||
return {
|
||||
...actual,
|
||||
countOutstandingDosesToday: async (...args: unknown[]) => {
|
||||
effectRecorder.record("countOutstandingDosesToday", args);
|
||||
return 2;
|
||||
},
|
||||
};
|
||||
});
|
||||
vi.mock("@/lib/notifications/delegated-intake", async (importOriginal) => {
|
||||
const actual =
|
||||
await importOriginal<
|
||||
typeof import("@/lib/notifications/delegated-intake")
|
||||
>();
|
||||
const { effectRecorder } = await import("../../../kit/parity");
|
||||
return {
|
||||
...actual,
|
||||
notifyDelegatedIntake: async (...args: unknown[]) => {
|
||||
effectRecorder.record("notifyDelegatedIntake", args);
|
||||
},
|
||||
};
|
||||
});
|
||||
|
||||
const prisma = getPrismaClient();
|
||||
const NOW = new Date("2026-10-15T12:00:00.000Z");
|
||||
const ROUTE = "/api/medications/intake";
|
||||
|
||||
let ownerId: string;
|
||||
let userIds: string[];
|
||||
let owner: RouteAuth;
|
||||
let writer: { auth: RouteAuth; headers: Record<string, string> };
|
||||
let reader: { auth: RouteAuth; headers: Record<string, string> };
|
||||
const ev: Record<string, string> = {};
|
||||
|
||||
type Caller = { auth?: RouteAuth; headers?: Record<string, string> };
|
||||
|
||||
async function get(
|
||||
name: string,
|
||||
query: Record<string, string>,
|
||||
caller: Caller = {},
|
||||
) {
|
||||
await parityStep({
|
||||
name: `medication-intake-status.${name}`,
|
||||
handler: GET,
|
||||
options: {
|
||||
method: "GET",
|
||||
route: ROUTE,
|
||||
query,
|
||||
auth: caller.auth ?? owner,
|
||||
headers: caller.headers,
|
||||
},
|
||||
userIds,
|
||||
now: NOW,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* A take that re-binds to another slot answers with the row the shared slot
|
||||
* write returns, which carries fewer fields than the registered event
|
||||
* resource. The parity snapshot pins that answer as it is; the contract check
|
||||
* is the route's own tests' business.
|
||||
*/
|
||||
const SLOT_MOVE_ANSWER = {
|
||||
skip: "a slot move answers with the narrower slot-write row",
|
||||
};
|
||||
|
||||
async function post(
|
||||
name: string,
|
||||
body: unknown,
|
||||
caller: Caller & { contract?: { skip: string } } = {},
|
||||
) {
|
||||
await parityStep({
|
||||
name: `medication-intake-status.${name}`,
|
||||
handler: POST,
|
||||
options: {
|
||||
method: "POST",
|
||||
route: ROUTE,
|
||||
body,
|
||||
auth: caller.auth ?? owner,
|
||||
headers: caller.headers,
|
||||
contract: caller.contract,
|
||||
},
|
||||
userIds,
|
||||
now: NOW,
|
||||
});
|
||||
}
|
||||
|
||||
async function intake(
|
||||
key: string,
|
||||
medicationId: string,
|
||||
data: {
|
||||
scheduledFor: string;
|
||||
takenAt?: string;
|
||||
skipped?: boolean;
|
||||
autoMissed?: boolean;
|
||||
deletedAt?: string;
|
||||
injectionSite?: "ABDOMEN_LEFT";
|
||||
userId?: string;
|
||||
},
|
||||
) {
|
||||
const row = await prisma.medicationIntakeEvent.create({
|
||||
data: {
|
||||
userId: data.userId ?? ownerId,
|
||||
medicationId,
|
||||
scheduledFor: new Date(data.scheduledFor),
|
||||
takenAt: data.takenAt ? new Date(data.takenAt) : null,
|
||||
skipped: data.skipped ?? false,
|
||||
autoMissed: data.autoMissed ?? false,
|
||||
deletedAt: data.deletedAt ? new Date(data.deletedAt) : null,
|
||||
injectionSite: data.injectionSite ?? null,
|
||||
source: "REMINDER",
|
||||
createdAt: new Date("2026-10-01T06:00:00.000Z"),
|
||||
},
|
||||
});
|
||||
ev[key] = row.id;
|
||||
}
|
||||
|
||||
const daily = (time: string, windowEnd: string) => ({
|
||||
windowStart: time,
|
||||
windowEnd,
|
||||
timesOfDay: [time],
|
||||
rrule: "FREQ=DAILY",
|
||||
});
|
||||
|
||||
beforeAll(async () => {
|
||||
vi.useFakeTimers({ toFake: ["Date"], now: NOW });
|
||||
await truncateAllTables(prisma);
|
||||
const user = await makeUser({ timezone: "UTC" });
|
||||
ownerId = user.id;
|
||||
owner = await makeSession(user);
|
||||
const created = new Date("2026-10-01T06:00:00.000Z");
|
||||
|
||||
const twice = await makeMedication(
|
||||
user,
|
||||
{
|
||||
name: "Twice daily",
|
||||
startsOn: new Date("2026-10-01"),
|
||||
createdAt: created,
|
||||
snoozedUntil: new Date("2026-10-15T12:30:00.000Z"),
|
||||
deliveryForm: "INJECTION",
|
||||
trackInjectionSites: true,
|
||||
allowedInjectionSites: ["ABDOMEN_LEFT"],
|
||||
},
|
||||
[daily("08:00", "10:00"), daily("20:00", "22:00")],
|
||||
);
|
||||
await prisma.medicationInventoryItem.create({
|
||||
data: {
|
||||
userId: ownerId,
|
||||
medicationId: twice.id,
|
||||
unitsTotal: 30,
|
||||
unitsRemaining: 30,
|
||||
purchasedAt: created,
|
||||
},
|
||||
});
|
||||
await intake("todayMorning", twice.id, {
|
||||
scheduledFor: "2026-10-15T08:00:00.000Z",
|
||||
});
|
||||
await intake("todayEvening", twice.id, {
|
||||
scheduledFor: "2026-10-15T20:00:00.000Z",
|
||||
});
|
||||
await intake("moveMe", twice.id, {
|
||||
scheduledFor: "2026-10-14T08:00:00.000Z",
|
||||
injectionSite: "ABDOMEN_LEFT",
|
||||
});
|
||||
await intake("pinMe", twice.id, {
|
||||
scheduledFor: "2026-10-13T20:00:00.000Z",
|
||||
});
|
||||
await intake("skipMe", twice.id, {
|
||||
scheduledFor: "2026-10-12T08:00:00.000Z",
|
||||
takenAt: "2026-10-12T08:10:00.000Z",
|
||||
});
|
||||
await intake("snoozeMe", twice.id, {
|
||||
scheduledFor: "2026-10-11T08:00:00.000Z",
|
||||
});
|
||||
await intake("resolved", twice.id, {
|
||||
scheduledFor: "2026-10-10T08:00:00.000Z",
|
||||
takenAt: "2026-10-10T08:05:00.000Z",
|
||||
});
|
||||
await intake("tombstoned", twice.id, {
|
||||
scheduledFor: "2026-10-09T08:00:00.000Z",
|
||||
deletedAt: "2026-10-09T09:00:00.000Z",
|
||||
});
|
||||
|
||||
const pen = await makeMedication(
|
||||
user,
|
||||
{
|
||||
name: "Daily pen",
|
||||
startsOn: new Date("2026-10-01"),
|
||||
createdAt: created,
|
||||
deliveryForm: "INJECTION",
|
||||
trackInjectionSites: true,
|
||||
allowedInjectionSites: ["ABDOMEN_LEFT", "ABDOMEN_RIGHT"],
|
||||
},
|
||||
[daily("09:00", "11:00")],
|
||||
);
|
||||
await intake("penToday", pen.id, {
|
||||
scheduledFor: "2026-10-15T09:00:00.000Z",
|
||||
});
|
||||
await prisma.user.update({
|
||||
where: { id: ownerId },
|
||||
data: { globalExcludedInjectionSites: ["ABDOMEN_RIGHT"] },
|
||||
});
|
||||
|
||||
const mixed = await makeMedication(
|
||||
user,
|
||||
{
|
||||
name: "Three times",
|
||||
startsOn: new Date("2026-10-01"),
|
||||
createdAt: created,
|
||||
},
|
||||
[daily("06:00", "07:00"), daily("10:00", "11:00"), daily("13:00", "14:00")],
|
||||
);
|
||||
await intake("missed", mixed.id, {
|
||||
scheduledFor: "2026-10-15T06:00:00.000Z",
|
||||
autoMissed: true,
|
||||
});
|
||||
await intake("taken", mixed.id, {
|
||||
scheduledFor: "2026-10-15T10:00:00.000Z",
|
||||
takenAt: "2026-10-15T10:05:00.000Z",
|
||||
});
|
||||
await intake("skipped", mixed.id, {
|
||||
scheduledFor: "2026-10-15T13:00:00.000Z",
|
||||
skipped: true,
|
||||
});
|
||||
|
||||
const recordOnly = await makeMedication(
|
||||
user,
|
||||
{ name: "Record only", createdAt: created, trackIntake: false },
|
||||
[daily("07:00", "08:00")],
|
||||
);
|
||||
await intake("recordOpen", recordOnly.id, {
|
||||
scheduledFor: "2026-10-14T07:00:00.000Z",
|
||||
});
|
||||
await intake("recordTaken", recordOnly.id, {
|
||||
scheduledFor: "2026-10-13T07:00:00.000Z",
|
||||
takenAt: "2026-10-13T07:05:00.000Z",
|
||||
});
|
||||
|
||||
const stranger = await makeUser({ timezone: "UTC" });
|
||||
const foreign = await makeMedication(stranger, { name: "Not yours" });
|
||||
await intake("foreign", foreign.id, {
|
||||
scheduledFor: "2026-10-15T08:00:00.000Z",
|
||||
userId: stranger.id,
|
||||
});
|
||||
|
||||
const w = await delegateOf(prisma, user, "WRITE");
|
||||
const r = await delegateOf(prisma, user, "READ");
|
||||
writer = { auth: w.auth, headers: w.headers };
|
||||
reader = { auth: r.auth, headers: r.headers };
|
||||
userIds = [ownerId, w.delegate.id, r.delegate.id];
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
vi.useRealTimers();
|
||||
});
|
||||
|
||||
describe("GET /api/medications/intake parity", () => {
|
||||
it("01 today's list", async () => {
|
||||
await get("01-today", { scope: "today" });
|
||||
});
|
||||
|
||||
it("02 the compliance buckets, cold and from the cache", async () => {
|
||||
await get("02a-compliance-cold", { scope: "compliance", days: "7" });
|
||||
await get("02b-compliance-warm", { scope: "compliance", days: "7" });
|
||||
});
|
||||
|
||||
it("03 a query the schema refuses", async () => {
|
||||
await get("03-invalid", { scope: "yesterday", days: "0" });
|
||||
});
|
||||
|
||||
it("04 a reading delegate, and nobody", async () => {
|
||||
await get("04a-reader", { scope: "today" }, reader);
|
||||
await get("04b-anonymous", { scope: "today" }, { auth: anonymous });
|
||||
});
|
||||
});
|
||||
|
||||
describe("POST /api/medications/intake parity", () => {
|
||||
it("11 a take in place", async () => {
|
||||
await post("11-take-in-place", {
|
||||
intakeId: ev.todayMorning,
|
||||
status: "taken",
|
||||
takenAt: "2026-10-15T08:30:00.000Z",
|
||||
});
|
||||
});
|
||||
|
||||
it("12 a take that re-binds to another slot", async () => {
|
||||
await post(
|
||||
"12-take-slot-move",
|
||||
{
|
||||
intakeId: ev.moveMe,
|
||||
status: "taken",
|
||||
takenAt: "2026-10-14T20:30:00.000Z",
|
||||
},
|
||||
{ contract: SLOT_MOVE_ANSWER },
|
||||
);
|
||||
});
|
||||
|
||||
it("13 a pinned take, and a pin that is no slot", async () => {
|
||||
await post(
|
||||
"13a-pin",
|
||||
{
|
||||
intakeId: ev.pinMe,
|
||||
status: "taken",
|
||||
takenAt: "2026-10-13T11:00:00.000Z",
|
||||
forceSlotInstant: "2026-10-13T08:00:00.000Z",
|
||||
},
|
||||
{ contract: SLOT_MOVE_ANSWER },
|
||||
);
|
||||
await post("13b-pin-not-a-slot", {
|
||||
intakeId: ev.snoozeMe,
|
||||
status: "taken",
|
||||
forceSlotInstant: "2026-10-11T15:00:00.000Z",
|
||||
});
|
||||
});
|
||||
|
||||
it("14 a skip over a recorded dose", async () => {
|
||||
await post("14-skip", { intakeId: ev.skipMe, status: "skipped" });
|
||||
});
|
||||
|
||||
it("15 a snooze with its end, and one without", async () => {
|
||||
await post("15a-snooze-until", {
|
||||
intakeId: ev.snoozeMe,
|
||||
status: "snoozed",
|
||||
snoozedUntil: "2026-10-15T13:00:00.000Z",
|
||||
});
|
||||
await post("15b-snooze-default", {
|
||||
intakeId: ev.snoozeMe,
|
||||
status: "snoozed",
|
||||
});
|
||||
});
|
||||
|
||||
it("16 the not-found answers", async () => {
|
||||
await post("16a-unknown", {
|
||||
intakeId: "cmv0000000000000000000000",
|
||||
status: "taken",
|
||||
});
|
||||
await post("16b-foreign", { intakeId: ev.foreign, status: "taken" });
|
||||
await post("16c-tombstoned", { intakeId: ev.tombstoned, status: "taken" });
|
||||
});
|
||||
|
||||
it("17 the record-only rule both ways", async () => {
|
||||
await post("17a-record-only-open", {
|
||||
intakeId: ev.recordOpen,
|
||||
status: "taken",
|
||||
});
|
||||
await post("17b-record-only-correction", {
|
||||
intakeId: ev.recordTaken,
|
||||
status: "taken",
|
||||
takenAt: "2026-10-13T07:20:00.000Z",
|
||||
});
|
||||
});
|
||||
|
||||
it("18 the injection-site refusal, and an allowed site", async () => {
|
||||
await post("18a-site-not-allowed", {
|
||||
intakeId: ev.penToday,
|
||||
status: "taken",
|
||||
takenAt: "2026-10-15T09:15:00.000Z",
|
||||
injectionSite: "ABDOMEN_RIGHT",
|
||||
});
|
||||
await post("18b-site", {
|
||||
intakeId: ev.penToday,
|
||||
status: "taken",
|
||||
takenAt: "2026-10-15T09:15:00.000Z",
|
||||
injectionSite: "ABDOMEN_LEFT",
|
||||
});
|
||||
});
|
||||
|
||||
it("19 a body the schema refuses", async () => {
|
||||
await post("19-invalid", { intakeId: "", status: "forgotten" });
|
||||
});
|
||||
|
||||
it("20 a delegate who marks an open dose, a snooze, a correction, a reader and nobody", async () => {
|
||||
await post(
|
||||
"20a-writer-take",
|
||||
{ intakeId: ev.todayEvening, status: "taken" },
|
||||
{ ...writer, contract: SLOT_MOVE_ANSWER },
|
||||
);
|
||||
await post(
|
||||
"20b-writer-snooze-refused",
|
||||
{ intakeId: ev.snoozeMe, status: "snoozed" },
|
||||
writer,
|
||||
);
|
||||
await post(
|
||||
"20c-writer-correction-refused",
|
||||
{ intakeId: ev.resolved, status: "skipped" },
|
||||
writer,
|
||||
);
|
||||
await post(
|
||||
"20d-reader",
|
||||
{ intakeId: ev.snoozeMe, status: "taken" },
|
||||
reader,
|
||||
);
|
||||
await post(
|
||||
"20e-anonymous",
|
||||
{ intakeId: ev.snoozeMe, status: "taken" },
|
||||
{ auth: anonymous },
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user