{# AI Generated Note: This template implements the list view from observation_list_screen.html using Twig #} {% extends "core/base.html.twig" %} {% block pagetitle %}{{ "Observation List"|xlt }}{% endblock %} {% block head %} {{ parent() }} {{ setupHeader(['datetime-picker']) }} {# Custom CSS for Observation List #} {% endblock %} {% block content %}
{# Page Header #} {# Filters and Search Section #} {#
#} {#
#} {#
#} {#
#} {#
#} {# #} {# #} {#
#} {#
#} {#
#} {#
#} {# #} {# {{ selectList('type-filter', 'Observation_Types', searchCriteria.obType|default(''), 'Select Type'|xla, {empty_name: 'Select Type'|xlt}) }}#} {#
#} {#
#} {# Date Filtering is stubbed out if we can do it #} {#
#} {#
#} {# #} {# #} {#
#} {#
#} {#
#} {#
#} {# #} {# #} {#
#} {#
#} {#
#} {#
#} {#
#} {% if statusMessage %} {% endif %} {# Observations List Container #}
{{ "Observations for this Encounter"|xlt }} {{ observations|length }}
{% if observations|length > 0 %} {% for observation in observations %}
{{ observation.description|text }} {% if observation.code %} {{ observation.code|text }} {% endif %}
{{ "Observation Date"|xlt }}: {{ observation.date|oeFormatDateTime }} {{ "Type"|xlt }}: {% if observation.ob_type_display %} {{ observation.ob_type_display|text }} {% else %} {{ "Unknown"|xlt }} {% endif %} {{ "Status"|xlt }}: {{ observation.ob_status_display|text }} {% if observation.ob_reason_code %} {{ "Reason Code"|xlt }}: {{ observation.ob_reason_code|text }} {% if observation.ob_reason_text %}  {{ observation.ob_reason_text|text }} {% endif %} {% endif %} {% if observation.ob_reason_status %} {{ "Reason Status"|xlt }}: {{ observation.ob_reason_status_display|text }} {% endif %}
{{ "Edit"|xlt }}
{% if observation.ob_value %}
{{ "Primary Value"|xlt }}
{{ observation.ob_value|text }} {% if observation.ob_unit %} {{ observation.ob_unit|text }} {% endif %}
{% endif %} {% if observation.code_type %}
{{ "Code Type"|xlt }}
{{ observation.code_type|text }}
{% endif %} {# do we want a date end? #} {# {% if observation.date_end %}#} {#
#} {#
#} {#
#} {# {{ "End Date"|xlt }}#} {#
#} {#
#} {# {% if observation.date_end %}#} {# {{ observation.date_end|oeFormatDateTime }}#} {# {% endif %}#} {#
#} {#
#} {#
#} {# {% endif %}#} {% if observation.observation %}
{{ "Comments"|xlt }}
{{ observation.observation|text }}
{% endif %}
{% if observation.questionnaire_response_id %}
{{ "Linked Questionnaire"|xlt }}
{{ observation.questionnaire_name|text }}
{% else %}
{{ "No Questionnaire"|xlt }}
{{ "Not linked"|xlt }}
{% endif %}
{% set subObservations = observation.sub_observations %}
{{ "Sub-observations"|xlt }} ({{ subObservations|length }})
{% if subObservations|length > 0 %}
{% for subObs in subObservations|slice(0, 3) %}
{{ subObs.description|text }} {{ subObs.ob_value|text }}
{% endfor %} {% if subObservations|length > 3 %}
{{ subObservations|length - 3 }} {{ "more..."|xlt }}
{% endif %}
{% else %}
{{ "None"|xlt }}
{% endif %}
{% endfor %} {% else %} {# Empty State #}

{{ "No Observations Found"|xlt }}

{{ "There are no observations recorded for this encounter yet."|xlt }}

{{ "Add First Observation"|xlt }}
{% endif %}
{% endblock %} {% block scripts %} {% endblock %}