{% extends "layout.html" %} {% block title %} {{ super() }} - {{ institute.display_name }} - {{ case.display_name }} {% endblock %} {% block css %} {{ super() }} {% endblock %} {% block top_nav %} {{ super() }} {% endblock %} {% block content_main %} {% set panel = panel or 1|int %}
{{ patient_data() }}
{{ show_matches('external') }}
{{ show_matches('internal') }}
{% endblock %} {% macro patient_data() %} {% for patient in case.mme_submission.patients %}
Patient #{{loop.index}}
  • Patient id: {{patient.id}}
  • Patient label: {{patient.label}}
  • Gender: {{patient.sex or "n.a."}}
Phenotype features (HPO terms)
    {% for hpo in case.mme_submission.features %}
  • {{hpo.id}} {{hpo.label}}
  • {% endfor %}
Diagnoses (OMIM terms)
    {% for omim in case.mme_submission.disorders %}
  • {{omim.id}} {{omim.label}}
  • {% endfor %}
{% for g_feat in patient.genomicFeatures %}
    {% for key, value in g_feat.items() %}
  • {% if key == 'gene' %}
    Gene:{{value.id}}
    {% elif key == 'variant' %} {% for ikey, item in value.items() %} {{ikey}}:{{item}}
    {% endfor %} {% elif key == 'type' %} {{key}}:{{value.label}} {% else %} {{key}}:{{value}} {% if value == 1 %} (heteroz. or hemiz. if on X in males) {% elif value == 2 %} (homozygous) {% endif %} {% endif %}
  • {% endfor %}
{% endfor %}


{% endfor %} {% endmacro %} {% macro show_matches(type) %} {% set matching_patients = [] %}
{% for patient, match_objs in matches.items() %}
{% set p_name = patient.split('.') %}

Showing {{type}} matches for patient {{ p_name[1] }}:

{% for match_obj in match_objs %} {% if match_obj.match_type == type %} {% do matching_patients.append(match_obj.patient_id) %}

{% for match_result in match_obj.patients %} {% endif %} {% if match_result.patient.genomicFeatures%} {% endif %} {% endfor %}
Score Node ID Contact Phenotypes Diagnoses
{{match_result.score.patient|round(4)}} {{match_result.node.label}} {% if "http" in match_result.patient_id %} link {% else %} {{match_result.patient_id}} {{match_result.patient.contact.name}}
{% if "http" in match_result.patient.contact.href %} contact link {% else %} {{match_result.patient.contact.href}} {% endif %} {% if match_result.patient.contact.institution %}
{{match_result.patient.contact.institution}} {% endif %} {% if match_result.patient.contact.email %}
{{match_result.patient.contact.email|replace("mailto:","")}} {% endif %}
{% for feature in match_result.patient.features %} {{feature.label}}({{feature.id}}) {% else %}

-

{% endfor %}
{% for omim in match_result.patient.disorders %} {{omim.id}} {% else %}

-

{% endfor %}
Gene/Variants: {% for g_feat in match_result.patient.genomicFeatures %}
{{loop.index}}
  • {{ g_feat.gene._geneName}} {{g_feat.gene.id}}
  • Variant: {{g_feat.variant|replace("'", "") or '-'}}
  • Type: {{g_feat.type|replace("'", "") or '-'}}
  • zygosity: {{g_feat.zygosity or '-'}}
{% endfor %}

{% endif %} {% endfor %} {% if not matching_patients %}

No matches available for this patient. {% endif %}
{% endfor %}
{% endmacro %} {% block scripts %} {{ super() }} {% endblock %}