{% extends '@RxConnexion/Admin/content.html.twig' %}
{% block content %}
    <style>
        #pdf { display: none;}
    </style>
    <div class="row max-width-initial">
        <div class="small-12 columns">
            <div class="content-container">
                <div class="content-container-content">
                    <div class="row max-width-initial">
                        <div class="large-12 columns">
                            <div class="row max-width-initial">
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Patient Company</label>
                                    <select class="js-multiple-company" name="" id="companies" multiple="multiple" style="">
                                        {% for companies in company %}
                                            <option value="{{ companies.id }}">{{ companies.description }}</option>
                                        {% endfor %}
                                    </select>
                                    <input type="hidden" id="form-company-id" />
                                </div>
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Patient Branch</label>
                                    <select class="js-multiple-branches" name="" id="branches" multiple="multiple" style="">
                                        {% for branches in branch %}
                                            <option value="{{ branches.id }}">{{ branches.description }}</option>
                                        {% endfor %}
                                    </select>
                                    <input type="hidden" id="form-branch-id" />
                                </div>
                            </div>
                            <div class="row max-width-initial">
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Patient</label>
                                    <input type="text" id="form-patient-fullName" />
                                    <input type="hidden" id="form-patient-id" />
                                </div>
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Interpreting Physician</label>
                                    <select class="js-multiple-clinician" name="" id="clinicians" multiple="multiple" style="">
                                        {% for clinicians in clinician %}
                                            <option value="{{ clinicians.id }}">{{ clinicians.providerName }}</option>
                                        {% endfor %}
                                    </select>
                                    <input type="hidden" id="form-clinician-id" />
                                </div>
                            </div>
                            <div class="row max-width-initial">
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Letter Type</label>
                                    <select name="" id="form-letter-types" style="">
                                        {% set i = 0 %}
                                        <option value="">All</option>
                                        {% for letterTypes in letterType %}
                                            <option value="{{ letterType[i] }}">{{ letterType[i] }}</option>
                                            {% set i = i + 1 %}
                                        {% endfor %}
                                    </select>
                                </div>
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Letter Status</label>
                                    <select name="" id="form-letter-statuses" style="">
                                        <option value="">All</option>
                                        {% for letterStatuses in letterStatus %}
                                            <option value="{{ letterStatuses.id }}">{{ letterStatuses.description }}</option>
                                        {% endfor %}
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                    {%
                        include '@RxConnexion/Report/buttons.html.twig'
                        with {
                        'preview_url': 'main/report/letter_tracker/preview',
                        'export_to_pdf_url': 'main/report/letter_tracker/export_to_pdf',
                        'export_to_excel_url': 'main/report/letter_tracker/export_to_excel',
                        'paramsIds': 'form-company-id|form-branch-id|form-patient-id|form-clinician-id|form-letter-types|form-letter-statuses'
                    }
                    %}
                </div>
            </div>
        </div>
    </div>
    {% include '@RxConnexion/Admin/js.html.twig' %}
    <script language="javascript">
        //<![CDATA[
        jQ('.js-multiple-branches, .js-multiple-company, .js-multiple-clinician').select2();
        jQ(document).ready(function(){
            letterTracker.settings.patient_autocompleteUrl = '{{ path('patient_autocomplete') }}';
            letterTracker.settings.provider_autocomplete_url = '{{ path('provider_autocomplete') }}';
            report.init('{{ app.environment }}');
            letterTracker.init();
        });
        //]]>
    </script>
{% endblock %}