{% 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>Referral Date From</label>
                                    <input type="text" class="date" id="date_from" value="{{ 'now'|date('m/d/Y') }}" />
                                </div>
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Referral Date To</label>
                                    <input type="text" class="date" id="date_to" value="{{ 'now'|date('m/d/Y') }}" />
                                </div>
                            </div>
                            <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-branch" 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>Diagnosis</label>
                                    <input type="text" id="form-diagnosis" />
                                    <input type="hidden" id="form-diagnosis-id" />
                                </div>
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Status</label>
                                    <select id="status">
                                        <option value="null" selected>All</option>
                                        <option value="1">Active</option>
                                        <option value="0">Inactive</option>
                                    </select>
                                </div>
                            </div>
                            <div class="row max-width-initial">
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Specialist</label>
                                    <input type="text" id="form-specialist" />
                                    <input type="hidden" id="form-specialist-id" />
                                </div>
                                <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>
                            <div class="row max-width-initial">
                                <div class="large-6 medium-6 small-12 columns">
                                    <label>Encounter Type</label>
                                    <input type="text" id="form-chart-type" />
                                    <input type="hidden" id="form-chart-type-id" />
                                </div>
                            </div>
                        </div>
                    </div>
                    {%
                        include '@RxConnexion/Report/buttons.html.twig'
                        with {
                        'preview_url': 'main/report/diagnosis/preview',
                        'export_to_pdf_url': 'main/report/diagnosis/export_to_pdf',
                        'export_to_excel_url': 'main/report/diagnosis/export_to_excel',
                        'paramsIds': 'date_from|date_to|form-company-id|form-branch-id|form-diagnosis-id|status|form-specialist-id|form-referring-affiliate-id|form-chart-type-id'
                    }
                    %}
                </div>
            </div>
        </div>
    </div>
    {% include '@RxConnexion/Admin/js.html.twig' %}
    <script language="javascript">
        //<![CDATA[
        jQ('.js-multiple-branch, .js-multiple-company').select2();
        diagnosis.settings.specialist_autocompleteUrl = '{{ path('specialist_autocomplete') }}';
        diagnosis.settings.referring_affiliate_autocompleteUrl = '{{ path('referring_health_facility_autocomplete') }}';
        diagnosis.settings.chart_type_autocompleteUrl = '{{ path('chart_type_autocomplete') }}';
        diagnosis.settings.diagnosis_autocompleteUrl = '{{ path('diagnosis_autocomplete') }}';
        jQ(document).ready(function(){
            report.init('{{ app.environment }}');
            diagnosis.init();
        });
        //]]>
    </script>
{% endblock %}