# Generate patient instructions

```
POST 
/generate_patient_instructions
```

Generates post-visit instructions for the patient. This extracts and summarizes the instructions the healthcare provider gave to the patient during the encounter.

## Request[​](#request "Direct link to Request")

* application/json

### Body**required**

* **note** objectrequired

  The Nabla-generated clinical note of the encounter.

  ******sections** object\[]required

  Sections of the note.

  Array \[

* **key**copilot\_note\_section\_key (string)required

  A key identifying a section of a note. The set of possible keys depend on the template that is used. Check [Note template](/core-api/guides/note-templates-sections-legacy-2024-10-01) for possible values.

  **Possible values:** \[`ALLERGIES`, `APPOINTMENTS`, `ASSESSMENT`, `ASSESSMENT_AND_PLAN`, `CARDIOVASCULAR_RISKS`, `CHIEF_COMPLAINT`, `CURRENT_MEDICATIONS`, `DIET_APPOINTMENTS`, `DIET_CHIEF_COMPLAINT`, `DIET_HABITS`, `DIET_LIFESTYLE`, `DIET_MEDICAL_HISTORY`, `DIET_OBJECTIVES`, `DIET_VITALS`, `FAMILY_HISTORY`, `HISTORY_OF_PRESENT_ILLNESS`, `IMAGING_RESULTS`, `IMMUNIZATIONS`, `LAB_RESULTS`, `MENTAL_HEALTH_EXAM`, `MENTAL_HEALTH_HISTORY`, `PAST_MEDICAL_HISTORY`, `PAST_OBSTETRIC_HISTORY`, `PAST_SURGICAL_HISTORY`, `PHYSICAL_EXAM`, `PLAN`, `PRESCRIPTION`, `PSYCHOLOGY_HISTORY_OF_COMPLAINT`, `SOAP_ASSESSMENT`, `SOAP_OBJECTIVE`, `SOAP_PLAN`, `SOAP_SUBJECTIVE`, `SOCIAL_HISTORY`, `VITALS`, `WELL_CHILD_CARE`]

  **Example:<!-- -->&#x20;**`CHIEF_COMPLAINT`

  **title**stringrequired

  The section title.

  **Example:<!-- -->&#x20;**`Chief complaint`

  **text**string

  Content of the note section (required).

  **Example:<!-- -->&#x20;**`Sleep disorder`

  ]

  **note\_locale**copilot\_note\_locale (string)required

  Locale of the note.

  **Possible values:** \[`en-US`, `en-GB`, `fr-FR`]

  **Example:<!-- -->&#x20;**`en-US`

  **instructions\_locale**copilot\_speech\_locale (string)required

  Locale of the patient instructions.

  **Possible values:** \[`en-US`, `en-GB`, `fr-FR`, `es-ES`, `es-MX`]

  **Example:<!-- -->&#x20;**`en-US`

  **recipient\_type**copilot\_patient\_instructions\_recipient\_type (string)

  Recipient type of the patient instructions. This is especially useful for pediatric encounters.

  **Possible values:** \[`PATIENT`, `PARENT`]

  **Default value:<!-- -->&#x20;**`PATIENT`

  **Example:<!-- -->&#x20;**`PATIENT`

## Responses[​](#responses "Direct link to Responses")

* 200

- application/json

* Schema
* Example (from schema)

**Schema**

* **instructions**stringrequired

  List of instructions for the patient.

  **Example:<!-- -->&#x20;**`- Order a sleep test that you can do at home. This will help us understand more about how you sleep. - After you've done the sleep test, we'll talk about the results in our next meeting.`

```
{

  "instructions": "- Order a sleep test that you can do at home. This will help us understand more about how you sleep.\n- After you've done the sleep test, we'll talk about the results in our next meeting."

}
```

## Operation spec

