# Patient Programs

Patient Program endpoints manage the enrollment of patients into care programs, track phase progression, and handle program completion or unenrollment.

**Base path:** `/{tenantName}/{instanceName}/patients/{patientId}/programs`

***

## Endpoints

### GET Get Patient's Program by Name

**GET** `/{tenantName}/{instanceName}/patients/{patientId}/programs/{programName}`

Returns the active enrollment record for a patient in a specific program.

#### Path Parameters

| Parameter     | Type   | Required | Description         |
| ------------- | ------ | -------- | ------------------- |
| `patientId`   | string | Yes      | Welkin patient UUID |
| `programName` | string | Yes      | Program name        |

#### Example Response `200 OK`

```json
{
  "id": "enrollment-uuid",
  "patientId": "a1b2c3d4",
  "programName": "diabetes-management",
  "currentPhase": "active-monitoring",
  "status": "ACTIVE",
  "enrolledAt": "2026-01-10T00:00:00Z",
  "updatedAt": "2026-02-15T00:00:00Z"
}
```

***

### GET Get Patient's Program by ID

**GET** `/{tenantName}/{instanceName}/patients/{patientId}/programs/{enrollmentId}`

Returns a specific enrollment record by its UUID. Works for both active and finished programs.

***

### PATCH Update Program Status and Assign Program

**PATCH** `/{tenantName}/{instanceName}/patients/{patientId}/programs/{programName}`

Enrolls a patient in a program or updates their enrollment status.

#### Request Body

| Field        | Type   | Required | Description                          |
| ------------ | ------ | -------- | ------------------------------------ |
| `status`     | string | Yes      | `ACTIVE`, `PAUSED`, or `COMPLETED`   |
| `phase`      | string | No       | Phase name to assign on enrollment   |
| `assignedTo` | string | No       | UUID of the care team user to assign |

#### Example Request

```http
PATCH /acme-health/live/patients/a1b2c3d4/programs/diabetes-management
Authorization: Bearer <token>
Content-Type: application/json

{
  "status": "ACTIVE",
  "phase": "onboarding",
  "assignedTo": "user-uuid"
}
```

***

### PATCH Change Phase

**PATCH** `/{tenantName}/{instanceName}/patients/{patientId}/programs/{programName}/phase`

Advances or changes the patient's current phase within a program.

#### Request Body

| Field   | Type   | Required | Description                        |
| ------- | ------ | -------- | ---------------------------------- |
| `phase` | string | Yes      | Target phase name to transition to |

***

### DELETE Unassign Patient from Program

**DELETE** `/{tenantName}/{instanceName}/patients/{patientId}/programs/{programName}`

Removes a patient from a program enrollment.

#### Response `204 No Content`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.welkinhealth.com/developer-and-integration-guide/api-reference/patient-programs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
