Skip to Content
AuraTemplates

Templates

Templates define how Aura should structure the final encounter note/summary (what sections appear, how each section should be written, and any constraints like defined set of options etc.).

What are templates?

A template is a reusable “note blueprint” that Aura uses when generating the final output for an encounter. Each template:

  • Groups output into sections (for example: Chief Complaint, HPI, Assessment, Plan, etc.)
  • Guides the LLM using section-level instructions (tone, level of detail, formatting requirements, and any choice constraints)
  • Can be scoped to an encounter phase (for example 'pre-chart' vs 'in-visit')

Templates registered for the authenticated provider

When the widget finishes authenticating, it provides the list of template IDs that are registered/available for the authenticated provider as part of the response payload.

Registering New Templates

AuraWidget supports two ways to register templates, registerTemplates and autoRegisterTemplates. Both expose a synchronous API for convenience. If the widget is not authenticated yet, the SDK will queue these messages and send them once authentication completes.

For template registration lifecycle events and errors, see Templates Events.

registerTemplates (template body)

Use registerTemplates when you want full control with template instructions and you already have a detailed template body (section names, instructions, formats, etc).

AuraWidget.registerTemplates({ templates: [ { id: 'vitals_and_history', name: 'Vitals and History', description: 'This template is used to capture the vitals and history of the patient', encounterPhase: 'in-visit', body: { sections: [ { name: 'Chief Complaint', instructions: "This should be a single sentence that articulates the patient's presenting complaint or medical issue. Use post-graduate level medical jargon", type: 'other', format: 'prose', }, { name: 'Vitals_Weight', instructions: 'The weight of the patient in pounds', type: 'other', format: 'prose', }, { name: 'Vitals_WeightChange', instructions: 'Calculate the change in weight from the previous weight using formula (Vitals_Weight - Vitals_WeightPrev)', type: 'other', format: 'prose', }, { name: 'Vitals_Height', instructions: 'The height of the patient in inches', type: 'other', format: 'prose', }, { name: 'Vitals_BMI', instructions: 'Calculate the BMI using formula (Vitals_Weight / (Vitals_Height * Vitals_Height)) * 703', type: 'other', format: 'prose', }, { name: 'Vitals_Temperature', instructions: 'The temperature of the patient', type: 'other', format: 'prose', }, ], }, }, { id: '1234567890', name: 'Template 1', description: 'Template 1 description', encounterPhase: 'pre-chart', body: { sections: [ { instructions: "This should be a single sentence that articulates the patient's presenting complaint or medical issue. Use post-graduate level medical jargon", name: 'Chief Complaint', type: 'other', format: 'prose', }, { instructions: 'HPI section should include a comprehensive and complete summary of the history of the present illness. This should be a chronological account of the problems for which the patient is seeking care. It should include onset of the problem, setting in which it developed and past treatments. The symptoms should be described with regards to location, quality, quantity or severity, onset, duration, frequency, exacerbating or relieving factors, pertinent positives and negatives from the clinical discussion. Be very detailed in this section. Use post-graduate level medical jargon.', name: 'HPI', type: 'hpi', format: 'prose', }, { instructions: 'Only fill in this section if appropriate. This should include only those treatments relevant to the chief complaint or the main subject of discussion in the HPI. Present the information as a numbered list with any relevant dates. Use post-graduate level medical jargon.', name: 'Past Treatments', type: 'other', format: 'prose', }, ], }, }, ], });

Make sure the template format is correct; otherwise the LLM may fall back to default templates depending on the encounterPhase.

registerTemplates props

It accepts an array of template objects with the following properties:

PropertyTypeDescription
id*
stringUnique identifier for the template.
name
stringHuman-readable name for the template (shown in the widget).
description
stringAny additional information about the template.
encounterPhase
'pre-chart' | 'in-visit'The encounter phase the template is intended for. Defaults to `in-visit`.
body*
objectThe body of the template containing the sections. This is used to format the final note summary.
sections*
Section[]The sections of the template containing the instructions, name, type and format.
name*
stringThe name of the section.
instructions*
stringAny contextual instructions for the section for LLM to follow.
type
'hpi' | 'subjective' | 'assessment' | 'plan' | 'other'The type of the section.
format
'prose' | 'bulleted'The format of the section output.
* Required field

