test(medications): pin the medication list and create before the create moves

This commit is contained in:
Marc-André Bombeck committed 2026-10-23 11:44:26 +02:00
1 parent 62b050f711
commit 8bb58d8760
25 files changed
+13381 -1

No files matched your search

@@ -0,0 +1,170 @@
{
"status": 200,
"body": {
"data": [
{
"id": "<id:1>",
"userId": "<id:2>",
"name": "Existing 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
}
],
"hasIngredients": false,
"category": "OTHER",
"categoryLabel": null,
"courses": [],
"courseCount": 0,
"previousCourseEndedOn": null,
"canStartCourse": false,
"lastTakenAt": null,
"todayEventCount": 0,
"nextDueAt": "2026-10-16T06:00:00.000Z",
"remindersActive": true,
"nextDueOverdue": false,
"nextDueScheduleId": "<id:3>",
"courseStatus": "CURRENT",
"intakeActionable": true,
"stockUnitsRemaining": null,
"stockDosesRemaining": null,
"runwayDays": null
}
],
"error": null
},
"events": [
{
"status": 200,
"action": {
"name": "medication.list"
},
"meta": {
"cache.medications.outcome": "miss",
"cache.medications.key_hash": "<key_hash>",
"count": 1
},
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:1>",
"userId": "<id:2>",
"name": "Existing 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
}
],
"revisions": [],
"pauseEras": [],
"courses": [],
"intakes": [],
"doseChanges": [],
"inventoryItems": [],
"inventoryEvents": [],
"categories": [],
"ingredients": [],
"audit": [],
"idempotency": []
}
}
@@ -0,0 +1,170 @@
{
"status": 200,
"body": {
"data": [
{
"id": "<id:1>",
"userId": "<id:2>",
"name": "Existing 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
}
],
"hasIngredients": false,
"category": "OTHER",
"categoryLabel": null,
"courses": [],
"courseCount": 0,
"previousCourseEndedOn": null,
"canStartCourse": false,
"lastTakenAt": null,
"todayEventCount": 0,
"nextDueAt": "2026-10-16T06:00:00.000Z",
"remindersActive": true,
"nextDueOverdue": false,
"nextDueScheduleId": "<id:3>",
"courseStatus": "CURRENT",
"intakeActionable": true,
"stockUnitsRemaining": null,
"stockDosesRemaining": null,
"runwayDays": null
}
],
"error": null
},
"events": [
{
"status": 200,
"action": {
"name": "medication.list"
},
"meta": {
"cache.medications.outcome": "hit",
"cache.medications.key_hash": "<key_hash>",
"count": 1
},
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:1>",
"userId": "<id:2>",
"name": "Existing 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
}
],
"revisions": [],
"pauseEras": [],
"courses": [],
"intakes": [],
"doseChanges": [],
"inventoryItems": [],
"inventoryEvents": [],
"categories": [],
"ingredients": [],
"audit": [],
"idempotency": []
}
}
@@ -0,0 +1,95 @@
{
"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": "Existing 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
}
],
"revisions": [],
"pauseEras": [],
"courses": [],
"intakes": [],
"doseChanges": [],
"inventoryItems": [],
"inventoryEvents": [],
"categories": [],
"ingredients": [],
"audit": [],
"idempotency": []
}
}
@@ -0,0 +1,226 @@
{
"status": 201,
"body": {
"data": {
"id": "<id:1>",
"userId": "<id:2>",
"name": "Plain tablet",
"dose": "5mg",
"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": "09: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": 201,
"action": {
"name": "medication.create",
"entity_type": "medication",
"entity_id": "<id:1>"
},
"meta": null,
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:4>",
"userId": "<id:2>",
"name": "Existing 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": "Plain tablet",
"dose": "5mg",
"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": "09: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:5>",
"medicationId": "<id:4>",
"windowStart": "08:00",
"windowEnd": "10:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
}
],
"revisions": [],
"pauseEras": [],
"courses": [],
"intakes": [],
"doseChanges": [],
"inventoryItems": [],
"inventoryEvents": [],
"categories": [
{
"medicationId": "<id:1>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [],
"audit": [
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"name": "Plain tablet",
"autoMarkTaken": false
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,334 @@
{
"status": 201,
"body": {
"data": {
"id": "<id:1>",
"userId": "<id:2>",
"name": "Full injection",
"dose": "1 pen",
"treatmentClass": "GLP1",
"dosesPerUnit": 4,
"unitsPerDose": 0.5,
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "INJECTION",
"trackInjectionSites": true,
"allowedInjectionSites": [
"ABDOMEN_LEFT",
"THIGH_RIGHT"
],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "A10BJ06",
"rxNormCode": "1991302",
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 7,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>",
"schedules": [
{
"id": "<id:3>",
"medicationId": "<id:1>",
"windowStart": "18:00",
"windowEnd": "20:00",
"label": "Evening",
"dose": "0.5 pen",
"unitsPerDose": 1,
"daysOfWeek": null,
"timesOfDay": [
"18:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=WEEKLY;BYDAY=MO",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "20:00",
"start": "18:00",
"timeOfDay": "18:30"
}
],
"resolvedUnitsPerDose": 1
}
],
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"categoryLabel": "Heart and circulation",
"courses": [
{
"id": "<id:4>",
"startsOn": "2026-10-10",
"endsOn": "2026-12-31",
"status": "CURRENT",
"takenDoses": 0,
"note": null
}
],
"courseCount": 1,
"previousCourseEndedOn": null,
"canStartCourse": false
},
"error": null
},
"events": [
{
"status": 201,
"action": {
"name": "medication.create",
"entity_type": "medication",
"entity_id": "<id:1>"
},
"meta": null,
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:5>",
"userId": "<id:2>",
"name": "Existing 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": "Full injection",
"dose": "1 pen",
"treatmentClass": "GLP1",
"dosesPerUnit": 4,
"unitsPerDose": "0.5",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "INJECTION",
"trackInjectionSites": true,
"allowedInjectionSites": [
"ABDOMEN_LEFT",
"THIGH_RIGHT"
],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "A10BJ06",
"rxNormCode": "1991302",
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 7,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:6>",
"userId": "<id:2>",
"name": "Plain tablet",
"dose": "5mg",
"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:7>",
"medicationId": "<id:6>",
"windowStart": "07:00",
"windowEnd": "09:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"07:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:8>",
"medicationId": "<id:5>",
"windowStart": "08:00",
"windowEnd": "10:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:3>",
"medicationId": "<id:1>",
"windowStart": "18:00",
"windowEnd": "20:00",
"label": "Evening",
"dose": "0.5 pen",
"unitsPerDose": "1",
"daysOfWeek": null,
"timesOfDay": [
"18:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=WEEKLY;BYDAY=MO",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "20:00",
"start": "18:00",
"timeOfDay": "18:30"
}
]
}
],
"revisions": [],
"pauseEras": [],
"courses": [
{
"id": "<id:4>",
"medicationId": "<id:1>",
"userId": "<id:2>",
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [],
"doseChanges": [],
"inventoryItems": [],
"inventoryEvents": [],
"categories": [
{
"medicationId": "<id:6>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:1>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [],
"audit": [
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"name": "Full injection",
"autoMarkTaken": true
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:6>",
"name": "Plain tablet",
"autoMarkTaken": false
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,344 @@
{
"status": 201,
"body": {
"data": {
"id": "<id:1>",
"userId": "<id:2>",
"name": "As needed",
"dose": "400mg",
"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>",
"schedules": [],
"category": "PAIN_RELIEF",
"categoryLabel": null,
"courses": [],
"courseCount": 0,
"previousCourseEndedOn": null,
"canStartCourse": false
},
"error": null
},
"events": [
{
"status": 201,
"action": {
"name": "medication.create",
"entity_type": "medication",
"entity_id": "<id:1>"
},
"meta": null,
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:1>",
"userId": "<id:2>",
"name": "As needed",
"dose": "400mg",
"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": "Existing 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:4>",
"userId": "<id:2>",
"name": "Full injection",
"dose": "1 pen",
"treatmentClass": "GLP1",
"dosesPerUnit": 4,
"unitsPerDose": "0.5",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "INJECTION",
"trackInjectionSites": true,
"allowedInjectionSites": [
"ABDOMEN_LEFT",
"THIGH_RIGHT"
],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "A10BJ06",
"rxNormCode": "1991302",
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 7,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:5>",
"userId": "<id:2>",
"name": "Plain tablet",
"dose": "5mg",
"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:6>",
"medicationId": "<id:5>",
"windowStart": "07:00",
"windowEnd": "09: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:7>",
"medicationId": "<id:3>",
"windowStart": "08:00",
"windowEnd": "10:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:8>",
"medicationId": "<id:4>",
"windowStart": "18:00",
"windowEnd": "20:00",
"label": "Evening",
"dose": "0.5 pen",
"unitsPerDose": "1",
"daysOfWeek": null,
"timesOfDay": [
"18:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=WEEKLY;BYDAY=MO",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "20:00",
"start": "18:00",
"timeOfDay": "18:30"
}
]
}
],
"revisions": [],
"pauseEras": [],
"courses": [
{
"id": "<id:9>",
"medicationId": "<id:4>",
"userId": "<id:2>",
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [],
"doseChanges": [],
"inventoryItems": [],
"inventoryEvents": [],
"categories": [
{
"medicationId": "<id:5>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:1>",
"category": "PAIN_RELIEF",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:4>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [],
"audit": [
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"name": "As needed",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:4>",
"name": "Full injection",
"autoMarkTaken": true
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"name": "Plain tablet",
"autoMarkTaken": false
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,455 @@
{
"status": 201,
"body": {
"data": {
"id": "<id:1>",
"userId": "<id:2>",
"name": "One shot",
"dose": "1 dose",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": 1,
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"oneShot": true,
"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": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null,
"resolvedUnitsPerDose": 1
}
],
"category": "OTHER",
"categoryLabel": null,
"courses": [
{
"id": "<id:4>",
"startsOn": "2026-10-20",
"endsOn": "2026-10-20",
"status": "UPCOMING",
"takenDoses": 0,
"note": null
}
],
"courseCount": 1,
"previousCourseEndedOn": null,
"canStartCourse": false
},
"error": null
},
"events": [
{
"status": 201,
"action": {
"name": "medication.create",
"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": "400mg",
"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": "Existing 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": "Full injection",
"dose": "1 pen",
"treatmentClass": "GLP1",
"dosesPerUnit": 4,
"unitsPerDose": "0.5",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "INJECTION",
"trackInjectionSites": true,
"allowedInjectionSites": [
"ABDOMEN_LEFT",
"THIGH_RIGHT"
],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "A10BJ06",
"rxNormCode": "1991302",
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 7,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:1>",
"userId": "<id:2>",
"name": "One shot",
"dose": "1 dose",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"oneShot": true,
"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": "Plain tablet",
"dose": "5mg",
"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:8>",
"windowStart": "07:00",
"windowEnd": "09: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": "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: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": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:11>",
"medicationId": "<id:7>",
"windowStart": "18:00",
"windowEnd": "20:00",
"label": "Evening",
"dose": "0.5 pen",
"unitsPerDose": "1",
"daysOfWeek": null,
"timesOfDay": [
"18:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=WEEKLY;BYDAY=MO",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "20:00",
"start": "18:00",
"timeOfDay": "18:30"
}
]
}
],
"revisions": [],
"pauseEras": [],
"courses": [
{
"id": "<id:12>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:4>",
"medicationId": "<id:1>",
"userId": "<id:2>",
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [],
"doseChanges": [],
"inventoryItems": [],
"inventoryEvents": [],
"categories": [
{
"medicationId": "<id:8>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:1>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:5>",
"category": "PAIN_RELIEF",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:7>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [],
"audit": [
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"name": "As needed",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"name": "Full injection",
"autoMarkTaken": true
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"name": "One shot",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:8>",
"name": "Plain tablet",
"autoMarkTaken": false
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,599 @@
{
"status": 201,
"body": {
"data": {
"id": "<id:1>",
"userId": "<id:2>",
"name": "Mixed schedules",
"dose": "2mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": 1,
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": false,
"autoMarkTaken": false,
"autoMarkTakenSince": null,
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": false,
"criticalAlarmEnabled": false,
"atcCode": null,
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": null,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>",
"schedules": [],
"recordedSchedules": [
{
"id": "<id:3>",
"medicationId": "<id:1>",
"windowStart": "06:00",
"windowEnd": "07:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"06:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "PRN",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null,
"resolvedUnitsPerDose": 1
},
{
"id": "<id:4>",
"medicationId": "<id:1>",
"windowStart": "21:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"21:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null,
"resolvedUnitsPerDose": 1
},
{
"id": "<id:5>",
"medicationId": "<id:1>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 3,
"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": 201,
"action": {
"name": "medication.create",
"entity_type": "medication",
"entity_id": "<id:1>"
},
"meta": null,
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:6>",
"userId": "<id:2>",
"name": "As needed",
"dose": "400mg",
"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:7>",
"userId": "<id:2>",
"name": "Existing 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": "Full injection",
"dose": "1 pen",
"treatmentClass": "GLP1",
"dosesPerUnit": 4,
"unitsPerDose": "0.5",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "INJECTION",
"trackInjectionSites": true,
"allowedInjectionSites": [
"ABDOMEN_LEFT",
"THIGH_RIGHT"
],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "A10BJ06",
"rxNormCode": "1991302",
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 7,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:1>",
"userId": "<id:2>",
"name": "Mixed schedules",
"dose": "2mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": false,
"autoMarkTaken": false,
"autoMarkTakenSince": null,
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": false,
"criticalAlarmEnabled": false,
"atcCode": null,
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": null,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:9>",
"userId": "<id:2>",
"name": "One shot",
"dose": "1 dose",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"oneShot": true,
"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:10>",
"userId": "<id:2>",
"name": "Plain tablet",
"dose": "5mg",
"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": "06:00",
"windowEnd": "07:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"06:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "PRN",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:11>",
"medicationId": "<id:10>",
"windowStart": "07:00",
"windowEnd": "09: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": "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:9>",
"windowStart": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:5>",
"medicationId": "<id:1>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 3,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:14>",
"medicationId": "<id:8>",
"windowStart": "18:00",
"windowEnd": "20:00",
"label": "Evening",
"dose": "0.5 pen",
"unitsPerDose": "1",
"daysOfWeek": null,
"timesOfDay": [
"18:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=WEEKLY;BYDAY=MO",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "20:00",
"start": "18:00",
"timeOfDay": "18:30"
}
]
},
{
"id": "<id:4>",
"medicationId": "<id:1>",
"windowStart": "21:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"21:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
}
],
"revisions": [],
"pauseEras": [],
"courses": [
{
"id": "<id:15>",
"medicationId": "<id:8>",
"userId": "<id:2>",
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:16>",
"medicationId": "<id:9>",
"userId": "<id:2>",
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [],
"doseChanges": [],
"inventoryItems": [],
"inventoryEvents": [],
"categories": [
{
"medicationId": "<id:10>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:9>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:1>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:6>",
"category": "PAIN_RELIEF",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:8>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [],
"audit": [
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:6>",
"name": "As needed",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:8>",
"name": "Full injection",
"autoMarkTaken": true
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"name": "Mixed schedules",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:9>",
"name": "One shot",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:10>",
"name": "Plain tablet",
"autoMarkTaken": false
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,645 @@
{
"status": 201,
"body": {
"data": {
"id": "<id:1>",
"userId": "<id:2>",
"name": "Ended window",
"dose": "3mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": 1,
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"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": "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,
"resolvedUnitsPerDose": 1
}
],
"category": "OTHER",
"categoryLabel": null,
"courses": [
{
"id": "<id:4>",
"startsOn": "2026-10-05",
"endsOn": "2026-10-05",
"status": "ENDED",
"takenDoses": 0,
"note": null
}
],
"courseCount": 1,
"previousCourseEndedOn": "2026-10-05",
"canStartCourse": true
},
"error": null
},
"events": [
{
"status": 201,
"action": {
"name": "medication.create",
"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": "400mg",
"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:1>",
"userId": "<id:2>",
"name": "Ended window",
"dose": "3mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"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": "Existing 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": "Full injection",
"dose": "1 pen",
"treatmentClass": "GLP1",
"dosesPerUnit": 4,
"unitsPerDose": "0.5",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "INJECTION",
"trackInjectionSites": true,
"allowedInjectionSites": [
"ABDOMEN_LEFT",
"THIGH_RIGHT"
],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "A10BJ06",
"rxNormCode": "1991302",
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 7,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:8>",
"userId": "<id:2>",
"name": "Mixed schedules",
"dose": "2mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": false,
"autoMarkTaken": false,
"autoMarkTakenSince": null,
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": false,
"criticalAlarmEnabled": false,
"atcCode": null,
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": null,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:9>",
"userId": "<id:2>",
"name": "One shot",
"dose": "1 dose",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"oneShot": true,
"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:10>",
"userId": "<id:2>",
"name": "Plain tablet",
"dose": "5mg",
"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": "06:00",
"windowEnd": "07:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"06:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "PRN",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:12>",
"medicationId": "<id:10>",
"windowStart": "07:00",
"windowEnd": "09: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:3>",
"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:13>",
"medicationId": "<id:6>",
"windowStart": "08:00",
"windowEnd": "10:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id: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": 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": null,
"rollingIntervalDays": 3,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:16>",
"medicationId": "<id:7>",
"windowStart": "18:00",
"windowEnd": "20:00",
"label": "Evening",
"dose": "0.5 pen",
"unitsPerDose": "1",
"daysOfWeek": null,
"timesOfDay": [
"18:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=WEEKLY;BYDAY=MO",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "20:00",
"start": "18:00",
"timeOfDay": "18:30"
}
]
},
{
"id": "<id:17>",
"medicationId": "<id:8>",
"windowStart": "21:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"21:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
}
],
"revisions": [],
"pauseEras": [],
"courses": [
{
"id": "<id:4>",
"medicationId": "<id:1>",
"userId": "<id:2>",
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:18>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:19>",
"medicationId": "<id:9>",
"userId": "<id:2>",
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [],
"doseChanges": [],
"inventoryItems": [],
"inventoryEvents": [],
"categories": [
{
"medicationId": "<id:10>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:9>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:8>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:1>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:5>",
"category": "PAIN_RELIEF",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:7>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [],
"audit": [
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"name": "As needed",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"name": "Ended window",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"name": "Full injection",
"autoMarkTaken": true
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:8>",
"name": "Mixed schedules",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:9>",
"name": "One shot",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:10>",
"name": "Plain tablet",
"autoMarkTaken": false
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,574 @@
{
"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": "400mg",
"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": "Ended window",
"dose": "3mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"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": "Existing 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": "Full injection",
"dose": "1 pen",
"treatmentClass": "GLP1",
"dosesPerUnit": 4,
"unitsPerDose": "0.5",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "INJECTION",
"trackInjectionSites": true,
"allowedInjectionSites": [
"ABDOMEN_LEFT",
"THIGH_RIGHT"
],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "A10BJ06",
"rxNormCode": "1991302",
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 7,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:6>",
"userId": "<id:2>",
"name": "Mixed schedules",
"dose": "2mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": false,
"autoMarkTaken": false,
"autoMarkTakenSince": null,
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": false,
"criticalAlarmEnabled": false,
"atcCode": null,
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": null,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:7>",
"userId": "<id:2>",
"name": "One shot",
"dose": "1 dose",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"oneShot": true,
"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": "Plain tablet",
"dose": "5mg",
"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": "06:00",
"windowEnd": "07:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"06:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "PRN",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:10>",
"medicationId": "<id:8>",
"windowStart": "07:00",
"windowEnd": "09: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:3>",
"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:4>",
"windowStart": "08:00",
"windowEnd": "10:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id: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": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:14>",
"medicationId": "<id:6>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 3,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:15>",
"medicationId": "<id:5>",
"windowStart": "18:00",
"windowEnd": "20:00",
"label": "Evening",
"dose": "0.5 pen",
"unitsPerDose": "1",
"daysOfWeek": null,
"timesOfDay": [
"18:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=WEEKLY;BYDAY=MO",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "20:00",
"start": "18:00",
"timeOfDay": "18:30"
}
]
},
{
"id": "<id:16>",
"medicationId": "<id:6>",
"windowStart": "21:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"21:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
}
],
"revisions": [],
"pauseEras": [],
"courses": [
{
"id": "<id:17>",
"medicationId": "<id:3>",
"userId": "<id:2>",
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:18>",
"medicationId": "<id:5>",
"userId": "<id:2>",
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:19>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [],
"doseChanges": [],
"inventoryItems": [],
"inventoryEvents": [],
"categories": [
{
"medicationId": "<id:8>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:7>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:6>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:3>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:1>",
"category": "PAIN_RELIEF",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:5>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [],
"audit": [
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"name": "As needed",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:3>",
"name": "Ended window",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"name": "Full injection",
"autoMarkTaken": true
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:6>",
"name": "Mixed schedules",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"name": "One shot",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:8>",
"name": "Plain tablet",
"autoMarkTaken": false
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,583 @@
{
"status": 422,
"body": {
"data": null,
"error": "Validation failed",
"details": {
"issues": [
{
"path": "endsOn",
"code": "custom",
"message": "endsOn must be on or after startsOn"
}
]
},
"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": "400mg",
"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": "Ended window",
"dose": "3mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"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": "Existing 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": "Full injection",
"dose": "1 pen",
"treatmentClass": "GLP1",
"dosesPerUnit": 4,
"unitsPerDose": "0.5",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "INJECTION",
"trackInjectionSites": true,
"allowedInjectionSites": [
"ABDOMEN_LEFT",
"THIGH_RIGHT"
],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "A10BJ06",
"rxNormCode": "1991302",
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 7,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:6>",
"userId": "<id:2>",
"name": "Mixed schedules",
"dose": "2mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": false,
"autoMarkTaken": false,
"autoMarkTakenSince": null,
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": false,
"criticalAlarmEnabled": false,
"atcCode": null,
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": null,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:7>",
"userId": "<id:2>",
"name": "One shot",
"dose": "1 dose",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"oneShot": true,
"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": "Plain tablet",
"dose": "5mg",
"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": "06:00",
"windowEnd": "07:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"06:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "PRN",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:10>",
"medicationId": "<id:8>",
"windowStart": "07:00",
"windowEnd": "09: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:3>",
"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:4>",
"windowStart": "08:00",
"windowEnd": "10:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id: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": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:14>",
"medicationId": "<id:6>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 3,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:15>",
"medicationId": "<id:5>",
"windowStart": "18:00",
"windowEnd": "20:00",
"label": "Evening",
"dose": "0.5 pen",
"unitsPerDose": "1",
"daysOfWeek": null,
"timesOfDay": [
"18:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=WEEKLY;BYDAY=MO",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "20:00",
"start": "18:00",
"timeOfDay": "18:30"
}
]
},
{
"id": "<id:16>",
"medicationId": "<id:6>",
"windowStart": "21:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"21:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
}
],
"revisions": [],
"pauseEras": [],
"courses": [
{
"id": "<id:17>",
"medicationId": "<id:3>",
"userId": "<id:2>",
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:18>",
"medicationId": "<id:5>",
"userId": "<id:2>",
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:19>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [],
"doseChanges": [],
"inventoryItems": [],
"inventoryEvents": [],
"categories": [
{
"medicationId": "<id:8>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:7>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:6>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:3>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:1>",
"category": "PAIN_RELIEF",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:5>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [],
"audit": [
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"name": "As needed",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:3>",
"name": "Ended window",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"name": "Full injection",
"autoMarkTaken": true
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:6>",
"name": "Mixed schedules",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"name": "One shot",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:8>",
"name": "Plain tablet",
"autoMarkTaken": false
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,574 @@
{
"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": "400mg",
"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": "Ended window",
"dose": "3mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"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": "Existing 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": "Full injection",
"dose": "1 pen",
"treatmentClass": "GLP1",
"dosesPerUnit": 4,
"unitsPerDose": "0.5",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "INJECTION",
"trackInjectionSites": true,
"allowedInjectionSites": [
"ABDOMEN_LEFT",
"THIGH_RIGHT"
],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "A10BJ06",
"rxNormCode": "1991302",
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 7,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:6>",
"userId": "<id:2>",
"name": "Mixed schedules",
"dose": "2mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": false,
"autoMarkTaken": false,
"autoMarkTakenSince": null,
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": false,
"criticalAlarmEnabled": false,
"atcCode": null,
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": null,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:7>",
"userId": "<id:2>",
"name": "One shot",
"dose": "1 dose",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"oneShot": true,
"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": "Plain tablet",
"dose": "5mg",
"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": "06:00",
"windowEnd": "07:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"06:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "PRN",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:10>",
"medicationId": "<id:8>",
"windowStart": "07:00",
"windowEnd": "09: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:3>",
"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:4>",
"windowStart": "08:00",
"windowEnd": "10:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id: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": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:14>",
"medicationId": "<id:6>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 3,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:15>",
"medicationId": "<id:5>",
"windowStart": "18:00",
"windowEnd": "20:00",
"label": "Evening",
"dose": "0.5 pen",
"unitsPerDose": "1",
"daysOfWeek": null,
"timesOfDay": [
"18:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=WEEKLY;BYDAY=MO",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "20:00",
"start": "18:00",
"timeOfDay": "18:30"
}
]
},
{
"id": "<id:16>",
"medicationId": "<id:6>",
"windowStart": "21:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"21:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
}
],
"revisions": [],
"pauseEras": [],
"courses": [
{
"id": "<id:17>",
"medicationId": "<id:3>",
"userId": "<id:2>",
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:18>",
"medicationId": "<id:5>",
"userId": "<id:2>",
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:19>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [],
"doseChanges": [],
"inventoryItems": [],
"inventoryEvents": [],
"categories": [
{
"medicationId": "<id:8>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:7>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:6>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:3>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:1>",
"category": "PAIN_RELIEF",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:5>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [],
"audit": [
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"name": "As needed",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:3>",
"name": "Ended window",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"name": "Full injection",
"autoMarkTaken": true
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:6>",
"name": "Mixed schedules",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"name": "One shot",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:8>",
"name": "Plain tablet",
"autoMarkTaken": false
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,574 @@
{
"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": "400mg",
"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": "Ended window",
"dose": "3mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"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": "Existing 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": "Full injection",
"dose": "1 pen",
"treatmentClass": "GLP1",
"dosesPerUnit": 4,
"unitsPerDose": "0.5",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "INJECTION",
"trackInjectionSites": true,
"allowedInjectionSites": [
"ABDOMEN_LEFT",
"THIGH_RIGHT"
],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "A10BJ06",
"rxNormCode": "1991302",
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 7,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:6>",
"userId": "<id:2>",
"name": "Mixed schedules",
"dose": "2mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": false,
"autoMarkTaken": false,
"autoMarkTakenSince": null,
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": false,
"criticalAlarmEnabled": false,
"atcCode": null,
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": null,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:7>",
"userId": "<id:2>",
"name": "One shot",
"dose": "1 dose",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"oneShot": true,
"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": "Plain tablet",
"dose": "5mg",
"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": "06:00",
"windowEnd": "07:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"06:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "PRN",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:10>",
"medicationId": "<id:8>",
"windowStart": "07:00",
"windowEnd": "09: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:3>",
"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:4>",
"windowStart": "08:00",
"windowEnd": "10:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id: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": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:14>",
"medicationId": "<id:6>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 3,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:15>",
"medicationId": "<id:5>",
"windowStart": "18:00",
"windowEnd": "20:00",
"label": "Evening",
"dose": "0.5 pen",
"unitsPerDose": "1",
"daysOfWeek": null,
"timesOfDay": [
"18:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=WEEKLY;BYDAY=MO",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "20:00",
"start": "18:00",
"timeOfDay": "18:30"
}
]
},
{
"id": "<id:16>",
"medicationId": "<id:6>",
"windowStart": "21:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"21:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
}
],
"revisions": [],
"pauseEras": [],
"courses": [
{
"id": "<id:17>",
"medicationId": "<id:3>",
"userId": "<id:2>",
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:18>",
"medicationId": "<id:5>",
"userId": "<id:2>",
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:19>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [],
"doseChanges": [],
"inventoryItems": [],
"inventoryEvents": [],
"categories": [
{
"medicationId": "<id:8>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:7>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:6>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:3>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:1>",
"category": "PAIN_RELIEF",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:5>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [],
"audit": [
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"name": "As needed",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:3>",
"name": "Ended window",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"name": "Full injection",
"autoMarkTaken": true
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:6>",
"name": "Mixed schedules",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"name": "One shot",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:8>",
"name": "Plain tablet",
"autoMarkTaken": false
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,589 @@
{
"status": 422,
"body": {
"data": null,
"error": "Validation failed",
"details": {
"issues": [
{
"path": "externalId",
"code": "custom",
"message": "external identifier must be stable across app restarts; received an object description (<Class: 0x…>), which embeds a memory address and is a new value on every launch — serialise the identity itself, not the object's description"
}
]
},
"meta": {
"errorCode": "http.invalid",
"requestId": "<requestId>"
}
},
"events": [
{
"status": 422,
"action": {
"name": "medication.external_id.rejected"
},
"meta": {
"external_id_rejected": 1,
"external_id_shapes": "object_description",
"external_id_surface": "medication.create"
},
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:1>",
"userId": "<id:2>",
"name": "As needed",
"dose": "400mg",
"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": "Ended window",
"dose": "3mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"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": "Existing 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": "Full injection",
"dose": "1 pen",
"treatmentClass": "GLP1",
"dosesPerUnit": 4,
"unitsPerDose": "0.5",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "INJECTION",
"trackInjectionSites": true,
"allowedInjectionSites": [
"ABDOMEN_LEFT",
"THIGH_RIGHT"
],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "A10BJ06",
"rxNormCode": "1991302",
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 7,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:6>",
"userId": "<id:2>",
"name": "Mixed schedules",
"dose": "2mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": false,
"autoMarkTaken": false,
"autoMarkTakenSince": null,
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": false,
"criticalAlarmEnabled": false,
"atcCode": null,
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": null,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:7>",
"userId": "<id:2>",
"name": "One shot",
"dose": "1 dose",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"oneShot": true,
"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": "Plain tablet",
"dose": "5mg",
"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": "06:00",
"windowEnd": "07:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"06:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "PRN",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:10>",
"medicationId": "<id:8>",
"windowStart": "07:00",
"windowEnd": "09: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:3>",
"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:4>",
"windowStart": "08:00",
"windowEnd": "10:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id: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": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:14>",
"medicationId": "<id:6>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 3,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:15>",
"medicationId": "<id:5>",
"windowStart": "18:00",
"windowEnd": "20:00",
"label": "Evening",
"dose": "0.5 pen",
"unitsPerDose": "1",
"daysOfWeek": null,
"timesOfDay": [
"18:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=WEEKLY;BYDAY=MO",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "20:00",
"start": "18:00",
"timeOfDay": "18:30"
}
]
},
{
"id": "<id:16>",
"medicationId": "<id:6>",
"windowStart": "21:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"21:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
}
],
"revisions": [],
"pauseEras": [],
"courses": [
{
"id": "<id:17>",
"medicationId": "<id:3>",
"userId": "<id:2>",
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:18>",
"medicationId": "<id:5>",
"userId": "<id:2>",
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:19>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [],
"doseChanges": [],
"inventoryItems": [],
"inventoryEvents": [],
"categories": [
{
"medicationId": "<id:8>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:7>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:6>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:3>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:1>",
"category": "PAIN_RELIEF",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:5>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [],
"audit": [
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"name": "As needed",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:3>",
"name": "Ended window",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"name": "Full injection",
"autoMarkTaken": true
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:6>",
"name": "Mixed schedules",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"name": "One shot",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:8>",
"name": "Plain tablet",
"autoMarkTaken": false
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,593 @@
{
"status": 422,
"body": {
"data": null,
"error": "Validation failed",
"details": {
"issues": [
{
"path": "name",
"code": "too_small",
"message": "Too small: expected string to have >=1 characters"
},
{
"path": "dose",
"code": "invalid_type",
"message": "Invalid input: expected string, received number"
},
{
"path": "schedules",
"code": "invalid_type",
"message": "Invalid input: expected array, received string"
}
]
},
"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": "400mg",
"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": "Ended window",
"dose": "3mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"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": "Existing 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": "Full injection",
"dose": "1 pen",
"treatmentClass": "GLP1",
"dosesPerUnit": 4,
"unitsPerDose": "0.5",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "INJECTION",
"trackInjectionSites": true,
"allowedInjectionSites": [
"ABDOMEN_LEFT",
"THIGH_RIGHT"
],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "A10BJ06",
"rxNormCode": "1991302",
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 7,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:6>",
"userId": "<id:2>",
"name": "Mixed schedules",
"dose": "2mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": false,
"autoMarkTaken": false,
"autoMarkTakenSince": null,
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": false,
"criticalAlarmEnabled": false,
"atcCode": null,
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": null,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:7>",
"userId": "<id:2>",
"name": "One shot",
"dose": "1 dose",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"oneShot": true,
"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": "Plain tablet",
"dose": "5mg",
"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": "06:00",
"windowEnd": "07:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"06:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "PRN",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:10>",
"medicationId": "<id:8>",
"windowStart": "07:00",
"windowEnd": "09: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:3>",
"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:4>",
"windowStart": "08:00",
"windowEnd": "10:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id: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": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:14>",
"medicationId": "<id:6>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 3,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:15>",
"medicationId": "<id:5>",
"windowStart": "18:00",
"windowEnd": "20:00",
"label": "Evening",
"dose": "0.5 pen",
"unitsPerDose": "1",
"daysOfWeek": null,
"timesOfDay": [
"18:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=WEEKLY;BYDAY=MO",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "20:00",
"start": "18:00",
"timeOfDay": "18:30"
}
]
},
{
"id": "<id:16>",
"medicationId": "<id:6>",
"windowStart": "21:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"21:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
}
],
"revisions": [],
"pauseEras": [],
"courses": [
{
"id": "<id:17>",
"medicationId": "<id:3>",
"userId": "<id:2>",
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:18>",
"medicationId": "<id:5>",
"userId": "<id:2>",
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:19>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [],
"doseChanges": [],
"inventoryItems": [],
"inventoryEvents": [],
"categories": [
{
"medicationId": "<id:8>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:7>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:6>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:3>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:1>",
"category": "PAIN_RELIEF",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:5>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [],
"audit": [
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"name": "As needed",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:3>",
"name": "Ended window",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"name": "Full injection",
"autoMarkTaken": true
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:6>",
"name": "Mixed schedules",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"name": "One shot",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:8>",
"name": "Plain tablet",
"autoMarkTaken": false
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,706 @@
{
"status": 201,
"body": {
"data": {
"id": "<id:1>",
"userId": "<id:2>",
"name": "Mirrored",
"dose": "50mg",
"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": "APPLE_HEALTH",
"externalId": "hk-concept-0001",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>",
"schedules": [
{
"id": "<id:3>",
"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,
"resolvedUnitsPerDose": 1
}
],
"category": "OTHER",
"categoryLabel": null,
"courses": [],
"courseCount": 0,
"previousCourseEndedOn": null,
"canStartCourse": false
},
"error": null
},
"events": [
{
"status": 201,
"action": {
"name": "medication.create",
"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": "400mg",
"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": "Ended window",
"dose": "3mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"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": "Existing 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": "Full injection",
"dose": "1 pen",
"treatmentClass": "GLP1",
"dosesPerUnit": 4,
"unitsPerDose": "0.5",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "INJECTION",
"trackInjectionSites": true,
"allowedInjectionSites": [
"ABDOMEN_LEFT",
"THIGH_RIGHT"
],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "A10BJ06",
"rxNormCode": "1991302",
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 7,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:1>",
"userId": "<id:2>",
"name": "Mirrored",
"dose": "50mg",
"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": "APPLE_HEALTH",
"externalId": "hk-concept-0001",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:8>",
"userId": "<id:2>",
"name": "Mixed schedules",
"dose": "2mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": false,
"autoMarkTaken": false,
"autoMarkTakenSince": null,
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": false,
"criticalAlarmEnabled": false,
"atcCode": null,
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": null,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:9>",
"userId": "<id:2>",
"name": "One shot",
"dose": "1 dose",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"oneShot": true,
"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:10>",
"userId": "<id:2>",
"name": "Plain tablet",
"dose": "5mg",
"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": "06:00",
"windowEnd": "07:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"06:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "PRN",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:12>",
"medicationId": "<id:10>",
"windowStart": "07:00",
"windowEnd": "09: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:13>",
"medicationId": "<id:5>",
"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": "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:14>",
"medicationId": "<id:6>",
"windowStart": "08:00",
"windowEnd": "10:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:15>",
"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": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:16>",
"medicationId": "<id:8>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 3,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:17>",
"medicationId": "<id:7>",
"windowStart": "18:00",
"windowEnd": "20:00",
"label": "Evening",
"dose": "0.5 pen",
"unitsPerDose": "1",
"daysOfWeek": null,
"timesOfDay": [
"18:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=WEEKLY;BYDAY=MO",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "20:00",
"start": "18:00",
"timeOfDay": "18:30"
}
]
},
{
"id": "<id:18>",
"medicationId": "<id:8>",
"windowStart": "21:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"21:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
}
],
"revisions": [],
"pauseEras": [],
"courses": [
{
"id": "<id:19>",
"medicationId": "<id:5>",
"userId": "<id:2>",
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:20>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:21>",
"medicationId": "<id:9>",
"userId": "<id:2>",
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [],
"doseChanges": [],
"inventoryItems": [],
"inventoryEvents": [],
"categories": [
{
"medicationId": "<id:10>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:9>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:8>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:5>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:1>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:4>",
"category": "PAIN_RELIEF",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:7>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [],
"audit": [
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:4>",
"name": "As needed",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"name": "Ended window",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"name": "Full injection",
"autoMarkTaken": true
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"name": "Mirrored",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:8>",
"name": "Mixed schedules",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:9>",
"name": "One shot",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:10>",
"name": "Plain tablet",
"autoMarkTaken": false
},
"ipAddress": null
}
],
"idempotency": []
}
}
@@ -0,0 +1,704 @@
{
"status": 200,
"body": {
"data": {
"id": "<id:1>",
"userId": "<id:2>",
"name": "Mirrored",
"dose": "50mg",
"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": "APPLE_HEALTH",
"externalId": "hk-concept-0001",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>",
"schedules": [
{
"id": "<id:3>",
"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,
"resolvedUnitsPerDose": 1
}
],
"category": "OTHER",
"categoryLabel": null
},
"error": null
},
"events": [
{
"status": 200,
"action": {
"name": "medication.create",
"entity_type": "medication",
"entity_id": "<id:1>"
},
"meta": {
"idempotent_replay": true
},
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:4>",
"userId": "<id:2>",
"name": "As needed",
"dose": "400mg",
"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": "Ended window",
"dose": "3mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"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": "Existing 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": "Full injection",
"dose": "1 pen",
"treatmentClass": "GLP1",
"dosesPerUnit": 4,
"unitsPerDose": "0.5",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "INJECTION",
"trackInjectionSites": true,
"allowedInjectionSites": [
"ABDOMEN_LEFT",
"THIGH_RIGHT"
],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "A10BJ06",
"rxNormCode": "1991302",
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 7,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:1>",
"userId": "<id:2>",
"name": "Mirrored",
"dose": "50mg",
"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": "APPLE_HEALTH",
"externalId": "hk-concept-0001",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:8>",
"userId": "<id:2>",
"name": "Mixed schedules",
"dose": "2mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": false,
"autoMarkTaken": false,
"autoMarkTakenSince": null,
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": false,
"criticalAlarmEnabled": false,
"atcCode": null,
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": null,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:9>",
"userId": "<id:2>",
"name": "One shot",
"dose": "1 dose",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"oneShot": true,
"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:10>",
"userId": "<id:2>",
"name": "Plain tablet",
"dose": "5mg",
"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": "06:00",
"windowEnd": "07:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"06:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "PRN",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:12>",
"medicationId": "<id:10>",
"windowStart": "07:00",
"windowEnd": "09: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:13>",
"medicationId": "<id:5>",
"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": "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:14>",
"medicationId": "<id:6>",
"windowStart": "08:00",
"windowEnd": "10:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:15>",
"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": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:16>",
"medicationId": "<id:8>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 3,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:17>",
"medicationId": "<id:7>",
"windowStart": "18:00",
"windowEnd": "20:00",
"label": "Evening",
"dose": "0.5 pen",
"unitsPerDose": "1",
"daysOfWeek": null,
"timesOfDay": [
"18:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=WEEKLY;BYDAY=MO",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "20:00",
"start": "18:00",
"timeOfDay": "18:30"
}
]
},
{
"id": "<id:18>",
"medicationId": "<id:8>",
"windowStart": "21:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"21:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
}
],
"revisions": [],
"pauseEras": [],
"courses": [
{
"id": "<id:19>",
"medicationId": "<id:5>",
"userId": "<id:2>",
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:20>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:21>",
"medicationId": "<id:9>",
"userId": "<id:2>",
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [],
"doseChanges": [],
"inventoryItems": [],
"inventoryEvents": [],
"categories": [
{
"medicationId": "<id:10>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:9>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:8>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:5>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:1>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:4>",
"category": "PAIN_RELIEF",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:7>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [],
"audit": [
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:4>",
"name": "As needed",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"name": "Ended window",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"name": "Full injection",
"autoMarkTaken": true
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"name": "Mirrored",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:8>",
"name": "Mixed schedules",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:9>",
"name": "One shot",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:10>",
"name": "Plain tablet",
"autoMarkTaken": false
},
"ipAddress": null
}
],
"idempotency": []
}
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,786 @@
{
"status": 201,
"body": {
"data": {
"id": "<id:1>",
"userId": "<id:2>",
"name": "Retried",
"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": "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,
"resolvedUnitsPerDose": 1
}
],
"category": "OTHER",
"categoryLabel": null,
"courses": [],
"courseCount": 0,
"previousCourseEndedOn": null,
"canStartCourse": false
},
"error": null
},
"events": [
{
"status": 201,
"action": {
"name": "medication.create",
"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": "400mg",
"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": "Ended window",
"dose": "3mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"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": "Existing 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": "Full injection",
"dose": "1 pen",
"treatmentClass": "GLP1",
"dosesPerUnit": 4,
"unitsPerDose": "0.5",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "INJECTION",
"trackInjectionSites": true,
"allowedInjectionSites": [
"ABDOMEN_LEFT",
"THIGH_RIGHT"
],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "A10BJ06",
"rxNormCode": "1991302",
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 7,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:8>",
"userId": "<id:2>",
"name": "Mirrored",
"dose": "50mg",
"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": "APPLE_HEALTH",
"externalId": "hk-concept-0001",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:9>",
"userId": "<id:2>",
"name": "Mixed schedules",
"dose": "2mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": false,
"autoMarkTaken": false,
"autoMarkTakenSince": null,
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": false,
"criticalAlarmEnabled": false,
"atcCode": null,
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": null,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:10>",
"userId": "<id:2>",
"name": "One shot",
"dose": "1 dose",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"oneShot": true,
"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:11>",
"userId": "<id:2>",
"name": "Plain tablet",
"dose": "5mg",
"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:1>",
"userId": "<id:2>",
"name": "Retried",
"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:12>",
"medicationId": "<id:9>",
"windowStart": "06:00",
"windowEnd": "07:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"06:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "PRN",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:13>",
"medicationId": "<id:11>",
"windowStart": "07:00",
"windowEnd": "09:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"07:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:14>",
"medicationId": "<id:5>",
"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:15>",
"medicationId": "<id:8>",
"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": "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:16>",
"medicationId": "<id:6>",
"windowStart": "08:00",
"windowEnd": "10:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:17>",
"medicationId": "<id:10>",
"windowStart": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:18>",
"medicationId": "<id:9>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 3,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:19>",
"medicationId": "<id:7>",
"windowStart": "18:00",
"windowEnd": "20:00",
"label": "Evening",
"dose": "0.5 pen",
"unitsPerDose": "1",
"daysOfWeek": null,
"timesOfDay": [
"18:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=WEEKLY;BYDAY=MO",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "20:00",
"start": "18:00",
"timeOfDay": "18:30"
}
]
},
{
"id": "<id:20>",
"medicationId": "<id:9>",
"windowStart": "21:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"21:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
}
],
"revisions": [],
"pauseEras": [],
"courses": [
{
"id": "<id:21>",
"medicationId": "<id:5>",
"userId": "<id:2>",
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:22>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:23>",
"medicationId": "<id:10>",
"userId": "<id:2>",
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [],
"doseChanges": [],
"inventoryItems": [],
"inventoryEvents": [],
"categories": [
{
"medicationId": "<id:11>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:10>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:9>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:5>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:8>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:1>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:4>",
"category": "PAIN_RELIEF",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:7>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [],
"audit": [
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:4>",
"name": "As needed",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"name": "Ended window",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"name": "Full injection",
"autoMarkTaken": true
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:8>",
"name": "Mirrored",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:9>",
"name": "Mixed schedules",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:10>",
"name": "One shot",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:11>",
"name": "Plain tablet",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"name": "Retried",
"autoMarkTaken": false
},
"ipAddress": null
}
],
"idempotency": [
{
"userId": "<id:2>",
"key": "<id:24>",
"method": "POST",
"path": "/api/medications",
"responseStatus": 201,
"requestFingerprint": "717bc7f22eaede79d3d0ec9e0197c6fae152d91ae21b29662ebbe2b02d7bd896",
"expiresAt": "2026-10-16T12:00:00.000Z"
}
]
}
}
@@ -0,0 +1,787 @@
{
"status": 201,
"body": {
"data": {
"id": "<id:1>",
"userId": "<id:2>",
"name": "Retried",
"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": "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,
"resolvedUnitsPerDose": 1
}
],
"category": "OTHER",
"categoryLabel": null,
"courses": [],
"courseCount": 0,
"previousCourseEndedOn": null,
"canStartCourse": false
},
"error": null
},
"events": [
{
"status": 201,
"action": {
"name": "idempotency.replay"
},
"meta": {
"method": "POST",
"path": "/api/medications"
},
"warnings": null,
"error": null
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:4>",
"userId": "<id:2>",
"name": "As needed",
"dose": "400mg",
"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": "Ended window",
"dose": "3mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"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": "Existing 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": "Full injection",
"dose": "1 pen",
"treatmentClass": "GLP1",
"dosesPerUnit": 4,
"unitsPerDose": "0.5",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "INJECTION",
"trackInjectionSites": true,
"allowedInjectionSites": [
"ABDOMEN_LEFT",
"THIGH_RIGHT"
],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "A10BJ06",
"rxNormCode": "1991302",
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 7,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:8>",
"userId": "<id:2>",
"name": "Mirrored",
"dose": "50mg",
"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": "APPLE_HEALTH",
"externalId": "hk-concept-0001",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:9>",
"userId": "<id:2>",
"name": "Mixed schedules",
"dose": "2mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": false,
"autoMarkTaken": false,
"autoMarkTakenSince": null,
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": false,
"criticalAlarmEnabled": false,
"atcCode": null,
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": null,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:10>",
"userId": "<id:2>",
"name": "One shot",
"dose": "1 dose",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"oneShot": true,
"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:11>",
"userId": "<id:2>",
"name": "Plain tablet",
"dose": "5mg",
"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:1>",
"userId": "<id:2>",
"name": "Retried",
"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:12>",
"medicationId": "<id:9>",
"windowStart": "06:00",
"windowEnd": "07:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"06:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "PRN",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:13>",
"medicationId": "<id:11>",
"windowStart": "07:00",
"windowEnd": "09:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"07:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:14>",
"medicationId": "<id:5>",
"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:15>",
"medicationId": "<id:8>",
"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": "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:16>",
"medicationId": "<id:6>",
"windowStart": "08:00",
"windowEnd": "10:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:17>",
"medicationId": "<id:10>",
"windowStart": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:18>",
"medicationId": "<id:9>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 3,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:19>",
"medicationId": "<id:7>",
"windowStart": "18:00",
"windowEnd": "20:00",
"label": "Evening",
"dose": "0.5 pen",
"unitsPerDose": "1",
"daysOfWeek": null,
"timesOfDay": [
"18:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=WEEKLY;BYDAY=MO",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "20:00",
"start": "18:00",
"timeOfDay": "18:30"
}
]
},
{
"id": "<id:20>",
"medicationId": "<id:9>",
"windowStart": "21:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"21:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
}
],
"revisions": [],
"pauseEras": [],
"courses": [
{
"id": "<id:21>",
"medicationId": "<id:5>",
"userId": "<id:2>",
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:22>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:23>",
"medicationId": "<id:10>",
"userId": "<id:2>",
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [],
"doseChanges": [],
"inventoryItems": [],
"inventoryEvents": [],
"categories": [
{
"medicationId": "<id:11>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:10>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:9>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:5>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:8>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:1>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:4>",
"category": "PAIN_RELIEF",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:7>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [],
"audit": [
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:4>",
"name": "As needed",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"name": "Ended window",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"name": "Full injection",
"autoMarkTaken": true
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:8>",
"name": "Mirrored",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:9>",
"name": "Mixed schedules",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:10>",
"name": "One shot",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:11>",
"name": "Plain tablet",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"name": "Retried",
"autoMarkTaken": false
},
"ipAddress": null
}
],
"idempotency": [
{
"userId": "<id:2>",
"key": "<id:24>",
"method": "POST",
"path": "/api/medications",
"responseStatus": 201,
"requestFingerprint": "717bc7f22eaede79d3d0ec9e0197c6fae152d91ae21b29662ebbe2b02d7bd896",
"expiresAt": "2026-10-16T12:00:00.000Z"
}
]
}
}
@@ -0,0 +1,856 @@
{
"status": 201,
"body": {
"data": {
"id": "<id:1>",
"userId": "<id:2>",
"name": "Brought by a delegate",
"dose": "20mg",
"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": "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,
"resolvedUnitsPerDose": 1
}
],
"category": "OTHER",
"categoryLabel": null,
"courses": [],
"courseCount": 0,
"previousCourseEndedOn": null,
"canStartCourse": false
},
"error": null
},
"events": [
{
"status": 201,
"action": {
"name": "medication.create",
"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": "400mg",
"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:1>",
"userId": "<id:2>",
"name": "Brought by a delegate",
"dose": "20mg",
"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:5>",
"userId": "<id:2>",
"name": "Ended window",
"dose": "3mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"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": "Existing 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": "Full injection",
"dose": "1 pen",
"treatmentClass": "GLP1",
"dosesPerUnit": 4,
"unitsPerDose": "0.5",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "INJECTION",
"trackInjectionSites": true,
"allowedInjectionSites": [
"ABDOMEN_LEFT",
"THIGH_RIGHT"
],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "A10BJ06",
"rxNormCode": "1991302",
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 7,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:8>",
"userId": "<id:2>",
"name": "Mirrored",
"dose": "50mg",
"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": "APPLE_HEALTH",
"externalId": "hk-concept-0001",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:9>",
"userId": "<id:2>",
"name": "Mixed schedules",
"dose": "2mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": false,
"autoMarkTaken": false,
"autoMarkTakenSince": null,
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": false,
"criticalAlarmEnabled": false,
"atcCode": null,
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": null,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:10>",
"userId": "<id:2>",
"name": "One shot",
"dose": "1 dose",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"oneShot": true,
"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:11>",
"userId": "<id:2>",
"name": "Plain tablet",
"dose": "5mg",
"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:12>",
"userId": "<id:2>",
"name": "Retried",
"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:13>",
"medicationId": "<id:9>",
"windowStart": "06:00",
"windowEnd": "07:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"06:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "PRN",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:14>",
"medicationId": "<id:11>",
"windowStart": "07:00",
"windowEnd": "09: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:15>",
"medicationId": "<id:5>",
"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:16>",
"medicationId": "<id:8>",
"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:17>",
"medicationId": "<id:12>",
"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": "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:18>",
"medicationId": "<id:6>",
"windowStart": "08:00",
"windowEnd": "10:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"08:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:19>",
"medicationId": "<id:10>",
"windowStart": "09:00",
"windowEnd": "11:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"09:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:20>",
"medicationId": "<id:9>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 3,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:21>",
"medicationId": "<id:7>",
"windowStart": "18:00",
"windowEnd": "20:00",
"label": "Evening",
"dose": "0.5 pen",
"unitsPerDose": "1",
"daysOfWeek": null,
"timesOfDay": [
"18:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=WEEKLY;BYDAY=MO",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "20:00",
"start": "18:00",
"timeOfDay": "18:30"
}
]
},
{
"id": "<id:22>",
"medicationId": "<id:9>",
"windowStart": "21:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"21:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
}
],
"revisions": [],
"pauseEras": [],
"courses": [
{
"id": "<id:23>",
"medicationId": "<id:5>",
"userId": "<id:2>",
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:24>",
"medicationId": "<id:7>",
"userId": "<id:2>",
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:25>",
"medicationId": "<id:10>",
"userId": "<id:2>",
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [],
"doseChanges": [],
"inventoryItems": [],
"inventoryEvents": [],
"categories": [
{
"medicationId": "<id:11>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:10>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:9>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:5>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:8>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:12>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:1>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:4>",
"category": "PAIN_RELIEF",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:7>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [],
"audit": [
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": "<id:26>",
"details": {
"medicationId": "<id:1>",
"name": "Brought by a delegate",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:4>",
"name": "As needed",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:5>",
"name": "Ended window",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"name": "Full injection",
"autoMarkTaken": true
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:8>",
"name": "Mirrored",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:9>",
"name": "Mixed schedules",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:10>",
"name": "One shot",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:11>",
"name": "Plain tablet",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:12>",
"name": "Retried",
"autoMarkTaken": false
},
"ipAddress": null
}
],
"idempotency": [
{
"userId": "<id:2>",
"key": "<id:27>",
"method": "POST",
"path": "/api/medications",
"responseStatus": 201,
"requestFingerprint": "717bc7f22eaede79d3d0ec9e0197c6fae152d91ae21b29662ebbe2b02d7bd896",
"expiresAt": "2026-10-16T12:00:00.000Z"
}
]
}
}
@@ -0,0 +1,799 @@
{
"status": 403,
"body": {
"data": null,
"error": "Account access denied",
"meta": {
"errorCode": "sharing.access.denied",
"requestId": "<requestId>"
}
},
"events": [
{
"status": 403,
"action": null,
"meta": {
"sharing_refusal": "insufficient_access"
},
"warnings": null,
"error": {
"type": "SharingAccessDeniedError",
"message": "Account access denied"
}
}
],
"effects": [],
"stored": {
"medications": [
{
"id": "<id:1>",
"userId": "<id:2>",
"name": "As needed",
"dose": "400mg",
"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": "Brought by a delegate",
"dose": "20mg",
"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": "Ended window",
"dose": "3mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"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": "Existing 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": "Full injection",
"dose": "1 pen",
"treatmentClass": "GLP1",
"dosesPerUnit": 4,
"unitsPerDose": "0.5",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "INJECTION",
"trackInjectionSites": true,
"allowedInjectionSites": [
"ABDOMEN_LEFT",
"THIGH_RIGHT"
],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "A10BJ06",
"rxNormCode": "1991302",
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 7,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:7>",
"userId": "<id:2>",
"name": "Mirrored",
"dose": "50mg",
"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": "APPLE_HEALTH",
"externalId": "hk-concept-0001",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:8>",
"userId": "<id:2>",
"name": "Mixed schedules",
"dose": "2mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": false,
"autoMarkTaken": false,
"autoMarkTakenSince": null,
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": false,
"criticalAlarmEnabled": false,
"atcCode": null,
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": null,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:9>",
"userId": "<id:2>",
"name": "One shot",
"dose": "1 dose",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"oneShot": true,
"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:10>",
"userId": "<id:2>",
"name": "Plain tablet",
"dose": "5mg",
"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:11>",
"userId": "<id:2>",
"name": "Retried",
"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:12>",
"medicationId": "<id:8>",
"windowStart": "06:00",
"windowEnd": "07:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"06:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "PRN",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:13>",
"medicationId": "<id:10>",
"windowStart": "07:00",
"windowEnd": "09:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"07:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:14>",
"medicationId": "<id:4>",
"windowStart": "08:00",
"windowEnd": "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:15>",
"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:16>",
"medicationId": "<id:11>",
"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:17>",
"medicationId": "<id:3>",
"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:18>",
"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:19>",
"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": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:20>",
"medicationId": "<id:8>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 3,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:21>",
"medicationId": "<id:6>",
"windowStart": "18:00",
"windowEnd": "20:00",
"label": "Evening",
"dose": "0.5 pen",
"unitsPerDose": "1",
"daysOfWeek": null,
"timesOfDay": [
"18:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=WEEKLY;BYDAY=MO",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "20:00",
"start": "18:00",
"timeOfDay": "18:30"
}
]
},
{
"id": "<id:22>",
"medicationId": "<id:8>",
"windowStart": "21:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"21:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
}
],
"revisions": [],
"pauseEras": [],
"courses": [
{
"id": "<id:23>",
"medicationId": "<id:4>",
"userId": "<id:2>",
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:24>",
"medicationId": "<id:6>",
"userId": "<id:2>",
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:25>",
"medicationId": "<id:9>",
"userId": "<id:2>",
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [],
"doseChanges": [],
"inventoryItems": [],
"inventoryEvents": [],
"categories": [
{
"medicationId": "<id:10>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:9>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:8>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:4>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:7>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:11>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:3>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:1>",
"category": "PAIN_RELIEF",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:6>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [],
"audit": [
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": "<id:26>",
"details": {
"medicationId": "<id:3>",
"name": "Brought by a delegate",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"name": "As needed",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:4>",
"name": "Ended window",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:6>",
"name": "Full injection",
"autoMarkTaken": true
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"name": "Mirrored",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:8>",
"name": "Mixed schedules",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:9>",
"name": "One shot",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:10>",
"name": "Plain tablet",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:11>",
"name": "Retried",
"autoMarkTaken": false
},
"ipAddress": null
}
],
"idempotency": [
{
"userId": "<id:2>",
"key": "<id:27>",
"method": "POST",
"path": "/api/medications",
"responseStatus": 201,
"requestFingerprint": "717bc7f22eaede79d3d0ec9e0197c6fae152d91ae21b29662ebbe2b02d7bd896",
"expiresAt": "2026-10-16T12:00:00.000Z"
}
]
}
}
@@ -0,0 +1,797 @@
{
"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": "400mg",
"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": "Brought by a delegate",
"dose": "20mg",
"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": "Ended window",
"dose": "3mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"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": "Existing 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": "Full injection",
"dose": "1 pen",
"treatmentClass": "GLP1",
"dosesPerUnit": 4,
"unitsPerDose": "0.5",
"active": true,
"notificationsEnabled": false,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"oneShot": false,
"asNeeded": false,
"trackIntake": true,
"autoMarkTaken": true,
"autoMarkTakenSince": "<now>",
"deliveryForm": "INJECTION",
"trackInjectionSites": true,
"allowedInjectionSites": [
"ABDOMEN_LEFT",
"THIGH_RIGHT"
],
"liveActivityEnabled": true,
"criticalAlarmEnabled": true,
"atcCode": "A10BJ06",
"rxNormCode": "1991302",
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": 7,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:7>",
"userId": "<id:2>",
"name": "Mirrored",
"dose": "50mg",
"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": "APPLE_HEALTH",
"externalId": "hk-concept-0001",
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:8>",
"userId": "<id:2>",
"name": "Mixed schedules",
"dose": "2mg",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": null,
"endsOn": null,
"oneShot": false,
"asNeeded": false,
"trackIntake": false,
"autoMarkTaken": false,
"autoMarkTakenSince": null,
"deliveryForm": "ORAL",
"trackInjectionSites": false,
"allowedInjectionSites": [],
"liveActivityEnabled": false,
"criticalAlarmEnabled": false,
"atcCode": null,
"rxNormCode": null,
"lowStockNotifiedAt": null,
"lowStockNotifiedThresholdDays": null,
"reorderLeadDays": null,
"externalSource": null,
"externalId": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:9>",
"userId": "<id:2>",
"name": "One shot",
"dose": "1 dose",
"treatmentClass": "GENERIC",
"dosesPerUnit": null,
"unitsPerDose": "1",
"active": true,
"notificationsEnabled": true,
"pausedAt": null,
"snoozedUntil": null,
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"oneShot": true,
"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:10>",
"userId": "<id:2>",
"name": "Plain tablet",
"dose": "5mg",
"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:11>",
"userId": "<id:2>",
"name": "Retried",
"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:12>",
"medicationId": "<id:8>",
"windowStart": "06:00",
"windowEnd": "07:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"06:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "PRN",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:13>",
"medicationId": "<id:10>",
"windowStart": "07:00",
"windowEnd": "09:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"07:00"
],
"reminderGraceMinutes": null,
"rrule": "FREQ=DAILY",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:14>",
"medicationId": "<id:4>",
"windowStart": "08:00",
"windowEnd": "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:15>",
"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:16>",
"medicationId": "<id:11>",
"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:17>",
"medicationId": "<id:3>",
"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:18>",
"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:19>",
"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": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:20>",
"medicationId": "<id:8>",
"windowStart": "12:00",
"windowEnd": "13:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": null,
"timesOfDay": [
"12:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": 3,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
},
{
"id": "<id:21>",
"medicationId": "<id:6>",
"windowStart": "18:00",
"windowEnd": "20:00",
"label": "Evening",
"dose": "0.5 pen",
"unitsPerDose": "1",
"daysOfWeek": null,
"timesOfDay": [
"18:30"
],
"reminderGraceMinutes": 45,
"rrule": "FREQ=WEEKLY;BYDAY=MO",
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": [
{
"end": "20:00",
"start": "18:00",
"timeOfDay": "18:30"
}
]
},
{
"id": "<id:22>",
"medicationId": "<id:8>",
"windowStart": "21:00",
"windowEnd": "22:00",
"label": null,
"dose": null,
"unitsPerDose": null,
"daysOfWeek": "i2;1,3,5",
"timesOfDay": [
"21:00"
],
"reminderGraceMinutes": null,
"rrule": null,
"rollingIntervalDays": null,
"scheduleType": "SCHEDULED",
"cyclicOnWeeks": null,
"cyclicOffWeeks": null,
"doseWindows": null
}
],
"revisions": [],
"pauseEras": [],
"courses": [
{
"id": "<id:23>",
"medicationId": "<id:4>",
"userId": "<id:2>",
"startsOn": "2026-10-05T00:00:00.000Z",
"endsOn": "2026-10-05T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:24>",
"medicationId": "<id:6>",
"userId": "<id:2>",
"startsOn": "2026-10-10T00:00:00.000Z",
"endsOn": "2026-12-31T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
},
{
"id": "<id:25>",
"medicationId": "<id:9>",
"userId": "<id:2>",
"startsOn": "2026-10-20T00:00:00.000Z",
"endsOn": "2026-10-20T00:00:00.000Z",
"noteEncrypted": null,
"createdAt": "<createdAt>",
"updatedAt": "<updatedAt>"
}
],
"intakes": [],
"doseChanges": [],
"inventoryItems": [],
"inventoryEvents": [],
"categories": [
{
"medicationId": "<id:10>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:9>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:8>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:4>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:7>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:11>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:3>",
"category": "OTHER",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:1>",
"category": "PAIN_RELIEF",
"updatedAt": "<updatedAt>"
},
{
"medicationId": "<id:6>",
"category": "custom:5b1f7c2e-4d3a-4b8e-9c61-2a7d0e9f4c13",
"updatedAt": "<updatedAt>"
}
],
"ingredients": [],
"audit": [
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": "<id:26>",
"details": {
"medicationId": "<id:3>",
"name": "Brought by a delegate",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:1>",
"name": "As needed",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:4>",
"name": "Ended window",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:6>",
"name": "Full injection",
"autoMarkTaken": true
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:7>",
"name": "Mirrored",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:8>",
"name": "Mixed schedules",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:9>",
"name": "One shot",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:10>",
"name": "Plain tablet",
"autoMarkTaken": false
},
"ipAddress": null
},
{
"action": "medication.create",
"userId": "<id:2>",
"actorUserId": null,
"details": {
"medicationId": "<id:11>",
"name": "Retried",
"autoMarkTaken": false
},
"ipAddress": null
}
],
"idempotency": [
{
"userId": "<id:2>",
"key": "<id:27>",
"method": "POST",
"path": "/api/medications",
"responseStatus": 201,
"requestFingerprint": "717bc7f22eaede79d3d0ec9e0197c6fae152d91ae21b29662ebbe2b02d7bd896",
"expiresAt": "2026-10-16T12:00:00.000Z"
}
]
}
}
@@ -186,6 +186,21 @@ export async function medicationState(prisma: Client, userIds: string[]) {
};
}
/**
* A server cache reports the hash of the key it looked up, and the key holds
* the account id, so the hash differs on every run. Its presence is kept.
*/
function withoutCacheKeyHashes(facts: unknown): unknown {
if (!facts || typeof facts !== "object") return facts;
const { meta } = facts as { meta?: unknown };
if (!meta || typeof meta !== "object") return facts;
const cleaned: Record<string, unknown> = {};
for (const [k, v] of Object.entries(meta)) {
cleaned[k] = /^cache\..+\.key_hash$/.test(k) ? "<key_hash>" : v;
}
return { ...facts, meta: cleaned };
}
export interface ParityCall {
/** Snapshot name, `<route>.<case>`. */
name: string;
@@ -215,7 +230,7 @@ export async function parityStep(call: ParityCall) {
{
status: res.status,
body: res.body,
events: events.map(eventFacts),
events: events.map(eventFacts).map(withoutCacheKeyHashes),
effects: effectRecorder.take(),
stored: await medicationState(getPrismaClient(), call.userIds),
},
@@ -0,0 +1,344 @@
/**
* Parity for `GET` and `POST /api/medications` while the create moves 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 list for its owner, for a
* reading delegate and for nobody; a plain create, a full one with a custom
* category, a course window and doses recorded automatically, an as-needed
* one, a one-shot one and a PRN schedule; the refusals (an unknown category,
* a course that ends before it starts, the two one-shot shapes, an unstable
* concept id, a body the schema refuses); a mirrored create, its replay, and
* the mirror cap on a second account; an idempotent retry; and creates by a
* delegate who may write and one who may only read. After each request the
* snapshot holds the response, the wide event and every medication row of
* the accounts.
*
* The clock is pinned (`Date` only), so the snapshot is the same on every
* day it runs.
*/
import { afterAll, beforeAll, describe, it, vi } from "vitest";
import { GET, POST } from "@/app/api/medications/route";
import { encryptToBytes } from "@/lib/ai/coach/bytes-codec";
import { anonymous, type RouteAuth } from "../../../kit/call-route";
import { makeMedication, makeSession, makeUser } from "../../../kit/factories";
import { getPrismaClient, truncateAllTables } from "../../setup";
import { delegateOf, parityStep } from "./medication-state";
vi.mock("@/lib/logging/transports", async (importOriginal) => {
const actual =
await importOriginal<typeof import("@/lib/logging/transports")>();
const { wideEventRecorder: recorder } = await import("../../../kit/parity");
return {
...actual,
emitIfSampled: (event: (typeof recorder.events)[number]) => {
recorder.events.push(event);
},
};
});
const prisma = getPrismaClient();
const NOW = new Date("2026-10-15T12:00:00.000Z");
const ROUTE = "/api/medications";
/**
* The create answers without the read-model fields (reminder state, course
* status, stock and runway) 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 CREATE_ANSWER = {
skip: "the create 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 writer: { auth: RouteAuth; headers: Record<string, string> };
let reader: { auth: RouteAuth; headers: Record<string, string> };
async function list(
name: string,
options: { auth?: RouteAuth; headers?: Record<string, string> } = {},
) {
await parityStep({
name: `medications.${name}`,
handler: GET,
options: {
method: "GET",
route: ROUTE,
auth: options.auth ?? owner,
headers: options.headers,
},
userIds,
now: NOW,
});
}
async function create(
name: string,
body: unknown,
options: {
auth?: RouteAuth;
headers?: Record<string, string>;
userIds?: string[];
} = {},
) {
await parityStep({
name: `medications.${name}`,
handler: POST,
options: {
method: "POST",
route: ROUTE,
body,
auth: options.auth ?? owner,
headers: options.headers,
contract: CREATE_ANSWER,
},
userIds: options.userIds ?? userIds,
now: NOW,
});
}
const schedule = (windowStart: string, windowEnd: string, extra = {}) => ({
windowStart,
windowEnd,
...extra,
});
beforeAll(async () => {
vi.useFakeTimers({ toFake: ["Date"], now: NOW });
await truncateAllTables(prisma);
const user = await makeUser({ timezone: "Europe/Berlin" });
ownerId = user.id;
owner = await makeSession(user);
await makeMedication(
user,
{
name: "Existing tablet",
startsOn: new Date("2026-10-01"),
createdAt: new Date("2026-10-01T06:00:00.000Z"),
},
[
{
windowStart: "08:00",
windowEnd: "10:00",
timesOfDay: ["08:00"],
rrule: "FREQ=DAILY",
},
],
);
await prisma.medicationCategoryLabel.create({
data: {
userId: ownerId,
key: CUSTOM_KEY,
labelEncrypted: encryptToBytes("Heart and circulation"),
},
});
const w = await delegateOf(prisma, user, "WRITE");
const r = await delegateOf(prisma, user, "READ");
writer = { auth: w.auth, headers: w.headers };
reader = { auth: r.auth, headers: r.headers };
userIds = [ownerId, w.delegate.id, r.delegate.id];
});
afterAll(() => {
vi.useRealTimers();
});
describe("GET /api/medications parity", () => {
it("01 the owner's list", async () => {
await list("01-list");
});
it("02 a reading delegate's view of it, and nobody's", async () => {
await list("02a-list-reader", reader);
await list("02b-list-anonymous", { auth: anonymous });
});
});
describe("POST /api/medications parity", () => {
it("11 a plain create", async () => {
await create("11-plain", {
name: "Plain tablet",
dose: "5mg",
schedules: [schedule("07:00", "09:00")],
});
});
it("12 a full create with a custom category, a course and auto-take", async () => {
await create("12-full", {
name: "Full injection",
dose: "1 pen",
category: CUSTOM_KEY,
treatmentClass: "GLP1",
dosesPerUnit: 4,
unitsPerDose: 0.5,
reorderLeadDays: 7,
deliveryForm: "INJECTION",
trackInjectionSites: true,
allowedInjectionSites: ["ABDOMEN_LEFT", "THIGH_RIGHT"],
notificationsEnabled: false,
liveActivityEnabled: true,
criticalAlarmEnabled: true,
atcCode: "A10BJ06",
rxNormCode: "1991302",
startsOn: "2026-10-10",
endsOn: "2026-12-31",
autoMarkTaken: true,
schedules: [
schedule("18:00", "20:00", {
label: "Evening",
dose: "0.5 pen",
unitsPerDose: 1,
timesOfDay: ["18:30"],
reminderGraceMinutes: 45,
rrule: "FREQ=WEEKLY;BYDAY=MO",
doseWindows: [{ timeOfDay: "18:30", start: "18:00", end: "20:00" }],
}),
],
});
});
it("13 an as-needed create, a one-shot one and a PRN schedule", async () => {
await create("13a-as-needed", {
name: "As needed",
dose: "400mg",
category: "PAIN_RELIEF",
asNeeded: true,
});
await create("13b-one-shot", {
name: "One shot",
dose: "1 dose",
oneShot: true,
startsOn: "2026-10-20",
endsOn: "2026-11-20",
schedules: [schedule("09:00", "11:00")],
});
await create("13c-prn-and-legacy-days", {
name: "Mixed schedules",
dose: "2mg",
trackIntake: false,
schedules: [
schedule("06:00", "07:00", { scheduleType: "PRN" }),
schedule("21:00", "22:00", { daysOfWeek: [1, 3, 5], intervalWeeks: 2 }),
schedule("12:00", "13:00", { rollingIntervalDays: 3 }),
],
});
await create("13d-ended-window", {
name: "Ended window",
dose: "3mg",
endsOn: "2026-10-05",
schedules: [schedule("08:00", "09:00")],
});
});
it("14 the refusals", async () => {
await create("14a-unknown-category", {
name: "Unknown category",
dose: "1mg",
category: "custom:0a6c2d4e-1111-4222-8333-944455556666",
schedules: [schedule("08:00", "09:00")],
});
await create("14b-course-ends-before-start", {
name: "Backwards course",
dose: "1mg",
startsOn: "2026-10-20",
endsOn: "2026-10-10",
schedules: [schedule("08:00", "09:00")],
});
await create("14c-one-shot-two-schedules", {
name: "One shot twice",
dose: "1mg",
oneShot: true,
startsOn: "2026-10-20",
schedules: [schedule("08:00", "09:00"), schedule("20:00", "21:00")],
});
await create("14d-one-shot-recurrence", {
name: "One shot recurring",
dose: "1mg",
oneShot: true,
startsOn: "2026-10-20",
schedules: [schedule("08:00", "09:00", { rrule: "FREQ=DAILY" })],
});
await create("14e-unstable-concept-id", {
name: "Phantom",
dose: "1mg",
externalSource: "APPLE_HEALTH",
externalId: "<HKMedicationConcept: 0x600003a1c0c0>",
schedules: [schedule("08:00", "09:00")],
});
await create("14f-invalid", { name: "", dose: 5, schedules: "daily" });
});
it("15 a mirrored create and its replay", async () => {
const mirrored = {
name: "Mirrored",
dose: "50mg",
externalSource: "APPLE_HEALTH",
externalId: "hk-concept-0001",
schedules: [schedule("08:00", "09:00")],
};
await create("15a-mirror", mirrored);
await create("15b-mirror-replay", { ...mirrored, name: "Renamed" });
});
it("16 the mirror cap", async () => {
const capped = await makeUser({ timezone: "UTC" });
await prisma.medication.createMany({
data: Array.from({ length: 30 }, (_, i) => ({
userId: capped.id,
name: `Mirror ${String(i).padStart(2, "0")}`,
dose: "1mg",
externalSource: "APPLE_HEALTH" as const,
externalId: `hk-cap-${String(i).padStart(2, "0")}`,
})),
});
await create(
"16-mirror-cap",
{
name: "One too many",
dose: "1mg",
externalSource: "APPLE_HEALTH",
externalId: "hk-cap-30",
schedules: [schedule("08:00", "09:00")],
},
{ auth: await makeSession(capped), userIds: [capped.id] },
);
});
it("17 a retried create under one idempotency key", async () => {
const body = {
name: "Retried",
dose: "10mg",
schedules: [schedule("08:00", "09:00")],
};
const headers = {
"idempotency-key": "6f9d2c4a-8b1e-4f3a-9d7c-5e2b1a0c9d8e",
};
await create("17a-idempotent-first", body, { headers });
await create("17b-idempotent-replay", body, { headers });
});
it("18 a delegate who may write, and one who may only read", async () => {
const body = {
name: "Brought by a delegate",
dose: "20mg",
schedules: [schedule("08:00", "09:00")],
};
await create("18a-writer", body, writer);
await create("18b-reader", body, reader);
});
it("19 no credentials", async () => {
await create(
"19-anonymous",
{ name: "Nobody", dose: "1mg" },
{
auth: anonymous,
},
);
});
});