API ReferenceapiclinicalPOST /v1/intake-eligibility/evaluate

POST /v1/intake-eligibility/evaluate

Service: clinical · operationId: (none)

Required scopes

(no scope declared — review service config)

Request body

{
  "type": "object",
  "properties": {
    "protocol_id": {
      "type": "string",
      "minLength": 1
    },
    "intake_response": {
      "type": "object",
      "properties": {
        "date_of_birth": {
          "type": "string",
          "format": "date"
        },
        "sex_assigned_at_birth": {
          "type": "string",
          "enum": [
            "female",
            "male",
            "intersex"
          ]
        },
        "biological_sex_relevant": {
          "type": "boolean"
        },
        "medications": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        },
        "conditions": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "pregnancy",
              "breastfeeding",
              "active-cancer",
              "autoimmune-flare",
              "kidney-disease",
              "liver-disease",
              "recent-surgery",
              "other"
            ]
          }
        },
        "other_condition_text": {
          "type": "string",
          "default": ""
        },
        "lifestyle": {
          "type": "object",
          "properties": {
            "alcohol_use": {
              "type": "string",
              "enum": [
                "none",
                "occasional",
                "moderate",
                "heavy"
              ]
            },
            "recreational_drug_use": {
              "type": "string",
              "enum": [
                "none",
                "occasional",
                "regular"
              ]
            },
            "supplements": {
              "type": "string",
              "default": ""
            }
          },
          "required": [
            "alcohol_use",
            "recreational_drug_use"
          ]
        },
        "goals_text": {
          "type": "string",
          "default": ""
        },
        "goals": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          }
        }
      },
      "required": [
        "date_of_birth",
        "sex_assigned_at_birth",
        "biological_sex_relevant",
        "medications",
        "conditions",
        "lifestyle",
        "goals"
      ]
    }
  },
  "required": [
    "protocol_id",
    "intake_response"
  ]
}

Responses

200 Intake eligibility result

{
  "type": "object",
  "properties": {
    "eligibility_status": {
      "type": "string",
      "enum": [
        "green",
        "yellow",
        "red"
      ]
    },
    "summary": {
      "type": "string"
    },
    "blocking_reasons": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "advisories": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "medication_matches": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "rule_id": {
            "type": "string"
          },
          "medication_code": {
            "type": "string"
          },
          "medication_name": {
            "type": "string"
          },
          "protocol_category": {
            "type": "string"
          },
          "severity": {
            "type": "string",
            "enum": [
              "absolute",
              "relative",
              "caution"
            ]
          },
          "reason": {
            "type": "string"
          },
          "alternatives": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "rule_id",
          "medication_code",
          "medication_name",
          "protocol_category",
          "severity",
          "reason",
          "alternatives"
        ]
      }
    }
  },
  "required": [
    "eligibility_status",
    "summary",
    "blocking_reasons",
    "advisories",
    "medication_matches"
  ]
}

404 Protocol not found

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

Example

curl -X POST https://clinical.platform.loop.health/v1/intake-eligibility/evaluate \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'