Instruction tips

These tips apply to writing section instructions (and related fields like format) when using registerTemplates.

Free text sections

Free text sections allow the LLM to generate open-ended, narrative content based on the conversation.

Tips:

  • Describe the expected content clearly (e.g., “a single sentence”, “a comprehensive summary”, “a chronological account”)
  • Specify the desired tone or style (e.g., “Use post-graduate level medical jargon”)
  • Use format: 'prose' for paragraph-style output or format: 'bulleted' for list-style output
  • Include any constraints on length or detail level
{ name: 'Chief Complaint', instructions: "This should be a single sentence that articulates the patient's presenting complaint or medical issue. Use post-graduate level medical jargon.", type: 'other', format: 'prose', }
Single select sections

Single select sections constrain the LLM to choose exactly one value from a predefined list of options.

Tips:

  • Use the phrase “Choose one of” followed by the available options in quotes
  • List all valid options explicitly, separated by commas
  • Keep option values concise and unambiguous
{ name: 'Vitals_BP_Location1', instructions: 'The location of the blood pressure measurement. Choose one of "Arm Right", "Arm Left", "Unknown".', type: 'other', }
{ name: 'SH_SmokingCessationEducationGiven', instructions: 'Select the smoking cessation education given to the patient. Choose one of "Yes", "No".', type: 'other', }
Multi-select sections

Multi-select sections allow the LLM to select multiple values from a predefined list of options.

Tips:

  • Use phrases like “Select all applicable” or “You may choose multiple options from”
  • List all valid options explicitly after the phrase
  • Provide context about what the options represent
{ name: 'PH_MedicalInjuriesOperationsTreatment', instructions: 'Select all applicable medical conditions, operations, or treatments for the patient. You may choose multiple options from: anemia, appendectomy, asthma, chemotherapy, chest pain.', type: 'other', }
{ name: 'FH_FamilyParents', instructions: 'Select all applicable family history for the patient. You may choose multiple options from: anemia, appendectomy, asthma, chemotherapy, chest pain.', type: 'other', }

The key difference between single-select and multi-select is the phrasing in the instructions. Use “Choose one of” for single-select and “Select all applicable” or “You may choose multiple options from” for multi-select.


autoRegisterTemplates (definition + exampleNotes)

Use autoRegisterTemplates when you want Aura to auto-generate the template body from a simpler, standard section definition.

You provide:

  • definition: an array of sections with name, type, and optional options / meta (instructions + examples)
  • exampleNotes: previous notes that help Aura infer the desired structure/tone (provide at least the past 3 notes, more is better)
AuraWidget.autoRegisterTemplates({ templates: [ { id: 'soap_note', name: 'SOAP Note', description: 'Standard SOAP note for in-visit encounters', encounterPhase: 'in-visit', definition: [ { name: 'Chief Complaint', type: 'openText', meta: { additionalInstructions: 'Keep concise. Use post-graduate level medical jargon.', }, }, { name: 'Review of Systems', type: 'multiSelect', options: ['Constitutional', 'HEENT', 'Cardiovascular', 'Respiratory'], }, { name: 'Assessment', type: 'openText', }, { name: 'Plan', type: 'openText', }, ], exampleNotes: [ 'Example note 1 (most recent)...', 'Example note 2...', 'Example note 3...', ], }, ], });

autoRegisterTemplates props

It accepts an array of template objects with the following properties:

PropertyTypeDescription
id*
stringUnique identifier for the template.
name
stringHuman-readable name for the template (shown in the widget).
description
stringAny additional information about the template.
encounterPhase
'pre-chart' | 'in-visit'The encounter phase the template is intended for. Defaults to `in-visit`.
definition*
TemplateSectionDefinition[]Standard section definition used to auto-generate a template.
name*
stringSection name.
type*
'openText' | 'singleSelect' | 'multiSelect' | 'openSingleSelect' | 'openMultiSelect' | 'number' | 'boolean'Section type.
options
string[]Allowed options (for select-type sections like singleSelect/multiSelect).
meta
objectOptional metadata used to improve the generated template.
additionalInstructions
stringExtra instructions for this section.
examples
string[]Example outputs for this section.
exampleNotes*
string[]Past notes used to infer style/structure. Provide at least the past 3 notes.
* Required field
Last updated on