{% extends '@RxConnexion/Admin/content.html.twig' %}
{% block content %}
    <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>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>Branch</label>
                                    <select class="js-multiple" name="" id="branches" multiple="multiple" style="">
                                        {% for branches in branch %}
                                            <option value="{{ branches.id }}">{{ branches.description }}</option>
                                        {% endfor %}
                                    </select>
                                    {#<input type="text" id="form-branch" />#}
                                    <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 Status</label>
                                    <select id="patient-active">
                                        <option value="null">All</option>
                                        <option value="1">Active</option>
                                        <option value="0">In Active</option>
                                    </select>
                                </div>
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Insurance</label>
                                    <input type="text" id="form-insurance" />
                                    <input type="hidden" id="form-insurance-id" />
                                </div>
                            </div>
                            <div class="row max-width-initial">
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Province</label>
                                    <input type="text" id="form-province" />
                                    <input type="hidden" id="form-province-id" />
                                </div>
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Postal Code</label>
                                    <input type="text" id="form-postalCode" />
                                    <input type="hidden" id="form-postalCode-id" />
                                </div>
                            </div>
                            <div class="row max-width-initial">
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Referring Affiliate</label>
                                    <input type="text" id="form-referring-affiliate" />
                                    <input type="hidden" id="form-referring-affiliate-id" />
                                </div>
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Referring Physician</label>
                                    <input type="text" id="form-referring-physician" />
                                    <input type="hidden" id="form-referring-physician-id" />
                                </div>
                            </div>
                            <div class="row max-width-initial">
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>City</label>
                                    <input type="text" id="form-city-desc" />
                                    <input type="hidden" id="form-city-id" />
                                </div>
                                <div class="large-6 medium-6 small-12 columns">
                                </div>
                            </div>
                        </div>
                    </div>
                    {%
                        include '@RxConnexion/Report/buttons.html.twig'
                        with {
                            'preview_url': 'main/report/patient/preview',
                            'export_to_pdf_url': 'main/report/patient/export_to_pdf',
                            'export_to_excel_url': 'main/report/patient/export_to_excel',
                            'paramsIds': 'form-company-id|form-branch-id|form-insurance-id|patient-active|form-province-id|form-postalCode-id|form-referring-affiliate-id|form-referring-physician-id|form-city-id'
                        }
                    %}
                </div>
            </div>
        </div>
    </div>
    {% include '@RxConnexion/Admin/js.html.twig' %}
    <script language="javascript">
        //<![CDATA[
        patient.settings.company_autocompleteUrl = '{{ path('company_autocomplete') }}';
        patient.settings.branch_autocompleteUrl = '{{ path('health_facility_autocomplete') }}';
        patient.settings.insurance_autocompleteUrl = '{{ path('insurance_autocomplete') }}';
        patient.settings.state_autocompleteUrl = '{{ path('province_autocomplete') }}';
        patient.settings.postalCode_autocompleteUrl = '{{ path('postal_code_autocomplete') }}';
        patient.settings.referring_health_facility_autocomplete_url = '{{ path('referring_health_facility_autocomplete') }}';
        patient.settings.referring_provider_autocomplete_url = '{{ path('referring_provider_autocomplete') }}';
        patient.settings.city_autocomplete_url = '{{ path('city_autocomplete') }}';
        jQ(document).ready(function(){
            jQ('.js-multiple, .js-multiple-company').select2();
            report.init('{{ app.environment }}');
            patient.init();
        });
        //]]>
    </script>
{% endblock %}