API Referenceapipatient-graphGET /v1/adherence/today-schedule

GET /v1/adherence/today-schedule

Service: patient-graph · operationId: (none)

Required scopes

(no scope declared — review service config)

Query parameters

  • patient_id (string) required
  • date (string) required
  • protocol_id (string) —

Responses

200 Member’s resolved schedule grouped into Today buckets (morning/evening/before_bed/any)

{
  "type": "object",
  "properties": {
    "patient_id": {
      "type": "string",
      "format": "uuid"
    },
    "date": {
      "type": "string"
    },
    "weekday": {
      "type": "integer",
      "minimum": 0,
      "maximum": 6
    },
    "morning": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "protocol_id": {
            "type": "string",
            "format": "uuid"
          },
          "protocol_compound_id": {
            "type": "string",
            "format": "uuid"
          },
          "compound_id": {
            "type": "string"
          },
          "compound_slug": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "dose_amount": {
            "type": "string"
          },
          "dose_unit": {
            "type": "string"
          },
          "dose_mcg_equivalent": {
            "type": [
              "string",
              "null"
            ]
          },
          "route": {
            "type": [
              "string",
              "null"
            ]
          },
          "days_of_week": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 6
            }
          },
          "timing": {
            "type": "string",
            "enum": [
              "morning",
              "evening",
              "before_bed",
              "any"
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "canonical",
              "schedule",
              "overridden",
              "added"
            ]
          },
          "schedule_changed": {
            "type": "boolean"
          }
        },
        "required": [
          "protocol_id",
          "protocol_compound_id",
          "compound_id",
          "compound_slug",
          "display_name",
          "dose_amount",
          "dose_unit",
          "dose_mcg_equivalent",
          "route",
          "days_of_week",
          "timing",
          "source",
          "schedule_changed"
        ]
      }
    },
    "evening": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "protocol_id": {
            "type": "string",
            "format": "uuid"
          },
          "protocol_compound_id": {
            "type": "string",
            "format": "uuid"
          },
          "compound_id": {
            "type": "string"
          },
          "compound_slug": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "dose_amount": {
            "type": "string"
          },
          "dose_unit": {
            "type": "string"
          },
          "dose_mcg_equivalent": {
            "type": [
              "string",
              "null"
            ]
          },
          "route": {
            "type": [
              "string",
              "null"
            ]
          },
          "days_of_week": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 6
            }
          },
          "timing": {
            "type": "string",
            "enum": [
              "morning",
              "evening",
              "before_bed",
              "any"
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "canonical",
              "schedule",
              "overridden",
              "added"
            ]
          },
          "schedule_changed": {
            "type": "boolean"
          }
        },
        "required": [
          "protocol_id",
          "protocol_compound_id",
          "compound_id",
          "compound_slug",
          "display_name",
          "dose_amount",
          "dose_unit",
          "dose_mcg_equivalent",
          "route",
          "days_of_week",
          "timing",
          "source",
          "schedule_changed"
        ]
      }
    },
    "before_bed": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "protocol_id": {
            "type": "string",
            "format": "uuid"
          },
          "protocol_compound_id": {
            "type": "string",
            "format": "uuid"
          },
          "compound_id": {
            "type": "string"
          },
          "compound_slug": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "dose_amount": {
            "type": "string"
          },
          "dose_unit": {
            "type": "string"
          },
          "dose_mcg_equivalent": {
            "type": [
              "string",
              "null"
            ]
          },
          "route": {
            "type": [
              "string",
              "null"
            ]
          },
          "days_of_week": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 6
            }
          },
          "timing": {
            "type": "string",
            "enum": [
              "morning",
              "evening",
              "before_bed",
              "any"
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "canonical",
              "schedule",
              "overridden",
              "added"
            ]
          },
          "schedule_changed": {
            "type": "boolean"
          }
        },
        "required": [
          "protocol_id",
          "protocol_compound_id",
          "compound_id",
          "compound_slug",
          "display_name",
          "dose_amount",
          "dose_unit",
          "dose_mcg_equivalent",
          "route",
          "days_of_week",
          "timing",
          "source",
          "schedule_changed"
        ]
      }
    },
    "any": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "protocol_id": {
            "type": "string",
            "format": "uuid"
          },
          "protocol_compound_id": {
            "type": "string",
            "format": "uuid"
          },
          "compound_id": {
            "type": "string"
          },
          "compound_slug": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "dose_amount": {
            "type": "string"
          },
          "dose_unit": {
            "type": "string"
          },
          "dose_mcg_equivalent": {
            "type": [
              "string",
              "null"
            ]
          },
          "route": {
            "type": [
              "string",
              "null"
            ]
          },
          "days_of_week": {
            "type": "array",
            "items": {
              "type": "integer",
              "minimum": 0,
              "maximum": 6
            }
          },
          "timing": {
            "type": "string",
            "enum": [
              "morning",
              "evening",
              "before_bed",
              "any"
            ]
          },
          "source": {
            "type": "string",
            "enum": [
              "canonical",
              "schedule",
              "overridden",
              "added"
            ]
          },
          "schedule_changed": {
            "type": "boolean"
          }
        },
        "required": [
          "protocol_id",
          "protocol_compound_id",
          "compound_id",
          "compound_slug",
          "display_name",
          "dose_amount",
          "dose_unit",
          "dose_mcg_equivalent",
          "route",
          "days_of_week",
          "timing",
          "source",
          "schedule_changed"
        ]
      }
    }
  },
  "required": [
    "patient_id",
    "date",
    "weekday",
    "morning",
    "evening",
    "before_bed",
    "any"
  ]
}

400 Bad request

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

401 Unauthorized

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

404 Patient not found

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

Example

curl -X GET https://patient-graph.platform.loop.health/v1/adherence/today-schedule \
  -H "Authorization: Bearer $ACCESS_TOKEN"