Gå til hovedinnhold

Du behersker dine malene i malfører: En avansert veiledning

for healthcare practitioners who want dynamic, intelligent templates that adapt to different clinical scenarios.

Oppdatert i dag

Welcome to the final part of our template tutorial series. This session is all about taking your template creation skills to the next level by using complex AI commands to fully customise your templates in a way that improves the quality of your clinical documentation. Whether you need specific formats, dynamic content adjustments, or seamless integration of past clinical data, this guide will help you use advanced capabilities to produce precise and efficient documentation.


Is this guide right for you?

This guide is for you if:

  • Your basic templates are working but you need dynamic behaviour

  • You want different outputs based on patient data (e.g. age, conditions, lab values)

  • You're building templates that handle multiple scenarios

  • You need to incorporate historical information from previous sessions

  • You want to create "macros" that auto-populate management plans

⚠️ not quite ready? If you're still getting comfortable with the basics, start here:


What's in this guide

Key section

What You'll Learn

Logic based on conditions

Create dynamic templates that adapt based on patient data

Creating clinical macros

Auto-generate management plans based on conditions

Adding historical context into current documentation

Include data from previous sessions

Understanding memory versus templates versus text snippets

When to use each feature

Example: bringing it all together

A full advanced template walkthrough

Advanced troubleshooting

Complex issues and solutions


Video Tutorial


Summary of techniques at intermediate level

Before diving into advanced strategies, let's quickly review some of the intermediate techniques we discussed in the previous article:

  • Change formatting of templates: We explored how to modify templates using AI instructions to follow specific formatting guidelines, such as writing the "subjective" section in narrative form without bullet points.

  • Types of AI instructions: We introduced basic AI instructions to control content style, such as using full sentences or formatting information line-by-line. The AI instructions can be specific to a particular placeholder or a particular section or they can be general instructions that are added at the top or bottom of your template separate from the sections/placeholders in your template.

Building on these concepts, we'll now explore more advanced AI commands to further customise your clinical notes.


Using the template builder for advanced edits

While this guide focuses on manual template editing for precise control, you can also use the template builder to make advanced changes. Simply describe what you want in plain English - here are some examples:

  • "add logical conditions so that if the patient is under 18, include a note about guardian consent at the top of the note"

  • "if allergies are not mentioned, print "NO known drug allergies"

  • "add historical notes handling so previous session info is incorporated but only today's recording represents current findings"

The template builder will generate the appropriate syntax based on your input. You can then view and further refine the underlying code if needed.


Advanced AI commands for customisation

Health provides several built-in settings to help generate clinical notes in specific styles. You may still need to override these defaults to meet particular requirements. Here's how you can use advanced AI commands to tailor your templates.

Logic based on conditions (If-then statements)

Logic based on conditions allows you to create dynamic templates that automatically adapt based on patient data. This is one of the most powerful advanced features.

How logic based on conditions works

Basic structure:

(if [condition], print "[text]". if [alternative condition], print "[alternative text]".)

The condition can be based on anything mentioned in the recording, contextual notes, or patient details- age, diagnoses, lab values, medications, etc.

Quick reference: logic based on conditions patterns

Pattern

Template builder

Manual syntax

Simple if-then

"if the patient is a smoker, add a line about smoking cessation including counselling provided and resources shared"

(only include if explicitly mentioned in recording, contextual notes or clinical note, else omit section entirely. **if the patient is a smoker, print "smoking cessation counselling provided."**)

If-else

"if allergies aren't mentioned, write no known drug allergies"

[allergies](only include allergies if explicitly mentioned in recording, contextual notes or clinical note. **if not mentioned, print "no known drug allergies"**)

Age-based

"if patient is under 18, note guardian consent"

[guardian consent] (** if patient is under 18, print "guardian consent obtained." if 18 or older, omit this line.**)

Value-based

"if BMI is over 30, recommend weight management"

(only include if explicitly mentioned in recording, contextual notes or clinical note, else omit section entirely. ** if BMI is greater than 30, print "weight management discussed."**)

condition-based

"if diabetes is mentioned, include HbA1c follow-up"

