# Generate patient instructions

```
POST 
/generate-patient-instructions
```

Generates clear, post-visit instructions based on what the healthcare provider communicated to the patient during the encounter. These instructions are intended to help patients better understand and follow their care plan.

Provider review

Patient instructions are generated automatically and may be translated. A licensed healthcare provider should review and approve them before sharing with the patient, especially when translation is involved.

This endpoint supports multiple input formats and languages to fit a variety of clinical workflows.

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

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

* 200

Patient instructions.

## Operation spec

```json
{
  "method": "post",
  "path": "/generate-patient-instructions",
  "operationId": "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": {
                "title": {
                  "type": "string",
                  "description": "Title of the note.",
                  "example": "Fever and strong headache"
                },
                "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](/core-api/guides/note-templates/note-templates-sections) for possible values.",
                        "example": "CHIEF_COMPLAINT",
                        "title": "note_section_key"
                      },
                      "title": {
                        "type": "string",
                        "description": "The section title.",
                        "example": "Chief complaint"
                      },
                      "content": {
                        "oneOf": [
                          {
                            "title": "TEXT",
                            "type": "object",
                            "description": "Plain-text note section content.",
                            "required": [
                              "type",
                              "text"
                            ],
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "TEXT"
                                ]
                              },
                              "text": {
                                "type": "string",
                                "description": "Content of the note section."
                              }
                            }
                          },
                          {
                            "title": "SUBSECTIONS",
                            "type": "object",
                            "description": "Structured note section content as subsections.",
                            "required": [
                              "type",
                              "subsections"
                            ],
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "SUBSECTIONS"
                                ]
                              },
                              "subsections": {
                                "type": "array",
                                "minItems": 1,
                                "description": "Structured subsections. Allowed only on the Assessment & Plan section of A&P-merged templates. Order is significant.",
                                "items": {
                                  "type": "object",
                                  "description": "A subsection of a note section. Currently only used on the Assessment & Plan section of A&P-merged templates.",
                                  "properties": {
                                    "id": {
                                      "description": "Stable identifier for this subsection. Echoed on normalized conditions via `subsection_id`.",
                                      "type": "string",
                                      "format": "uuid",
                                      "example": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
                                      "title": "uuid"
                                    },
                                    "title": {
                                      "type": "string",
                                      "description": "Short subsection title (typically a clinical problem name). May be absent (e.g. subsections appended by dot phrase auto-apply)."
                                    },
                                    "text": {
                                      "type": "string",
                                      "description": "Free-text content of the subsection. May be absent if the subsection only carries a title."
                                    }
                                  },
                                  "required": [
                                    "id"
                                  ],
                                  "title": "note_section_subsection_request"
                                }
                              }
                            }
                          }
                        ],
                        "discriminator": {
                          "propertyName": "type",
                          "mapping": {
                            "TEXT": {
                              "type": "object",
                              "description": "Plain-text note section content.",
                              "required": [
                                "type",
                                "text"
                              ],
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "TEXT"
                                  ]
                                },
                                "text": {
                                  "type": "string",
                                  "description": "Content of the note section."
                                }
                              },
                              "title": "note_section_content_text_request"
                            },
                            "SUBSECTIONS": {
                              "type": "object",
                              "description": "Structured note section content as subsections.",
                              "required": [
                                "type",
                                "subsections"
                              ],
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "SUBSECTIONS"
                                  ]
                                },
                                "subsections": {
                                  "type": "array",
                                  "minItems": 1,
                                  "description": "Structured subsections. Allowed only on the Assessment & Plan section of A&P-merged templates. Order is significant.",
                                  "items": {
                                    "type": "object",
                                    "description": "A subsection of a note section. Currently only used on the Assessment & Plan section of A&P-merged templates.",
                                    "properties": {
                                      "id": {
                                        "description": "Stable identifier for this subsection. Echoed on normalized conditions via `subsection_id`.",
                                        "type": "string",
                                        "format": "uuid",
                                        "example": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
                                        "title": "uuid"
                                      },
                                      "title": {
                                        "type": "string",
                                        "description": "Short subsection title (typically a clinical problem name). May be absent (e.g. subsections appended by dot phrase auto-apply)."
                                      },
                                      "text": {
                                        "type": "string",
                                        "description": "Free-text content of the subsection. May be absent if the subsection only carries a title."
                                      }
                                    },
                                    "required": [
                                      "id"
                                    ],
                                    "title": "note_section_subsection_request"
                                  }
                                }
                              },
                              "title": "note_section_content_subsections_request"
                            }
                          }
                        },
                        "title": "note_section_content_request"
                      }
                    },
                    "required": [
                      "key",
                      "title",
                      "content"
                    ],
                    "title": "note_section_request"
                  }
                },
                "locale": {
                  "type": "string",
                  "description": "Locale of the note.",
                  "enum": [
                    "ENGLISH_US",
                    "ENGLISH_UK",
                    "FRENCH_FR"
                  ],
                  "example": "ENGLISH_US",
                  "title": "note_locale"
                },
                "template_key": {
                  "type": "string",
                  "description": "Human-readable identifier for the note template used to generate this note."
                }
              },
              "required": [
                "sections",
                "locale",
                "template_key"
              ],
              "title": "note_request"
            },
            "instructions_locale": {
              "description": "Locale of the patient instructions.",
              "type": "string",
              "enum": [
                "ENGLISH_US",
                "ENGLISH_UK",
                "SPANISH_ES",
                "SPANISH_MX",
                "FRENCH_FR",
                "ARABIC_EG",
                "ARABIC_LB",
                "ARABIC_MA",
                "ARABIC_SA",
                "ARMENIAN_AM",
                "BENGALI_IN",
                "CANTONESE_CN",
                "CROATIAN_HR",
                "FILIPINO_PH",
                "GERMAN_DE",
                "GREEK_GR",
                "GUJARATI_IN",
                "HEBREW_IL",
                "HINDI_IN",
                "ITALIAN_IT",
                "JAPANESE_JP",
                "KHMER_KH",
                "KOREAN_KR",
                "MANDARIN_CN",
                "PERSIAN_IR",
                "POLISH_PL",
                "PORTUGUESE_PT",
                "PUNJABI_IN",
                "RUSSIAN_RU",
                "SERBIAN_RS",
                "TAMIL_IN",
                "TELUGU_IN",
                "THAI_TH",
                "URDU_IN",
                "VIETNAMESE_VN",
                "HAITIAN_HT"
              ],
              "example": "ENGLISH_US",
              "title": "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": "patient_instructions_recipient_type"
            }
          },
          "required": [
            "note",
            "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"
          }
        }
      }
    }
  }
}
```
