API Referenceapipatient-graphPOST /v1/patients/{patient_id}/encounters

POST /v1/patients/\{patient_id\}/encounters

Service: patient-graph · operationId: (none)

Required scopes

(no scope declared — review service config)

Path parameters

  • patient_id (string) required

Request body

{
  "type": "object",
  "properties": {
    "brand_id": {
      "type": "string",
      "minLength": 1
    },
    "provider_id": {
      "type": "string",
      "format": "uuid"
    },
    "encounter_type": {
      "type": "string",
      "enum": [
        "office_visit",
        "telehealth",
        "lab",
        "pharmacy",
        "other"
      ]
    },
    "scheduled_at": {
      "type": "string",
      "format": "date-time"
    },
    "chief_complaint": {
      "type": "string"
    },
    "notes": {
      "type": "string"
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "default": {}
    }
  },
  "required": [
    "brand_id",
    "encounter_type"
  ]
}

Responses

201 Encounter recorded

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "patient_id": {
      "type": "string"
    },
    "provider_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "brand_id": {
      "type": "string"
    },
    "encounter_type": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "scheduled_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "started_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "ended_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "chief_complaint": {
      "type": [
        "string",
        "null"
      ]
    },
    "notes": {
      "type": [
        "string",
        "null"
      ]
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {}
    },
    "created_at": {
      "type": "string"
    },
    "updated_at": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "patient_id",
    "provider_id",
    "brand_id",
    "encounter_type",
    "status",
    "scheduled_at",
    "started_at",
    "ended_at",
    "chief_complaint",
    "notes",
    "metadata",
    "created_at",
    "updated_at"
  ]
}

404 Patient not found

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

500 Internal error

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

Example

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