# Receive Nabla Connect events

```
POST 
/callback
```

This is the endpoint you need to implement on your server to receive callbacks. This page references the format of all the possible callbacks.

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

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

* 200

Respond with 200 to acknowledge the handling of this event.

## Operation spec

```json
{
  "method": "post",
  "path": "/callback",
  "operationId": "callback",
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "oneOf": [
            {
              "title": "NOTE_EXPORT",
              "x-sensitive-medical-data": true,
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "request_uuid": {
                      "description": "The unique identifier of this webhook event",
                      "type": "string",
                      "format": "uuid",
                      "example": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
                      "title": "uuid"
                    },
                    "type": {
                      "description": "Type of this event, serves as a discriminator between the different possible webhook types.",
                      "type": "string",
                      "enum": [
                        "NOTE_EXPORT",
                        "PATIENT_INSTRUCTIONS_EXPORT"
                      ],
                      "title": "callback_type"
                    }
                  },
                  "required": [
                    "request_uuid",
                    "type"
                  ],
                  "title": "base_callback"
                },
                {
                  "type": "object",
                  "description": "Event sent when a note is exported.",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "external_patient_id": {
                          "type": "string",
                          "description": "External patient ID from your app, that you provided at launch"
                        },
                        "external_encounter_id": {
                          "type": "string",
                          "description": "External encounter ID from your app, that you provided at launch"
                        },
                        "external_provider_id": {
                          "type": "string",
                          "description": "External patient ID from your app, that you provided at launch"
                        },
                        "note": {
                          "description": "The exported note.",
                          "type": "object",
                          "properties": {
                            "sections": {
                              "type": "array",
                              "description": "Content of the note structured in multiple sections.",
                              "items": {
                                "type": "object",
                                "description": "A note section.",
                                "properties": {
                                  "category": {
                                    "type": "string",
                                    "description": "A category identifying a section of a note.\nThe set of possible categories depend on the template that is used.",
                                    "example": "CHIEF_COMPLAINT",
                                    "enum": [
                                      "CHIEF_COMPLAINT",
                                      "HISTORY_OF_PRESENT_ILLNESS",
                                      "PAST_HISTORY",
                                      "CURRENT_MEDICATIONS",
                                      "VITALS",
                                      "IMMUNIZATIONS",
                                      "ASSESSMENT_AND_PLAN",
                                      "EXAMINATION",
                                      "RESULTS",
                                      "PRESCRIPTIONS",
                                      "APPOINTMENTS"
                                    ],
                                    "title": "note_section_type"
                                  },
                                  "title": {
                                    "type": "string",
                                    "description": "The section title.",
                                    "example": "Chief complaint"
                                  },
                                  "content": {
                                    "type": "string",
                                    "deprecated": true,
                                    "description": "Content of the note section, flattened as text. Deprecated: replace your usage with `structured_content`, which carries the same content in a structured form.",
                                    "example": "Sleep disorder"
                                  },
                                  "structured_content": {
                                    "description": "Content of the note section, discriminated by `type`. Always present: read `type` to know whether the section carries plain text or structured subsections.",
                                    "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.",
                                            "example": "Sleep disorder"
                                          }
                                        }
                                      },
                                      {
                                        "title": "SUBSECTIONS",
                                        "type": "object",
                                        "description": "Structured note section content as per-problem subsections.",
                                        "required": [
                                          "type",
                                          "subsections"
                                        ],
                                        "properties": {
                                          "type": {
                                            "type": "string",
                                            "enum": [
                                              "SUBSECTIONS"
                                            ]
                                          },
                                          "subsections": {
                                            "type": "array",
                                            "description": "Structured subsections with their normalized codes, in note order. In practice only the Assessment & Plan section of A&P-merged templates is structured this way.",
                                            "items": {
                                              "type": "object",
                                              "description": "A subsection of a note section, with its normalized codes inlined. In practice only the Assessment & Plan section of A&P-merged templates has subsections.",
                                              "properties": {
                                                "title": {
                                                  "type": "string",
                                                  "description": "Short subsection title (typically a clinical problem name). May be `null`  (e.g. subsections appended by dot phrase auto-apply).",
                                                  "example": "Hypertension"
                                                },
                                                "text": {
                                                  "type": "string",
                                                  "description": "Free-text content of the subsection.",
                                                  "example": "BP elevated to 160/100. Continue lisinopril."
                                                },
                                                "icd10_codes": {
                                                  "type": "array",
                                                  "description": "ICD-10 codes attached to this subsection. Empty when no codes are available (e.g. code extraction disabled, or not completed at export time).",
                                                  "items": {
                                                    "type": "object",
                                                    "description": "An ICD-10 entry including HCC and MCC information.",
                                                    "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."
                                                      },
                                                      "is_hcc": {
                                                        "description": "Indicates if this code maps to a Hierarchical Condition Category (HCC) under the version 28 risk adjustment model.",
                                                        "type": "boolean"
                                                      },
                                                      "is_mcc": {
                                                        "description": "Indicates if this code qualifies as a Major Complication or Comorbidity (MCC).",
                                                        "type": "boolean"
                                                      }
                                                    },
                                                    "required": [
                                                      "code",
                                                      "display",
                                                      "system",
                                                      "is_hcc",
                                                      "is_mcc"
                                                    ],
                                                    "title": "icd10_entry_with_hcc_mcc"
                                                  }
                                                },
                                                "snomed_codes": {
                                                  "type": "array",
                                                  "description": "SNOMED CT codes attached to this subsection. Empty when no codes are available (e.g. code extraction disabled, or not completed at export time).",
                                                  "items": {
                                                    "type": "object",
                                                    "description": "A SNOMED CT entry.",
                                                    "properties": {
                                                      "system": {
                                                        "type": "string",
                                                        "description": "The used coding system, only SNOMED CT is supported.",
                                                        "enum": [
                                                          "http://snomed.info/sct"
                                                        ]
                                                      },
                                                      "code": {
                                                        "type": "string",
                                                        "example": "38341003",
                                                        "description": "Code of the [SNOMED CT](https://www.snomed.org) concept."
                                                      },
                                                      "display": {
                                                        "type": "string",
                                                        "example": "Hypertensive disorder",
                                                        "description": "Description of the [SNOMED CT](https://www.snomed.org) concept."
                                                      }
                                                    },
                                                    "required": [
                                                      "system",
                                                      "code",
                                                      "display"
                                                    ],
                                                    "title": "snomed_entry"
                                                  }
                                                }
                                              },
                                              "required": [
                                                "text",
                                                "icd10_codes",
                                                "snomed_codes"
                                              ],
                                              "title": "note_section_subsection_with_codes"
                                            }
                                          }
                                        }
                                      }
                                    ],
                                    "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.",
                                              "example": "Sleep disorder"
                                            }
                                          },
                                          "title": "note_section_content_text"
                                        },
                                        "SUBSECTIONS": {
                                          "type": "object",
                                          "description": "Structured note section content as per-problem subsections.",
                                          "required": [
                                            "type",
                                            "subsections"
                                          ],
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "SUBSECTIONS"
                                              ]
                                            },
                                            "subsections": {
                                              "type": "array",
                                              "description": "Structured subsections with their normalized codes, in note order. In practice only the Assessment & Plan section of A&P-merged templates is structured this way.",
                                              "items": {
                                                "type": "object",
                                                "description": "A subsection of a note section, with its normalized codes inlined. In practice only the Assessment & Plan section of A&P-merged templates has subsections.",
                                                "properties": {
                                                  "title": {
                                                    "type": "string",
                                                    "description": "Short subsection title (typically a clinical problem name). May be `null`  (e.g. subsections appended by dot phrase auto-apply).",
                                                    "example": "Hypertension"
                                                  },
                                                  "text": {
                                                    "type": "string",
                                                    "description": "Free-text content of the subsection.",
                                                    "example": "BP elevated to 160/100. Continue lisinopril."
                                                  },
                                                  "icd10_codes": {
                                                    "type": "array",
                                                    "description": "ICD-10 codes attached to this subsection. Empty when no codes are available (e.g. code extraction disabled, or not completed at export time).",
                                                    "items": {
                                                      "type": "object",
                                                      "description": "An ICD-10 entry including HCC and MCC information.",
                                                      "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."
                                                        },
                                                        "is_hcc": {
                                                          "description": "Indicates if this code maps to a Hierarchical Condition Category (HCC) under the version 28 risk adjustment model.",
                                                          "type": "boolean"
                                                        },
                                                        "is_mcc": {
                                                          "description": "Indicates if this code qualifies as a Major Complication or Comorbidity (MCC).",
                                                          "type": "boolean"
                                                        }
                                                      },
                                                      "required": [
                                                        "code",
                                                        "display",
                                                        "system",
                                                        "is_hcc",
                                                        "is_mcc"
                                                      ],
                                                      "title": "icd10_entry_with_hcc_mcc"
                                                    }
                                                  },
                                                  "snomed_codes": {
                                                    "type": "array",
                                                    "description": "SNOMED CT codes attached to this subsection. Empty when no codes are available (e.g. code extraction disabled, or not completed at export time).",
                                                    "items": {
                                                      "type": "object",
                                                      "description": "A SNOMED CT entry.",
                                                      "properties": {
                                                        "system": {
                                                          "type": "string",
                                                          "description": "The used coding system, only SNOMED CT is supported.",
                                                          "enum": [
                                                            "http://snomed.info/sct"
                                                          ]
                                                        },
                                                        "code": {
                                                          "type": "string",
                                                          "example": "38341003",
                                                          "description": "Code of the [SNOMED CT](https://www.snomed.org) concept."
                                                        },
                                                        "display": {
                                                          "type": "string",
                                                          "example": "Hypertensive disorder",
                                                          "description": "Description of the [SNOMED CT](https://www.snomed.org) concept."
                                                        }
                                                      },
                                                      "required": [
                                                        "system",
                                                        "code",
                                                        "display"
                                                      ],
                                                      "title": "snomed_entry"
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "text",
                                                  "icd10_codes",
                                                  "snomed_codes"
                                                ],
                                                "title": "note_section_subsection_with_codes"
                                              }
                                            }
                                          },
                                          "title": "note_section_content_subsections"
                                        }
                                      }
                                    },
                                    "title": "note_section_content"
                                  }
                                },
                                "required": [
                                  "content",
                                  "structured_content"
                                ],
                                "title": "note_section"
                              }
                            },
                            "free_text": {
                              "type": "string",
                              "description": "Free-form text written by the practitioner, alongside the note sections."
                            }
                          },
                          "required": [
                            "sections"
                          ],
                          "title": "note"
                        },
                        "transcript": {
                          "description": "The exported note transcript.",
                          "type": "array",
                          "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"
                              },
                              "locale": {
                                "description": "Locale for this transcript item, detected by the speech-to-text engine from the list of locales in the input.",
                                "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"
                              },
                              "start_offset_ms": {
                                "type": "integer",
                                "description": "Start time of this transcription item as the offset, in milliseconds, from the start of the audio file.",
                                "example": 65100
                              },
                              "end_offset_ms": {
                                "type": "integer",
                                "description": "End time of this transcription item as the offset, in milliseconds, from the start of the audio file. Equals the `start_time_ms` plus the duration of the related transcribed audio portion.",
                                "example": 69300
                              }
                            },
                            "required": [
                              "text",
                              "speaker_type",
                              "start_offset_ms",
                              "end_offset_ms"
                            ],
                            "title": "transcript_item"
                          },
                          "title": "transcript"
                        },
                        "visit_diagnoses": {
                          "type": "array",
                          "description": "New visit diagnosis suggestions with ICD-10 codes, corresponding to the \"New Visit Diagnoses Suggestions\" section in the Nabla UI. Only available for US organizations with the ICD-10 feature enabled. Omitted when normalization has not run or the ICD-10 feature is disabled for the org. Only includes visit diagnoses that have not been deleted (i.e., struck-through) in the Nabla UI.\n",
                          "items": {
                            "type": "object",
                            "description": "An ICD-10 entry including HCC and MCC information.",
                            "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."
                              },
                              "is_hcc": {
                                "description": "Indicates if this code maps to a Hierarchical Condition Category (HCC) under the version 28 risk adjustment model.",
                                "type": "boolean"
                              },
                              "is_mcc": {
                                "description": "Indicates if this code qualifies as a Major Complication or Comorbidity (MCC).",
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "code",
                              "display",
                              "system",
                              "is_hcc",
                              "is_mcc"
                            ],
                            "title": "icd10_entry_with_hcc_mcc"
                          },
                          "title": "visit_diagnoses"
                        }
                      },
                      "required": [
                        "external_patient_id",
                        "external_encounter_id",
                        "external_provider_id",
                        "note"
                      ],
                      "title": "note_export_data"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              ]
            },
            {
              "title": "PATIENT_INSTRUCTIONS_EXPORT",
              "x-sensitive-medical-data": true,
              "allOf": [
                {
                  "type": "object",
                  "properties": {
                    "request_uuid": {
                      "description": "The unique identifier of this webhook event",
                      "type": "string",
                      "format": "uuid",
                      "example": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
                      "title": "uuid"
                    },
                    "type": {
                      "description": "Type of this event, serves as a discriminator between the different possible webhook types.",
                      "type": "string",
                      "enum": [
                        "NOTE_EXPORT",
                        "PATIENT_INSTRUCTIONS_EXPORT"
                      ],
                      "title": "callback_type"
                    }
                  },
                  "required": [
                    "request_uuid",
                    "type"
                  ],
                  "title": "base_callback"
                },
                {
                  "type": "object",
                  "description": "Event sent when patient instructions are exported.",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "external_patient_id": {
                          "type": "string",
                          "description": "External patient ID from your app, that you provided at launch"
                        },
                        "external_encounter_id": {
                          "type": "string",
                          "description": "External encounter ID from your app, that you provided at launch"
                        },
                        "external_provider_id": {
                          "type": "string",
                          "description": "External patient ID from your app, that you provided at launch"
                        },
                        "patient_instructions": {
                          "description": "The exported patient_instructions.",
                          "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": "patient_instructions"
                        }
                      },
                      "required": [
                        "external_patient_id",
                        "external_encounter_id",
                        "external_provider_id",
                        "patient_instructions"
                      ],
                      "title": "patient_instructions_export_data"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              ]
            }
          ],
          "discriminator": {
            "propertyName": "type",
            "mapping": {
              "NOTE_EXPORT": {
                "x-sensitive-medical-data": true,
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "request_uuid": {
                        "description": "The unique identifier of this webhook event",
                        "type": "string",
                        "format": "uuid",
                        "example": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
                        "title": "uuid"
                      },
                      "type": {
                        "description": "Type of this event, serves as a discriminator between the different possible webhook types.",
                        "type": "string",
                        "enum": [
                          "NOTE_EXPORT",
                          "PATIENT_INSTRUCTIONS_EXPORT"
                        ],
                        "title": "callback_type"
                      }
                    },
                    "required": [
                      "request_uuid",
                      "type"
                    ],
                    "title": "base_callback"
                  },
                  {
                    "type": "object",
                    "description": "Event sent when a note is exported.",
                    "properties": {
                      "data": {
                        "type": "object",
                        "properties": {
                          "external_patient_id": {
                            "type": "string",
                            "description": "External patient ID from your app, that you provided at launch"
                          },
                          "external_encounter_id": {
                            "type": "string",
                            "description": "External encounter ID from your app, that you provided at launch"
                          },
                          "external_provider_id": {
                            "type": "string",
                            "description": "External patient ID from your app, that you provided at launch"
                          },
                          "note": {
                            "description": "The exported note.",
                            "type": "object",
                            "properties": {
                              "sections": {
                                "type": "array",
                                "description": "Content of the note structured in multiple sections.",
                                "items": {
                                  "type": "object",
                                  "description": "A note section.",
                                  "properties": {
                                    "category": {
                                      "type": "string",
                                      "description": "A category identifying a section of a note.\nThe set of possible categories depend on the template that is used.",
                                      "example": "CHIEF_COMPLAINT",
                                      "enum": [
                                        "CHIEF_COMPLAINT",
                                        "HISTORY_OF_PRESENT_ILLNESS",
                                        "PAST_HISTORY",
                                        "CURRENT_MEDICATIONS",
                                        "VITALS",
                                        "IMMUNIZATIONS",
                                        "ASSESSMENT_AND_PLAN",
                                        "EXAMINATION",
                                        "RESULTS",
                                        "PRESCRIPTIONS",
                                        "APPOINTMENTS"
                                      ],
                                      "title": "note_section_type"
                                    },
                                    "title": {
                                      "type": "string",
                                      "description": "The section title.",
                                      "example": "Chief complaint"
                                    },
                                    "content": {
                                      "type": "string",
                                      "deprecated": true,
                                      "description": "Content of the note section, flattened as text. Deprecated: replace your usage with `structured_content`, which carries the same content in a structured form.",
                                      "example": "Sleep disorder"
                                    },
                                    "structured_content": {
                                      "description": "Content of the note section, discriminated by `type`. Always present: read `type` to know whether the section carries plain text or structured subsections.",
                                      "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.",
                                              "example": "Sleep disorder"
                                            }
                                          }
                                        },
                                        {
                                          "title": "SUBSECTIONS",
                                          "type": "object",
                                          "description": "Structured note section content as per-problem subsections.",
                                          "required": [
                                            "type",
                                            "subsections"
                                          ],
                                          "properties": {
                                            "type": {
                                              "type": "string",
                                              "enum": [
                                                "SUBSECTIONS"
                                              ]
                                            },
                                            "subsections": {
                                              "type": "array",
                                              "description": "Structured subsections with their normalized codes, in note order. In practice only the Assessment & Plan section of A&P-merged templates is structured this way.",
                                              "items": {
                                                "type": "object",
                                                "description": "A subsection of a note section, with its normalized codes inlined. In practice only the Assessment & Plan section of A&P-merged templates has subsections.",
                                                "properties": {
                                                  "title": {
                                                    "type": "string",
                                                    "description": "Short subsection title (typically a clinical problem name). May be `null`  (e.g. subsections appended by dot phrase auto-apply).",
                                                    "example": "Hypertension"
                                                  },
                                                  "text": {
                                                    "type": "string",
                                                    "description": "Free-text content of the subsection.",
                                                    "example": "BP elevated to 160/100. Continue lisinopril."
                                                  },
                                                  "icd10_codes": {
                                                    "type": "array",
                                                    "description": "ICD-10 codes attached to this subsection. Empty when no codes are available (e.g. code extraction disabled, or not completed at export time).",
                                                    "items": {
                                                      "type": "object",
                                                      "description": "An ICD-10 entry including HCC and MCC information.",
                                                      "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."
                                                        },
                                                        "is_hcc": {
                                                          "description": "Indicates if this code maps to a Hierarchical Condition Category (HCC) under the version 28 risk adjustment model.",
                                                          "type": "boolean"
                                                        },
                                                        "is_mcc": {
                                                          "description": "Indicates if this code qualifies as a Major Complication or Comorbidity (MCC).",
                                                          "type": "boolean"
                                                        }
                                                      },
                                                      "required": [
                                                        "code",
                                                        "display",
                                                        "system",
                                                        "is_hcc",
                                                        "is_mcc"
                                                      ],
                                                      "title": "icd10_entry_with_hcc_mcc"
                                                    }
                                                  },
                                                  "snomed_codes": {
                                                    "type": "array",
                                                    "description": "SNOMED CT codes attached to this subsection. Empty when no codes are available (e.g. code extraction disabled, or not completed at export time).",
                                                    "items": {
                                                      "type": "object",
                                                      "description": "A SNOMED CT entry.",
                                                      "properties": {
                                                        "system": {
                                                          "type": "string",
                                                          "description": "The used coding system, only SNOMED CT is supported.",
                                                          "enum": [
                                                            "http://snomed.info/sct"
                                                          ]
                                                        },
                                                        "code": {
                                                          "type": "string",
                                                          "example": "38341003",
                                                          "description": "Code of the [SNOMED CT](https://www.snomed.org) concept."
                                                        },
                                                        "display": {
                                                          "type": "string",
                                                          "example": "Hypertensive disorder",
                                                          "description": "Description of the [SNOMED CT](https://www.snomed.org) concept."
                                                        }
                                                      },
                                                      "required": [
                                                        "system",
                                                        "code",
                                                        "display"
                                                      ],
                                                      "title": "snomed_entry"
                                                    }
                                                  }
                                                },
                                                "required": [
                                                  "text",
                                                  "icd10_codes",
                                                  "snomed_codes"
                                                ],
                                                "title": "note_section_subsection_with_codes"
                                              }
                                            }
                                          }
                                        }
                                      ],
                                      "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.",
                                                "example": "Sleep disorder"
                                              }
                                            },
                                            "title": "note_section_content_text"
                                          },
                                          "SUBSECTIONS": {
                                            "type": "object",
                                            "description": "Structured note section content as per-problem subsections.",
                                            "required": [
                                              "type",
                                              "subsections"
                                            ],
                                            "properties": {
                                              "type": {
                                                "type": "string",
                                                "enum": [
                                                  "SUBSECTIONS"
                                                ]
                                              },
                                              "subsections": {
                                                "type": "array",
                                                "description": "Structured subsections with their normalized codes, in note order. In practice only the Assessment & Plan section of A&P-merged templates is structured this way.",
                                                "items": {
                                                  "type": "object",
                                                  "description": "A subsection of a note section, with its normalized codes inlined. In practice only the Assessment & Plan section of A&P-merged templates has subsections.",
                                                  "properties": {
                                                    "title": {
                                                      "type": "string",
                                                      "description": "Short subsection title (typically a clinical problem name). May be `null`  (e.g. subsections appended by dot phrase auto-apply).",
                                                      "example": "Hypertension"
                                                    },
                                                    "text": {
                                                      "type": "string",
                                                      "description": "Free-text content of the subsection.",
                                                      "example": "BP elevated to 160/100. Continue lisinopril."
                                                    },
                                                    "icd10_codes": {
                                                      "type": "array",
                                                      "description": "ICD-10 codes attached to this subsection. Empty when no codes are available (e.g. code extraction disabled, or not completed at export time).",
                                                      "items": {
                                                        "type": "object",
                                                        "description": "An ICD-10 entry including HCC and MCC information.",
                                                        "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."
                                                          },
                                                          "is_hcc": {
                                                            "description": "Indicates if this code maps to a Hierarchical Condition Category (HCC) under the version 28 risk adjustment model.",
                                                            "type": "boolean"
                                                          },
                                                          "is_mcc": {
                                                            "description": "Indicates if this code qualifies as a Major Complication or Comorbidity (MCC).",
                                                            "type": "boolean"
                                                          }
                                                        },
                                                        "required": [
                                                          "code",
                                                          "display",
                                                          "system",
                                                          "is_hcc",
                                                          "is_mcc"
                                                        ],
                                                        "title": "icd10_entry_with_hcc_mcc"
                                                      }
                                                    },
                                                    "snomed_codes": {
                                                      "type": "array",
                                                      "description": "SNOMED CT codes attached to this subsection. Empty when no codes are available (e.g. code extraction disabled, or not completed at export time).",
                                                      "items": {
                                                        "type": "object",
                                                        "description": "A SNOMED CT entry.",
                                                        "properties": {
                                                          "system": {
                                                            "type": "string",
                                                            "description": "The used coding system, only SNOMED CT is supported.",
                                                            "enum": [
                                                              "http://snomed.info/sct"
                                                            ]
                                                          },
                                                          "code": {
                                                            "type": "string",
                                                            "example": "38341003",
                                                            "description": "Code of the [SNOMED CT](https://www.snomed.org) concept."
                                                          },
                                                          "display": {
                                                            "type": "string",
                                                            "example": "Hypertensive disorder",
                                                            "description": "Description of the [SNOMED CT](https://www.snomed.org) concept."
                                                          }
                                                        },
                                                        "required": [
                                                          "system",
                                                          "code",
                                                          "display"
                                                        ],
                                                        "title": "snomed_entry"
                                                      }
                                                    }
                                                  },
                                                  "required": [
                                                    "text",
                                                    "icd10_codes",
                                                    "snomed_codes"
                                                  ],
                                                  "title": "note_section_subsection_with_codes"
                                                }
                                              }
                                            },
                                            "title": "note_section_content_subsections"
                                          }
                                        }
                                      },
                                      "title": "note_section_content"
                                    }
                                  },
                                  "required": [
                                    "content",
                                    "structured_content"
                                  ],
                                  "title": "note_section"
                                }
                              },
                              "free_text": {
                                "type": "string",
                                "description": "Free-form text written by the practitioner, alongside the note sections."
                              }
                            },
                            "required": [
                              "sections"
                            ],
                            "title": "note"
                          },
                          "transcript": {
                            "description": "The exported note transcript.",
                            "type": "array",
                            "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"
                                },
                                "locale": {
                                  "description": "Locale for this transcript item, detected by the speech-to-text engine from the list of locales in the input.",
                                  "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"
                                },
                                "start_offset_ms": {
                                  "type": "integer",
                                  "description": "Start time of this transcription item as the offset, in milliseconds, from the start of the audio file.",
                                  "example": 65100
                                },
                                "end_offset_ms": {
                                  "type": "integer",
                                  "description": "End time of this transcription item as the offset, in milliseconds, from the start of the audio file. Equals the `start_time_ms` plus the duration of the related transcribed audio portion.",
                                  "example": 69300
                                }
                              },
                              "required": [
                                "text",
                                "speaker_type",
                                "start_offset_ms",
                                "end_offset_ms"
                              ],
                              "title": "transcript_item"
                            },
                            "title": "transcript"
                          },
                          "visit_diagnoses": {
                            "type": "array",
                            "description": "New visit diagnosis suggestions with ICD-10 codes, corresponding to the \"New Visit Diagnoses Suggestions\" section in the Nabla UI. Only available for US organizations with the ICD-10 feature enabled. Omitted when normalization has not run or the ICD-10 feature is disabled for the org. Only includes visit diagnoses that have not been deleted (i.e., struck-through) in the Nabla UI.\n",
                            "items": {
                              "type": "object",
                              "description": "An ICD-10 entry including HCC and MCC information.",
                              "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."
                                },
                                "is_hcc": {
                                  "description": "Indicates if this code maps to a Hierarchical Condition Category (HCC) under the version 28 risk adjustment model.",
                                  "type": "boolean"
                                },
                                "is_mcc": {
                                  "description": "Indicates if this code qualifies as a Major Complication or Comorbidity (MCC).",
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "code",
                                "display",
                                "system",
                                "is_hcc",
                                "is_mcc"
                              ],
                              "title": "icd10_entry_with_hcc_mcc"
                            },
                            "title": "visit_diagnoses"
                          }
                        },
                        "required": [
                          "external_patient_id",
                          "external_encounter_id",
                          "external_provider_id",
                          "note"
                        ],
                        "title": "note_export_data"
                      }
                    },
                    "required": [
                      "data"
                    ]
                  }
                ],
                "title": "callback_note_export"
              },
              "PATIENT_INSTRUCTIONS_EXPORT": {
                "x-sensitive-medical-data": true,
                "allOf": [
                  {
                    "type": "object",
                    "properties": {
                      "request_uuid": {
                        "description": "The unique identifier of this webhook event",
                        "type": "string",
                        "format": "uuid",
                        "example": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
                        "title": "uuid"
                      },
                      "type": {
                        "description": "Type of this event, serves as a discriminator between the different possible webhook types.",
                        "type": "string",
                        "enum": [
                          "NOTE_EXPORT",
                          "PATIENT_INSTRUCTIONS_EXPORT"
                        ],
                        "title": "callback_type"
                      }
                    },
                    "required": [
                      "request_uuid",
                      "type"
                    ],
                    "title": "base_callback"
                  },
                  {
                    "type": "object",
                    "description": "Event sent when patient instructions are exported.",
                    "properties": {
                      "data": {
                        "type": "object",
                        "properties": {
                          "external_patient_id": {
                            "type": "string",
                            "description": "External patient ID from your app, that you provided at launch"
                          },
                          "external_encounter_id": {
                            "type": "string",
                            "description": "External encounter ID from your app, that you provided at launch"
                          },
                          "external_provider_id": {
                            "type": "string",
                            "description": "External patient ID from your app, that you provided at launch"
                          },
                          "patient_instructions": {
                            "description": "The exported patient_instructions.",
                            "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": "patient_instructions"
                          }
                        },
                        "required": [
                          "external_patient_id",
                          "external_encounter_id",
                          "external_provider_id",
                          "patient_instructions"
                        ],
                        "title": "patient_instructions_export_data"
                      }
                    },
                    "required": [
                      "data"
                    ]
                  }
                ],
                "title": "callback_patient_instructions_export"
              }
            }
          },
          "example": {
            "request_uuid": "0cf0b04d-5bbe-47a9-9601-3dd037644f65",
            "type": "NOTE_EXPORT",
            "data": {
              "patient_id": "patient_123456",
              "encounter_id": "encounter_987654",
              "provider_id": "provider_456789",
              "note": {
                "sections": [
                  {
                    "type": "CHIEF_COMPLAINT",
                    "title": "Chief complaint",
                    "content": "- Persistent fatigue\n- Mild headaches on the right side"
                  },
                  {
                    "type": "ASSESSMENT_AND_PLAN",
                    "title": "Past medical history",
                    "content": "- Hypertension\n- Elevated blood sugar levels"
                  },
                  {
                    "type": "RESULTS",
                    "title": "Lab results",
                    "content": "- Blood sugar level: 1.4 g/L\n- LDL cholesterol: 2 g/L"
                  }
                ]
              }
            }
          },
          "title": "callback"
        }
      }
    }
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "request_uuid": {
                "description": "The request UUID you provided in the request.",
                "type": "string",
                "format": "uuid",
                "example": "98FCE1EF-DBCA-41EF-8BC7-4D1621AC07C6",
                "title": "uuid"
              }
            },
            "required": [
              "request_uuid"
            ],
            "title": "callback_response"
          }
        }
      },
      "description": "Respond with 200 to acknowledge the handling of this event."
    }
  }
}
```