(only include if explicitly mentioned in recording, contextual notes or clinical note, else omit section entirely. ** if diabetes is mentioned, print "HbA1c monitoring recommended."**)

Example 1: simple logic based on conditions

situation: you want to include smoking cessation advice only for patients who smoke.

template builder: "if the patient is a smoker, add smoking cessation including counselling provided and resources shared"

Manual edit:

(only include if explicitly mentioned in recording, contextual notes or clinical note, else omit section entirely. if the patient is a smoker, print "smoking cessation counselling provided. resources shared." if the patient is a non-smoker, omit this statement entirely.)

Example 2: age-based logic based on conditions

situation: you want different consent wording for paediatric vs adult patients.

template builder: "if patient is under 18, note that guardian consent was obtained"

Manual edit:

[consent] (if patient is under 18, print "guardian/parent consent obtained for today's consultation." if patient is 18 or older, print "patient consent obtained for today's consultation.")

Example 3: laboratory value logic based on conditions

situation: you want to provide different recommendations based on HbA1c levels.

template builder: "add blood sugar control assessment based on HbA1c level"

Manual edit:

[blood sugar assessment] (only include if explicitly mentioned in recording, contextual notes or clinical note, else omit section entirely. if HbA1c is above 8%, print "poor blood sugar control - treatment intensification recommended." if HbA1c is between 7% and 8%, print "suboptimal blood sugar control - review medication adherence and lifestyle factors." if HbA1c is 7% or below, print "adequate blood sugar control - continue current management.")

Example 4: multiple conditions (and/or)

situation: you want screening recommendations for specific patient groups.

template builder: "if the patient is female and over 50 and hasn't had a recent mammogram, recommend mammogram screening"

Manual edit:

[screening recommendations] (only include if explicitly mentioned in recording, contextual notes or clinical note, else omit section entirely. if the patient is female and over 50 and has not had a recent mammogram, print "recommend mammogram screening - patient meets criteria for breast cancer screening." if these criteria are not all met, omit this recommendation entirely.)

Example 5: nested logic based on conditions

situation: you want diabetes-specific advice, but only when diabetes is relevant.

template builder: "if diabetes is mentioned, assess blood sugar control based on HbA1c"

Manual edit:

[diabetes management] (only include if explicitly mentioned in recording, contextual notes or clinical note, else omit section entirely. if diabetes is mentioned, then: if HbA1c is above 7%, print "poor blood sugar control - intensify treatment." if HbA1c is 7% or below, print "adequate blood sugar control - continue current management." if diabetes is not mentioned, omit this section entirely.)

Logic based on conditions reference table

Type

Example template instructions

Simple conditional

(only include if explicitly mentioned in recording, contextual notes or clinical note, else omit section entirely. if [condition], print "[text]". if [alternative], print "[alternative text]".)

Multiple conditions (AND)

(only include if explicitly mentioned in recording, contextual notes or clinical note, else omit section entirely. if the patient is female AND over 50 AND has not had a recent mammogram, print "recommend mammogram screening." if not all criteria are met, omit entirely.)

Multiple conditions (OR)

(only include if explicitly mentioned in recording, contextual notes or clinical note, else omit section entirely. if the patient is male OR under 50 OR has had a recent mammogram, omit this recommendation entirely.)

nested conditions

(only include if explicitly mentioned in recording, contextual notes or clinical note, else omit section entirely. if diabetes is mentioned, then: if HbA1c is greater than 7%, print "poor control." if HbA1c less than or equal to 7%, print "adequate control." if diabetes not mentioned, omit section.)

conditional plus formatting

(only include if explicitly mentioned in recording, contextual notes or clinical note, else omit section entirely. if multiple medications are prescribed, list each on a new line with dosage. if only one medication, write in a single sentence. if none, print "nil medications prescribed.")

verbatim conditional

(only include if explicitly mentioned in recording, contextual notes or clinical note, else omit section entirely. if the patient is a smoker, print: "smoking cessation counselling provided. resources for smoking cessation support shared." if non-smoker, omit.)

overall template conditional

