 <!DOCTYPE html>
<html>
<head>
<title>FINAL REPORT</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="/static/dashboard/css/style.css">
</head>
<body>
<div class="wrapper">

                                            <div class="header-top">
                                                <div class="hd-left">
                                                    <div class="logo">
                                                        <img src="/static/dashboard/images/logo.png">
                                                    </div>
                                                </div>
                                                <div class="hd-right">
                                                    <h2>FINAL REPORT</h2>
                                                </div>
                                            </div>
                                            <div class="slider-mind">
                                                <div class="slider-left">
                                                    <h2>{{ Entry.patient.full_name }}</h2>
                                                    <ul>
                                                        <li><span>PATIENT ID</span>{{ Entry.patient.patient_id }}</li>
                                                        <li><span>DOB</span>{{ Entry.patient.dob |date:"m/d/Y" }}</li>
                                                        <li><span>AGE</span>{% if Entry.patient.age %}{{ Entry.patient.age }}{% else %}{{ Entry.patient.how_old }}{% endif %}</li>
                                                        <li><span>GENDER</span>{{ Entry.patient.show_gender_name }}</li>
                                                    </ul>
                                                    <div class="Laboratories">
                                                        <h2>{{Entry.patient.patient_client.business_legal_name  }}</h2>
                                                        <p>CLIENT ID <span class="vg2">{{ Entry.patient.patient_client.client_code }} </span> ATTENDING PHYSICIAN: {{ Entry.physician_name }}</p>
                                                        <p>ADDRESS <span class="vg">{{ Entry.patient.patient_client.business_address }}{% if Entry.patient.patient_client.business_address2 %} {{ Entry.patient.patient_client.business_address2 }} {% endif %} {{ Entry.patient.patient_client.business_city  }}, {{ Entry.patient.patient_client.business_state }}, {{ Entry.patient.patient_client.business_zipcode }}</span></p>
                                                    </div>

                                                </div>
                                                <div class="slider-right">
                                                    <h1>{{ Accession.exam_in.exam_casetype.case_type_name |upper}}</h1>
                                                    <ul>
                                                        <li><span>ACCESSION #:</span>{{ Accession.accession_number }}</li>
                                                        <li><span>COLLECTED:</span>{{ Entry.collection_date |date:"m/d/Y" }}</li>
                                                        <li><span>RECEIVED:</span>{{ Entry.created_date |date:"m/d/Y"}}</li>
                                                        <li><span>REPORTED:</span>{{ Accession.completed_date |date:"m/d/Y" }}</li>
                                                    </ul>
                                                </div>
                                            </div>

                                            {% if Accession.exam_in.exam_casetype.case_type_id == 1 %}
                                            <div class="mid-section">

                                                <h1>CLINICAL INFORMATION</h1>
                                                <ul>
                                                    <li><span>Specimen Source: </span>
                                                        {% if Entry.GYN_Cervix == 1 %} Cervix, {% endif %}
                                                        {% if Entry.GYN_Vaginal == 1 %}Vaginal, {% endif %}
                                                        {% if Entry.GYN_Endocervix == 1 %}Endocervix, {% endif %}
                                                        {% if Entry.GYN_None == 1 %} None given {% endif %}
                                                    </li>
                                                    <li><span>LMP</span>8/15/2015</li>

                                                </ul>
                                                <ul>
                                                    <li><span>Specimen Type: </span>
                                                        {% if Entry.GYN_speciment_type == 'Conventional' %}Conventional{% else %}Liquid Base PAP{% endif %}
                                                    </li>
                                                    <li><span>STATUS</span>Regular</li>
                                                </ul>
                                                <ul>
                                                    <li><span>Clinical Findings:</span>
                                                        {% if Entry.GYN_routine == 1 %}Routine {% endif %}
                                                        {% if Entry.GYN_vaginitis == 1 %}Vaginitis, {% endif %}
                                                        {% if Entry.GYN_cervicitis == 1 %}Cervicitis, {% endif %}
                                                        {% if Entry.GYN_condyloma == 1 %}HPV, {% endif %}
                                                        {% if Entry.GYN_herpes == 1 %}Possible Herpes,{% endif %}
                                                        {% if Entry.GYN_clinically_suspicious == 1 %}Clinically suspicious, {% endif %}
                                                        {% if Entry.GYN_abnormal_bleeding == 1 %}Abnormal Bleeding, {% endif %}
                                                        {% if Entry.GYN_cervical_lesion == 1 %}Cervical Lesion, {% endif %}
                                                        {% if Entry.GYN_menopausal_syndrome == 1 %}Menopausal Syndrome, {% endif %}
                                                        {% if Entry.GYN_bleeds_on_contact == 1 %}Bleeds on Contact, {% endif %}
                                                        {% if Entry.GYN_infection == 1 %}Infection, {% endif %}
                                                        {% if Entry.GYN_iud == 1 %}IUD, {% endif %}
                                                        {% if Entry.GYN_discharge == 1 %}Discharge, {% endif %}
                                                        {% if Entry.GYN_hysterectomy == 1 %}Hysterectomy, {% endif %}
                                                        {% if Entry.GYN_hysterectomy == 1 %}{% if Entry.GYN_discharge_info == 'Partial' %}Partial {% endif %}{% if Entry.GYN_discharge_info == 'Total' %}Total{% endif %}  {% endif %}
                                                    </li>
                                                </ul>
                                                <ul>
                                                    <li><span>OTHER INFO:</span>
                                                         {% if Entry.GYN_hysterectomy_description %}{{ Entry.GYN_hysterectomy_description }} {% endif %}
                                                    </li>
                                                </ul>

                                                <div class="mid-secound">
                                                    <div class="mid-left">
                                                        <h1>RESULTS</h1>
                                                        <h2>SPECIMEN ADEQUACY: </h2>
                                                            {% for result in Results_in_specimen %}
                                                                {% if result.code_casetype_result.case_type_id == Accession.exam_in.exam_casetype.case_type_id %}
                                                                       {% for accession in Entry.accession_number.all %}
                                                                           {% if Accession.exam_in.exam_id == accession.exam_in.exam_id %}
                                                                                {% if accession.result_in_speciment.all %}
                                                                                   {% for res in accession.result_in_speciment.all %}
                                                                                      {% if result.code_id == res.code_id %}
                                                                                          {% if result.code_result_type == 1 %}
                                                                                            <span>{{ result.code_description }}</span><br />
                                                                                          {% else %}
                                                                                              <p>{{ result.code_description }}</p><br />
                                                                                          {% endif %}

                                                                                      {% endif %}
                                                                                    {% endfor %}
                                                                                {% endif %}
                                                                            {% endif %}

                                                                       {% endfor %}

                                                                {% endif %}
                                                            {% endfor %}
                                                        <h2>INTERPRETATION / RESULTS: </h2>

                                                            {% for result in Results_in_interpretation %}
                                                                {% if result.code_casetype_result.case_type_id == Accession.exam_in.exam_casetype.case_type_id %}
                                                                       {% for accession in Entry.accession_number.all %}
                                                                           {% if Accession.exam_in.exam_id == accession.exam_in.exam_id %}
                                                                                {% if accession.result_in_interpretation.all %}
                                                                                   {% for res in accession.result_in_interpretation.all %}
                                                                                      {% if result.code_id == res.code_id %}
                                                                                         {% if result.code_result_type == 1 %}
                                                                                            <span>{{ result.code_description }}</span><br />
                                                                                          {% else %}
                                                                                              <p>{{ result.code_description }}</p><br />
                                                                                          {% endif %}
                                                                                      {% endif %}
                                                                                    {% endfor %}
                                                                                {% endif %}
                                                                           {% endif %}
                                                                       {% endfor %}

                                                                {% endif %}
                                                            {% endfor %}
                                                        <h2>ADDITIONAL FINDINGS: </h2>
                                                            {% for result in Results_in_additional %}
                                                                {% if result.code_casetype_result.case_type_id == Accession.exam_in.exam_casetype.case_type_id %}
                                                                       {% if Entry.accession_number.all %}
                                                                           {% for accession in Entry.accession_number.all %}
                                                                               {% if Accession.exam_in.exam_id == accession.exam_in.exam_id %}
                                                                                    {% if accession.result_in_additional.all %}
                                                                                       {% for res in accession.result_in_additional.all %}
                                                                                          {% if result.code_id == res.code_id %}
                                                                                              {% if result.code_result_type == 1 %}
                                                                                                <span>{{ result.code_description }}</span><br />
                                                                                              {% else %}
                                                                                                  <p>{{ result.code_description }}</p><br />
                                                                                              {% endif %}
                                                                                          {% endif %}
                                                                                        {% endfor %}
                                                                                    {% endif %}
                                                                               {% endif %}
                                                                           {% endfor %}
                                                                       {% endif %}

                                                                {% endif %}
                                                            {% endfor %}
                                                        <h2>HORMONAL EVALUATION: </h2>
                                                            {% for result in Results_in_hormonal %}
                                                                {% if result.code_casetype_result.case_type_id == Accession.exam_in.exam_casetype.case_type_id %}
                                                                       {% for accession in Entry.accession_number.all %}
                                                                           {% if Accession.exam_in.exam_id == accession.exam_in.exam_id %}
                                                                                {% if accession.result_in_hormonal.all %}
                                                                                   {% for res in accession.result_in_hormonal.all %}
                                                                                      {% if result.code_id == res.code_id %}
                                                                                              {% if result.code_result_type == 1 %}
                                                                                                <span>{{ result.code_description }}</span><br />
                                                                                              {% else %}
                                                                                                  <p>{{ result.code_description }}</p><br />
                                                                                              {% endif %}
                                                                                      {% endif %}
                                                                                    {% endfor %}
                                                                                {% endif %}
                                                                           {% endif %}
                                                                       {% endfor %}

                                                                {% endif %}
                                                            {% endfor %}

                                                        <h2>COMMENTS</h2>
                                                            {% for accession in Entry.accession_number.all %}
                                                                {% if Accession.exam_in.exam_id == accession.exam_in.exam_id %}
                                                                    {{ accession.GYN_result_comment }}
                                                                {% endif %}
                                                            {% endfor %}

                                                    </div>

                                                            {% for accession in Entry.accession_number.all %}
                                                                {% if Accession.exam_in.exam_id == accession.exam_in.exam_id %}
                                                                    {% if accession.GYN_result_photo %}
                                                                        <div class="mid-right">
                                                                            <h1>SPECIMEN IMAGE</h1>
                                                                            <img src="/media/{{ accession.GYN_result_photo }}">
                                                                            {% if accession.GYN_result_caption %}
                                                                                <p>{{ accession.GYN_result_caption }}</p>
                                                                            {% endif %}
                                                                        </div>
                                                                    {% endif %}

                                                                {% endif %}
                                                            {% endfor %}

                                                </div>
                                            </div>

                                            {% endif %}


                                            {% if Accession.exam_in.exam_casetype.case_type_id == 2 %}
                                                <div class="mid-section">

                                                    <h1>CLINICAL INFORMATION</h1>
                                                    <ul>
                                                         <li><p><span>SPECIMEN SOURCE: </span>{% if Entry.Non_GYN_specimen_source %} {% for source in no_gyn_specimen_sources %} {% if source.id == Entry.Non_GYN_specimen_source %}{{ source.name }}{% endif %}{% endfor %}{% endif %}</p></li>
                                                    </ul>
                                                    <ul>
                                                        <li><p><span>CLINICAL INFORMATION: </span>{% if Entry.Non_GYN_clinical_info %}{{ Entry.Non_GYN_clinical_info }}{% endif %}</p></li>
                                                    </ul>
                                                    <ul>
                                                         <li><p><span>GROSS DESCRIPTION: </span>{% if Entry.Non_GYN_gross_description %}{{ Entry.Non_GYN_gross_description }}{% endif %}</p></li>
                                                    </ul>
                                                    <div class="mid-secound">
                                                        <div class="mid-left">
                                                            <h1>RESULTS</h1>
                                                            <h2>SPECIMENT RECEIVED:</h2>
                                                                <p>{% for accession in Entry.accession_number.all %}{% if Accession.exam_in.exam_id == accession.exam_in.exam_id %}{{ accession.Non_GYN_result_speciment_received }}{% endif %}{% endfor %}</p>

                                                            <h2>CLINICAL DATA:</h2>
                                                                <p>{% for accession in Entry.accession_number.all %}{% if Accession.exam_in.exam_id == accession.exam_in.exam_id %}{{ accession.Non_GYN_result_clinical_data }}{% endif %}{% endfor %}</p>

                                                            <h2>GROSS DESCRIPTION:</h2>
                                                                <p>{% for accession in Entry.accession_number.all %}{% if Accession.exam_in.exam_id == accession.exam_in.exam_id %}{{ accession.Non_GYN_result_gross_description }}{% endif %}{% endfor %}</p>

                                                            <h2>DIAGNOSIS:</h2>
                                                                <p>{% for accession in Entry.accession_number.all %}{% if Accession.exam_in.exam_id == accession.exam_in.exam_id %}{{ accession.Non_GYN_result_diagnosis }}{% endif %}{% endfor %}</p>
                                                            <h2>COMMENT:</h2>
                                                                <p>{% for accession in Entry.accession_number.all %}{% if Accession.exam_in.exam_id == accession.exam_in.exam_id %}{{ accession.Non_GYN_result_comment }}{% endif %}{% endfor %}</p>

                                                        </div>

                                                            {% for accession in Entry.accession_number.all %}
                                                                {% if Accession.exam_in.exam_id == accession.exam_in.exam_id %}
                                                                    {% if accession.Non_GYN_result_photo %}
                                                                        <div class="mid-right">
                                                                            <h1>SPECIMEN IMAGE</h1>
                                                                            <img src="/media/{{ accession.Non_GYN_result_photo }}">
                                                                            {% if accession.Non_GYN_result_caption %}
                                                                                <p>{{ accession.Non_GYN_result_caption }}</p>
                                                                            {% endif %}
                                                                        </div>
                                                                    {% endif %}

                                                                {% endif %}
                                                            {% endfor %}

                                                    </div>

                                                </div>

                                            {% endif %}

                                            {% if Accession.exam_in.exam_casetype.case_type_id == 3 %}

                                                <div class="mid-section">

                                                    <h1>CLINICAL INFORMATION:</h1>
                                                     <ul>
                                                         <li><p><span>SPECIMEN SOURCE: </span>
                                                             {% if Entry.MP_speciment_source == 'Vaginal' %}Vaginal swab, </i>{% endif %} 
                                                             {% if Entry.MP_speciment_source == 'Urethral' %}Urethral swab,  </i>{% endif %}
                                                             {% if Entry.MP_speciment_source == 'Urine' %}Urine, {% endif %} 
                                                             {% if Entry.MP_speciment_source == 'Liquid-based' %}Liquid based, {% endif %}
                                                             {% if Entry.MP_speciment_source == 'PAP' %}PAP{% endif %}
                                                             </p>
                                                         </li>
                                                    </ul>




                                                    <div class="mid-secound">
                                                        <div class="mid-left">
                                                            <h1>RESULTS</h1>
                                                            <h2>COMMENT:</h2>
                                                                <p>{% for accession in Entry.accession_number.all %}{% if Accession.exam_in.exam_id == accession.exam_in.exam_id %}{{ accession.MP_result_comment }}{% endif %}{% endfor %}</p>
                                                                <h2>CHLAMYDIA TRACHOMATIS EVALUATION</h2>
                                                            {% for result in Results_in_interpretation %}
                                                                {% if result.code_casetype_result.case_type_id == case.exam_casetype.case_type_id %}
                                                                       {% for accession in Entry.accession_number.all %}
                                                                           {% if case.exam_id == accession.exam_in.exam_id %}
                                                                                {% if accession.result_in_molecular_CHlamydia_trachomatis.all %}
                                                                                   {% for res in accession.result_in_molecular_CHlamydia_trachomatis.all %}
                                                                                      {% if result.code_id == res.code_id %}
                                                                                              {% if result.code_result_type == 1 %}
                                                                                                <span>{{ result.code_description }}</span><br />
                                                                                              {% else %}
                                                                                                  <p>{{ result.code_description }}</p><br />
                                                                                              {% endif %}
                                                                                      {% endif %}
                                                                                    {% endfor %}
                                                                                {% endif %}
                                                                           {% endif %}
                                                                       {% endfor %}

                                                                {% endif %}
                                                            {% endfor %}

                                                        <h2>NEISSERIA GONORRHOEAE EVALUATION</h2>
                                                            {% for result in Results_in_interpretation %}
                                                                {% if result.code_casetype_result.case_type_id == case.exam_casetype.case_type_id %}
                                                                       {% for accession in Entry.accession_number.all %}
                                                                           {% if case.exam_id == accession.exam_in.exam_id %}
                                                                                {% if accession.result_in_molecular_Neiseria_gonorroeae.all %}
                                                                                   {% for res in accession.result_in_molecular_Neiseria_gonorroeae.all %}
                                                                                      {% if result.code_id == res.code_id %}
                                                                                              {% if result.code_result_type == 1 %}
                                                                                                <span>{{ result.code_description }}</span><br />
                                                                                              {% else %}
                                                                                                  <p>{{ result.code_description }}</p><br />
                                                                                              {% endif %}
                                                                                      {% endif %}
                                                                                    {% endfor %}
                                                                                {% endif %}
                                                                           {% endif %}
                                                                       {% endfor %}

                                                                {% endif %}
                                                            {% endfor %}


                                                        </div>
                                                        {% for accession in Entry.accession_number.all %}
                                                                {% if case.exam_id == accession.exam_in.exam_id %}
                                                                    {% if accession.MP_result_photo %}
                                                                        <div class="mid-right">
                                                                            <h1>SPECIMEN IMAGE</h1>
                                                                            <img src="/media/{{ accession.MP_result_photo }}" width="200" height="200">
                                                                            {% if accession.MP_result_caption %}
                                                                                <p>{{ accession.MP_result_caption }}</p>
                                                                            {% endif %}
                                                                        </div>
                                                                    {% endif %}
                                                                {% endif %}
                                                        {% endfor %}
                                                    </div>


                                                </div>

                                            {% endif %}

                                            {% if Accession.exam_in.exam_casetype.case_type_id == 4 %}

                                                <div class="mid-section">

                                                    <h1>CLINICAL INFORMATION</h1>
                                                    <ul>
                                                        <li><span>{{ Entry.SP_clinical_info }}</span></li>
                                                    </ul>
                                                            {% if Entry.test_in_entry.all %} 
                                                                {%  for exam in Entry.test_in_entry.all %}
                                                                    {% if Accession.exam_in.exam_casetype.case_type_name  == exam.exam_casetype.case_type_name %}
                                                                        {% for i in exam.get_cut_range %} 
                                                                            <p> Specimen Source Part # {{ forloop.counter }}:
                                                                            <span>  {% if forloop.counter == 1 %}{{ Entry.SP_specimen_source_1 }}{% elif forloop.counter == 2 %}{{ Entry.SP_specimen_source_2 }}{% elif forloop.counter == 3 %}{{ Entry.SP_specimen_source_3 }}{% elif forloop.counter == 4 %}{{ Entry.SP_specimen_source_4 }}{% elif forloop.counter == 5 %}{{ Entry.SP_specimen_source_5 }}{% elif forloop.counter == 6 %}{{ Entry.SP_specimen_source_6 }}{% elif forloop.counter == 7 %}{{ Entry.SP_specimen_source_7 }}{% elif forloop.counter == 8 %}{{ Entry.SP_specimen_source_8 }}{% elif forloop.counter == 9 %}{{ Entry.SP_specimen_source_9 }}{% elif forloop.counter == 10 %}{{ Entry.SP_specimen_source_10 }}{% elif forloop.counter == 11 %}{{ Entry.SP_specimen_source_11 }}{% elif forloop.counter == 12 %}{{ Entry.SP_specimen_source_12 }}{% endif %}</span></p>
                                                                            <p>Gross description Part # {{ forloop.counter }}:
                                                                            <span> {% if forloop.counter == 1 %}{{ Entry.SP_gross_description_1 }}{% elif forloop.counter == 2 %}{{ Entry.SP_gross_description_2 }}{% elif forloop.counter == 3 %}{{ Entry.SP_gross_description_3 }}{% elif forloop.counter == 4 %}{{ Entry.SP_gross_description_4 }}{% elif forloop.counter == 5 %}{{ Entry.SP_gross_description_5 }}{% elif forloop.counter == 6 %}{{ Entry.SP_gross_description_6 }}{% elif forloop.counter == 7 %}{{ Entry.SP_gross_description_7 }}{% elif forloop.counter == 8 %}{{ Entry.SP_gross_description_8 }}{% elif forloop.counter == 9 %}{{ Entry.SP_gross_description_9 }}{% elif forloop.counter == 10 %}{{ Entry.SP_gross_description_10 }}{% elif forloop.counter == 11 %}{{ Entry.SP_gross_description_11 }}{% elif forloop.counter == 12 %}{{ Entry.SP_gross_description_12 }}{% endif %}</span></p>
                                                                        {% endfor %}
                                                                    {% endif %} 
                                                                {% endfor %}
                                                             {% endif %}
                                                    <div class="mid-secound">
                                                        <div class="mid-left">
                                                            <h1>RESULTS</h1>
                                                            {% if Entry.test_in_entry.all %}
                                                                {%  for exam in Entry.test_in_entry.all %}
                                                                    {% if Accession.exam_in.exam_casetype.case_type_name  == exam.exam_casetype.case_type_name %}
                                                                            {% for i in exam.get_cut_range %}
                                                                                 <p><b>Part # {{ forloop.counter }} - Results :</b>
                                                                                 {% for accession in Entry.accession_number.all %}{% if Accession.exam_in.exam_id == accession.exam_in.exam_id %}{% if forloop.counter == 1 %}{{ accession.SP_result_part_1 }}{% elif forloop.counter == 2 %}{{ accession.SP_result_part_2 }}{% elif forloop.counter == 3 %}{{ accession.SP_result_part_3 }}{% elif forloop.counter == 4 %}{{ accession.SP_result_part_4 }}{% elif forloop.counter == 5 %}{{ accession.SP_result_part_5 }}{% elif forloop.counter == 6 %}{{ accession.SP_result_part_6 }}{% elif forloop.counter == 7 %}{{ accession.SP_result_part_7 }}{% elif forloop.counter == 8 %}{{ accession.SP_result_part_8 }}{% elif forloop.counter == 9 %}{{ accession.SP_result_part_9 }}{% elif forloop.counter == 10 %}{{ accession.SP_result_part_10 }}{% elif forloop.counter == 11 %}{{ accession.SP_result_part_11 }}{% elif forloop.counter == 12 %}{{ accession.SP_result_part_12 }}{% endif %}{% endif %}{% endfor %}
                                                                            </p>
                                                                            {% endfor %}
                                                                    {% endif %}
                                                                {% endfor %}
                                                            {% endif %}

                                                        </div>

                                                            {% for accession in Entry.accession_number.all %}
                                                                {% if Accession.exam_in.exam_id == accession.exam_in.exam_id %}
                                                                    {% if accession.SP_result_photo %}
                                                                        <div class="mid-right">
                                                                            <h1>SPECIMEN IMAGE</h1>
                                                                            <img src="/media/{{ accession.SP_result_photo }}">
                                                                            {% if accession.SP_result_caption %}
                                                                                <p>{{ accession.SP_result_caption }}</p>
                                                                            {% endif %}
                                                                        </div>
                                                                    {% endif %}

                                                                {% endif %}
                                                            {% endfor %}

                                                    </div>

                                                </div>

                                            {% endif %}
                                            {% if Accession.exam_in.exam_casetype.case_type_id == 3 %}
                                                <div class="sct"><span><strong>This test was processed using the Aptima Combo2 Assay  on the Panther System.</strong></span></div>
                                            {% endif %}
                                      <div class="sct"><span>SCREENED BY:</span> Carlos Lovera, CT (ASCP)</div>

                                     <div class="footer">
                                             <p>{{ Lab.lab_name }} | CLIA ID:{{ Lab.lab_clia_id }} | {{ Lab.lab_address }} {% if Lab.lab_address2 %}{{ Lab.lab_address2 }} {% endif %} {{ Lab.lab_city }}, {{ Lab.lab_state }} {{ Lab.lab_zipcode }} | PHONE: {{ Lab.lab_phone }} | FAX: {{ Lab.lab_fax }}</p>
                                     </div>

</div>

</body>
</html> 