{
  "_comment": "Educational USDM Timing/sub-timeline example (USDM Play). Illustrates anchor + relative timing with ISO 8601 durations and windows.",
  "_conformance_notes": "Fixed vs. the previous version of this file: the ScheduledActivityInstance flow (defaultConditionId chain: predose -> dose -> 1h -> 24h) now matches the Timing directions instead of contradicting them; the terminal instance (SAI_24h) now points to a ScheduleTimelineExit instead of having no exit and no default condition; mainTimeline is explicitly set to false since this is a sub-timeline, not the study's main timeline.",
  "scheduleTimeline": {
    "id": "ScheduleTimeline_PK",
    "instanceType": "ScheduleTimeline",
    "name": "PK Sub-timeline",
    "mainTimeline": false,
    "entryCondition": "Start of dosing",
    "exits": [
      { "id": "Exit_PK_1", "instanceType": "ScheduleTimelineExit", "label": "End of PK profile" }
    ],
    "instances": [
      { "id": "SAI_predose", "instanceType": "ScheduledActivityInstance", "activityIds": ["Activity_PKsample"], "defaultConditionId": "SAI_dose" },
      { "id": "SAI_dose", "instanceType": "ScheduledActivityInstance", "activityIds": ["Activity_Dose"], "defaultConditionId": "SAI_1h" },
      { "id": "SAI_1h", "instanceType": "ScheduledActivityInstance", "activityIds": ["Activity_PKsample"], "defaultConditionId": "SAI_24h" },
      { "id": "SAI_24h", "instanceType": "ScheduledActivityInstance", "activityIds": ["Activity_PKsample"], "timelineExitId": "Exit_PK_1" }
    ],
    "timings": [
      {
        "id": "Timing_anchor",
        "instanceType": "Timing",
        "type": { "code": "C201357", "decode": "Fixed Reference" },
        "value": "P0D",
        "relativeToFrom": { "code": "C201358", "decode": "Start to Start" },
        "relativeToScheduledInstanceId": "SAI_dose",
        "relativeFromScheduledInstanceId": "SAI_dose"
      },
      {
        "id": "Timing_predose",
        "instanceType": "Timing",
        "type": { "code": "C201356", "decode": "Before" },
        "value": "PT30M",
        "windowLower": "PT10M",
        "windowUpper": "PT0M",
        "relativeToScheduledInstanceId": "SAI_dose",
        "relativeFromScheduledInstanceId": "SAI_predose"
      },
      {
        "id": "Timing_1h",
        "instanceType": "Timing",
        "type": { "code": "C201355", "decode": "After" },
        "value": "PT1H",
        "windowLower": "PT5M",
        "windowUpper": "PT5M",
        "relativeToScheduledInstanceId": "SAI_1h",
        "relativeFromScheduledInstanceId": "SAI_dose"
      },
      {
        "id": "Timing_24h",
        "instanceType": "Timing",
        "type": { "code": "C201355", "decode": "After" },
        "value": "P1D",
        "windowLower": "PT30M",
        "windowUpper": "PT30M",
        "relativeToScheduledInstanceId": "SAI_24h",
        "relativeFromScheduledInstanceId": "SAI_dose"
      }
    ]
  }
}