```json
{
  "method": "post",
  "path": "/generate_patient_instructions",
  "operationId": "copilot-generate-patient-instructions",
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "description": "The input to generate the patient instructions.",
          "properties": {
            "note": {
              "description": "The Nabla-generated clinical note of the encounter.",
              "type": "object",
              "properties": {
                "sections": {
                  "type": "array",
                  "description": "Sections of the note.",
                  "items": {
                    "type": "object",
                    "description": "A note section.",
                    "properties": {
                      "key": {
                        "type": "string",
                        "description": "A key identifying a section of a note.\nThe set of possible keys depend on the template that is used. Check [Note template](/guides/note-templates-sections) for possible values.",
                        "example": "CHIEF_COMPLAINT",
                        "enum": [
                          "ALLERGIES",
                          "APPOINTMENTS",
                          "ASSESSMENT",
                          "ASSESSMENT_AND_PLAN",
                          "CARDIOVASCULAR_RISKS",
                          "CHIEF_COMPLAINT",
                          "CURRENT_MEDICATIONS",
                          "DIET_APPOINTMENTS",
                          "DIET_CHIEF_COMPLAINT",
                          "DIET_HABITS",
                          "DIET_LIFESTYLE",
                          "DIET_MEDICAL_HISTORY",
                          "DIET_OBJECTIVES",
                          "DIET_VITALS",
                          "FAMILY_HISTORY",
                          "HISTORY_OF_PRESENT_ILLNESS",
                          "IMAGING_RESULTS",
                          "IMMUNIZATIONS",
                          "LAB_RESULTS",
                          "MENTAL_HEALTH_EXAM",
                          "MENTAL_HEALTH_HISTORY",
                          "PAST_MEDICAL_HISTORY",
                          "PAST_OBSTETRIC_HISTORY",
                          "PAST_SURGICAL_HISTORY",
                          "PHYSICAL_EXAM",
                          "PLAN",
                          "PRESCRIPTION",
                          "PSYCHOLOGY_HISTORY_OF_COMPLAINT",
                          "SOAP_ASSESSMENT",
                          "SOAP_OBJECTIVE",
                          "SOAP_PLAN",
                          "SOAP_SUBJECTIVE",
                          "SOCIAL_HISTORY",
                          "VITALS",
                          "WELL_CHILD_CARE"
                        ],
                        "title": "copilot_note_section_key"
                      },
                      "title": {
                        "type": "string",
                        "description": "The section title.",
                        "example": "Chief complaint"
                      },
                      "text": {
                        "type": "string",
                        "description": "Content of the note section (required).",
                        "example": "Sleep disorder"
                      }
                    },
                    "required": [
                      "key",
                      "title"
                    ],
                    "title": "copilot_note_section_request"
                  }
                }
              },
              "required": [
                "sections"
              ],
              "title": "copilot_note_request"
            },
            "note_locale": {
              "type": "string",
              "description": "Locale of the note.",
              "enum": [
                "en-US",
                "en-GB",
                "fr-FR"
              ],
              "example": "en-US",
              "title": "copilot_note_locale"
            },
            "instructions_locale": {
              "description": "Locale of the patient instructions.",
              "type": "string",
              "enum": [
                "en-US",
                "en-GB",
                "fr-FR",
                "es-ES",
                "es-MX"
              ],
              "example": "en-US",
              "title": "copilot_speech_locale"
            },
            "recipient_type": {
              "type": "string",
              "enum": [
                "PATIENT",
                "PARENT"
              ],
              "description": "Recipient type of the patient instructions. This is especially useful for pediatric encounters.",
              "default": "PATIENT",
              "example": "PATIENT",
              "title": "copilot_patient_instructions_recipient_type"
            }
          },
          "required": [
            "note",
            "note_locale",
            "instructions_locale"
          ],
          "title": "generate_patient_instructions_request"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Patient instructions.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "instructions": {
                "type": "string",
                "description": "List of instructions for the patient.",
                "example": "- Order a sleep test that you can do at home. This will help us understand more about how you sleep.\n- After you've done the sleep test, we'll talk about the results in our next meeting."
              }
            },
            "required": [
              "instructions"
            ],
            "title": "generate_patient_instructions_response"
          }
        }
      }
    }
  }
}
```
