{% extends "base.html" %} {% block title %}Visit brief — CareAgents{% endblock %} {% block bodyclass %}page-brief{% endblock %} {% block content %}
{# Sample records only: the chat's line, at the top and sticky, and every line below says whose records these are. The engine words its own sentences about the sample person when asked (voice=sample). Each wording is spelled out, and these lines are written onto the tags around them, so a real brief renders byte for byte as before. #}{% if sample_line %}

{{ sample_line }}

{% endif %} {%- set from_records %}{% if sample_line %}From the made-up records{% else %}From your records{% endif %}{% endset %} {%- set unreachable %}{% if sample_line %}{% if brief_unavailable %}

We could not reach these made-up records just now, so this section was not checked.

{% else %}

Not in these made-up records.

{% endif %}{% else %}{% if brief_unavailable %}

We could not reach your records just now, so this section was not checked.

{% else %}

Not available from your connected records.

{% endif %}{% endif %}{% endset %}

Visit brief

{# No record type or id beside an item: "from Observation demo-obs-a1c" is record jargon to a person on a phone (#877). The engine still sends both; this page does not show them. #}
{% if sample_line %}A snapshot of these made-up records, to show what a visit brief looks like.{% else %}A snapshot of your records to bring to your visit.{% endif %}
{# --- lab trends --- #} {# How a result moved over time (the creatinine check, #867). The one item on this page that asks the person to act, so it comes first, under the intro (#878 V4). Shown only when the engine sent a sentence: an empty section would read as "nothing changed", which nobody checked. No resource type or id: "from Observation obs-9" means nothing to a patient (#878 G7). #} {% set fields = sections.get('lab-trends', []) %} {% if fields %}

{% if sample_line %}Something the sample person should raise with their doctor{% else %}Something to raise with your doctor{% endif %}

{% for f in fields %}
{{ f.label }}

{{ f.value }}

{% if sample_line %}From the made-up lab results{% else %}From your lab results{% endif %}
{% endfor %}
{% endif %} {# --- problems --- #}

Current conditions

{% set fields = sections.get('problems', []) %} {% if fields %}
{% for f in fields %}
{{ f.label }} {{ f.value }} {{ from_records }}
{% endfor %}
{% else %} {{ unreachable }} {% endif %}
{# --- medications --- #}

Current medications

{% set fields = sections.get('medications', []) %} {% if fields %}
{% for f in fields %}
{{ f.label }} {{ f.value }} {{ from_records }}
{% endfor %}
{% else %} {{ unreachable }} {% endif %}
{# --- labs --- #}

Recent labs

{% set fields = sections.get('labs', []) %} {% if fields %}
{% for f in fields %}
{{ f.label }} {{ f.value }} {{ from_records }}
{% endfor %}
{% else %} {{ unreachable }} {% endif %}
{# --- care gaps --- #}

Preventive care due

{% set fields = sections.get('care-gaps', []) %} {# Three states, not two. An empty list only means "nothing due" when the screening review actually ran, so care_gaps_ok is checked first — an unset value falls through to unavailable, never to reassurance. Not ok WITH fields is a partial review: the due items are real and are shown, under the engine's own note naming what it could not check. #} {% if fields %} {% if not care_gaps_ok %}

{% if care_gaps_note %}{{ care_gaps_note }}{% else %}Some screenings could not be checked, so this list may not be complete.{% endif %}

{% endif %}
{% for f in fields %}
{{ f.label }} {{ f.value }} {% if sample_line %}Based on the sample person's age and sex{% else %}Based on your age and sex{% endif %}
{% endfor %}
{% elif not care_gaps_ok %}

{% if sample_line %}We couldn't check the sample person's screenings just now.{% else %}We couldn't check your screenings just now. Ask your doctor which ones you are due for.{% endif %}

{% else %}

{% if sample_line %}We found no preventive care items in these made-up records.{% else %}We found no preventive care items based on your current records.{% endif %}

{% endif %}
{# --- visits --- #}

Recent and upcoming visits

{% set fields = sections.get('visits', []) %} {% if fields %}
{% for f in fields %}
{{ f.label }} {{ f.value }} {{ from_records }}
{% endfor %}
{% else %} {{ unreachable }} {% endif %}
{# No disclaimer here: the footer on every page carries it, and twice on one screen read as filler (#884 G7). #}

Something confusing? Tell us.

{% endblock %}