API Referenceapipatient-graphPOST /v1/coaches/me/triage

POST /v1/coaches/me/triage

Service: patient-graph · operationId: (none)

Required scopes

(no scope declared — review service config)

Request body

{
  "type": "object",
  "properties": {
    "patients": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "patient_id": {
            "type": "string",
            "minLength": 1
          },
          "display_name": {
            "type": "string",
            "minLength": 1
          },
          "enrolled_at": {
            "type": "string",
            "minLength": 1
          },
          "protocol_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "last_interaction_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "adherence_pct_7d": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "maximum": 100
          },
          "has_critical_lab_recent": {
            "type": "boolean"
          },
          "unread_message_count_7d": {
            "type": "integer",
            "minimum": 0
          },
          "had_check_in_for_day": {
            "type": "object",
            "properties": {
              "30": {
                "type": "boolean"
              },
              "60": {
                "type": "boolean"
              },
              "90": {
                "type": "boolean"
              }
            }
          }
        },
        "required": [
          "patient_id",
          "display_name",
          "enrolled_at"
        ]
      }
    }
  },
  "required": [
    "patients"
  ]
}

Responses

200 Triage queue sorted by score desc

{
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "patient_id": {
            "type": "string"
          },
          "display_name": {
            "type": "string"
          },
          "score": {
            "type": "integer",
            "minimum": 0
          },
          "reasons": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reason_codes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "due_check_in_day": {
            "anyOf": [
              {
                "type": "number",
                "enum": [
                  30
                ]
              },
              {
                "type": "number",
                "enum": [
                  60
                ]
              },
              {
                "type": "number",
                "enum": [
                  90
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "last_interaction_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "protocol_id": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "patient_id",
          "display_name",
          "score",
          "reasons",
          "reason_codes",
          "due_check_in_day",
          "last_interaction_at",
          "protocol_id"
        ]
      }
    },
    "cache": {
      "type": "object",
      "properties": {
        "hit": {
          "type": "boolean"
        },
        "ttl_ms": {
          "type": "integer",
          "minimum": 0
        }
      },
      "required": [
        "hit",
        "ttl_ms"
      ]
    }
  },
  "required": [
    "data",
    "cache"
  ]
}

401 Unauthorized

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

Example

curl -X POST https://patient-graph.platform.loop.health/v1/coaches/me/triage \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'