test(medications): pin the medication read, edit and delete before they move

One walk through GET, PUT and DELETE /api/medications/{id}: the read with stock, composition and courses, every edit branch the handler tells apart (schedule replace and echo, the grace bridge, pause and resume, the category rules, the record-only rule and both tracking transitions, the as-needed and one-shot refusals, the course refusals, a composition change), the refusals, and delegated access at each level. The parity step can now wait for a write the route does not await and read state outside the medication tables.
This commit is contained in:
Marc-André Bombeck committed 2026-10-23 13:59:41 +02:00
1 parent d24c544e98
commit e8510ae167
42 files changed
+37662

No files matched your search

@@ -0,0 +1,699 @@
{
"status": 200,
"body": {
"data": {
"id": "<id:1>",
"userId": "<id:2>",
"name": "Rolling pen",
"dose": "1 pen",
"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": true,
"autoMarkTakenSince": "2026-10-01T06:00:00.000Z",
"deliveryForm": "INJECTION",
"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>",
"schedules": [
{
"id": "<id:3>",
"medicationId": "<id:1>",
"windowStart": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 7,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null,
"resolvedUnitsPerDose": 1
}
],
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"categoryLabel": "Heart and circulation",
"courses": [],
"courseCount": 0,
"previousCourseEndedOn": null,
"canStartCourse": false,
"nextDueAt": "2026-10-17T07:00:00.000Z",
"remindersActive": false,
"nextDueOverdue": false,
"courseStatus": "CURRENT",
"intakeActionable": true,
"stockUnitsRemaining": 3,
"stockDosesRemaining": 3,
"runwayDays": 21,
"ingredients": [
{
"nutrient": "vitamin_d",
"amountPerUnit": 25,
"unit": "ug",
"enteredAmount": 1000,
"enteredUnit": "IU",
"labelKey": "nutrients.names.vitamin_d",
"label": "Vitamin D"
}
],
"related": []
},
"error": null
},
"events": [
{
"status": 200,
"action": {
"name": "medication.get",
"entity_type": "medication",
"entity_id": "<id:1>"
},
"meta": null,
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:4>",
"userId": "<id:2>",
"name": "As needed",
"dose": "10mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": true,
"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": "Booster",
"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": 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": "Course tablet",
"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:7>",
"userId": "<id:2>",
"name": "Daily tablet",
"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:8>",
"userId": "<id:2>",
"name": "Record only",
"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": 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:1>",
"userId": "<id:2>",
"name": "Rolling pen",
"dose": "1 pen",
"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": true,
"autoMarkTakenSince": "2026-10-01T06:00:00.000Z",
"deliveryForm": "INJECTION",
"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:9>",
"userId": "<id:2>",
"name": "To delete",
"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": 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>"
}
],
"schedules": [
{
"id": "<id:10>",
"medicationId": "<id:8>",
"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:6>",
"windowStart": "08:00",
"windowEnd": "09: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:7>",
"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:13>",
"medicationId": "<id:5>",
"windowStart": "09:00",
"windowEnd": "10: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:3>",
"medicationId": "<id:1>",
"windowStart": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 7,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:14>",
"medicationId": "<id:9>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:15>",
"medicationId": "<id:7>",
"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": [
{
"id": "<id:16>",
"medicationId": "<id:6>",
"userId": "<id:2>",
"startsOn": "2026-08-01T00:00:00.000Z",
"endsOn": "2026-08-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:17>",
"medicationId": "<id:6>",
"userId": "<id:2>",
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [
{
"id": "<id:18>",
"userId": "<id:2>",
"medicationId": "<id:1>",
"scheduledFor": "2026-10-10T07:00:00.000Z",
"takenAt": "2026-10-10T07:05:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:7>",
"scheduledFor": "2026-10-14T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:7>",
"scheduledFor": "2026-10-15T06:00:00.000Z",
"takenAt": "2026-10-15T06:10:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:7>",
"scheduledFor": "2026-10-15T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:8>",
"scheduledFor": "2026-10-16T05:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:7>",
"scheduledFor": "2026-10-16T06:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": null
}
],
"doseChanges": [],
"inventoryItems": [
{
"id": "<id:24>",
"userId": "<id:2>",
"medicationId": "<id:1>",
"state": "ACTIVE",
"containerType": "OTHER",
"unitsTotal": "4",
"unitsRemaining": "3",
"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": [
{
"medicationId": "<id:1>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [
{
"id": "<id:25>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"nutrient": "magnesium",
"amountPerUnit": 100,
"unit": "mg",
"enteredAmount": null,
"enteredUnit": null,
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:26>",
"userId": "<id:2>",
"medicationId": "<id:1>",
"nutrient": "vitamin_d",
"amountPerUnit": 25,
"unit": "ug",
"enteredAmount": 1000,
"enteredUnit": "IU",
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"audit": [],
"idempotency": []
}
}
@@ -0,0 +1,710 @@
{
"status": 200,
"body": {
"data": {
"id": "<id:1>",
"userId": "<id:2>",
"name": "Daily tablet",
"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>",
"schedules": [
{
"id": "<id:3>",
"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,
"resolvedUnitsPerDose": 1
},
{
"id": "<id:4>",
"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,
"resolvedUnitsPerDose": 1
}
],
"category": "OTHER",
"categoryLabel": null,
"courses": [],
"courseCount": 0,
"previousCourseEndedOn": null,
"canStartCourse": false,
"nextDueAt": "2026-10-15T18:00:00.000Z",
"remindersActive": true,
"nextDueOverdue": false,
"courseStatus": "CURRENT",
"intakeActionable": true,
"stockUnitsRemaining": null,
"stockDosesRemaining": null,
"runwayDays": null,
"ingredients": [],
"related": []
},
"error": null
},
"events": [
{
"status": 200,
"action": {
"name": "medication.get",
"entity_type": "medication",
"entity_id": "<id:1>"
},
"meta": null,
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:5>",
"userId": "<id:2>",
"name": "As needed",
"dose": "10mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": true,
"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": "Booster",
"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": 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:7>",
"userId": "<id:2>",
"name": "Course tablet",
"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:2>",
"name": "Daily tablet",
"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:8>",
"userId": "<id:2>",
"name": "Record only",
"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": 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:9>",
"userId": "<id:2>",
"name": "Rolling pen",
"dose": "1 pen",
"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": true,
"autoMarkTakenSince": "2026-10-01T06:00:00.000Z",
"deliveryForm": "INJECTION",
"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:10>",
"userId": "<id:2>",
"name": "To delete",
"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": 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>"
}
],
"schedules": [
{
"id": "<id:11>",
"medicationId": "<id:8>",
"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:12>",
"medicationId": "<id:7>",
"windowStart": "08:00",
"windowEnd": "09: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:3>",
"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:13>",
"medicationId": "<id:6>",
"windowStart": "09:00",
"windowEnd": "10: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:14>",
"medicationId": "<id:9>",
"windowStart": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 7,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:15>",
"medicationId": "<id:10>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:4>",
"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": [
{
"id": "<id:16>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-08-01T00:00:00.000Z",
"endsOn": "2026-08-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:17>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [
{
"id": "<id:18>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"scheduledFor": "2026-10-10T07:00:00.000Z",
"takenAt": "2026-10-10T07:05:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-14T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-15T06:00:00.000Z",
"takenAt": "2026-10-15T06:10:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-15T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:8>",
"scheduledFor": "2026-10-16T05:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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-16T06:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": null
}
],
"doseChanges": [],
"inventoryItems": [
{
"id": "<id:24>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"state": "ACTIVE",
"containerType": "OTHER",
"unitsTotal": "4",
"unitsRemaining": "3",
"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": [
{
"medicationId": "<id:9>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [
{
"id": "<id:25>",
"userId": "<id:2>",
"medicationId": "<id:10>",
"nutrient": "magnesium",
"amountPerUnit": 100,
"unit": "mg",
"enteredAmount": null,
"enteredUnit": null,
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:26>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"nutrient": "vitamin_d",
"amountPerUnit": 25,
"unit": "ug",
"enteredAmount": 1000,
"enteredUnit": "IU",
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"audit": [],
"idempotency": []
}
}
@@ -0,0 +1,690 @@
{
"status": 200,
"body": {
"data": {
"id": "<id:1>",
"userId": "<id:2>",
"name": "Record only",
"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": 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>",
"schedules": [],
"recordedSchedules": [
{
"id": "<id:3>",
"medicationId": "<id:1>",
"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,
"resolvedUnitsPerDose": 1
}
],
"category": "OTHER",
"categoryLabel": null,
"courses": [],
"courseCount": 0,
"previousCourseEndedOn": null,
"canStartCourse": false,
"nextDueAt": null,
"remindersActive": false,
"nextDueOverdue": false,
"courseStatus": "CURRENT",
"intakeActionable": false,
"stockUnitsRemaining": null,
"stockDosesRemaining": null,
"runwayDays": null,
"ingredients": [],
"related": []
},
"error": null
},
"events": [
{
"status": 200,
"action": {
"name": "medication.get",
"entity_type": "medication",
"entity_id": "<id:1>"
},
"meta": null,
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:4>",
"userId": "<id:2>",
"name": "As needed",
"dose": "10mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": true,
"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": "Booster",
"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": 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": "Course tablet",
"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:7>",
"userId": "<id:2>",
"name": "Daily tablet",
"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:2>",
"name": "Record only",
"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": 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:2>",
"name": "Rolling pen",
"dose": "1 pen",
"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": true,
"autoMarkTakenSince": "2026-10-01T06:00:00.000Z",
"deliveryForm": "INJECTION",
"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:9>",
"userId": "<id:2>",
"name": "To delete",
"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": 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>"
}
],
"schedules": [
{
"id": "<id:3>",
"medicationId": "<id:1>",
"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:6>",
"windowStart": "08:00",
"windowEnd": "09: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:7>",
"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:5>",
"windowStart": "09:00",
"windowEnd": "10: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": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 7,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:14>",
"medicationId": "<id:9>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:15>",
"medicationId": "<id:7>",
"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": [
{
"id": "<id:16>",
"medicationId": "<id:6>",
"userId": "<id:2>",
"startsOn": "2026-08-01T00:00:00.000Z",
"endsOn": "2026-08-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:17>",
"medicationId": "<id:6>",
"userId": "<id:2>",
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [
{
"id": "<id:18>",
"userId": "<id:2>",
"medicationId": "<id:8>",
"scheduledFor": "2026-10-10T07:00:00.000Z",
"takenAt": "2026-10-10T07:05:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:7>",
"scheduledFor": "2026-10-14T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:7>",
"scheduledFor": "2026-10-15T06:00:00.000Z",
"takenAt": "2026-10-15T06:10:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:7>",
"scheduledFor": "2026-10-15T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-16T05:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:7>",
"scheduledFor": "2026-10-16T06:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": null
}
],
"doseChanges": [],
"inventoryItems": [
{
"id": "<id:24>",
"userId": "<id:2>",
"medicationId": "<id:8>",
"state": "ACTIVE",
"containerType": "OTHER",
"unitsTotal": "4",
"unitsRemaining": "3",
"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": [
{
"medicationId": "<id:8>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [
{
"id": "<id:25>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"nutrient": "magnesium",
"amountPerUnit": 100,
"unit": "mg",
"enteredAmount": null,
"enteredUnit": null,
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:26>",
"userId": "<id:2>",
"medicationId": "<id:8>",
"nutrient": "vitamin_d",
"amountPerUnit": 25,
"unit": "ug",
"enteredAmount": 1000,
"enteredUnit": "IU",
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"audit": [],
"idempotency": []
}
}
@@ -0,0 +1,617 @@
{
"status": 404,
"body": {
"data": null,
"error": "Medication 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": "As needed",
"dose": "10mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": true,
"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": "Booster",
"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": 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:2>",
"name": "Course tablet",
"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": "Daily tablet",
"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": "Record only",
"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": 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": "Rolling pen",
"dose": "1 pen",
"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": true,
"autoMarkTakenSince": "2026-10-01T06:00:00.000Z",
"deliveryForm": "INJECTION",
"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:2>",
"name": "To delete",
"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": 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>"
}
],
"schedules": [
{
"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:4>",
"windowStart": "08:00",
"windowEnd": "09: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": "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:3>",
"windowStart": "09:00",
"windowEnd": "10: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:7>",
"windowStart": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 7,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:14>",
"medicationId": "<id:8>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12: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": [
{
"id": "<id:16>",
"medicationId": "<id:4>",
"userId": "<id:2>",
"startsOn": "2026-08-01T00:00:00.000Z",
"endsOn": "2026-08-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:17>",
"medicationId": "<id:4>",
"userId": "<id:2>",
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [
{
"id": "<id:18>",
"userId": "<id:2>",
"medicationId": "<id:7>",
"scheduledFor": "2026-10-10T07:00:00.000Z",
"takenAt": "2026-10-10T07:05:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:5>",
"scheduledFor": "2026-10-14T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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-15T06:00:00.000Z",
"takenAt": "2026-10-15T06:10:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:5>",
"scheduledFor": "2026-10-15T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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-16T05:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:5>",
"scheduledFor": "2026-10-16T06:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": null
}
],
"doseChanges": [],
"inventoryItems": [
{
"id": "<id:24>",
"userId": "<id:2>",
"medicationId": "<id:7>",
"state": "ACTIVE",
"containerType": "OTHER",
"unitsTotal": "4",
"unitsRemaining": "3",
"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": [
{
"medicationId": "<id:7>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [
{
"id": "<id:25>",
"userId": "<id:2>",
"medicationId": "<id:8>",
"nutrient": "magnesium",
"amountPerUnit": 100,
"unit": "mg",
"enteredAmount": null,
"enteredUnit": null,
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:26>",
"userId": "<id:2>",
"medicationId": "<id:7>",
"nutrient": "vitamin_d",
"amountPerUnit": 25,
"unit": "ug",
"enteredAmount": 1000,
"enteredUnit": "IU",
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"audit": [],
"idempotency": []
}
}
@@ -0,0 +1,699 @@
{
"status": 200,
"body": {
"data": {
"id": "<id:1>",
"userId": "<id:2>",
"name": "Rolling pen",
"dose": "1 pen",
"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": true,
"autoMarkTakenSince": "2026-10-01T06:00:00.000Z",
"deliveryForm": "INJECTION",
"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>",
"schedules": [
{
"id": "<id:3>",
"medicationId": "<id:1>",
"windowStart": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 7,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null,
"resolvedUnitsPerDose": 1
}
],
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"categoryLabel": "Heart and circulation",
"courses": [],
"courseCount": 0,
"previousCourseEndedOn": null,
"canStartCourse": false,
"nextDueAt": "2026-10-17T07:00:00.000Z",
"remindersActive": false,
"nextDueOverdue": false,
"courseStatus": "CURRENT",
"intakeActionable": true,
"stockUnitsRemaining": 3,
"stockDosesRemaining": 3,
"runwayDays": 21,
"ingredients": [
{
"nutrient": "vitamin_d",
"amountPerUnit": 25,
"unit": "ug",
"enteredAmount": 1000,
"enteredUnit": "IU",
"labelKey": "nutrients.names.vitamin_d",
"label": "Vitamin D"
}
],
"related": []
},
"error": null
},
"events": [
{
"status": 200,
"action": {
"name": "medication.get",
"entity_type": "medication",
"entity_id": "<id:1>"
},
"meta": null,
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:4>",
"userId": "<id:2>",
"name": "As needed",
"dose": "10mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": true,
"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": "Booster",
"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": 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": "Course tablet",
"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:7>",
"userId": "<id:2>",
"name": "Daily tablet",
"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:8>",
"userId": "<id:2>",
"name": "Record only",
"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": 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:1>",
"userId": "<id:2>",
"name": "Rolling pen",
"dose": "1 pen",
"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": true,
"autoMarkTakenSince": "2026-10-01T06:00:00.000Z",
"deliveryForm": "INJECTION",
"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:9>",
"userId": "<id:2>",
"name": "To delete",
"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": 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>"
}
],
"schedules": [
{
"id": "<id:10>",
"medicationId": "<id:8>",
"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:6>",
"windowStart": "08:00",
"windowEnd": "09: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:7>",
"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:13>",
"medicationId": "<id:5>",
"windowStart": "09:00",
"windowEnd": "10: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:3>",
"medicationId": "<id:1>",
"windowStart": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 7,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:14>",
"medicationId": "<id:9>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:15>",
"medicationId": "<id:7>",
"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": [
{
"id": "<id:16>",
"medicationId": "<id:6>",
"userId": "<id:2>",
"startsOn": "2026-08-01T00:00:00.000Z",
"endsOn": "2026-08-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:17>",
"medicationId": "<id:6>",
"userId": "<id:2>",
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [
{
"id": "<id:18>",
"userId": "<id:2>",
"medicationId": "<id:1>",
"scheduledFor": "2026-10-10T07:00:00.000Z",
"takenAt": "2026-10-10T07:05:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:7>",
"scheduledFor": "2026-10-14T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:7>",
"scheduledFor": "2026-10-15T06:00:00.000Z",
"takenAt": "2026-10-15T06:10:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:7>",
"scheduledFor": "2026-10-15T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:8>",
"scheduledFor": "2026-10-16T05:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:7>",
"scheduledFor": "2026-10-16T06:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": null
}
],
"doseChanges": [],
"inventoryItems": [
{
"id": "<id:24>",
"userId": "<id:2>",
"medicationId": "<id:1>",
"state": "ACTIVE",
"containerType": "OTHER",
"unitsTotal": "4",
"unitsRemaining": "3",
"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": [
{
"medicationId": "<id:1>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [
{
"id": "<id:25>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"nutrient": "magnesium",
"amountPerUnit": 100,
"unit": "mg",
"enteredAmount": null,
"enteredUnit": null,
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:26>",
"userId": "<id:2>",
"medicationId": "<id:1>",
"nutrient": "vitamin_d",
"amountPerUnit": 25,
"unit": "ug",
"enteredAmount": 1000,
"enteredUnit": "IU",
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"audit": [],
"idempotency": []
}
}
@@ -0,0 +1,620 @@
{
"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": "As needed",
"dose": "10mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": true,
"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": "Booster",
"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": 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:2>",
"name": "Course tablet",
"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": "Daily tablet",
"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": "Record only",
"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": 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": "Rolling pen",
"dose": "1 pen",
"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": true,
"autoMarkTakenSince": "2026-10-01T06:00:00.000Z",
"deliveryForm": "INJECTION",
"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:2>",
"name": "To delete",
"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": 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>"
}
],
"schedules": [
{
"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:4>",
"windowStart": "08:00",
"windowEnd": "09: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": "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:3>",
"windowStart": "09:00",
"windowEnd": "10: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:7>",
"windowStart": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 7,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:14>",
"medicationId": "<id:8>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12: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": [
{
"id": "<id:16>",
"medicationId": "<id:4>",
"userId": "<id:2>",
"startsOn": "2026-08-01T00:00:00.000Z",
"endsOn": "2026-08-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:17>",
"medicationId": "<id:4>",
"userId": "<id:2>",
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [
{
"id": "<id:18>",
"userId": "<id:2>",
"medicationId": "<id:7>",
"scheduledFor": "2026-10-10T07:00:00.000Z",
"takenAt": "2026-10-10T07:05:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:5>",
"scheduledFor": "2026-10-14T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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-15T06:00:00.000Z",
"takenAt": "2026-10-15T06:10:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:5>",
"scheduledFor": "2026-10-15T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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-16T05:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:5>",
"scheduledFor": "2026-10-16T06:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": null
}
],
"doseChanges": [],
"inventoryItems": [
{
"id": "<id:24>",
"userId": "<id:2>",
"medicationId": "<id:7>",
"state": "ACTIVE",
"containerType": "OTHER",
"unitsTotal": "4",
"unitsRemaining": "3",
"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": [
{
"medicationId": "<id:7>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [
{
"id": "<id:25>",
"userId": "<id:2>",
"medicationId": "<id:8>",
"nutrient": "magnesium",
"amountPerUnit": 100,
"unit": "mg",
"enteredAmount": null,
"enteredUnit": null,
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:26>",
"userId": "<id:2>",
"medicationId": "<id:7>",
"nutrient": "vitamin_d",
"amountPerUnit": 25,
"unit": "ug",
"enteredAmount": 1000,
"enteredUnit": "IU",
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"audit": [],
"idempotency": []
}
}
@@ -0,0 +1,718 @@
{
"status": 200,
"body": {
"data": {
"id": "<id:1>",
"userId": "<id:2>",
"name": "Daily tablet renamed",
"dose": "20mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": 30,
"unitsPerDose": 1,
"active": true,
"notificationsEnabled": false,
"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": true,
"criticalAlarmEnabled": true,
"atcCode": "C09AA05",
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 5,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>",
"schedules": [
{
"id": "<id:3>",
"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,
"resolvedUnitsPerDose": 1
},
{
"id": "<id:4>",
"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,
"resolvedUnitsPerDose": 1
}
],
"category": "OTHER",
"categoryLabel": null,
"courses": [],
"courseCount": 0,
"previousCourseEndedOn": null,
"canStartCourse": false
},
"error": null
},
"events": [
{
"status": 200,
"action": {
"name": "medication.update",
"entity_type": "medication",
"entity_id": "<id:1>"
},
"meta": null,
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:5>",
"userId": "<id:2>",
"name": "As needed",
"dose": "10mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": true,
"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": "Booster",
"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": 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:7>",
"userId": "<id:2>",
"name": "Course tablet",
"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:2>",
"name": "Daily tablet renamed",
"dose": "20mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": 30,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": false,
"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": true,
"criticalAlarmEnabled": true,
"atcCode": "C09AA05",
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 5,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:8>",
"userId": "<id:2>",
"name": "Record only",
"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": 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:9>",
"userId": "<id:2>",
"name": "Rolling pen",
"dose": "1 pen",
"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": true,
"autoMarkTakenSince": "2026-10-01T06:00:00.000Z",
"deliveryForm": "INJECTION",
"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:10>",
"userId": "<id:2>",
"name": "To delete",
"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": 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>"
}
],
"schedules": [
{
"id": "<id:11>",
"medicationId": "<id:8>",
"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:12>",
"medicationId": "<id:7>",
"windowStart": "08:00",
"windowEnd": "09: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:3>",
"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:13>",
"medicationId": "<id:6>",
"windowStart": "09:00",
"windowEnd": "10: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:14>",
"medicationId": "<id:9>",
"windowStart": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 7,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:15>",
"medicationId": "<id:10>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:4>",
"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": [
{
"id": "<id:16>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-08-01T00:00:00.000Z",
"endsOn": "2026-08-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:17>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [
{
"id": "<id:18>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"scheduledFor": "2026-10-10T07:00:00.000Z",
"takenAt": "2026-10-10T07:05:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-14T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-15T06:00:00.000Z",
"takenAt": "2026-10-15T06:10:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-15T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:8>",
"scheduledFor": "2026-10-16T05:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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-16T06:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": null
}
],
"doseChanges": [],
"inventoryItems": [
{
"id": "<id:24>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"state": "ACTIVE",
"containerType": "OTHER",
"unitsTotal": "4",
"unitsRemaining": "3",
"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": [
{
"medicationId": "<id:9>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [
{
"id": "<id:25>",
"userId": "<id:2>",
"medicationId": "<id:10>",
"nutrient": "magnesium",
"amountPerUnit": 100,
"unit": "mg",
"enteredAmount": null,
"enteredUnit": null,
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:26>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"nutrient": "vitamin_d",
"amountPerUnit": 25,
"unit": "ug",
"enteredAmount": 1000,
"enteredUnit": "IU",
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"audit": [
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"dose",
"name"
],
"previous": {
"name": "Daily tablet",
"dose": "10mg"
}
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,794 @@
{
"status": 200,
"body": {
"data": {
"id": "<id:1>",
"userId": "<id:2>",
"name": "Daily tablet renamed",
"dose": "20mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": 30,
"unitsPerDose": 1,
"active": true,
"notificationsEnabled": false,
"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": true,
"criticalAlarmEnabled": true,
"atcCode": "C09AA05",
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 5,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>",
"schedules": [
{
"id": "<id:3>",
"medicationId": "<id:1>",
"windowStart": "11:30",
"windowEnd": "11:30",
"label": "Late morning",
"dose": "10mg",
"unitsPerDose": 2,
"daysOfWeek": null,
"timesOfDay": [
"11:30"
],
"reminderGraceMinutes": 30,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null,
"resolvedUnitsPerDose": 2
},
{
"id": "<id:4>",
"medicationId": "<id:1>",
"windowStart": "20:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"20:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "21:00",
"start": "19:30",
"timeOfDay": "20:00"
}
],
"resolvedUnitsPerDose": 1
}
],
"category": "OTHER",
"categoryLabel": null,
"courses": [],
"courseCount": 0,
"previousCourseEndedOn": null,
"canStartCourse": false
},
"error": null
},
"events": [
{
"status": 200,
"action": {
"name": "medication.update",
"entity_type": "medication",
"entity_id": "<id:1>"
},
"meta": {
"schedule_revision_rows": 2
},
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:5>",
"userId": "<id:2>",
"name": "As needed",
"dose": "10mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": true,
"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": "Booster",
"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": 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:7>",
"userId": "<id:2>",
"name": "Course tablet",
"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:2>",
"name": "Daily tablet renamed",
"dose": "20mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": 30,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": false,
"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": true,
"criticalAlarmEnabled": true,
"atcCode": "C09AA05",
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 5,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:8>",
"userId": "<id:2>",
"name": "Record only",
"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": 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:9>",
"userId": "<id:2>",
"name": "Rolling pen",
"dose": "1 pen",
"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": true,
"autoMarkTakenSince": "2026-10-01T06:00:00.000Z",
"deliveryForm": "INJECTION",
"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:10>",
"userId": "<id:2>",
"name": "To delete",
"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": 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>"
}
],
"schedules": [
{
"id": "<id:11>",
"medicationId": "<id:8>",
"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:12>",
"medicationId": "<id:7>",
"windowStart": "08:00",
"windowEnd": "09: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:13>",
"medicationId": "<id:6>",
"windowStart": "09:00",
"windowEnd": "10: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:14>",
"medicationId": "<id:9>",
"windowStart": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 7,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:3>",
"medicationId": "<id:1>",
"windowStart": "11:30",
"windowEnd": "11:30",
"label": "Late morning",
"dose": "10mg",
"unitsPerDose": "2",
"daysOfWeek": null,
"timesOfDay": [
"11:30"
],
"reminderGraceMinutes": 30,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:15>",
"medicationId": "<id:10>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:4>",
"medicationId": "<id:1>",
"windowStart": "20:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"20:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "21:00",
"start": "19:30",
"timeOfDay": "20:00"
}
]
}
],
"revisions": [
{
"id": "<id:16>",
"medicationId": "<id:1>",
"validFrom": "2026-10-01T06:00:00.000Z",
"validUntil": "<now>",
"payload": [
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "10:00",
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"doseWindows": null,
"windowStart": "08:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
},
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "22:00",
"daysOfWeek": null,
"timesOfDay": [
"20:00"
],
"doseWindows": null,
"windowStart": "20:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
}
],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
}
],
"pauseEras": [],
"courses": [
{
"id": "<id:17>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-08-01T00:00:00.000Z",
"endsOn": "2026-08-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:18>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [
{
"id": "<id:19>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"scheduledFor": "2026-10-10T07:00:00.000Z",
"takenAt": "2026-10-10T07:05:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-14T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-15T06:00:00.000Z",
"takenAt": "2026-10-15T06:10:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-15T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
},
{
"id": "<id:23>",
"userId": "<id:2>",
"medicationId": "<id:8>",
"scheduledFor": "2026-10-16T05:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-16T06:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
}
],
"doseChanges": [],
"inventoryItems": [
{
"id": "<id:25>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"state": "ACTIVE",
"containerType": "OTHER",
"unitsTotal": "4",
"unitsRemaining": "3",
"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": [
{
"medicationId": "<id:9>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [
{
"id": "<id:26>",
"userId": "<id:2>",
"medicationId": "<id:10>",
"nutrient": "magnesium",
"amountPerUnit": 100,
"unit": "mg",
"enteredAmount": null,
"enteredUnit": null,
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:27>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"nutrient": "vitamin_d",
"amountPerUnit": 25,
"unit": "ug",
"enteredAmount": 1000,
"enteredUnit": "IU",
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"audit": [
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"dose",
"name"
],
"previous": {
"name": "Daily tablet",
"dose": "10mg"
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {},
"replacedCadence": "08:00 FREQ=DAILY | 20:00 FREQ=DAILY",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 2,
"tombstonedFrom": "2026-10-15T18:00:00.000Z",
"tombstonedTo": "2026-10-16T06:00:00.000Z"
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,808 @@
{
"status": 200,
"body": {
"data": {
"id": "<id:1>",
"userId": "<id:2>",
"name": "Daily tablet renamed",
"dose": "20mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": 30,
"unitsPerDose": 1,
"active": true,
"notificationsEnabled": false,
"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": true,
"criticalAlarmEnabled": true,
"atcCode": "C09AA05",
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 5,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>",
"schedules": [
{
"id": "<id:3>",
"medicationId": "<id:1>",
"windowStart": "11:30",
"windowEnd": "11:30",
"label": "Late morning",
"dose": "10mg",
"unitsPerDose": 2,
"daysOfWeek": null,
"timesOfDay": [
"11:30"
],
"reminderGraceMinutes": 30,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null,
"resolvedUnitsPerDose": 2
},
{
"id": "<id:4>",
"medicationId": "<id:1>",
"windowStart": "20:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"20:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "21:00",
"start": "19:30",
"timeOfDay": "20:00"
}
],
"resolvedUnitsPerDose": 1
}
],
"category": "OTHER",
"categoryLabel": null,
"courses": [],
"courseCount": 0,
"previousCourseEndedOn": null,
"canStartCourse": false
},
"error": null
},
"events": [
{
"status": 200,
"action": {
"name": "medication.update",
"entity_type": "medication",
"entity_id": "<id:1>"
},
"meta": null,
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:5>",
"userId": "<id:2>",
"name": "As needed",
"dose": "10mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": true,
"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": "Booster",
"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": 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:7>",
"userId": "<id:2>",
"name": "Course tablet",
"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:2>",
"name": "Daily tablet renamed",
"dose": "20mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": 30,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": false,
"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": true,
"criticalAlarmEnabled": true,
"atcCode": "C09AA05",
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 5,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:8>",
"userId": "<id:2>",
"name": "Record only",
"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": 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:9>",
"userId": "<id:2>",
"name": "Rolling pen",
"dose": "1 pen",
"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": true,
"autoMarkTakenSince": "2026-10-01T06:00:00.000Z",
"deliveryForm": "INJECTION",
"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:10>",
"userId": "<id:2>",
"name": "To delete",
"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": 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>"
}
],
"schedules": [
{
"id": "<id:11>",
"medicationId": "<id:8>",
"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:12>",
"medicationId": "<id:7>",
"windowStart": "08:00",
"windowEnd": "09: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:13>",
"medicationId": "<id:6>",
"windowStart": "09:00",
"windowEnd": "10: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:14>",
"medicationId": "<id:9>",
"windowStart": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 7,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:3>",
"medicationId": "<id:1>",
"windowStart": "11:30",
"windowEnd": "11:30",
"label": "Late morning",
"dose": "10mg",
"unitsPerDose": "2",
"daysOfWeek": null,
"timesOfDay": [
"11:30"
],
"reminderGraceMinutes": 30,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:15>",
"medicationId": "<id:10>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:4>",
"medicationId": "<id:1>",
"windowStart": "20:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"20:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "21:00",
"start": "19:30",
"timeOfDay": "20:00"
}
]
}
],
"revisions": [
{
"id": "<id:16>",
"medicationId": "<id:1>",
"validFrom": "2026-10-01T06:00:00.000Z",
"validUntil": "<now>",
"payload": [
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "10:00",
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"doseWindows": null,
"windowStart": "08:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
},
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "22:00",
"daysOfWeek": null,
"timesOfDay": [
"20:00"
],
"doseWindows": null,
"windowStart": "20:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
}
],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
}
],
"pauseEras": [],
"courses": [
{
"id": "<id:17>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-08-01T00:00:00.000Z",
"endsOn": "2026-08-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:18>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [
{
"id": "<id:19>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"scheduledFor": "2026-10-10T07:00:00.000Z",
"takenAt": "2026-10-10T07:05:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-14T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-15T06:00:00.000Z",
"takenAt": "2026-10-15T06:10:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-15T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
},
{
"id": "<id:23>",
"userId": "<id:2>",
"medicationId": "<id:8>",
"scheduledFor": "2026-10-16T05:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-16T06:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
}
],
"doseChanges": [],
"inventoryItems": [
{
"id": "<id:25>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"state": "ACTIVE",
"containerType": "OTHER",
"unitsTotal": "4",
"unitsRemaining": "3",
"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": [
{
"medicationId": "<id:9>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [
{
"id": "<id:26>",
"userId": "<id:2>",
"medicationId": "<id:10>",
"nutrient": "magnesium",
"amountPerUnit": 100,
"unit": "mg",
"enteredAmount": null,
"enteredUnit": null,
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:27>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"nutrient": "vitamin_d",
"amountPerUnit": 25,
"unit": "ug",
"enteredAmount": 1000,
"enteredUnit": "IU",
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"audit": [
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"dose",
"name"
],
"previous": {
"name": "Daily tablet",
"dose": "10mg"
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {},
"replacedCadence": "08:00 FREQ=DAILY | 20:00 FREQ=DAILY",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 2,
"tombstonedFrom": "2026-10-15T18:00:00.000Z",
"tombstonedTo": "2026-10-16T06:00:00.000Z"
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {},
"replacedCadence": "11:30 FREQ=DAILY | 20:00 i2;1,3,5",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 0,
"tombstonedFrom": null,
"tombstonedTo": null
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,819 @@
{
"status": 200,
"body": {
"data": {
"id": "<id:1>",
"userId": "<id:2>",
"name": "Daily tablet renamed",
"dose": "20mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": 30,
"unitsPerDose": 1,
"active": true,
"notificationsEnabled": false,
"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": true,
"criticalAlarmEnabled": true,
"atcCode": "C09AA05",
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 5,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>",
"schedules": [
{
"id": "<id:3>",
"medicationId": "<id:1>",
"windowStart": "11:30",
"windowEnd": "11:30",
"label": "Late morning",
"dose": "10mg",
"unitsPerDose": 2,
"daysOfWeek": null,
"timesOfDay": [
"11:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null,
"resolvedUnitsPerDose": 2
},
{
"id": "<id:4>",
"medicationId": "<id:1>",
"windowStart": "20:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"20:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "21:00",
"start": "19:30",
"timeOfDay": "20:00"
}
],
"resolvedUnitsPerDose": 1
}
],
"category": "OTHER",
"categoryLabel": null,
"courses": [],
"courseCount": 0,
"previousCourseEndedOn": null,
"canStartCourse": false
},
"error": null
},
"events": [
{
"status": 200,
"action": {
"name": "medication.update",
"entity_type": "medication",
"entity_id": "<id:1>"
},
"meta": null,
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:5>",
"userId": "<id:2>",
"name": "As needed",
"dose": "10mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": true,
"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": "Booster",
"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": 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:7>",
"userId": "<id:2>",
"name": "Course tablet",
"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:2>",
"name": "Daily tablet renamed",
"dose": "20mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": 30,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": false,
"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": true,
"criticalAlarmEnabled": true,
"atcCode": "C09AA05",
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 5,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:8>",
"userId": "<id:2>",
"name": "Record only",
"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": 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:9>",
"userId": "<id:2>",
"name": "Rolling pen",
"dose": "1 pen",
"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": true,
"autoMarkTakenSince": "2026-10-01T06:00:00.000Z",
"deliveryForm": "INJECTION",
"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:10>",
"userId": "<id:2>",
"name": "To delete",
"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": 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>"
}
],
"schedules": [
{
"id": "<id:11>",
"medicationId": "<id:8>",
"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:12>",
"medicationId": "<id:7>",
"windowStart": "08:00",
"windowEnd": "09: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:13>",
"medicationId": "<id:6>",
"windowStart": "09:00",
"windowEnd": "10: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:14>",
"medicationId": "<id:9>",
"windowStart": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 7,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:3>",
"medicationId": "<id:1>",
"windowStart": "11:30",
"windowEnd": "11:30",
"label": "Late morning",
"dose": "10mg",
"unitsPerDose": "2",
"daysOfWeek": null,
"timesOfDay": [
"11:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:15>",
"medicationId": "<id:10>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:4>",
"medicationId": "<id:1>",
"windowStart": "20:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"20:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "21:00",
"start": "19:30",
"timeOfDay": "20:00"
}
]
}
],
"revisions": [
{
"id": "<id:16>",
"medicationId": "<id:1>",
"validFrom": "2026-10-01T06:00:00.000Z",
"validUntil": "<now>",
"payload": [
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "10:00",
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"doseWindows": null,
"windowStart": "08:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
},
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "22:00",
"daysOfWeek": null,
"timesOfDay": [
"20:00"
],
"doseWindows": null,
"windowStart": "20:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
}
],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
}
],
"pauseEras": [],
"courses": [
{
"id": "<id:17>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-08-01T00:00:00.000Z",
"endsOn": "2026-08-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:18>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [
{
"id": "<id:19>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"scheduledFor": "2026-10-10T07:00:00.000Z",
"takenAt": "2026-10-10T07:05:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-14T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-15T06:00:00.000Z",
"takenAt": "2026-10-15T06:10:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-15T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
},
{
"id": "<id:23>",
"userId": "<id:2>",
"medicationId": "<id:8>",
"scheduledFor": "2026-10-16T05:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-16T06:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
}
],
"doseChanges": [],
"inventoryItems": [
{
"id": "<id:25>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"state": "ACTIVE",
"containerType": "OTHER",
"unitsTotal": "4",
"unitsRemaining": "3",
"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": [
{
"medicationId": "<id:9>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [
{
"id": "<id:26>",
"userId": "<id:2>",
"medicationId": "<id:10>",
"nutrient": "magnesium",
"amountPerUnit": 100,
"unit": "mg",
"enteredAmount": null,
"enteredUnit": null,
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:27>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"nutrient": "vitamin_d",
"amountPerUnit": 25,
"unit": "ug",
"enteredAmount": 1000,
"enteredUnit": "IU",
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"audit": [
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"dose",
"name"
],
"previous": {
"name": "Daily tablet",
"dose": "10mg"
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {},
"replacedCadence": "08:00 FREQ=DAILY | 20:00 FREQ=DAILY",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 2,
"tombstonedFrom": "2026-10-15T18:00:00.000Z",
"tombstonedTo": "2026-10-16T06:00:00.000Z"
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {},
"replacedCadence": "11:30 FREQ=DAILY | 20:00 i2;1,3,5",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 0,
"tombstonedFrom": null,
"tombstonedTo": null
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {}
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,843 @@
{
"status": 200,
"body": {
"data": {
"id": "<id:1>",
"userId": "<id:2>",
"name": "Daily tablet renamed",
"dose": "20mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": 30,
"unitsPerDose": 1,
"active": false,
"notificationsEnabled": false,
"pausedAt": "<now>",
"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": true,
"criticalAlarmEnabled": true,
"atcCode": "C09AA05",
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 5,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>",
"schedules": [
{
"id": "<id:3>",
"medicationId": "<id:1>",
"windowStart": "11:30",
"windowEnd": "11:30",
"label": "Late morning",
"dose": "10mg",
"unitsPerDose": 2,
"daysOfWeek": null,
"timesOfDay": [
"11:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null,
"resolvedUnitsPerDose": 2
},
{
"id": "<id:4>",
"medicationId": "<id:1>",
"windowStart": "20:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"20:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "21:00",
"start": "19:30",
"timeOfDay": "20:00"
}
],
"resolvedUnitsPerDose": 1
}
],
"category": "OTHER",
"categoryLabel": null,
"courses": [],
"courseCount": 0,
"previousCourseEndedOn": null,
"canStartCourse": false
},
"error": null
},
"events": [
{
"status": 200,
"action": {
"name": "medication.update",
"entity_type": "medication",
"entity_id": "<id:1>"
},
"meta": null,
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:5>",
"userId": "<id:2>",
"name": "As needed",
"dose": "10mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": true,
"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": "Booster",
"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": 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:7>",
"userId": "<id:2>",
"name": "Course tablet",
"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:2>",
"name": "Daily tablet renamed",
"dose": "20mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": 30,
"unitsPerDose": "1",
"active": false,
"notificationsEnabled": false,
"pausedAt": "<now>",
"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": true,
"criticalAlarmEnabled": true,
"atcCode": "C09AA05",
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 5,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:8>",
"userId": "<id:2>",
"name": "Record only",
"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": 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:9>",
"userId": "<id:2>",
"name": "Rolling pen",
"dose": "1 pen",
"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": true,
"autoMarkTakenSince": "2026-10-01T06:00:00.000Z",
"deliveryForm": "INJECTION",
"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:10>",
"userId": "<id:2>",
"name": "To delete",
"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": 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>"
}
],
"schedules": [
{
"id": "<id:11>",
"medicationId": "<id:8>",
"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:12>",
"medicationId": "<id:7>",
"windowStart": "08:00",
"windowEnd": "09: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:13>",
"medicationId": "<id:6>",
"windowStart": "09:00",
"windowEnd": "10: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:14>",
"medicationId": "<id:9>",
"windowStart": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 7,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:3>",
"medicationId": "<id:1>",
"windowStart": "11:30",
"windowEnd": "11:30",
"label": "Late morning",
"dose": "10mg",
"unitsPerDose": "2",
"daysOfWeek": null,
"timesOfDay": [
"11:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:15>",
"medicationId": "<id:10>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:4>",
"medicationId": "<id:1>",
"windowStart": "20:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"20:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "21:00",
"start": "19:30",
"timeOfDay": "20:00"
}
]
}
],
"revisions": [
{
"id": "<id:16>",
"medicationId": "<id:1>",
"validFrom": "2026-10-01T06:00:00.000Z",
"validUntil": "<now>",
"payload": [
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "10:00",
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"doseWindows": null,
"windowStart": "08:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
},
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "22:00",
"daysOfWeek": null,
"timesOfDay": [
"20:00"
],
"doseWindows": null,
"windowStart": "20:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
}
],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
}
],
"pauseEras": [
{
"id": "<id:17>",
"medicationId": "<id:1>",
"userId": "<id:2>",
"pausedAt": "<now>",
"resumedAt": null,
"createdAt": "<createdAt>"
}
],
"courses": [
{
"id": "<id:18>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-08-01T00:00:00.000Z",
"endsOn": "2026-08-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:19>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [
{
"id": "<id:20>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"scheduledFor": "2026-10-10T07:00:00.000Z",
"takenAt": "2026-10-10T07:05:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-14T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-15T06:00:00.000Z",
"takenAt": "2026-10-15T06:10:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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-15T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
},
{
"id": "<id:24>",
"userId": "<id:2>",
"medicationId": "<id:8>",
"scheduledFor": "2026-10-16T05:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-16T06:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
}
],
"doseChanges": [],
"inventoryItems": [
{
"id": "<id:26>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"state": "ACTIVE",
"containerType": "OTHER",
"unitsTotal": "4",
"unitsRemaining": "3",
"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": [
{
"medicationId": "<id:9>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [
{
"id": "<id:27>",
"userId": "<id:2>",
"medicationId": "<id:10>",
"nutrient": "magnesium",
"amountPerUnit": 100,
"unit": "mg",
"enteredAmount": null,
"enteredUnit": null,
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:28>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"nutrient": "vitamin_d",
"amountPerUnit": 25,
"unit": "ug",
"enteredAmount": 1000,
"enteredUnit": "IU",
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"audit": [
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"active"
],
"previous": {
"active": true
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"dose",
"name"
],
"previous": {
"name": "Daily tablet",
"dose": "10mg"
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {},
"replacedCadence": "08:00 FREQ=DAILY | 20:00 FREQ=DAILY",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 2,
"tombstonedFrom": "2026-10-15T18:00:00.000Z",
"tombstonedTo": "2026-10-16T06:00:00.000Z"
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {},
"replacedCadence": "11:30 FREQ=DAILY | 20:00 i2;1,3,5",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 0,
"tombstonedFrom": null,
"tombstonedTo": null
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {}
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,858 @@
{
"status": 200,
"body": {
"data": {
"id": "<id:1>",
"userId": "<id:2>",
"name": "Daily tablet renamed",
"dose": "20mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": 30,
"unitsPerDose": 1,
"active": true,
"notificationsEnabled": false,
"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": true,
"criticalAlarmEnabled": true,
"atcCode": "C09AA05",
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 5,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>",
"schedules": [
{
"id": "<id:3>",
"medicationId": "<id:1>",
"windowStart": "11:30",
"windowEnd": "11:30",
"label": "Late morning",
"dose": "10mg",
"unitsPerDose": 2,
"daysOfWeek": null,
"timesOfDay": [
"11:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null,
"resolvedUnitsPerDose": 2
},
{
"id": "<id:4>",
"medicationId": "<id:1>",
"windowStart": "20:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"20:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "21:00",
"start": "19:30",
"timeOfDay": "20:00"
}
],
"resolvedUnitsPerDose": 1
}
],
"category": "OTHER",
"categoryLabel": null,
"courses": [],
"courseCount": 0,
"previousCourseEndedOn": null,
"canStartCourse": false
},
"error": null
},
"events": [
{
"status": 200,
"action": {
"name": "medication.update",
"entity_type": "medication",
"entity_id": "<id:1>"
},
"meta": null,
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:5>",
"userId": "<id:2>",
"name": "As needed",
"dose": "10mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": true,
"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": "Booster",
"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": 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:7>",
"userId": "<id:2>",
"name": "Course tablet",
"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:2>",
"name": "Daily tablet renamed",
"dose": "20mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": 30,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": false,
"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": true,
"criticalAlarmEnabled": true,
"atcCode": "C09AA05",
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 5,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:8>",
"userId": "<id:2>",
"name": "Record only",
"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": 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:9>",
"userId": "<id:2>",
"name": "Rolling pen",
"dose": "1 pen",
"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": true,
"autoMarkTakenSince": "2026-10-01T06:00:00.000Z",
"deliveryForm": "INJECTION",
"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:10>",
"userId": "<id:2>",
"name": "To delete",
"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": 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>"
}
],
"schedules": [
{
"id": "<id:11>",
"medicationId": "<id:8>",
"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:12>",
"medicationId": "<id:7>",
"windowStart": "08:00",
"windowEnd": "09: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:13>",
"medicationId": "<id:6>",
"windowStart": "09:00",
"windowEnd": "10: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:14>",
"medicationId": "<id:9>",
"windowStart": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 7,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:3>",
"medicationId": "<id:1>",
"windowStart": "11:30",
"windowEnd": "11:30",
"label": "Late morning",
"dose": "10mg",
"unitsPerDose": "2",
"daysOfWeek": null,
"timesOfDay": [
"11:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:15>",
"medicationId": "<id:10>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:4>",
"medicationId": "<id:1>",
"windowStart": "20:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"20:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "21:00",
"start": "19:30",
"timeOfDay": "20:00"
}
]
}
],
"revisions": [
{
"id": "<id:16>",
"medicationId": "<id:1>",
"validFrom": "2026-10-01T06:00:00.000Z",
"validUntil": "<now>",
"payload": [
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "10:00",
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"doseWindows": null,
"windowStart": "08:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
},
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "22:00",
"daysOfWeek": null,
"timesOfDay": [
"20:00"
],
"doseWindows": null,
"windowStart": "20:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
}
],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
}
],
"pauseEras": [
{
"id": "<id:17>",
"medicationId": "<id:1>",
"userId": "<id:2>",
"pausedAt": "<now>",
"resumedAt": "<now>",
"createdAt": "<createdAt>"
}
],
"courses": [
{
"id": "<id:18>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-08-01T00:00:00.000Z",
"endsOn": "2026-08-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:19>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [
{
"id": "<id:20>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"scheduledFor": "2026-10-10T07:00:00.000Z",
"takenAt": "2026-10-10T07:05:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-14T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-15T06:00:00.000Z",
"takenAt": "2026-10-15T06:10:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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-15T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
},
{
"id": "<id:24>",
"userId": "<id:2>",
"medicationId": "<id:8>",
"scheduledFor": "2026-10-16T05:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-16T06:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
}
],
"doseChanges": [],
"inventoryItems": [
{
"id": "<id:26>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"state": "ACTIVE",
"containerType": "OTHER",
"unitsTotal": "4",
"unitsRemaining": "3",
"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": [
{
"medicationId": "<id:9>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [
{
"id": "<id:27>",
"userId": "<id:2>",
"medicationId": "<id:10>",
"nutrient": "magnesium",
"amountPerUnit": 100,
"unit": "mg",
"enteredAmount": null,
"enteredUnit": null,
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:28>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"nutrient": "vitamin_d",
"amountPerUnit": 25,
"unit": "ug",
"enteredAmount": 1000,
"enteredUnit": "IU",
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"audit": [
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"active"
],
"previous": {
"active": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"active"
],
"previous": {
"active": true
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"dose",
"name"
],
"previous": {
"name": "Daily tablet",
"dose": "10mg"
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {},
"replacedCadence": "08:00 FREQ=DAILY | 20:00 FREQ=DAILY",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 2,
"tombstonedFrom": "2026-10-15T18:00:00.000Z",
"tombstonedTo": "2026-10-16T06:00:00.000Z"
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {},
"replacedCadence": "11:30 FREQ=DAILY | 20:00 i2;1,3,5",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 0,
"tombstonedFrom": null,
"tombstonedTo": null
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {}
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,873 @@
{
"status": 200,
"body": {
"data": {
"id": "<id:1>",
"userId": "<id:2>",
"name": "Daily tablet renamed",
"dose": "20mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": 30,
"unitsPerDose": 1,
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "C09AA05",
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 5,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>",
"schedules": [
{
"id": "<id:3>",
"medicationId": "<id:1>",
"windowStart": "11:30",
"windowEnd": "11:30",
"label": "Late morning",
"dose": "10mg",
"unitsPerDose": 2,
"daysOfWeek": null,
"timesOfDay": [
"11:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null,
"resolvedUnitsPerDose": 2
},
{
"id": "<id:4>",
"medicationId": "<id:1>",
"windowStart": "20:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"20:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "21:00",
"start": "19:30",
"timeOfDay": "20:00"
}
],
"resolvedUnitsPerDose": 1
}
],
"category": "OTHER",
"categoryLabel": null,
"courses": [],
"courseCount": 0,
"previousCourseEndedOn": null,
"canStartCourse": false
},
"error": null
},
"events": [
{
"status": 200,
"action": {
"name": "medication.update",
"entity_type": "medication",
"entity_id": "<id:1>"
},
"meta": null,
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:5>",
"userId": "<id:2>",
"name": "As needed",
"dose": "10mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": true,
"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": "Booster",
"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": 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:7>",
"userId": "<id:2>",
"name": "Course tablet",
"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:2>",
"name": "Daily tablet renamed",
"dose": "20mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": 30,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "C09AA05",
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 5,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:8>",
"userId": "<id:2>",
"name": "Record only",
"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": 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:9>",
"userId": "<id:2>",
"name": "Rolling pen",
"dose": "1 pen",
"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": true,
"autoMarkTakenSince": "2026-10-01T06:00:00.000Z",
"deliveryForm": "INJECTION",
"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:10>",
"userId": "<id:2>",
"name": "To delete",
"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": 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>"
}
],
"schedules": [
{
"id": "<id:11>",
"medicationId": "<id:8>",
"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:12>",
"medicationId": "<id:7>",
"windowStart": "08:00",
"windowEnd": "09: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:13>",
"medicationId": "<id:6>",
"windowStart": "09:00",
"windowEnd": "10: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:14>",
"medicationId": "<id:9>",
"windowStart": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 7,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:3>",
"medicationId": "<id:1>",
"windowStart": "11:30",
"windowEnd": "11:30",
"label": "Late morning",
"dose": "10mg",
"unitsPerDose": "2",
"daysOfWeek": null,
"timesOfDay": [
"11:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:15>",
"medicationId": "<id:10>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:4>",
"medicationId": "<id:1>",
"windowStart": "20:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"20:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "21:00",
"start": "19:30",
"timeOfDay": "20:00"
}
]
}
],
"revisions": [
{
"id": "<id:16>",
"medicationId": "<id:1>",
"validFrom": "2026-10-01T06:00:00.000Z",
"validUntil": "<now>",
"payload": [
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "10:00",
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"doseWindows": null,
"windowStart": "08:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
},
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "22:00",
"daysOfWeek": null,
"timesOfDay": [
"20:00"
],
"doseWindows": null,
"windowStart": "20:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
}
],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
}
],
"pauseEras": [
{
"id": "<id:17>",
"medicationId": "<id:1>",
"userId": "<id:2>",
"pausedAt": "<now>",
"resumedAt": "<now>",
"createdAt": "<createdAt>"
}
],
"courses": [
{
"id": "<id:18>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-08-01T00:00:00.000Z",
"endsOn": "2026-08-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:19>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [
{
"id": "<id:20>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"scheduledFor": "2026-10-10T07:00:00.000Z",
"takenAt": "2026-10-10T07:05:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-14T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-15T06:00:00.000Z",
"takenAt": "2026-10-15T06:10:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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-15T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
},
{
"id": "<id:24>",
"userId": "<id:2>",
"medicationId": "<id:8>",
"scheduledFor": "2026-10-16T05:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-16T06:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
}
],
"doseChanges": [],
"inventoryItems": [
{
"id": "<id:26>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"state": "ACTIVE",
"containerType": "OTHER",
"unitsTotal": "4",
"unitsRemaining": "3",
"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": [
{
"medicationId": "<id:9>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [
{
"id": "<id:27>",
"userId": "<id:2>",
"medicationId": "<id:10>",
"nutrient": "magnesium",
"amountPerUnit": 100,
"unit": "mg",
"enteredAmount": null,
"enteredUnit": null,
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:28>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"nutrient": "vitamin_d",
"amountPerUnit": 25,
"unit": "ug",
"enteredAmount": 1000,
"enteredUnit": "IU",
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"audit": [
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"active"
],
"previous": {
"active": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"active"
],
"previous": {
"active": true
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"autoMarkTaken"
],
"previous": {
"autoMarkTaken": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"dose",
"name"
],
"previous": {
"name": "Daily tablet",
"dose": "10mg"
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {},
"replacedCadence": "08:00 FREQ=DAILY | 20:00 FREQ=DAILY",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 2,
"tombstonedFrom": "2026-10-15T18:00:00.000Z",
"tombstonedTo": "2026-10-16T06:00:00.000Z"
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {},
"replacedCadence": "11:30 FREQ=DAILY | 20:00 i2;1,3,5",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 0,
"tombstonedFrom": null,
"tombstonedTo": null
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {}
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,889 @@
{
"status": 200,
"body": {
"data": {
"id": "<id:1>",
"userId": "<id:2>",
"name": "Daily tablet renamed",
"dose": "20mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": 30,
"unitsPerDose": 1,
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "C09AA05",
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 5,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>",
"schedules": [
{
"id": "<id:3>",
"medicationId": "<id:1>",
"windowStart": "11:30",
"windowEnd": "11:30",
"label": "Late morning",
"dose": "10mg",
"unitsPerDose": 2,
"daysOfWeek": null,
"timesOfDay": [
"11:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null,
"resolvedUnitsPerDose": 2
},
{
"id": "<id:4>",
"medicationId": "<id:1>",
"windowStart": "20:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"20:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "21:00",
"start": "19:30",
"timeOfDay": "20:00"
}
],
"resolvedUnitsPerDose": 1
}
],
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"categoryLabel": "Heart and circulation",
"courses": [],
"courseCount": 0,
"previousCourseEndedOn": null,
"canStartCourse": false
},
"error": null
},
"events": [
{
"status": 200,
"action": {
"name": "medication.update",
"entity_type": "medication",
"entity_id": "<id:1>"
},
"meta": null,
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:5>",
"userId": "<id:2>",
"name": "As needed",
"dose": "10mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": true,
"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": "Booster",
"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": 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:7>",
"userId": "<id:2>",
"name": "Course tablet",
"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:2>",
"name": "Daily tablet renamed",
"dose": "20mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": 30,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "C09AA05",
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 5,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:8>",
"userId": "<id:2>",
"name": "Record only",
"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": 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:9>",
"userId": "<id:2>",
"name": "Rolling pen",
"dose": "1 pen",
"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": true,
"autoMarkTakenSince": "2026-10-01T06:00:00.000Z",
"deliveryForm": "INJECTION",
"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:10>",
"userId": "<id:2>",
"name": "To delete",
"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": 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>"
}
],
"schedules": [
{
"id": "<id:11>",
"medicationId": "<id:8>",
"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:12>",
"medicationId": "<id:7>",
"windowStart": "08:00",
"windowEnd": "09: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:13>",
"medicationId": "<id:6>",
"windowStart": "09:00",
"windowEnd": "10: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:14>",
"medicationId": "<id:9>",
"windowStart": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 7,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:3>",
"medicationId": "<id:1>",
"windowStart": "11:30",
"windowEnd": "11:30",
"label": "Late morning",
"dose": "10mg",
"unitsPerDose": "2",
"daysOfWeek": null,
"timesOfDay": [
"11:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:15>",
"medicationId": "<id:10>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:4>",
"medicationId": "<id:1>",
"windowStart": "20:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"20:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "21:00",
"start": "19:30",
"timeOfDay": "20:00"
}
]
}
],
"revisions": [
{
"id": "<id:16>",
"medicationId": "<id:1>",
"validFrom": "2026-10-01T06:00:00.000Z",
"validUntil": "<now>",
"payload": [
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "10:00",
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"doseWindows": null,
"windowStart": "08:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
},
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "22:00",
"daysOfWeek": null,
"timesOfDay": [
"20:00"
],
"doseWindows": null,
"windowStart": "20:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
}
],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
}
],
"pauseEras": [
{
"id": "<id:17>",
"medicationId": "<id:1>",
"userId": "<id:2>",
"pausedAt": "<now>",
"resumedAt": "<now>",
"createdAt": "<createdAt>"
}
],
"courses": [
{
"id": "<id:18>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-08-01T00:00:00.000Z",
"endsOn": "2026-08-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:19>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [
{
"id": "<id:20>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"scheduledFor": "2026-10-10T07:00:00.000Z",
"takenAt": "2026-10-10T07:05:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-14T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-15T06:00:00.000Z",
"takenAt": "2026-10-15T06:10:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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-15T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
},
{
"id": "<id:24>",
"userId": "<id:2>",
"medicationId": "<id:8>",
"scheduledFor": "2026-10-16T05:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-16T06:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
}
],
"doseChanges": [],
"inventoryItems": [
{
"id": "<id:26>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"state": "ACTIVE",
"containerType": "OTHER",
"unitsTotal": "4",
"unitsRemaining": "3",
"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": [
{
"medicationId": "<id:9>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:1>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [
{
"id": "<id:27>",
"userId": "<id:2>",
"medicationId": "<id:10>",
"nutrient": "magnesium",
"amountPerUnit": 100,
"unit": "mg",
"enteredAmount": null,
"enteredUnit": null,
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:28>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"nutrient": "vitamin_d",
"amountPerUnit": 25,
"unit": "ug",
"enteredAmount": 1000,
"enteredUnit": "IU",
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"audit": [
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"active"
],
"previous": {
"active": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"active"
],
"previous": {
"active": true
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"autoMarkTaken"
],
"previous": {
"autoMarkTaken": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"dose",
"name"
],
"previous": {
"name": "Daily tablet",
"dose": "10mg"
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {},
"replacedCadence": "08:00 FREQ=DAILY | 20:00 FREQ=DAILY",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 2,
"tombstonedFrom": "2026-10-15T18:00:00.000Z",
"tombstonedTo": "2026-10-16T06:00:00.000Z"
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {},
"replacedCadence": "11:30 FREQ=DAILY | 20:00 i2;1,3,5",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 0,
"tombstonedFrom": null,
"tombstonedTo": null
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {}
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,902 @@
{
"status": 200,
"body": {
"data": {
"id": "<id:1>",
"userId": "<id:2>",
"name": "Daily tablet renamed",
"dose": "20mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": 30,
"unitsPerDose": 1,
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "C09AA05",
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 5,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>",
"schedules": [
{
"id": "<id:3>",
"medicationId": "<id:1>",
"windowStart": "11:30",
"windowEnd": "11:30",
"label": "Late morning",
"dose": "10mg",
"unitsPerDose": 2,
"daysOfWeek": null,
"timesOfDay": [
"11:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null,
"resolvedUnitsPerDose": 2
},
{
"id": "<id:4>",
"medicationId": "<id:1>",
"windowStart": "20:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"20:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "21:00",
"start": "19:30",
"timeOfDay": "20:00"
}
],
"resolvedUnitsPerDose": 1
}
],
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"categoryLabel": "Heart and circulation",
"courses": [],
"courseCount": 0,
"previousCourseEndedOn": null,
"canStartCourse": false
},
"error": null
},
"events": [
{
"status": 200,
"action": {
"name": "medication.update",
"entity_type": "medication",
"entity_id": "<id:1>"
},
"meta": {
"entity_id": "<id:1>"
},
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:5>",
"userId": "<id:2>",
"name": "As needed",
"dose": "10mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": true,
"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": "Booster",
"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": 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:7>",
"userId": "<id:2>",
"name": "Course tablet",
"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:2>",
"name": "Daily tablet renamed",
"dose": "20mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": 30,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "C09AA05",
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 5,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:8>",
"userId": "<id:2>",
"name": "Record only",
"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": 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:9>",
"userId": "<id:2>",
"name": "Rolling pen",
"dose": "1 pen",
"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": true,
"autoMarkTakenSince": "2026-10-01T06:00:00.000Z",
"deliveryForm": "INJECTION",
"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:10>",
"userId": "<id:2>",
"name": "To delete",
"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": 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>"
}
],
"schedules": [
{
"id": "<id:11>",
"medicationId": "<id:8>",
"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:12>",
"medicationId": "<id:7>",
"windowStart": "08:00",
"windowEnd": "09: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:13>",
"medicationId": "<id:6>",
"windowStart": "09:00",
"windowEnd": "10: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:14>",
"medicationId": "<id:9>",
"windowStart": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 7,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:3>",
"medicationId": "<id:1>",
"windowStart": "11:30",
"windowEnd": "11:30",
"label": "Late morning",
"dose": "10mg",
"unitsPerDose": "2",
"daysOfWeek": null,
"timesOfDay": [
"11:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:15>",
"medicationId": "<id:10>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:4>",
"medicationId": "<id:1>",
"windowStart": "20:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"20:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "21:00",
"start": "19:30",
"timeOfDay": "20:00"
}
]
}
],
"revisions": [
{
"id": "<id:16>",
"medicationId": "<id:1>",
"validFrom": "2026-10-01T06:00:00.000Z",
"validUntil": "<now>",
"payload": [
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "10:00",
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"doseWindows": null,
"windowStart": "08:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
},
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "22:00",
"daysOfWeek": null,
"timesOfDay": [
"20:00"
],
"doseWindows": null,
"windowStart": "20:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
}
],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
}
],
"pauseEras": [
{
"id": "<id:17>",
"medicationId": "<id:1>",
"userId": "<id:2>",
"pausedAt": "<now>",
"resumedAt": "<now>",
"createdAt": "<createdAt>"
}
],
"courses": [
{
"id": "<id:18>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-08-01T00:00:00.000Z",
"endsOn": "2026-08-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:19>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [
{
"id": "<id:20>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"scheduledFor": "2026-10-10T07:00:00.000Z",
"takenAt": "2026-10-10T07:05:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-14T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-15T06:00:00.000Z",
"takenAt": "2026-10-15T06:10:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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-15T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
},
{
"id": "<id:24>",
"userId": "<id:2>",
"medicationId": "<id:8>",
"scheduledFor": "2026-10-16T05:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-16T06:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
}
],
"doseChanges": [],
"inventoryItems": [
{
"id": "<id:26>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"state": "ACTIVE",
"containerType": "OTHER",
"unitsTotal": "4",
"unitsRemaining": "3",
"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": [
{
"medicationId": "<id:9>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:1>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [
{
"id": "<id:27>",
"userId": "<id:2>",
"medicationId": "<id:10>",
"nutrient": "magnesium",
"amountPerUnit": 100,
"unit": "mg",
"enteredAmount": null,
"enteredUnit": null,
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:28>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"nutrient": "vitamin_d",
"amountPerUnit": 25,
"unit": "ug",
"enteredAmount": 1000,
"enteredUnit": "IU",
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"audit": [
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"active"
],
"previous": {
"active": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"active"
],
"previous": {
"active": true
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"autoMarkTaken"
],
"previous": {
"autoMarkTaken": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"dose",
"name"
],
"previous": {
"name": "Daily tablet",
"dose": "10mg"
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {},
"replacedCadence": "08:00 FREQ=DAILY | 20:00 FREQ=DAILY",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 2,
"tombstonedFrom": "2026-10-15T18:00:00.000Z",
"tombstonedTo": "2026-10-16T06:00:00.000Z"
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {},
"replacedCadence": "11:30 FREQ=DAILY | 20:00 i2;1,3,5",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 0,
"tombstonedFrom": null,
"tombstonedTo": null
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {}
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,911 @@
{
"status": 200,
"body": {
"data": {
"id": "<id:1>",
"userId": "<id:2>",
"name": "Daily tablet renamed",
"dose": "20mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": 30,
"unitsPerDose": 1,
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "C09AA05",
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 5,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>",
"schedules": [
{
"id": "<id:3>",
"medicationId": "<id:1>",
"windowStart": "11:30",
"windowEnd": "11:30",
"label": "Late morning",
"dose": "10mg",
"unitsPerDose": 2,
"daysOfWeek": null,
"timesOfDay": [
"11:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null,
"resolvedUnitsPerDose": 2
},
{
"id": "<id:4>",
"medicationId": "<id:1>",
"windowStart": "20:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"20:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "21:00",
"start": "19:30",
"timeOfDay": "20:00"
}
],
"resolvedUnitsPerDose": 1
}
],
"category": "OTHER",
"categoryLabel": null,
"courses": [],
"courseCount": 0,
"previousCourseEndedOn": null,
"canStartCourse": false
},
"error": null
},
"events": [
{
"status": 200,
"action": {
"name": "medication.update",
"entity_type": "medication",
"entity_id": "<id:1>"
},
"meta": null,
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:5>",
"userId": "<id:2>",
"name": "As needed",
"dose": "10mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": true,
"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": "Booster",
"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": 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:7>",
"userId": "<id:2>",
"name": "Course tablet",
"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:2>",
"name": "Daily tablet renamed",
"dose": "20mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": 30,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "C09AA05",
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 5,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:8>",
"userId": "<id:2>",
"name": "Record only",
"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": 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:9>",
"userId": "<id:2>",
"name": "Rolling pen",
"dose": "1 pen",
"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": true,
"autoMarkTakenSince": "2026-10-01T06:00:00.000Z",
"deliveryForm": "INJECTION",
"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:10>",
"userId": "<id:2>",
"name": "To delete",
"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": 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>"
}
],
"schedules": [
{
"id": "<id:11>",
"medicationId": "<id:8>",
"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:12>",
"medicationId": "<id:7>",
"windowStart": "08:00",
"windowEnd": "09: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:13>",
"medicationId": "<id:6>",
"windowStart": "09:00",
"windowEnd": "10: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:14>",
"medicationId": "<id:9>",
"windowStart": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 7,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:3>",
"medicationId": "<id:1>",
"windowStart": "11:30",
"windowEnd": "11:30",
"label": "Late morning",
"dose": "10mg",
"unitsPerDose": "2",
"daysOfWeek": null,
"timesOfDay": [
"11:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:15>",
"medicationId": "<id:10>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:4>",
"medicationId": "<id:1>",
"windowStart": "20:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"20:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "21:00",
"start": "19:30",
"timeOfDay": "20:00"
}
]
}
],
"revisions": [
{
"id": "<id:16>",
"medicationId": "<id:1>",
"validFrom": "2026-10-01T06:00:00.000Z",
"validUntil": "<now>",
"payload": [
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "10:00",
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"doseWindows": null,
"windowStart": "08:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
},
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "22:00",
"daysOfWeek": null,
"timesOfDay": [
"20:00"
],
"doseWindows": null,
"windowStart": "20:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
}
],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
}
],
"pauseEras": [
{
"id": "<id:17>",
"medicationId": "<id:1>",
"userId": "<id:2>",
"pausedAt": "<now>",
"resumedAt": "<now>",
"createdAt": "<createdAt>"
}
],
"courses": [
{
"id": "<id:18>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-08-01T00:00:00.000Z",
"endsOn": "2026-08-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:19>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [
{
"id": "<id:20>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"scheduledFor": "2026-10-10T07:00:00.000Z",
"takenAt": "2026-10-10T07:05:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-14T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-15T06:00:00.000Z",
"takenAt": "2026-10-15T06:10:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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-15T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
},
{
"id": "<id:24>",
"userId": "<id:2>",
"medicationId": "<id:8>",
"scheduledFor": "2026-10-16T05:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:1>",
"scheduledFor": "2026-10-16T06:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
}
],
"doseChanges": [],
"inventoryItems": [
{
"id": "<id:26>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"state": "ACTIVE",
"containerType": "OTHER",
"unitsTotal": "4",
"unitsRemaining": "3",
"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": [
{
"medicationId": "<id:1>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:9>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [
{
"id": "<id:27>",
"userId": "<id:2>",
"medicationId": "<id:10>",
"nutrient": "magnesium",
"amountPerUnit": 100,
"unit": "mg",
"enteredAmount": null,
"enteredUnit": null,
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:28>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"nutrient": "vitamin_d",
"amountPerUnit": 25,
"unit": "ug",
"enteredAmount": 1000,
"enteredUnit": "IU",
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"audit": [
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"active"
],
"previous": {
"active": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"active"
],
"previous": {
"active": true
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"autoMarkTaken"
],
"previous": {
"autoMarkTaken": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"dose",
"name"
],
"previous": {
"name": "Daily tablet",
"dose": "10mg"
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {},
"replacedCadence": "08:00 FREQ=DAILY | 20:00 FREQ=DAILY",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 2,
"tombstonedFrom": "2026-10-15T18:00:00.000Z",
"tombstonedTo": "2026-10-16T06:00:00.000Z"
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {},
"replacedCadence": "11:30 FREQ=DAILY | 20:00 i2;1,3,5",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 0,
"tombstonedFrom": null,
"tombstonedTo": null
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [],
"previous": {}
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,822 @@
{
"status": 422,
"body": {
"data": null,
"error": "Unknown medication category",
"meta": {
"errorCode": "medications.category.unknown",
"requestId": "<requestId>"
}
},
"events": [
{
"status": 422,
"action": null,
"meta": null,
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:1>",
"userId": "<id:2>",
"name": "As needed",
"dose": "10mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": true,
"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": "Booster",
"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": 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:2>",
"name": "Course tablet",
"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": "Daily tablet renamed",
"dose": "20mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": 30,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "C09AA05",
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 5,
"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": "2026-10-01T00:00:00.000Z",
"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": "Rolling pen",
"dose": "1 pen",
"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": true,
"autoMarkTakenSince": "2026-10-01T06:00:00.000Z",
"deliveryForm": "INJECTION",
"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:2>",
"name": "To delete",
"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": 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>"
}
],
"schedules": [
{
"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:4>",
"windowStart": "08:00",
"windowEnd": "09: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:3>",
"windowStart": "09:00",
"windowEnd": "10: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": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 7,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:13>",
"medicationId": "<id:5>",
"windowStart": "11:30",
"windowEnd": "11:30",
"label": "Late morning",
"dose": "10mg",
"unitsPerDose": "2",
"daysOfWeek": null,
"timesOfDay": [
"11:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:14>",
"medicationId": "<id:8>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12: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": "i2;1,3,5",
"timesOfDay": [
"20:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "21:00",
"start": "19:30",
"timeOfDay": "20:00"
}
]
}
],
"revisions": [
{
"id": "<id:16>",
"medicationId": "<id:5>",
"validFrom": "2026-10-01T06:00:00.000Z",
"validUntil": "<now>",
"payload": [
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "10:00",
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"doseWindows": null,
"windowStart": "08:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
},
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "22:00",
"daysOfWeek": null,
"timesOfDay": [
"20:00"
],
"doseWindows": null,
"windowStart": "20:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
}
],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
}
],
"pauseEras": [
{
"id": "<id:17>",
"medicationId": "<id:5>",
"userId": "<id:2>",
"pausedAt": "<now>",
"resumedAt": "<now>",
"createdAt": "<createdAt>"
}
],
"courses": [
{
"id": "<id:18>",
"medicationId": "<id:4>",
"userId": "<id:2>",
"startsOn": "2026-08-01T00:00:00.000Z",
"endsOn": "2026-08-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:19>",
"medicationId": "<id:4>",
"userId": "<id:2>",
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [
{
"id": "<id:20>",
"userId": "<id:2>",
"medicationId": "<id:7>",
"scheduledFor": "2026-10-10T07:00:00.000Z",
"takenAt": "2026-10-10T07:05:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:5>",
"scheduledFor": "2026-10-14T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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-15T06:00:00.000Z",
"takenAt": "2026-10-15T06:10:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:5>",
"scheduledFor": "2026-10-15T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
},
{
"id": "<id:24>",
"userId": "<id:2>",
"medicationId": "<id:6>",
"scheduledFor": "2026-10-16T05:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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-16T06:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
}
],
"doseChanges": [],
"inventoryItems": [
{
"id": "<id:26>",
"userId": "<id:2>",
"medicationId": "<id:7>",
"state": "ACTIVE",
"containerType": "OTHER",
"unitsTotal": "4",
"unitsRemaining": "3",
"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": [
{
"medicationId": "<id:5>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:7>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [
{
"id": "<id:27>",
"userId": "<id:2>",
"medicationId": "<id:8>",
"nutrient": "magnesium",
"amountPerUnit": 100,
"unit": "mg",
"enteredAmount": null,
"enteredUnit": null,
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:28>",
"userId": "<id:2>",
"medicationId": "<id:7>",
"nutrient": "vitamin_d",
"amountPerUnit": 25,
"unit": "ug",
"enteredAmount": 1000,
"enteredUnit": "IU",
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"audit": [
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [
"active"
],
"previous": {
"active": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [
"active"
],
"previous": {
"active": true
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [
"autoMarkTaken"
],
"previous": {
"autoMarkTaken": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [
"dose",
"name"
],
"previous": {
"name": "Daily tablet",
"dose": "10mg"
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {},
"replacedCadence": "08:00 FREQ=DAILY | 20:00 FREQ=DAILY",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 2,
"tombstonedFrom": "2026-10-15T18:00:00.000Z",
"tombstonedTo": "2026-10-16T06:00:00.000Z"
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {},
"replacedCadence": "11:30 FREQ=DAILY | 20:00 i2;1,3,5",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 0,
"tombstonedFrom": null,
"tombstonedTo": null
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {}
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,904 @@
{
"status": 200,
"body": {
"data": {
"id": "<id:1>",
"userId": "<id:2>",
"name": "Record only renamed",
"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": 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>",
"schedules": [],
"recordedSchedules": [
{
"id": "<id:3>",
"medicationId": "<id:1>",
"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,
"resolvedUnitsPerDose": 1
}
],
"category": "OTHER",
"categoryLabel": null,
"courses": [],
"courseCount": 0,
"previousCourseEndedOn": null,
"canStartCourse": false
},
"error": null
},
"events": [
{
"status": 200,
"action": {
"name": "medication.update",
"entity_type": "medication",
"entity_id": "<id:1>"
},
"meta": {
"dropped_schedules": true,
"dropped_as_needed": false,
"dropped_one_shot": true
},
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:4>",
"userId": "<id:2>",
"name": "As needed",
"dose": "10mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": true,
"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": "Booster",
"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": 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": "Course tablet",
"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:7>",
"userId": "<id:2>",
"name": "Daily tablet renamed",
"dose": "20mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": 30,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "C09AA05",
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 5,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:1>",
"userId": "<id:2>",
"name": "Record only renamed",
"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": 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:2>",
"name": "Rolling pen",
"dose": "1 pen",
"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": true,
"autoMarkTakenSince": "2026-10-01T06:00:00.000Z",
"deliveryForm": "INJECTION",
"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:9>",
"userId": "<id:2>",
"name": "To delete",
"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": 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>"
}
],
"schedules": [
{
"id": "<id:3>",
"medicationId": "<id:1>",
"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:6>",
"windowStart": "08:00",
"windowEnd": "09: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": "10: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:8>",
"windowStart": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 7,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:13>",
"medicationId": "<id:7>",
"windowStart": "11:30",
"windowEnd": "11:30",
"label": "Late morning",
"dose": "10mg",
"unitsPerDose": "2",
"daysOfWeek": null,
"timesOfDay": [
"11:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:14>",
"medicationId": "<id:9>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:15>",
"medicationId": "<id:7>",
"windowStart": "20:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"20:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "21:00",
"start": "19:30",
"timeOfDay": "20:00"
}
]
}
],
"revisions": [
{
"id": "<id:16>",
"medicationId": "<id:7>",
"validFrom": "2026-10-01T06:00:00.000Z",
"validUntil": "<now>",
"payload": [
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "10:00",
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"doseWindows": null,
"windowStart": "08:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
},
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "22:00",
"daysOfWeek": null,
"timesOfDay": [
"20:00"
],
"doseWindows": null,
"windowStart": "20:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
}
],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
}
],
"pauseEras": [
{
"id": "<id:17>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"pausedAt": "<now>",
"resumedAt": "<now>",
"createdAt": "<createdAt>"
}
],
"courses": [
{
"id": "<id:18>",
"medicationId": "<id:6>",
"userId": "<id:2>",
"startsOn": "2026-08-01T00:00:00.000Z",
"endsOn": "2026-08-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:19>",
"medicationId": "<id:6>",
"userId": "<id:2>",
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [
{
"id": "<id:20>",
"userId": "<id:2>",
"medicationId": "<id:8>",
"scheduledFor": "2026-10-10T07:00:00.000Z",
"takenAt": "2026-10-10T07:05:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:7>",
"scheduledFor": "2026-10-14T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:7>",
"scheduledFor": "2026-10-15T06:00:00.000Z",
"takenAt": "2026-10-15T06:10:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:7>",
"scheduledFor": "2026-10-15T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
},
{
"id": "<id:24>",
"userId": "<id:2>",
"medicationId": "<id:1>",
"scheduledFor": "2026-10-16T05:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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-16T06:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
}
],
"doseChanges": [],
"inventoryItems": [
{
"id": "<id:26>",
"userId": "<id:2>",
"medicationId": "<id:8>",
"state": "ACTIVE",
"containerType": "OTHER",
"unitsTotal": "4",
"unitsRemaining": "3",
"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": [
{
"medicationId": "<id:7>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:8>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [
{
"id": "<id:27>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"nutrient": "magnesium",
"amountPerUnit": 100,
"unit": "mg",
"enteredAmount": null,
"enteredUnit": null,
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:28>",
"userId": "<id:2>",
"medicationId": "<id:8>",
"nutrient": "vitamin_d",
"amountPerUnit": 25,
"unit": "ug",
"enteredAmount": 1000,
"enteredUnit": "IU",
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"audit": [
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [
"active"
],
"previous": {
"active": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [
"active"
],
"previous": {
"active": true
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [
"autoMarkTaken"
],
"previous": {
"autoMarkTaken": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [
"dose",
"name"
],
"previous": {
"name": "Daily tablet",
"dose": "10mg"
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"name"
],
"previous": {
"name": "Record only"
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [],
"previous": {},
"replacedCadence": "08:00 FREQ=DAILY | 20:00 FREQ=DAILY",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 2,
"tombstonedFrom": "2026-10-15T18:00:00.000Z",
"tombstonedTo": "2026-10-16T06:00:00.000Z"
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [],
"previous": {},
"replacedCadence": "11:30 FREQ=DAILY | 20:00 i2;1,3,5",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 0,
"tombstonedFrom": null,
"tombstonedTo": null
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [],
"previous": {}
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,927 @@
{
"status": 200,
"body": {
"data": {
"id": "<id:1>",
"userId": "<id:2>",
"name": "Record only renamed",
"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>",
"schedules": [
{
"id": "<id:3>",
"medicationId": "<id:1>",
"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,
"resolvedUnitsPerDose": 1
}
],
"category": "OTHER",
"categoryLabel": null,
"courses": [],
"courseCount": 0,
"previousCourseEndedOn": null,
"canStartCourse": false
},
"error": null
},
"events": [
{
"status": 200,
"action": {
"name": "medication.update",
"entity_type": "medication",
"entity_id": "<id:1>"
},
"meta": {
"schedule_revision_rows": 0,
"track_intake": true
},
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:4>",
"userId": "<id:2>",
"name": "As needed",
"dose": "10mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": true,
"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": "Booster",
"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": 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": "Course tablet",
"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:7>",
"userId": "<id:2>",
"name": "Daily tablet renamed",
"dose": "20mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": 30,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "C09AA05",
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 5,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:1>",
"userId": "<id:2>",
"name": "Record only renamed",
"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:8>",
"userId": "<id:2>",
"name": "Rolling pen",
"dose": "1 pen",
"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": true,
"autoMarkTakenSince": "2026-10-01T06:00:00.000Z",
"deliveryForm": "INJECTION",
"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:9>",
"userId": "<id:2>",
"name": "To delete",
"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": 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>"
}
],
"schedules": [
{
"id": "<id:3>",
"medicationId": "<id:1>",
"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:6>",
"windowStart": "08:00",
"windowEnd": "09: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": "10: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:8>",
"windowStart": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 7,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:13>",
"medicationId": "<id:7>",
"windowStart": "11:30",
"windowEnd": "11:30",
"label": "Late morning",
"dose": "10mg",
"unitsPerDose": "2",
"daysOfWeek": null,
"timesOfDay": [
"11:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:14>",
"medicationId": "<id:9>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:15>",
"medicationId": "<id:7>",
"windowStart": "20:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"20:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "21:00",
"start": "19:30",
"timeOfDay": "20:00"
}
]
}
],
"revisions": [
{
"id": "<id:16>",
"medicationId": "<id:1>",
"validFrom": "2026-10-01T06:00:00.000Z",
"validUntil": "<now>",
"payload": [],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
},
{
"id": "<id:17>",
"medicationId": "<id:7>",
"validFrom": "2026-10-01T06:00:00.000Z",
"validUntil": "<now>",
"payload": [
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "10:00",
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"doseWindows": null,
"windowStart": "08:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
},
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "22:00",
"daysOfWeek": null,
"timesOfDay": [
"20:00"
],
"doseWindows": null,
"windowStart": "20:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
}
],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
}
],
"pauseEras": [
{
"id": "<id:18>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"pausedAt": "<now>",
"resumedAt": "<now>",
"createdAt": "<createdAt>"
}
],
"courses": [
{
"id": "<id:19>",
"medicationId": "<id:6>",
"userId": "<id:2>",
"startsOn": "2026-08-01T00:00:00.000Z",
"endsOn": "2026-08-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:20>",
"medicationId": "<id:6>",
"userId": "<id:2>",
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [
{
"id": "<id:21>",
"userId": "<id:2>",
"medicationId": "<id:8>",
"scheduledFor": "2026-10-10T07:00:00.000Z",
"takenAt": "2026-10-10T07:05:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:7>",
"scheduledFor": "2026-10-14T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:7>",
"scheduledFor": "2026-10-15T06:00:00.000Z",
"takenAt": "2026-10-15T06:10:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:7>",
"scheduledFor": "2026-10-15T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
},
{
"id": "<id:25>",
"userId": "<id:2>",
"medicationId": "<id:1>",
"scheduledFor": "2026-10-16T05:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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-16T06:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
}
],
"doseChanges": [],
"inventoryItems": [
{
"id": "<id:27>",
"userId": "<id:2>",
"medicationId": "<id:8>",
"state": "ACTIVE",
"containerType": "OTHER",
"unitsTotal": "4",
"unitsRemaining": "3",
"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": [
{
"medicationId": "<id:7>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:8>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [
{
"id": "<id:28>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"nutrient": "magnesium",
"amountPerUnit": 100,
"unit": "mg",
"enteredAmount": null,
"enteredUnit": null,
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:29>",
"userId": "<id:2>",
"medicationId": "<id:8>",
"nutrient": "vitamin_d",
"amountPerUnit": 25,
"unit": "ug",
"enteredAmount": 1000,
"enteredUnit": "IU",
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"audit": [
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [
"active"
],
"previous": {
"active": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [
"active"
],
"previous": {
"active": true
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [
"autoMarkTaken"
],
"previous": {
"autoMarkTaken": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [
"dose",
"name"
],
"previous": {
"name": "Daily tablet",
"dose": "10mg"
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"name"
],
"previous": {
"name": "Record only"
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"trackIntake"
],
"previous": {
"trackIntake": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [],
"previous": {},
"replacedCadence": "08:00 FREQ=DAILY | 20:00 FREQ=DAILY",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 2,
"tombstonedFrom": "2026-10-15T18:00:00.000Z",
"tombstonedTo": "2026-10-16T06:00:00.000Z"
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [],
"previous": {},
"replacedCadence": "11:30 FREQ=DAILY | 20:00 i2;1,3,5",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 0,
"tombstonedFrom": null,
"tombstonedTo": null
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [],
"previous": {}
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,971 @@
{
"status": 200,
"body": {
"data": {
"id": "<id:1>",
"userId": "<id:2>",
"name": "Record only renamed",
"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": 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>",
"schedules": [],
"recordedSchedules": [
{
"id": "<id:3>",
"medicationId": "<id:1>",
"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,
"resolvedUnitsPerDose": 1
}
],
"category": "OTHER",
"categoryLabel": null,
"courses": [],
"courseCount": 0,
"previousCourseEndedOn": null,
"canStartCourse": false
},
"error": null
},
"events": [
{
"status": 200,
"action": {
"name": "medication.update",
"entity_type": "medication",
"entity_id": "<id:1>"
},
"meta": {
"schedule_revision_rows": 1,
"track_intake": false
},
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:4>",
"userId": "<id:2>",
"name": "As needed",
"dose": "10mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": true,
"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": "Booster",
"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": 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": "Course tablet",
"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:7>",
"userId": "<id:2>",
"name": "Daily tablet renamed",
"dose": "20mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": 30,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "C09AA05",
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 5,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:1>",
"userId": "<id:2>",
"name": "Record only renamed",
"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": 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:2>",
"name": "Rolling pen",
"dose": "1 pen",
"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": true,
"autoMarkTakenSince": "2026-10-01T06:00:00.000Z",
"deliveryForm": "INJECTION",
"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:9>",
"userId": "<id:2>",
"name": "To delete",
"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": 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>"
}
],
"schedules": [
{
"id": "<id:3>",
"medicationId": "<id:1>",
"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:6>",
"windowStart": "08:00",
"windowEnd": "09: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": "10: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:8>",
"windowStart": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 7,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:13>",
"medicationId": "<id:7>",
"windowStart": "11:30",
"windowEnd": "11:30",
"label": "Late morning",
"dose": "10mg",
"unitsPerDose": "2",
"daysOfWeek": null,
"timesOfDay": [
"11:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:14>",
"medicationId": "<id:9>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:15>",
"medicationId": "<id:7>",
"windowStart": "20:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"20:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "21:00",
"start": "19:30",
"timeOfDay": "20:00"
}
]
}
],
"revisions": [
{
"id": "<id:16>",
"medicationId": "<id:1>",
"validFrom": "2026-10-01T06:00:00.000Z",
"validUntil": "<now>",
"payload": [],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
},
{
"id": "<id:17>",
"medicationId": "<id:7>",
"validFrom": "2026-10-01T06:00:00.000Z",
"validUntil": "<now>",
"payload": [
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "10:00",
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"doseWindows": null,
"windowStart": "08:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
},
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "22:00",
"daysOfWeek": null,
"timesOfDay": [
"20:00"
],
"doseWindows": null,
"windowStart": "20:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
}
],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
},
{
"id": "<id:18>",
"medicationId": "<id:1>",
"validFrom": "<now>",
"validUntil": "<now>",
"payload": [
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "08:00",
"daysOfWeek": null,
"timesOfDay": [
"07:00"
],
"doseWindows": null,
"windowStart": "07:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
}
],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
}
],
"pauseEras": [
{
"id": "<id:19>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"pausedAt": "<now>",
"resumedAt": "<now>",
"createdAt": "<createdAt>"
}
],
"courses": [
{
"id": "<id:20>",
"medicationId": "<id:6>",
"userId": "<id:2>",
"startsOn": "2026-08-01T00:00:00.000Z",
"endsOn": "2026-08-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:21>",
"medicationId": "<id:6>",
"userId": "<id:2>",
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [
{
"id": "<id:22>",
"userId": "<id:2>",
"medicationId": "<id:8>",
"scheduledFor": "2026-10-10T07:00:00.000Z",
"takenAt": "2026-10-10T07:05:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:7>",
"scheduledFor": "2026-10-14T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:7>",
"scheduledFor": "2026-10-15T06:00:00.000Z",
"takenAt": "2026-10-15T06:10:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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-15T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
},
{
"id": "<id:26>",
"userId": "<id:2>",
"medicationId": "<id:1>",
"scheduledFor": "2026-10-16T05:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
},
{
"id": "<id:27>",
"userId": "<id:2>",
"medicationId": "<id:7>",
"scheduledFor": "2026-10-16T06:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
}
],
"doseChanges": [],
"inventoryItems": [
{
"id": "<id:28>",
"userId": "<id:2>",
"medicationId": "<id:8>",
"state": "ACTIVE",
"containerType": "OTHER",
"unitsTotal": "4",
"unitsRemaining": "3",
"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": [
{
"medicationId": "<id:7>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:8>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [
{
"id": "<id:29>",
"userId": "<id:2>",
"medicationId": "<id:9>",
"nutrient": "magnesium",
"amountPerUnit": 100,
"unit": "mg",
"enteredAmount": null,
"enteredUnit": null,
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:30>",
"userId": "<id:2>",
"medicationId": "<id:8>",
"nutrient": "vitamin_d",
"amountPerUnit": 25,
"unit": "ug",
"enteredAmount": 1000,
"enteredUnit": "IU",
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"audit": [
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [
"active"
],
"previous": {
"active": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [
"active"
],
"previous": {
"active": true
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [
"autoMarkTaken"
],
"previous": {
"autoMarkTaken": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [
"dose",
"name"
],
"previous": {
"name": "Daily tablet",
"dose": "10mg"
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"name"
],
"previous": {
"name": "Record only"
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"trackIntake"
],
"previous": {
"trackIntake": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"trackIntake"
],
"previous": {
"trackIntake": true
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [],
"previous": {},
"replacedCadence": "08:00 FREQ=DAILY | 20:00 FREQ=DAILY",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 2,
"tombstonedFrom": "2026-10-15T18:00:00.000Z",
"tombstonedTo": "2026-10-16T06:00:00.000Z"
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [],
"previous": {},
"replacedCadence": "11:30 FREQ=DAILY | 20:00 i2;1,3,5",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 0,
"tombstonedFrom": null,
"tombstonedTo": null
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"fields": [],
"previous": {}
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,905 @@
{
"status": 422,
"body": {
"data": null,
"error": "A scheduled medication requires at least one schedule",
"meta": {
"errorCode": "http.invalid",
"requestId": "<requestId>"
}
},
"events": [
{
"status": 422,
"action": null,
"meta": null,
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:1>",
"userId": "<id:2>",
"name": "As needed",
"dose": "10mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": true,
"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": "Booster",
"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": 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:2>",
"name": "Course tablet",
"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": "Daily tablet renamed",
"dose": "20mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": 30,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "C09AA05",
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 5,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:6>",
"userId": "<id:2>",
"name": "Record only renamed",
"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": 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": "Rolling pen",
"dose": "1 pen",
"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": true,
"autoMarkTakenSince": "2026-10-01T06:00:00.000Z",
"deliveryForm": "INJECTION",
"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:2>",
"name": "To delete",
"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": 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>"
}
],
"schedules": [
{
"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:4>",
"windowStart": "08:00",
"windowEnd": "09: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:3>",
"windowStart": "09:00",
"windowEnd": "10: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": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 7,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:13>",
"medicationId": "<id:5>",
"windowStart": "11:30",
"windowEnd": "11:30",
"label": "Late morning",
"dose": "10mg",
"unitsPerDose": "2",
"daysOfWeek": null,
"timesOfDay": [
"11:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:14>",
"medicationId": "<id:8>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12: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": "i2;1,3,5",
"timesOfDay": [
"20:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "21:00",
"start": "19:30",
"timeOfDay": "20:00"
}
]
}
],
"revisions": [
{
"id": "<id:16>",
"medicationId": "<id:6>",
"validFrom": "2026-10-01T06:00:00.000Z",
"validUntil": "<now>",
"payload": [],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
},
{
"id": "<id:17>",
"medicationId": "<id:5>",
"validFrom": "2026-10-01T06:00:00.000Z",
"validUntil": "<now>",
"payload": [
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "10:00",
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"doseWindows": null,
"windowStart": "08:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
},
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "22:00",
"daysOfWeek": null,
"timesOfDay": [
"20:00"
],
"doseWindows": null,
"windowStart": "20:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
}
],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
},
{
"id": "<id:18>",
"medicationId": "<id:6>",
"validFrom": "<now>",
"validUntil": "<now>",
"payload": [
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "08:00",
"daysOfWeek": null,
"timesOfDay": [
"07:00"
],
"doseWindows": null,
"windowStart": "07:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
}
],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
}
],
"pauseEras": [
{
"id": "<id:19>",
"medicationId": "<id:5>",
"userId": "<id:2>",
"pausedAt": "<now>",
"resumedAt": "<now>",
"createdAt": "<createdAt>"
}
],
"courses": [
{
"id": "<id:20>",
"medicationId": "<id:4>",
"userId": "<id:2>",
"startsOn": "2026-08-01T00:00:00.000Z",
"endsOn": "2026-08-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:21>",
"medicationId": "<id:4>",
"userId": "<id:2>",
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [
{
"id": "<id:22>",
"userId": "<id:2>",
"medicationId": "<id:7>",
"scheduledFor": "2026-10-10T07:00:00.000Z",
"takenAt": "2026-10-10T07:05:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:5>",
"scheduledFor": "2026-10-14T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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:5>",
"scheduledFor": "2026-10-15T06:00:00.000Z",
"takenAt": "2026-10-15T06:10:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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-15T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
},
{
"id": "<id:26>",
"userId": "<id:2>",
"medicationId": "<id:6>",
"scheduledFor": "2026-10-16T05:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
},
{
"id": "<id:27>",
"userId": "<id:2>",
"medicationId": "<id:5>",
"scheduledFor": "2026-10-16T06:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
}
],
"doseChanges": [],
"inventoryItems": [
{
"id": "<id:28>",
"userId": "<id:2>",
"medicationId": "<id:7>",
"state": "ACTIVE",
"containerType": "OTHER",
"unitsTotal": "4",
"unitsRemaining": "3",
"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": [
{
"medicationId": "<id:5>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:7>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [
{
"id": "<id:29>",
"userId": "<id:2>",
"medicationId": "<id:8>",
"nutrient": "magnesium",
"amountPerUnit": 100,
"unit": "mg",
"enteredAmount": null,
"enteredUnit": null,
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:30>",
"userId": "<id:2>",
"medicationId": "<id:7>",
"nutrient": "vitamin_d",
"amountPerUnit": 25,
"unit": "ug",
"enteredAmount": 1000,
"enteredUnit": "IU",
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"audit": [
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [
"active"
],
"previous": {
"active": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [
"active"
],
"previous": {
"active": true
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [
"autoMarkTaken"
],
"previous": {
"autoMarkTaken": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [
"dose",
"name"
],
"previous": {
"name": "Daily tablet",
"dose": "10mg"
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:6>",
"fields": [
"name"
],
"previous": {
"name": "Record only"
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:6>",
"fields": [
"trackIntake"
],
"previous": {
"trackIntake": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:6>",
"fields": [
"trackIntake"
],
"previous": {
"trackIntake": true
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {},
"replacedCadence": "08:00 FREQ=DAILY | 20:00 FREQ=DAILY",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 2,
"tombstonedFrom": "2026-10-15T18:00:00.000Z",
"tombstonedTo": "2026-10-16T06:00:00.000Z"
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {},
"replacedCadence": "11:30 FREQ=DAILY | 20:00 i2;1,3,5",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 0,
"tombstonedFrom": null,
"tombstonedTo": null
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {}
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,955 @@
{
"status": 422,
"body": {
"data": null,
"error": "An as-needed medication cannot carry schedules (send schedules: [] to clear them)",
"meta": {
"errorCode": "http.invalid",
"requestId": "<requestId>"
}
},
"events": [
{
"status": 422,
"action": null,
"meta": null,
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:1>",
"userId": "<id:2>",
"name": "As needed",
"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": 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": "Booster",
"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": 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:2>",
"name": "Course tablet",
"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": "Daily tablet renamed",
"dose": "20mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": 30,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "C09AA05",
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 5,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:6>",
"userId": "<id:2>",
"name": "Record only renamed",
"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": 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": "Rolling pen",
"dose": "1 pen",
"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": true,
"autoMarkTakenSince": "2026-10-01T06:00:00.000Z",
"deliveryForm": "INJECTION",
"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:2>",
"name": "To delete",
"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": 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>"
}
],
"schedules": [
{
"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:4>",
"windowStart": "08:00",
"windowEnd": "09: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:1>",
"windowStart": "08:00",
"windowEnd": "09: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:3>",
"windowStart": "09:00",
"windowEnd": "10: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:7>",
"windowStart": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 7,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:14>",
"medicationId": "<id:5>",
"windowStart": "11:30",
"windowEnd": "11:30",
"label": "Late morning",
"dose": "10mg",
"unitsPerDose": "2",
"daysOfWeek": null,
"timesOfDay": [
"11:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:15>",
"medicationId": "<id:8>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:16>",
"medicationId": "<id:5>",
"windowStart": "20:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"20:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "21:00",
"start": "19:30",
"timeOfDay": "20:00"
}
]
}
],
"revisions": [
{
"id": "<id:17>",
"medicationId": "<id:6>",
"validFrom": "2026-10-01T06:00:00.000Z",
"validUntil": "<now>",
"payload": [],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
},
{
"id": "<id:18>",
"medicationId": "<id:1>",
"validFrom": "2026-10-01T06:00:00.000Z",
"validUntil": "<now>",
"payload": [],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
},
{
"id": "<id:19>",
"medicationId": "<id:5>",
"validFrom": "2026-10-01T06:00:00.000Z",
"validUntil": "<now>",
"payload": [
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "10:00",
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"doseWindows": null,
"windowStart": "08:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
},
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "22:00",
"daysOfWeek": null,
"timesOfDay": [
"20:00"
],
"doseWindows": null,
"windowStart": "20:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
}
],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
},
{
"id": "<id:20>",
"medicationId": "<id:6>",
"validFrom": "<now>",
"validUntil": "<now>",
"payload": [
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "08:00",
"daysOfWeek": null,
"timesOfDay": [
"07:00"
],
"doseWindows": null,
"windowStart": "07:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
}
],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
}
],
"pauseEras": [
{
"id": "<id:21>",
"medicationId": "<id:5>",
"userId": "<id:2>",
"pausedAt": "<now>",
"resumedAt": "<now>",
"createdAt": "<createdAt>"
}
],
"courses": [
{
"id": "<id:22>",
"medicationId": "<id:4>",
"userId": "<id:2>",
"startsOn": "2026-08-01T00:00:00.000Z",
"endsOn": "2026-08-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:23>",
"medicationId": "<id:4>",
"userId": "<id:2>",
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [
{
"id": "<id:24>",
"userId": "<id:2>",
"medicationId": "<id:7>",
"scheduledFor": "2026-10-10T07:00:00.000Z",
"takenAt": "2026-10-10T07:05:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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-14T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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-15T06:00:00.000Z",
"takenAt": "2026-10-15T06:10:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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-15T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
},
{
"id": "<id:28>",
"userId": "<id:2>",
"medicationId": "<id:6>",
"scheduledFor": "2026-10-16T05:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
},
{
"id": "<id:29>",
"userId": "<id:2>",
"medicationId": "<id:5>",
"scheduledFor": "2026-10-16T06:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
}
],
"doseChanges": [],
"inventoryItems": [
{
"id": "<id:30>",
"userId": "<id:2>",
"medicationId": "<id:7>",
"state": "ACTIVE",
"containerType": "OTHER",
"unitsTotal": "4",
"unitsRemaining": "3",
"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": [
{
"medicationId": "<id:5>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:7>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [
{
"id": "<id:31>",
"userId": "<id:2>",
"medicationId": "<id:8>",
"nutrient": "magnesium",
"amountPerUnit": 100,
"unit": "mg",
"enteredAmount": null,
"enteredUnit": null,
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:32>",
"userId": "<id:2>",
"medicationId": "<id:7>",
"nutrient": "vitamin_d",
"amountPerUnit": 25,
"unit": "ug",
"enteredAmount": 1000,
"enteredUnit": "IU",
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"audit": [
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [
"active"
],
"previous": {
"active": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [
"active"
],
"previous": {
"active": true
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"asNeeded"
],
"previous": {
"asNeeded": true
},
"replacedCadence": null,
"replacedScheduleCount": 0,
"tombstonedSlotCount": 0,
"tombstonedFrom": null,
"tombstonedTo": null
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [
"autoMarkTaken"
],
"previous": {
"autoMarkTaken": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [
"dose",
"name"
],
"previous": {
"name": "Daily tablet",
"dose": "10mg"
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:6>",
"fields": [
"name"
],
"previous": {
"name": "Record only"
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:6>",
"fields": [
"trackIntake"
],
"previous": {
"trackIntake": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:6>",
"fields": [
"trackIntake"
],
"previous": {
"trackIntake": true
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {},
"replacedCadence": "08:00 FREQ=DAILY | 20:00 FREQ=DAILY",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 2,
"tombstonedFrom": "2026-10-15T18:00:00.000Z",
"tombstonedTo": "2026-10-16T06:00:00.000Z"
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {},
"replacedCadence": "11:30 FREQ=DAILY | 20:00 i2;1,3,5",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 0,
"tombstonedFrom": null,
"tombstonedTo": null
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {}
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,983 @@
{
"status": 422,
"body": {
"data": null,
"error": "A one-shot medication can have at most one schedule",
"meta": {
"errorCode": "http.invalid",
"requestId": "<requestId>"
}
},
"events": [
{
"status": 422,
"action": null,
"meta": null,
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:1>",
"userId": "<id:2>",
"name": "As needed",
"dose": "10mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": true,
"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": "Booster",
"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": 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:2>",
"name": "Course tablet",
"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": "Daily tablet renamed",
"dose": "20mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": 30,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "C09AA05",
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 5,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:6>",
"userId": "<id:2>",
"name": "Record only renamed",
"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": 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": "Rolling pen",
"dose": "1 pen",
"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": true,
"autoMarkTakenSince": "2026-10-01T06:00:00.000Z",
"deliveryForm": "INJECTION",
"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:2>",
"name": "To delete",
"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": 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>"
}
],
"schedules": [
{
"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:4>",
"windowStart": "08:00",
"windowEnd": "09: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:3>",
"windowStart": "09:00",
"windowEnd": "10: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": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 7,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:13>",
"medicationId": "<id:5>",
"windowStart": "11:30",
"windowEnd": "11:30",
"label": "Late morning",
"dose": "10mg",
"unitsPerDose": "2",
"daysOfWeek": null,
"timesOfDay": [
"11:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:14>",
"medicationId": "<id:8>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12: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": "i2;1,3,5",
"timesOfDay": [
"20:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "21:00",
"start": "19:30",
"timeOfDay": "20:00"
}
]
}
],
"revisions": [
{
"id": "<id:16>",
"medicationId": "<id:6>",
"validFrom": "2026-10-01T06:00:00.000Z",
"validUntil": "<now>",
"payload": [],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
},
{
"id": "<id:17>",
"medicationId": "<id:1>",
"validFrom": "2026-10-01T06:00:00.000Z",
"validUntil": "<now>",
"payload": [],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
},
{
"id": "<id:18>",
"medicationId": "<id:5>",
"validFrom": "2026-10-01T06:00:00.000Z",
"validUntil": "<now>",
"payload": [
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "10:00",
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"doseWindows": null,
"windowStart": "08:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
},
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "22:00",
"daysOfWeek": null,
"timesOfDay": [
"20:00"
],
"doseWindows": null,
"windowStart": "20:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
}
],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
},
{
"id": "<id:19>",
"medicationId": "<id:6>",
"validFrom": "<now>",
"validUntil": "<now>",
"payload": [
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "08:00",
"daysOfWeek": null,
"timesOfDay": [
"07:00"
],
"doseWindows": null,
"windowStart": "07:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
}
],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
},
{
"id": "<id:20>",
"medicationId": "<id:1>",
"validFrom": "<now>",
"validUntil": "<now>",
"payload": [
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "09:00",
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"doseWindows": null,
"windowStart": "08:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
}
],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
}
],
"pauseEras": [
{
"id": "<id:21>",
"medicationId": "<id:5>",
"userId": "<id:2>",
"pausedAt": "<now>",
"resumedAt": "<now>",
"createdAt": "<createdAt>"
}
],
"courses": [
{
"id": "<id:22>",
"medicationId": "<id:4>",
"userId": "<id:2>",
"startsOn": "2026-08-01T00:00:00.000Z",
"endsOn": "2026-08-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:23>",
"medicationId": "<id:4>",
"userId": "<id:2>",
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [
{
"id": "<id:24>",
"userId": "<id:2>",
"medicationId": "<id:7>",
"scheduledFor": "2026-10-10T07:00:00.000Z",
"takenAt": "2026-10-10T07:05:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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-14T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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-15T06:00:00.000Z",
"takenAt": "2026-10-15T06:10:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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-15T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
},
{
"id": "<id:28>",
"userId": "<id:2>",
"medicationId": "<id:6>",
"scheduledFor": "2026-10-16T05:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
},
{
"id": "<id:29>",
"userId": "<id:2>",
"medicationId": "<id:5>",
"scheduledFor": "2026-10-16T06:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
}
],
"doseChanges": [],
"inventoryItems": [
{
"id": "<id:30>",
"userId": "<id:2>",
"medicationId": "<id:7>",
"state": "ACTIVE",
"containerType": "OTHER",
"unitsTotal": "4",
"unitsRemaining": "3",
"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": [
{
"medicationId": "<id:5>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:7>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [
{
"id": "<id:31>",
"userId": "<id:2>",
"medicationId": "<id:8>",
"nutrient": "magnesium",
"amountPerUnit": 100,
"unit": "mg",
"enteredAmount": null,
"enteredUnit": null,
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:32>",
"userId": "<id:2>",
"medicationId": "<id:7>",
"nutrient": "vitamin_d",
"amountPerUnit": 25,
"unit": "ug",
"enteredAmount": 1000,
"enteredUnit": "IU",
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"audit": [
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [
"active"
],
"previous": {
"active": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [
"active"
],
"previous": {
"active": true
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"asNeeded"
],
"previous": {
"asNeeded": false
},
"replacedCadence": "08:00 FREQ=DAILY",
"replacedScheduleCount": 1,
"tombstonedSlotCount": 0,
"tombstonedFrom": null,
"tombstonedTo": null
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"asNeeded"
],
"previous": {
"asNeeded": true
},
"replacedCadence": null,
"replacedScheduleCount": 0,
"tombstonedSlotCount": 0,
"tombstonedFrom": null,
"tombstonedTo": null
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [
"autoMarkTaken"
],
"previous": {
"autoMarkTaken": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [
"dose",
"name"
],
"previous": {
"name": "Daily tablet",
"dose": "10mg"
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:6>",
"fields": [
"name"
],
"previous": {
"name": "Record only"
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:6>",
"fields": [
"trackIntake"
],
"previous": {
"trackIntake": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:6>",
"fields": [
"trackIntake"
],
"previous": {
"trackIntake": true
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {},
"replacedCadence": "08:00 FREQ=DAILY | 20:00 FREQ=DAILY",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 2,
"tombstonedFrom": "2026-10-15T18:00:00.000Z",
"tombstonedTo": "2026-10-16T06:00:00.000Z"
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {},
"replacedCadence": "11:30 FREQ=DAILY | 20:00 i2;1,3,5",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 0,
"tombstonedFrom": null,
"tombstonedTo": null
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {}
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,983 @@
{
"status": 422,
"body": {
"data": null,
"error": "A one-shot medication cannot have a recurrence (rrule or rollingIntervalDays)",
"meta": {
"errorCode": "http.invalid",
"requestId": "<requestId>"
}
},
"events": [
{
"status": 422,
"action": null,
"meta": null,
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:1>",
"userId": "<id:2>",
"name": "As needed",
"dose": "10mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": true,
"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": "Booster",
"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": 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:2>",
"name": "Course tablet",
"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": "Daily tablet renamed",
"dose": "20mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": 30,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "C09AA05",
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 5,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:6>",
"userId": "<id:2>",
"name": "Record only renamed",
"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": 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": "Rolling pen",
"dose": "1 pen",
"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": true,
"autoMarkTakenSince": "2026-10-01T06:00:00.000Z",
"deliveryForm": "INJECTION",
"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:2>",
"name": "To delete",
"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": 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>"
}
],
"schedules": [
{
"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:4>",
"windowStart": "08:00",
"windowEnd": "09: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:3>",
"windowStart": "09:00",
"windowEnd": "10: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": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 7,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:13>",
"medicationId": "<id:5>",
"windowStart": "11:30",
"windowEnd": "11:30",
"label": "Late morning",
"dose": "10mg",
"unitsPerDose": "2",
"daysOfWeek": null,
"timesOfDay": [
"11:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:14>",
"medicationId": "<id:8>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12: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": "i2;1,3,5",
"timesOfDay": [
"20:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "21:00",
"start": "19:30",
"timeOfDay": "20:00"
}
]
}
],
"revisions": [
{
"id": "<id:16>",
"medicationId": "<id:6>",
"validFrom": "2026-10-01T06:00:00.000Z",
"validUntil": "<now>",
"payload": [],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
},
{
"id": "<id:17>",
"medicationId": "<id:1>",
"validFrom": "2026-10-01T06:00:00.000Z",
"validUntil": "<now>",
"payload": [],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
},
{
"id": "<id:18>",
"medicationId": "<id:5>",
"validFrom": "2026-10-01T06:00:00.000Z",
"validUntil": "<now>",
"payload": [
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "10:00",
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"doseWindows": null,
"windowStart": "08:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
},
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "22:00",
"daysOfWeek": null,
"timesOfDay": [
"20:00"
],
"doseWindows": null,
"windowStart": "20:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
}
],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
},
{
"id": "<id:19>",
"medicationId": "<id:6>",
"validFrom": "<now>",
"validUntil": "<now>",
"payload": [
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "08:00",
"daysOfWeek": null,
"timesOfDay": [
"07:00"
],
"doseWindows": null,
"windowStart": "07:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
}
],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
},
{
"id": "<id:20>",
"medicationId": "<id:1>",
"validFrom": "<now>",
"validUntil": "<now>",
"payload": [
{
"dose": null,
"label": null,
"rrule": "FREQ=DAILY",
"windowEnd": "09:00",
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"doseWindows": null,
"windowStart": "08:00",
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"rollingIntervalDays": null,
"reminderGraceMinutes": null
}
],
"source": "ARCHIVED",
"supersededByRevisionId": null,
"createdAt": "<createdAt>"
}
],
"pauseEras": [
{
"id": "<id:21>",
"medicationId": "<id:5>",
"userId": "<id:2>",
"pausedAt": "<now>",
"resumedAt": "<now>",
"createdAt": "<createdAt>"
}
],
"courses": [
{
"id": "<id:22>",
"medicationId": "<id:4>",
"userId": "<id:2>",
"startsOn": "2026-08-01T00:00:00.000Z",
"endsOn": "2026-08-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:23>",
"medicationId": "<id:4>",
"userId": "<id:2>",
"startsOn": "2026-10-01T00:00:00.000Z",
"endsOn": null,
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [
{
"id": "<id:24>",
"userId": "<id:2>",
"medicationId": "<id:7>",
"scheduledFor": "2026-10-10T07:00:00.000Z",
"takenAt": "2026-10-10T07:05:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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-14T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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-15T06:00:00.000Z",
"takenAt": "2026-10-15T06:10:00.000Z",
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"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-15T18:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
},
{
"id": "<id:28>",
"userId": "<id:2>",
"medicationId": "<id:6>",
"scheduledFor": "2026-10-16T05:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
},
{
"id": "<id:29>",
"userId": "<id:2>",
"medicationId": "<id:5>",
"scheduledFor": "2026-10-16T06:00:00.000Z",
"takenAt": null,
"skipped": false,
"autoMissed": false,
"autoRecorded": false,
"attributionSource": "AUTO",
"source": "WEB",
"idempotencyKey": null,
"createdAt": "<createdAt>",
"injectionSite": null,
"doseTaken": null,
"inventoryConsumption": null,
"externalId": null,
"updatedAt": "<updatedAt>",
"syncVersion": "<syncVersion>",
"deletedAt": "<now>"
}
],
"doseChanges": [],
"inventoryItems": [
{
"id": "<id:30>",
"userId": "<id:2>",
"medicationId": "<id:7>",
"state": "ACTIVE",
"containerType": "OTHER",
"unitsTotal": "4",
"unitsRemaining": "3",
"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": [
{
"medicationId": "<id:5>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:7>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [
{
"id": "<id:31>",
"userId": "<id:2>",
"medicationId": "<id:8>",
"nutrient": "magnesium",
"amountPerUnit": 100,
"unit": "mg",
"enteredAmount": null,
"enteredUnit": null,
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:32>",
"userId": "<id:2>",
"medicationId": "<id:7>",
"nutrient": "vitamin_d",
"amountPerUnit": 25,
"unit": "ug",
"enteredAmount": 1000,
"enteredUnit": "IU",
"source": "MANUAL",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"audit": [
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [
"active"
],
"previous": {
"active": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [
"active"
],
"previous": {
"active": true
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"asNeeded"
],
"previous": {
"asNeeded": false
},
"replacedCadence": "08:00 FREQ=DAILY",
"replacedScheduleCount": 1,
"tombstonedSlotCount": 0,
"tombstonedFrom": null,
"tombstonedTo": null
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"fields": [
"asNeeded"
],
"previous": {
"asNeeded": true
},
"replacedCadence": null,
"replacedScheduleCount": 0,
"tombstonedSlotCount": 0,
"tombstonedFrom": null,
"tombstonedTo": null
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [
"autoMarkTaken"
],
"previous": {
"autoMarkTaken": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [
"dose",
"name"
],
"previous": {
"name": "Daily tablet",
"dose": "10mg"
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:6>",
"fields": [
"name"
],
"previous": {
"name": "Record only"
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:6>",
"fields": [
"trackIntake"
],
"previous": {
"trackIntake": false
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:6>",
"fields": [
"trackIntake"
],
"previous": {
"trackIntake": true
}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {},
"replacedCadence": "08:00 FREQ=DAILY | 20:00 FREQ=DAILY",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 2,
"tombstonedFrom": "2026-10-15T18:00:00.000Z",
"tombstonedTo": "2026-10-16T06:00:00.000Z"
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {},
"replacedCadence": "11:30 FREQ=DAILY | 20:00 i2;1,3,5",
"replacedScheduleCount": 2,
"tombstonedSlotCount": 0,
"tombstonedFrom": null,
"tombstonedTo": null
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {}
},
"ipAddress": null
},
{
"action": "medication.update",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"fields": [],
"previous": {}
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,579 @@
/**
* Parity for `GET`, `PUT` and `DELETE /api/medications/{id}` while the read,
* the edit and the delete 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: a rolling injection
* with stock, a composition, a custom category and automatic recording; a
* daily tablet without stock; a record-only medication; another account's
* medication; a reading delegate and nobody. The edits: plain fields, a
* schedule replace that moves the dose times outside the stale window (era
* archived, open slots tombstoned), the same schedule echoed back, the
* top-level reminder-window bridge, a pause and a resume, automatic recording
* switched on, the category writes (a custom one, a native client's OTHER over
* it, the web's OTHER, an unknown one), the record-only rule and both tracking
* transitions, the as-needed flips and their refusals, the one-shot refusals
* and a conversion, the course refusals and a course edit, a units change on
* a medication with a composition, a body the schema refuses, the not-found
* answer, a delegate who may write and one who may manage, and nobody. The
* deletes: the owner's (its scoped ingest token revoked), the not-found
* answer, a managing delegate 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 { DELETE, GET, PUT } from "@/app/api/medications/[id]/route";
import { encryptToBytes } from "@/lib/ai/coach/bytes-codec";
import { anonymous, type RouteAuth } from "../../../kit/call-route";
import {
makeMedication,
makeSession,
makeToken,
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 supplement recompute the route hands a composition change to, recorded
// instead of run (see `effectRecorder`).
vi.mock(
"@/lib/medications/ingredients/recompute-job",
async (importOriginal) => {
const actual =
await importOriginal<
typeof import("@/lib/medications/ingredients/recompute-job")
>();
const { effectRecorder } = await import("../../../kit/parity");
return {
...actual,
enqueueSupplementNutrientRecompute: async (...args: unknown[]) => {
effectRecorder.record("enqueueSupplementNutrientRecompute", args);
return { queued: true };
},
};
},
);
const prisma = getPrismaClient();
const NOW = new Date("2026-10-15T12:00:00.000Z");
const ROUTE = "/api/medications/{id}";
/**
* The edit answers without the read-model fields (reminder state, stock and
* runway, composition, links) the registered medication resource declares.
* The parity snapshot pins that answer as it is; the contract check is the
* route's own tests' business.
*/
const EDIT_ANSWER = {
skip: "the edit answers without the read-model fields of the resource",
};
const CUSTOM_KEY = "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13";
let ownerId: string;
let userIds: string[];
let owner: RouteAuth;
let ownerBearer: RouteAuth;
let writer: { auth: RouteAuth; headers: Record<string, string> };
let reader: { auth: RouteAuth; headers: Record<string, string> };
let manager: { auth: RouteAuth; headers: Record<string, string> };
const med: Record<string, string> = {};
type Caller = { auth?: RouteAuth; headers?: Record<string, string> };
async function get(name: string, id: string, caller: Caller = {}) {
await parityStep({
name: `medication-detail.${name}`,
handler: GET,
options: {
method: "GET",
route: ROUTE,
params: { id },
auth: caller.auth ?? owner,
headers: caller.headers,
},
userIds,
now: NOW,
});
}
async function put(
name: string,
id: string,
body: unknown,
caller: Caller = {},
) {
await parityStep({
name: `medication-detail.${name}`,
handler: PUT,
options: {
method: "PUT",
route: ROUTE,
params: { id },
body,
auth: caller.auth ?? owner,
headers: caller.headers,
contract: EDIT_ANSWER,
},
userIds,
now: NOW,
});
}
async function del(name: string, id: string, caller: Caller = {}) {
await parityStep({
name: `medication-detail.${name}`,
handler: DELETE,
options: {
method: "DELETE",
route: ROUTE,
params: { id },
auth: caller.auth ?? owner,
headers: caller.headers,
},
userIds,
now: NOW,
// The ingest scope names the medication's generated id inside a string,
// which the id placeholders cannot see; it reads as the fixture's name.
extra: async () =>
(
await prisma.apiToken.findMany({
where: { userId: ownerId },
select: { name: true, permissions: true, revoked: true },
orderBy: { name: "asc" },
})
).map((token) => ({
...token,
permissions: token.permissions.map((p) =>
p.replace(med.doomed, "<doomed>"),
),
})),
});
}
async function intake(
medicationId: string,
scheduledFor: string,
takenAt: string | null = null,
) {
await prisma.medicationIntakeEvent.create({
data: {
userId: ownerId,
medicationId,
scheduledFor: new Date(scheduledFor),
takenAt: takenAt ? new Date(takenAt) : null,
createdAt: new Date("2026-10-01T06:00:00.000Z"),
},
});
}
const daily = (windowStart: string, windowEnd: string, extra = {}) => ({
windowStart,
windowEnd,
timesOfDay: [windowStart],
rrule: "FREQ=DAILY",
...extra,
});
beforeAll(async () => {
vi.useFakeTimers({ toFake: ["Date"], now: NOW });
await truncateAllTables(prisma);
const user = await makeUser({ timezone: "Europe/Berlin", locale: "en" });
ownerId = user.id;
owner = await makeSession(user);
ownerBearer = await makeToken(user, { name: "kit-phone" });
const created = new Date("2026-10-01T06:00:00.000Z");
const rolling = await makeMedication(
user,
{
name: "Rolling pen",
dose: "1 pen",
deliveryForm: "INJECTION",
unitsPerDose: 1,
startsOn: new Date("2026-10-01"),
createdAt: created,
autoMarkTaken: true,
autoMarkTakenSince: created,
},
[
{
windowStart: "09:00",
windowEnd: "11:00",
timesOfDay: ["09:00"],
rollingIntervalDays: 7,
},
],
);
med.rolling = rolling.id;
await intake(
rolling.id,
"2026-10-10T07:00:00.000Z",
"2026-10-10T07:05:00.000Z",
);
await prisma.medicationInventoryItem.create({
data: {
userId: ownerId,
medicationId: rolling.id,
unitsTotal: 4,
unitsRemaining: 3,
purchasedAt: created,
},
});
await prisma.medicationIngredient.create({
data: {
userId: ownerId,
medicationId: rolling.id,
nutrient: "vitamin_d",
amountPerUnit: 25,
unit: "ug",
enteredAmount: 1000,
enteredUnit: "IU",
source: "MANUAL",
},
});
await prisma.medicationCategoryLabel.create({
data: {
userId: ownerId,
key: CUSTOM_KEY,
labelEncrypted: encryptToBytes("Heart and circulation"),
},
});
await prisma.medicationCategoryAssignment.create({
data: { medicationId: rolling.id, category: CUSTOM_KEY },
});
const tablet = await makeMedication(
user,
{
name: "Daily tablet",
startsOn: new Date("2026-10-01"),
createdAt: created,
},
[daily("08:00", "10:00"), daily("20:00", "22:00")],
);
med.tablet = tablet.id;
await intake(tablet.id, "2026-10-14T18:00:00.000Z");
await intake(
tablet.id,
"2026-10-15T06:00:00.000Z",
"2026-10-15T06:10:00.000Z",
);
await intake(tablet.id, "2026-10-15T18:00:00.000Z");
await intake(tablet.id, "2026-10-16T06:00:00.000Z");
const recordOnly = await makeMedication(
user,
{
name: "Record only",
startsOn: new Date("2026-10-01"),
createdAt: created,
trackIntake: false,
},
[daily("07:00", "08:00")],
);
med.recordOnly = recordOnly.id;
await intake(recordOnly.id, "2026-10-16T05:00:00.000Z");
const asNeeded = await makeMedication(
user,
{ name: "As needed", createdAt: created, asNeeded: true },
[],
);
med.asNeeded = asNeeded.id;
const booster = await makeMedication(
user,
{ name: "Booster", createdAt: created },
[daily("09:00", "10:00")],
);
med.booster = booster.id;
const course = await makeMedication(
user,
{
name: "Course tablet",
startsOn: new Date("2026-10-01"),
createdAt: new Date("2026-07-25T06:00:00.000Z"),
},
[daily("08:00", "09:00")],
);
med.course = course.id;
await prisma.medicationCourse.createMany({
data: [
{
userId: ownerId,
medicationId: course.id,
startsOn: new Date("2026-08-01"),
endsOn: new Date("2026-08-31"),
},
{
userId: ownerId,
medicationId: course.id,
startsOn: new Date("2026-10-01"),
endsOn: null,
},
],
});
const doomed = await makeMedication(
user,
{ name: "To delete", createdAt: created },
[daily("12:00", "13:00")],
);
med.doomed = doomed.id;
await prisma.medicationIngredient.create({
data: {
userId: ownerId,
medicationId: doomed.id,
nutrient: "magnesium",
amountPerUnit: 100,
unit: "mg",
source: "MANUAL",
},
});
await makeToken(user, {
name: "kit-ingest",
permissions: [`medication:${doomed.id}:ingest`],
});
const stranger = await makeUser({ timezone: "UTC" });
const foreign = await makeMedication(stranger, { name: "Not yours" });
med.foreign = foreign.id;
const w = await delegateOf(prisma, user, "WRITE");
const r = await delegateOf(prisma, user, "READ");
const m = await delegateOf(prisma, user, "MANAGE");
writer = { auth: w.auth, headers: w.headers };
reader = { auth: r.auth, headers: r.headers };
manager = { auth: m.auth, headers: m.headers };
userIds = [ownerId, w.delegate.id, r.delegate.id, m.delegate.id];
});
afterAll(() => {
vi.useRealTimers();
});
describe("GET /api/medications/{id} parity", () => {
it("01 a rolling injection with stock, a composition and a custom category", async () => {
await get("01-rolling", med.rolling);
});
it("02 a daily tablet without stock", async () => {
await get("02-daily", med.tablet);
});
it("03 a record-only medication", async () => {
await get("03-record-only", med.recordOnly);
});
it("04 another account's medication", async () => {
await get("04-not-found", med.foreign);
});
it("05 a reading delegate, and nobody", async () => {
await get("05a-reader", med.rolling, reader);
await get("05b-anonymous", med.rolling, { auth: anonymous });
});
});
describe("PUT /api/medications/{id} parity", () => {
it("11 plain fields", async () => {
await put("11-plain-fields", med.tablet, {
name: "Daily tablet renamed",
dose: "20mg",
treatmentClass: "GENERIC",
dosesPerUnit: 30,
reorderLeadDays: 5,
deliveryForm: "ORAL",
notificationsEnabled: false,
liveActivityEnabled: true,
criticalAlarmEnabled: true,
atcCode: "C09AA05",
rxNormCode: null,
});
});
it("12 a schedule replace whose dose time leaves the stale window", async () => {
await put("12-schedule-replace", med.tablet, {
schedules: [
{
windowStart: "08:00",
windowEnd: "10:00",
timesOfDay: ["11:30"],
label: "Late morning",
dose: "10mg",
unitsPerDose: 2,
reminderGraceMinutes: 30,
},
{
windowStart: "20:00",
windowEnd: "22:00",
daysOfWeek: [1, 3, 5],
intervalWeeks: 2,
doseWindows: [{ timeOfDay: "20:00", start: "19:30", end: "21:00" }],
},
],
});
});
it("13 the same schedule echoed back", async () => {
await put("13-schedule-echo", med.tablet, {
schedules: [
{
windowStart: "11:30",
windowEnd: "11:30",
timesOfDay: ["11:30"],
label: "Late morning",
dose: "10mg",
unitsPerDose: 2,
reminderGraceMinutes: 30,
rrule: "FREQ=DAILY",
},
{
windowStart: "20:00",
windowEnd: "22:00",
daysOfWeek: [1, 3, 5],
intervalWeeks: 2,
doseWindows: [{ timeOfDay: "20:00", start: "19:30", end: "21:00" }],
},
],
});
});
it("14 the top-level reminder window", async () => {
await put("14-grace-bridge", med.tablet, { reminderGraceMinutes: 45 });
});
it("15 a pause and a resume", async () => {
await put("15a-pause", med.tablet, { active: false });
await put("15b-resume", med.tablet, { active: true });
});
it("16 automatic recording switched on", async () => {
await put("16-auto-mark-taken", med.tablet, { autoMarkTaken: true });
});
it("17 the category writes", async () => {
await put("17a-custom-category", med.tablet, { category: CUSTOM_KEY });
await put(
"17b-native-other-kept",
med.tablet,
{ category: "OTHER" },
{ auth: ownerBearer },
);
await put("17c-web-other", med.tablet, { category: "OTHER" });
await put("17d-unknown-category", med.tablet, {
category: "custom:0a6c2d4e-1111-4222-8333-944455556666",
});
});
it("18 a record-only medication and both tracking transitions", async () => {
await put("18a-record-schedule-kept", med.recordOnly, {
name: "Record only renamed",
schedules: [daily("06:00", "07:00")],
oneShot: false,
});
await put("18b-tracking-on", med.recordOnly, { trackIntake: true });
await put("18c-tracking-off", med.recordOnly, { trackIntake: false });
});
it("19 the as-needed flips and their refusals", async () => {
await put("19a-scheduled-without-schedules", med.asNeeded, {
asNeeded: false,
});
await put("19b-scheduled", med.asNeeded, {
asNeeded: false,
schedules: [daily("08:00", "09:00")],
});
await put("19c-as-needed-keeping-schedules", med.asNeeded, {
asNeeded: true,
});
await put("19d-as-needed", med.asNeeded, {
asNeeded: true,
schedules: [],
});
});
it("20 the one-shot refusals and a conversion", async () => {
await put("20a-one-shot-two-schedules", med.booster, {
oneShot: true,
startsOn: "2026-10-20",
schedules: [daily("09:00", "10:00"), daily("18:00", "19:00")],
});
await put("20b-one-shot-recurrence", med.booster, {
oneShot: true,
startsOn: "2026-10-20",
schedules: [
{ windowStart: "09:00", windowEnd: "10:00", rrule: "FREQ=DAILY" },
],
});
await put("20c-one-shot", med.booster, {
oneShot: true,
startsOn: "2026-10-20",
schedules: [{ windowStart: "09:00", windowEnd: "10:00" }],
});
});
it("21 the course refusals and a course edit", async () => {
await put("21a-course-overlap", med.course, { startsOn: "2026-08-20" });
await put("21b-course-window-required", med.course, {
startsOn: null,
endsOn: null,
});
await put("21c-course-end", med.course, { endsOn: "2026-12-31" });
});
it("22 a units change on a medication with a composition", async () => {
await put("22-composition-units", med.rolling, { unitsPerDose: 2 });
});
it("23 a body the schema refuses, and another account's medication", async () => {
await put("23a-invalid", med.tablet, {
name: "",
unitsPerDose: -1,
schedules: "daily",
});
await put("23b-not-found", med.foreign, { name: "Taken over" });
});
it("24 a delegate who may write, one who may manage, and nobody", async () => {
await put("24a-writer", med.tablet, { name: "By a writer" }, writer);
await put("24b-manager", med.tablet, { name: "By a manager" }, manager);
await put(
"24c-anonymous",
med.tablet,
{ name: "By nobody" },
{ auth: anonymous },
);
});
});
describe("DELETE /api/medications/{id} parity", () => {
it("31 the owner deletes a medication with a composition and an ingest token", async () => {
await del("31-delete", med.doomed);
});
it("32 the same medication again", async () => {
await del("32-not-found", med.doomed);
});
it("33 a managing delegate, and nobody", async () => {
await del("33a-manager", med.booster, manager);
await del("33b-anonymous", med.booster, { auth: anonymous });
});
});
@@ -210,6 +210,14 @@ export interface ParityCall {
userIds: string[];
/** The clock the test pinned; server stamps at or after it read `<now>`. */
now: Date;
/**
* Waits, after the response, for a write the route deliberately does not
* await (a refusal's audit row), so the rows read back do not depend on
* whether it landed first.
*/
settle?: () => Promise<void>;
/** Further state the route writes outside the medication tables. */
extra?: () => Promise<unknown>;
}
/**
@@ -224,6 +232,7 @@ export async function parityStep(call: ParityCall) {
const res = await callRoute(call.handler, call.options);
const events = wideEventRecorder.take();
expect(events.length).toBeGreaterThan(0);
if (call.settle) await call.settle();
await expectParity(
call.name,
stable(
@@ -233,6 +242,7 @@ export async function parityStep(call: ParityCall) {
events: events.map(eventFacts).map(withoutCacheKeyHashes),
effects: effectRecorder.take(),
stored: await medicationState(getPrismaClient(), call.userIds),
...(call.extra ? { extra: await call.extra() } : {}),
},
{ since: call.now },
),