(if this is a follow-up visit, include the "progress since last visit" section. if this is an initial consultation, omit that section entirely.)


Creating clinical macros

predefined blocks of text that are automatically inserted into your template's output when certain conditions are met. This makes them an excellent tool for standardised management plans.

How macros work

A macro is a combination of logic based on conditions with verbatim text. When a logic based on conditions statement is met, the subsequent verbatim text will be printed.

You can insert multiple macros within a template, to prepare for multiple scenarios.

Example: CKD management macro

situation: you want different management plans to appear automatically based on creatinine levels.

Plan:

(only include if explicitly mentioned in recording, contextual notes or clinical note, else omit section entirely. if creatinine is above 1.5 mg/dL and less than or equal to 2.0 mg/dL, print:

"management plan for CKD stage 1:

- monitor kidney function tests (serum creatinine, eGFR) every 6-12 months

- recommend lifestyle modifications: low-sodium diet, regular physical activity

- blood pressure control: aim for BP < 140/90 mmHg using ACE inhibitors or ARBs

- avoid nephrotoxic drugs (e.g., NSAIDs), smoking and alcohol intake")

(only include if explicitly mentioned in recording, contextual notes or clinical note, else omit section entirely. if creatinine is above 2.0 mg/dL, print:

"management plan for CKD stage 2:

- monitor kidney function tests (serum creatinine, eGFR) every 3-6 months

- low-protein diet (0.8 g/kg body weight per day), continue low-sodium diet

- blood pressure control: aim for BP < 130/80 mmHg with ACE inhibitors or ARBs

- referral to a kidney specialist for assessment and shared management

- discussed potential need for renal replacement therapy if progression to stage 3 or higher is anticipated

- encouraged vaccinations (influenza, pneumococcal, hepatitis B) as appropriate")

understand this example: if the patient's creatinine is mentioned as 1.8 mg/dL during the consult, the stage 1 plan automatically appears. if it's 2.3 mg/dL, the stage 2 plan appears instead.

more macro examples

blood pressure management:

(only include if explicitly mentioned in recording, contextual notes or clinical note, else omit section entirely. if systolic BP is greater than 160 mmHg, print:

"blood pressure management - severe:

- immediate medication initiation/adjustment required

- consider combination therapy - review in 2 weeks

- home BP monitoring recommended")

(only include if explicitly mentioned in recording, contextual notes or clinical note, else omit section entirely. if systolic BP is between 140 and 160 mmHg, print:

"blood pressure management - moderate:

- lifestyle modifications: dash diet, sodium restriction, exercise

- medication review

- consider initiation if lifestyle measures insufficient

- review in 4-6 weeks")

BMI-based advice:

(only include if explicitly mentioned in recording, contextual notes or clinical note, else omit section entirely. if BMI is greater than 30, print:

"weight management:

- discussed health risks associated with obesity

- lifestyle modification counselling provided

- consider referral to a nutrition specialist

- set realistic weight loss goal of 5-10% body weight over 6 months

- review in 4 weeks")


Adding historical context into current documentation

Often, it is necessary to include data from previous sessions or encounters to provide a comprehensive clinical picture. Health's templates can dynamically pull in information from contextual notes (i.e., additional notes including past healthcare encounters) that you enter into the context tab in Health.

There are 2 ways to do this within Health:

  1. linked sessions

  2. manually add historical context in the context tab

1. linked sessions

linked sessions allow you to incorporate historical patient data into your current documentation, enabling more comprehensive and continuous patient care rather than isolated snapshots.

How to link a session to a patient

  1. open any session and click on the "add patient details" input field

  2. select the patient you want to link the session to, or create a new patient if they aren't listed

  3. the session will now be linked to that patient profile

How to include previous sessions in the context:

for any linked session, you can choose which past sessions to include as context for your documentation. sessions automatically appear with the three most recent previous sessions as default if you are using linked patients.

If you do not want them included, manually uncheck the box at the bottom left of the transcript window.

Key considerations for linked sessions

  • session limit: capped at 3 past sessions at this stage to maintain high output quality - this is something we're looking to expand in future updates.

  • context changes: if you change the sessions included in your context, a sync button will appear to update your outputs accordingly.

  • deleted sessions: if you delete your sessions, you won't be able to use this feature for those sessions.

2. using contextual notes for follow-up visits

This scenario works best if you would prefer not to link patients, and prefer to manually upload the past clinical note to the session each time. This gives you greater control of what history you'd like to upload.

example scenario: suppose you are documenting a follow-up session for a burn patient and want to include relevant information from the initial consultation.

  1. Include past context in your template:

    • first, find and copy the relevant details from the initial/previous session into the "context" section, or upload a document containing historical patient information directly into the "context" section.

  2. add contextual instructions into your template:

    • include a global instruction such as:

      (contextual notes will contain clinical notes or summaries from previous healthcare encounters. Make sure these are summarised and included in the current clinical notes for the same patient.)

      or

      (contextual notes will contain clinical notes or summaries from previous healthcare encounters. historical information should be incorporated where relevant as background information. only information from today's recording should be documented as today's findings, examination results, or current status. clearly distinguish between historical information and current findings.)

  3. Save, refresh, and regenerate:

    • When you regenerate the output, the system will automatically pull in the relevant historical data, such as previous treatments, progress, or diagnostic results, and include them in the current documentation.

This method ensures that your follow-up notes are complete and accurately reflect the patient's clinical history, and reduces redundancy and improves clarity. This reduces redundancy, and improves clarity.


Using advanced techniques for improved control

To make full use of these advanced commands, think about the following strategies:

  1. Use clear language and terminology:

    • The system's AI responds best to specific terms and consistent wording. for example, use "recording" to refer to conversations between the patient and healthcare provider, or "contextual note" and "clinical note" to denote data from past healthcare encounters. This helps the system accurately interpret your instructions.

  2. Try different instruction placement:

    • General AI instructions can sometimes work better at the start or end of a template. If an instruction isn't performing as expected, try moving it.

  3. Use logical conditions to automate decisions:

    • If-then statements can make your templates more dynamic and responsive. experiment with different scenarios to automate decisions based on patient data, like lab results, vital signs, or previous diagnoses.

  4. reference the request glossary for accurate commands:

    • The system uses specific terms to label different data types. For example:

    • "Recording" refers to the conversation text.

    • "contextual notes" are summaries of previous healthcare encounters.

    • "Patient details" include personal information such as name, age, or pronouns.

    • "Clinical note" is the core document from which other documents are derived.

Using the correct terms from the glossary ensures the system correctly interprets your commands, leading to more accurate outputs.


Understanding memory versus templates versus text snippets

for advanced template users, it's important to understand when to use templates versus other Health features:

Funsksjon

Best suited for

scope

Examples

Minne

individual healthcare provider or organisation-wide preferences that apply everywhere

all templates, all sessions

date format (DD/MM/yyyy), spelling (Australian English), approved abbreviations

templates

note-specific structure and logic based on conditions

one template type

soap format, referral letter structure, specialty-specific requirements

Tekstsnutt

reusable text blocks you insert manually

on-demand insertion

standard patient education text, referral letter closings, safety netting advice

When to use memory

✅ use memory for:

  • date and time formats

  • spelling conventions (UK/US/AU English)

  • standard abbreviations you or your practice uses

  • default units (metric/imperial)

  • your practice details (name, address, contact)

when to use templates

✅ use templates for:

  • note structure (soap, history of presenting complaint, problem-based)

  • logic based on conditions (if-then statements)

  • section-specific formatting

  • document type requirements (referral vs progress note)

when to use snippets

✅ use snippets for:

  • patient education materials you share frequently

  • consent wording

  • medication instructions

  • referral letter sign-offs

  • safety netting advice


Example: bringing it all together

let's build a complete advanced template for a diabetes review that includes:

  • logic based on conditions for blood sugar control assessment

  • automatic management plan based on HbA1c

  • integration of historical context

  • dynamic screening recommendations

complete template: diabetes review

diabetes review note

date: [date of consultation]

patient: [patient name], [age] years old

(only include if explicitly mentioned in recording, contextual notes or clinical note, else omit section entirely. write as a brief statement.)

reason for visit: [reason for today's diabetes review]

(only include if explicitly mentioned in recording, contextual notes or clinical note, else omit section entirely. write as a brief statement.)

diabetes history: [summary of diabetes history including type, duration, and previous complications] (incorporate relevant history from contextual notes if provided. this represents historical background.)

current diabetes management: [current diabetes medications with doses] (only include if explicitly mentioned in recording, context or clinical note, else omit section entirely. Write as a bulleted list.)

today's assessment:

blood sugar control: [HbA1c result and interpretation] (only include if explicitly mentioned in recording, contextual notes or clinical note, else omit section entirely. if HbA1c is above 8%, print "assessment: poor blood sugar control requiring treatment intensification." if HbA1c is between 7% and 8%, print "assessment: suboptimal blood sugar control - review adherence and lifestyle factors." if HbA1c is 7% or below, print "assessment: adequate blood sugar control - continue current management.")

blood pressure: [blood pressure reading] (only include if explicitly mentioned in recording, contextual notes or clinical note, else omit section entirely.)

weight/BMI: [weight and BMI if available] (only include if explicitly mentioned in recording, contextual notes or clinical note, else omit section entirely.)

complications screening: [foot examination findings] (only include if explicitly mentioned in recording, contextual notes or clinical note, else print "foot examination: not performed today")

[eye screening status] (only include if explicitly mentioned in recording, contextual notes or clinical note, else print "retinal screening: status unknown - consider referral")

[renal function] (only include if explicitly mentioned in recording, contextual notes or clinical note, else omit section entirely.)

plan: (only include if explicitly mentioned in recording, contextual notes or clinical note, else omit section entirely. if HbA1c is above 8%, print: "management plan - poor control:

1. medication adjustment: - [specific changes to be determined by healthcare provider] - consider addition of second agent or insulin initiation

2. lifestyle reinforcement:- dietary review - refer to nutrition specialist

- exercise prescription

- 150 mins moderate activity per week

3. monitoring:

- increase home glucose monitoring frequency

- repeat HbA1c in 3 months

4. follow-up:

- review in 4 weeks to assess response")

(only include if explicitly mentioned in recording, contextual notes or clinical note, else omit section entirely. if HbA1c is between 7% and 8%, print:

"management plan - suboptimal control:

1. review medication adherence

2. reinforce lifestyle measures

3. repeat HbA1c in 3 months

4. follow-up in 6-8 weeks")

(only include if explicitly mentioned in recording, contextual notes or clinical note, else omit section entirely. if HbA1c is 7% or below, print:

"management plan - adequate control:

1. continue current medications unchanged

2. annual complications screening due

3. repeat HbA1c in 6 months

4. routine follow-up in 3-6 months")

(Du må alltid referere til pasienten ved navn hvis det er tilgjengelig. use Australian English spelling throughout. use dd/mm/yyyy format for all dates.)

How this template works

  1. structure: clear sections for history, current assessment, and plan

  2. historical context: previous diabetes history pulled from contextual notes

  3. conditional assessments: blood sugar control automatically interpreted based on HbA1c

  4. dynamic macros: different management plans appear based on control level

  5. smart defaults: screening sections show "not performed" if not mentioned

  6. global instructions: consistent formatting throughout


Advanced troubleshooting

complex layout not rendering correctly

problem: your template has multiple sections and logic based on conditions, but the output is messy or incomplete.

solutions:

  • simplify and isolate - temporarily remove sections to identify which one is causing issues

  • check for conflicting instructions - two instructions that contradict each other can cause unpredictable behaviour

  • ensure conditionals are properly closed - every "if" should have a clear outcome:

❌ (if diabetic, include HbA1c)

✅ (if diabetic, print "HbA1c monitoring recommended." if not diabetic, omit entirely.)

  • try moving global instructions - move from bottom to top of template (or vice versa)

logic based on conditions not triggering

problem: your if-then statements aren't producing the expected output.

solutions:

  • match the terminology - use terms that match what's actually in the recording:

❌ (if diabetic...)

✅ (if diabetes or diabetic is mentioned...)

  • be more explicit - specify exactly what triggers the condition:

❌ (if HbA1c is high...)

✅ (if HbA1c is above 7%...)

  • check the data source - ensure the information the condition relies on is actually in the recording or contextual notes

historical context being confused with today's findings

problem: the system is mixing up historical information from context with current findings from today.

solution: add this global instruction:

(historical notes from previous sessions are provided in contextual notes and should be incorporated where relevant as background information. only information from today's recording should be documented as today's findings, examination results, or current status. do not present historical information as current findings.)

sensitive terms being filtered

problem: clinically relevant terms (including patient-reported profanity) are being removed from notes.

solution: add this instruction if clinically relevant:

(include verbatim any clinically relevant language used by the patient, even if it includes profanity or sensitive terms, as this may be important for accurate clinical documentation.)


best practices for advanced templates

#{{do}} #{{checkmark}}

  • start with a working basic template before adding advanced features

  • test conditionals one at a time - add complexity gradually

  • use clear, specific conditions - "if HbA1c > 8%" not "if HbA1c is high"

  • include fallback options - what happens if the condition isn't met?

#{{avoid}} #{{cross_mark}}

  • overcomplicating - if you need 10+ conditionals, consider multiple templates instead

  • vague conditions - "if relevant" or "if appropriate" won't work reliably

  • nested conditionals more than 3 levels deep

  • assuming the system can calculate - note that while the system handles value comparisons well (e.g. "if BP > 160"), arithmetic calculations and date arithmetic are not reliable.


Request glossary

We've created a request glossary with specific terms commonly used in our base requests. Using these terms in your templates will lead to higher quality outputs.

example: always refer to the conversation between the healthcare provider and patient as the 'recording' rather than 'the conversation' or other variations.

#{{term}}

#{{definition}}

transkripsjon

The recording of the conversation between the healthcare provider and the patient.

kontekstuelle notater

The context or contextual notes made by the healthcare provider, which should be integrated into the foundation clinical note.

pasientdetaljer

Details specific to the patient that should be included in the document.

structure

The preferred structure or format for the clinical note as specified by the healthcare provider, essentially a note template.

mal

The predefined format or structure that the clinical note or document should follow.

stil

The unique voice and style preferences of the healthcare provider for writing the note. Brief, balanced, detailed and very detailed.

språk

the recording is in US English and specifically trained on medical terminology. if you want to use British or Australian English, specifically use the terms UK English.

dagens dato

The current date in dd/mm/yyyy format, with instructions to reformat for US/Canada.

helsehelsemøte

How we refer to all information pertaining to today's session, visit or consult, essentially the recording, the contextual notes, patient details, date today etc.

krav

Requirements and instructions specific to writing the clinical note.

klinisk notat

The foundation clinical note that needs to be mapped to the template.

plassholder

Text in square brackets describing the type of medical information that should be displayed.

AI-instruksjoner

Text in round brackets guiding how to treat or manipulate information.

ordrett

Text in quotation marks that must be included word-for-word in the output.

safety instruction

an instruction ensuring content is only included if explicitly mentioned, preventing the system from inferring or assuming information.

global instruction

an instruction placed at the top or bottom of a template that applies to the entire document rather than a specific section.

logic based on conditions

if-then statements that create dynamic templates adapting to different clinical scenarios based on patient data.

macro

a predefined block of text or instructions triggered by logic based on conditions based on specific criteria.


#{{what_next}}

🎉 congratulations! you've completed the template tutorial series.

you now have the knowledge to create sophisticated, dynamic templates that can:

  • adapt to different patient scenarios

  • auto-generate management plans

  • integrate historical context

  • handle complex clinical workflows


continue learning

  • 🌐 template community - share your templates and learn from others

  • 📖 adding a template to the community - contribute your creations

  • 💬 support - reach out to our support team via the help button


quick links

⬅️ creating templates in Health: a basic guide - review the fundamentals

⬅️ improving your Health templates: an intermediate guide - formatting and troubleshooting

Svarte dette på spørsmålet?