Unfortunately, the Heidi API and Widget are no longer available for future integrations in Australia and New Zealand. If you are a current Heidi customer looking to integrate, reach out to your Customer Success representative. Otherwise, contact our team to find out what this means for you.
Heidi API
Sectional notes

Sectional notes

A standard consult note is generated as a single block of free text (Markdown or HTML). A sectional note is that same note broken into discrete, named sections returned as structured JSON. Each heading in the note becomes a key, and the text under that heading becomes its value.

This is useful when you need to map individual parts of a note into separate fields in your EHR (for example, writing the History, Examination, and Plan into different boxes) rather than pasting one block of text.

Sectional notes are derived from an existing consult note. You must generate a consult note for the session first (see Consult notes) before converting it to a sectional note.

How it works

  1. Generate a consult note for the session using a template. This produces the note in plain text / Markdown.
  2. Call the sectional note conversion endpoint. Heidi parses the latest consult note for that session and returns it as a structured clinical_note object, keyed by section heading.
  3. If a template section mapping is configured for the template, each returned section also carries the EHR section it is linked to, so you can route the content to the correct field.

The conversion runs against the session's latest consult note, so no note content needs to be sent in the request body.


Convert a note to sectional format

Method: POST

Path: /sessions/{session_id}/consult-note/sectional-note-conversion

Description: Converts the session's latest consult note into a structured sectional note (JSON format). The converted note is also saved back against the consult note with a content type of JSON.

Request

POST /sessions/1234567890/consult-note/sectional-note-conversion
Authorization: Bearer <your_token>
Content-Type: application/json

No request body is required. The endpoint operates on the most recent consult note generated for the session.

Response

The response is a clinical_note object. Each key is a section heading from the note, and each value is the section content.

When the template's sections are not linked to EHR fields, each value is a plain string:

{
  "clinical_note": {
    "History of presenting complaint": "Patient reports a three-day history of...",
    "Examination": "Chest clear, no added sounds...",
    "Assessment and plan": "Likely viral URTI. Advised rest and fluids..."
  }
}

When a section is linked to an EHR field (see below), its value is an object containing the content and the linked EHR section ID:

{
  "clinical_note": {
    "History of presenting complaint": {
      "content": "Patient reports a three-day history of...",
      "linked_ehr_section_id": "subjective"
    },
    "Examination": {
      "content": "Chest clear, no added sounds...",
      "linked_ehr_section_id": "objective"
    }
  }
}

Response Fields:

  • clinical_note (object, required): A map of section heading to section content. Each value is either a plain string (unlinked) or an object with:
    • content (string): The text of the section.
    • linked_ehr_section_id (string): The EHR section this content is linked to.

Linking sections to EHR fields

If you want sectional note headings to map onto specific fields in your EHR, you can link a section heading to an EHR section ID. Once a section is linked, conversions return that section as a { content, linked_ehr_section_id } object so you know exactly where to write it.

Method: POST

Path: /sessions/{session_id}/consult-note:link-section

Description: Links a section of the consult note to an EHR section ID. Only works with JSON (sectional) format notes.

Request

POST /sessions/1234567890/consult-note:link-section
Authorization: Bearer <your_token>
Content-Type: application/json
 
{
  "section_heading": "History of presenting complaint",
  "linked_ehr_section_id": "subjective"
}

Request Fields:

  • section_heading (string, required): The heading of the section in the consult note to link.
  • linked_ehr_section_id (string, required): The EHR section ID to link the section to.

Response

{
  "consult_note": {
    "...": "the updated consult note"
  }
}

Response Fields:

  • consult_note (object): The updated consult note, including the new section link.