# Edit Note With Instructions

```
POST 
/edit-note-with-instructions
```

Edit the Nabla-generated clinical note following human-readable text instructions, to customize and have more control over its content and structure.

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

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

* 200

The edited note.

## Operation spec

```json
{
  "method": "post",
  "path": "/edit-note-with-instructions",
  "operationId": "edit-note-with-instructions",
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "description": "The input to edit the note with instructions.",
          "properties": {
            "instructions": {
              "type": "string",
              "maxLength": 700,
              "minLength": 1,
              "description": "Human-readable text instructions for editing the note. Instructions should be short and straightforward, providing clear direction such as \"Include discussion about…\", \"Make note more concise\", or \"Remove parts about…\". The instructions should help refine and adapt the note to the desired format and content without requiring lengthy or complex prompts.",
              "example": "Add more details in the Plan section."
            },
            "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",
                        "enum": [
                          "ALLERGIES",
                          "APPOINTMENTS",
                          "ASSESSMENT",
                          "ASSESSMENT_AND_PLAN",
                          "CARDIOVASCULAR_RISK_FACTORS",
                          "CHIEF_COMPLAINT",
                          "CURRENT_MEDICATIONS",
                          "DIAGNOSTIC_TESTS_ORDERED",
                          "FOOD_HABITS",
                          "LIFESTYLE",
                          "PAST_MEDICAL_HISTORY",
                          "OBJECTIVES_AND_ADVICE",
                          "FAMILY_HISTORY",
                          "HISTORY_OF_PRESENT_ILLNESS",
                          "IMAGING_RESULTS",
                          "IMMUNIZATIONS",
                          "LAB_RESULTS",
                          "MENTAL_HEALTH_EXAM",
                          "MENTAL_HEALTH_HISTORY",
                          "PAST_OBSTETRIC_HISTORY",
                          "PAST_SURGICAL_HISTORY",
                          "PHYSICAL_EXAM",
                          "PLAN",
                          "PRESCRIPTION",
                          "HISTORY_OF_PRESENT_COMPLAINT",
                          "OBJECTIVE",
                          "SUBJECTIVE",
                          "SOCIAL_HISTORY",
                          "VITALS",
                          "WELL_CHILD_CARE"
                        ],
                        "title": "note_section_key"
                      },
                      "title": {
                        "type": "string",
                        "description": "The section title.",
                        "example": "Chief complaint"
                      },
                      "text": {
                        "type": "string",
                        "description": "Content of the note section.",
                        "example": "Sleep disorder"
                      }
                    },
                    "required": [
                      "key",
                      "title",
                      "text"
                    ],
                    "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": {
                  "type": "string",
                  "enum": [
                    "GENERIC_MULTIPLE_SECTIONS",
                    "GENERIC_MULTIPLE_SECTIONS_AP_MERGED",
                    "GENERIC_SOAP",
                    "GENERIC_SOAP_AP_MERGED",
                    "GENERIC_SOAP_PLUS_EXAM_TESTS_AP_MERGED",
                    "GENERIC_APSO_AP_MERGED",
                    "EMERGENCY_MULTIPLE_SECTIONS",
                    "EMERGENCY_SOAP",
                    "WCC_MULTIPLE_SECTIONS",
                    "WCC_SOAP",
                    "PSYCHIATRY_MULTIPLE_SECTIONS",
                    "PSYCHIATRY_SOAP",
                    "PSYCHOLOGY_MULTIPLE_SECTIONS",
                    "CARDIOLOGY_MULTIPLE_SECTIONS",
                    "DIET_MULTIPLE_SECTIONS"
                  ],
                  "description": "The template used to generate the note.\n\nSome templates are **only available in specific languages**. Check [Note template](/core-api/guides/note-templates/note-templates-sections) for details.",
                  "example": "GENERIC_MULTIPLE_SECTIONS",
                  "title": "note_template"
                }
              },
              "required": [
                "sections",
                "locale",
                "template"
              ],
              "title": "note_request"
            },
            "transcript_items": {
              "type": "array",
              "description": "The same transcript that served to generate the note. This transcript provides essential context, especially when instructions involve capturing more details or detailing specific parts of the encounter.",
              "items": {
                "type": "object",
                "description": "A portion of the transcribed consultation.",
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "The transcribed text.",
                    "example": "Also, I’m allergic to peanuts."
                  },
                  "speaker_type": {
                    "type": "string",
                    "enum": [
                      "DOCTOR",
                      "PATIENT",
                      "UNSPECIFIED"
                    ],
                    "description": "Who said the text in this transcript item.",
                    "example": "DOCTOR",
                    "title": "speaker"
                  }
                },
                "required": [
                  "text",
                  "speaker_type"
                ],
                "title": "transcript_item_request"
              }
            },
            "unstructured_context": {
              "type": "string",
              "maxLength": 700,
              "description": "The same unstructured patient context that served to generate the note, if any. For better information processing, please prioritize passing information in a structured manner via the `structured_context` field.",
              "example": "28 yo woman with diabetes."
            },
            "structured_context": {
              "type": "object",
              "description": "Structured context about the patient and the encounter, which will be taken into account when generating the note.",
              "properties": {
                "encounter_diagnoses_coding": {
                  "type": "array",
                  "description": "The ICD-10 coding for the patient's active encounter diagnoses. If the template used for the note generation contains an `ASSESSMENT_AND_PLAN` section, these diagnoses will be used for the \"by problem\" structuration of this section if they are discussed during the encounter.",
                  "items": {
                    "type": "object",
                    "description": "An ICD-10 entry.",
                    "properties": {
                      "system": {
                        "type": "string",
                        "description": "The used coding system, only ICD-10 is supported for now.",
                        "enum": [
                          "http://hl7.org/fhir/sid/icd-10-cm"
                        ]
                      },
                      "code": {
                        "type": "string",
                        "example": "G44.8",
                        "description": "Code of the [ICD-10](https://www.icd10data.com/ICD10CM/Codes) entry."
                      },
                      "display": {
                        "type": "string",
                        "example": "Other specified headache syndromes.",
                        "description": "Description of the [ICD-10](https://www.icd10data.com/ICD10CM/Codes) entry."
                      }
                    },
                    "required": [
                      "code",
                      "display",
                      "system"
                    ],
                    "title": "icd10_entry_request"
                  }
                },
                "patient_demographics": {
                  "type": "object",
                  "description": "Demographic details about the patient.",
                  "properties": {
                    "name": {
                      "type": "string",
                      "description": "The patient's name."
                    },
                    "birth_date": {
                      "type": "string",
                      "format": "date",
                      "description": "The patient's birthdate (YYYY-MM-DD format).",
                      "example": "1996-03-21"
                    },
                    "gender": {
                      "type": "string",
                      "enum": [
                        "MALE",
                        "FEMALE",
                        "OTHER"
                      ],
                      "description": "The patient's gender.",
                      "title": "gender"
                    },
                    "pronouns": {
                      "type": "string",
                      "enum": [
                        "HE_HIM",
                        "SHE_HER",
                        "THEY_THEM"
                      ],
                      "description": "The patient's pronouns.",
                      "title": "pronouns"
                    }
                  },
                  "required": [
                    "name"
                  ],
                  "title": "patient_demographics"
                },
                "draft_assessment_and_plan": {
                  "type": "string",
                  "description": "The text that should be used as a starting point for the generation of the \"Assessment & Plan\" section of the note. It could be text written by the user right before the beginning of the encounter, or the A&P of the previous note in the case when the user is doing a follow-up encounter. If the template used for the note generation contains an `ASSESSMENT_AND_PLAN` section, the provided text will be used for this section and augmented based on the transcript."
                }
              },
              "title": "structured_context_request"
            },
            "note_sections_customization": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "section_key": {
                    "type": "string",
                    "title": "note_section_key",
                    "description": "Key of the note section this customization should apply to.",
                    "example": "CHIEF_COMPLAINT",
                    "enum": [
                      "ALLERGIES",
                      "APPOINTMENTS",
                      "ASSESSMENT",
                      "ASSESSMENT_AND_PLAN",
                      "CARDIOVASCULAR_RISK_FACTORS",
                      "CHIEF_COMPLAINT",
                      "CURRENT_MEDICATIONS",
                      "DIAGNOSTIC_TESTS_ORDERED",
                      "FOOD_HABITS",
                      "LIFESTYLE",
                      "PAST_MEDICAL_HISTORY",
                      "OBJECTIVES_AND_ADVICE",
                      "FAMILY_HISTORY",
                      "HISTORY_OF_PRESENT_ILLNESS",
                      "IMAGING_RESULTS",
                      "IMMUNIZATIONS",
                      "LAB_RESULTS",
                      "MENTAL_HEALTH_EXAM",
                      "MENTAL_HEALTH_HISTORY",
                      "PAST_OBSTETRIC_HISTORY",
                      "PAST_SURGICAL_HISTORY",
                      "PHYSICAL_EXAM",
                      "PLAN",
                      "PRESCRIPTION",
                      "HISTORY_OF_PRESENT_COMPLAINT",
                      "OBJECTIVE",
                      "SUBJECTIVE",
                      "SOCIAL_HISTORY",
                      "VITALS",
                      "WELL_CHILD_CARE"
                    ]
                  },
                  "custom_instruction": {
                    "type": "string",
                    "maxLength": 700,
                    "example": "Include discussion about first symptoms",
                    "description": "Allow to customize a note section by providing specific guidelines.  These guidelines must be as clear and concise as possible for best results.",
                    "title": "note_section_customization_custom_instruction"
                  },
                  "style": {
                    "type": "string",
                    "enum": [
                      "AUTO",
                      "PARAGRAPH",
                      "BULLET_POINTS"
                    ],
                    "example": "PARAGRAPH",
                    "description": "Specifies the desired style for the note section:\n\n  • `PARAGRAPH`: Prioritizes generating paragraphs;\n\n  • `BULLET_POINTS`: Prioritizes structuring content using bullet points.\n\n  • `AUTO`: Automatically picks the most natural formatting option.\n\nDefault is `AUTO`.",
                    "title": "note_section_customization_section_style"
                  },
                  "level_of_detail": {
                    "type": "string",
                    "enum": [
                      "DEFAULT",
                      "DETAILED"
                    ],
                    "description": "Specifies the desired level of details. Use `detailed` to get more details in the note section.",
                    "title": "note_section_customization_level_of_detail"
                  },
                  "split_by_problem": {
                    "type": "boolean",
                    "description": "Flag to structure the content of the note sections according to distinct clinical problems or topics addressed during the consultation."
                  }
                },
                "required": [
                  "section_key"
                ],
                "title": "note_section_customization_request"
              }
            }
          },
          "required": [
            "transcript_items",
            "note",
            "instructions"
          ],
          "title": "edit_note_with_instructions_request"
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "The edited note.",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "note": {
                "description": "The new edited note.",
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "Title of the note.",
                    "example": "Fever and strong headache"
                  },
                  "sections": {
                    "type": "array",
                    "description": "Content of the note structured in multiple sections.",
                    "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",
                          "enum": [
                            "ALLERGIES",
                            "APPOINTMENTS",
                            "ASSESSMENT",
                            "ASSESSMENT_AND_PLAN",
                            "CARDIOVASCULAR_RISK_FACTORS",
                            "CHIEF_COMPLAINT",
                            "CURRENT_MEDICATIONS",
                            "DIAGNOSTIC_TESTS_ORDERED",
                            "FOOD_HABITS",
                            "LIFESTYLE",
                            "PAST_MEDICAL_HISTORY",
                            "OBJECTIVES_AND_ADVICE",
                            "FAMILY_HISTORY",
                            "HISTORY_OF_PRESENT_ILLNESS",
                            "IMAGING_RESULTS",
                            "IMMUNIZATIONS",
                            "LAB_RESULTS",
                            "MENTAL_HEALTH_EXAM",
                            "MENTAL_HEALTH_HISTORY",
                            "PAST_OBSTETRIC_HISTORY",
                            "PAST_SURGICAL_HISTORY",
                            "PHYSICAL_EXAM",
                            "PLAN",
                            "PRESCRIPTION",
                            "HISTORY_OF_PRESENT_COMPLAINT",
                            "OBJECTIVE",
                            "SUBJECTIVE",
                            "SOCIAL_HISTORY",
                            "VITALS",
                            "WELL_CHILD_CARE"
                          ],
                          "title": "note_section_key"
                        },
                        "title": {
                          "type": "string",
                          "description": "The section title.",
                          "example": "Chief complaint"
                        },
                        "text": {
                          "type": "string",
                          "description": "Content of the note section.",
                          "example": "Sleep disorder"
                        }
                      },
                      "required": [
                        "key",
                        "title",
                        "text"
                      ],
                      "example": [
                        {
                          "key": "CHIEF_COMPLAINT",
                          "title": "Chief complaint",
                          "text": "Fatigue and headaches"
                        },
                        {
                          "key": "SYMPTOMS",
                          "title": "Symptoms",
                          "text": "- Tiredness all day long\n- Mild headaches on the right side"
                        }
                      ],
                      "title": "note_section"
                    }
                  },
                  "locale": {
                    "type": "string",
                    "description": "Locale of the note.",
                    "enum": [
                      "ENGLISH_US",
                      "ENGLISH_UK",
                      "FRENCH_FR"
                    ],
                    "example": "ENGLISH_US",
                    "title": "note_locale"
                  },
                  "template": {
                    "type": "string",
                    "enum": [
                      "GENERIC_MULTIPLE_SECTIONS",
                      "GENERIC_MULTIPLE_SECTIONS_AP_MERGED",
                      "GENERIC_SOAP",
                      "GENERIC_SOAP_AP_MERGED",
                      "GENERIC_SOAP_PLUS_EXAM_TESTS_AP_MERGED",
                      "GENERIC_APSO_AP_MERGED",
                      "EMERGENCY_MULTIPLE_SECTIONS",
                      "EMERGENCY_SOAP",
                      "WCC_MULTIPLE_SECTIONS",
                      "WCC_SOAP",
                      "PSYCHIATRY_MULTIPLE_SECTIONS",
                      "PSYCHIATRY_SOAP",
                      "PSYCHOLOGY_MULTIPLE_SECTIONS",
                      "CARDIOLOGY_MULTIPLE_SECTIONS",
                      "DIET_MULTIPLE_SECTIONS"
                    ],
                    "description": "The template used to generate the note.\n\nSome templates are **only available in specific languages**. Check [Note template](/core-api/guides/note-templates/note-templates-sections) for details.",
                    "example": "GENERIC_MULTIPLE_SECTIONS",
                    "title": "note_template"
                  }
                },
                "required": [
                  "sections",
                  "locale",
                  "template"
                ],
                "title": "note"
              }
            },
            "required": [
              "note"
            ],
            "title": "edit_note_with_instructions_response"
          }
        }
      }
    }
  }
}
```
