{% from "cases/utils.html" import remove_form %} {% macro cohort_panel(case, institute, cohort_tags) %}
 Cohort tag
{% for cohort_batch in case.cohorts|batch(5, '') -%}
{% for cohort in cohort_batch %} {% if cohort %} {{cohort}} {{ remove_form(url_for('cases.cohorts', institute_id=institute._id, case_name=case.display_name, remove='yes'), hidden_input=('cohort_tag', cohort)) }} {% endif %} {% endfor %}
{% else %} No cohort tags added yet. {% endfor %}
{% endmacro %} {% macro diagnosis_phenotypes(case, institute, omim_terms) %}
OMIM Phenotypes
{{ diagnosis_form('phenotype', case, institute) }}
{% endmacro %} {% macro diagnosis_form(type, case, institute) %}
{% if type == "phenotype"%} {% else %} {% endif %}

{% endmacro %} {% macro phenotype_groups_panel(case, institute, hpo_groups) %}
 Phenotype groups
{% for hpo_term in case.phenotype_groups %} {{ hpo_term.feature }}  {{ hpo_term.phenotype_id }} {{ remove_form(url_for('cases.phenotypes', institute_id=institute._id, case_name=case.display_name, phenotype_id=hpo_term.phenotype_id, is_group='yes')) }}    {% else %} No HPO groups added yet. {% endfor %}
{% endmacro%} {% macro hpo_group_item(hpo_term, case, institute) %}
  • {{ hpo_term.feature }} {{ hpo_term.phenotype_id }}
    {{ remove_form(url_for('cases.phenotypes', institute_id=institute._id, case_name=case.display_name, phenotype_id=hpo_term.phenotype_id, is_group='yes')) }}
  • {% endmacro %} {% macro hpo_panel(case, institute, config) %} {% set url = 'https://hpo.jax.org/app/' %}
     Phenotype terms (HPO)
    {% for hpo_term in case.phenotype_terms %} {{ hpo_item(hpo_term, case.individuals) }} {% else %} No phenotypes added yet {% endfor %}
    {% if config.PHENOMIZER_USERNAME %} {% endif %}
    Add gene to the dynamic panel
    {% endmacro %} {% macro hpo_item(hpo_term, case_individuals) %} {% if hpo_term %} {{ hpo_term.feature }} {{ hpo_term.phenotype_id }} {% for ind in hpo_term.individuals %} {% for case_ind in case_individuals %} {% if ind.individual_name == case_ind.display_name%} {% endif %} {% endfor %} {% endfor %}      {% else %} {% endif %} {% endmacro %}