{# The Allergy card for the MRD This template renders a card for the Medical Record Dashboard displaying active allergies a patient has. The card provides a direct link to the Issues page, showing just the allergies. Some allergies may not be visible without scrolling. Any allergy with a severity of severe, life threatening, or fatal is always rendered at the top of the card, regardless of the overflow of the list. To modify how a critical allergy is displayed, provide an array of strings to critical_allergy_item_class_list from the rendering page. To modify the classes used to render each non-priority allergy, override list_group_container_class_list with an array of strings representing class names. @package OpenEMR @subpackage Patient @author Robert Down @copyright Copyright (c) 2023 Providence Healthtech @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3 #} {% extends "patient/card/card_base.html.twig" %} {% block content %}
{% if list|length == 0 %} {% if listTouched == true %}
{{ "No Known Allergies"|xlt }}
{% else %}
{{ "Nothing Recorded"|xlt }}
{% endif %} {% else %} {% set severityAlarms = ["severe", "life_threatening_severity", "fatal"] %} {% for l in list %} {% set classes = (l.severity_al in severityAlarms) ? 'bg-warning font-weight-bold px-1' : '' %}
{% set _severity = getListItemTitle('severity_ccda', l.severity_al) %}
{{ l.title|text }} ({{ _severity|text }})
{% endfor %} {% endif %}
{% endblock %}