{% 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-4 medium-4 small-12 columns">
                                    <label>Referral Date From</label>
                                    <input type="text" class="date" id="date_from" value=""/>
                                </div>
                                <div class="large-4 medium-4 small-12 columns">
                                    <label>Referral Date To</label>
                                    <input type="text" class="date" id="date_to" value=""/>
                                </div>
                                <div class="large-4 medium-4 small-12 columns">
                                    <label>Patient</label>
                                    <input type="text" id="form-patient-fullName"/>
                                    <input type="hidden" id="form-patient-id"/>
                                </div>
                            </div>
                            <div class="row max-width-initial">
                                <div class="large-4 medium-4 small-12 columns">
                                    <label>Received Date From</label>
                                    <input type="text" class="date" id="received_date_from" value="" />
                                </div>
                                <div class="large-4 medium-4 small-12 columns">
                                    <label>Received Date To</label>
                                    <input type="text" class="date" id="received_date_to" value="" />
                                </div>
                                <div class="large-4 medium-4 small-12 columns">

                                </div>
                            </div>
                            <div class="row max-width-initial">
                                <div class="large-4 medium-4 small-12 columns">
                                    <label>HSAT Date From</label>
                                    <input type="text" class="date" id="hsat_date_from" value=""/>
                                </div>
                                <div class="large-4 medium-4 small-12 columns">
                                    <label>HSAT Date To</label>
                                    <input type="text" class="date" id="hsat_date_to" value=""/>
                                </div>
                                <div class="large-4 medium-4 small-12 columns">
                                    <label>HSAT Status</label>
                                    <select id="hsat_status">
                                        <option value="null">All
                                            {% for cs in cpapStatus %}
                                                {% if cs.chartType == 'HSAT' %}
                                                    <option value="{{ cs.description }}">{{ cs.description }}</option>
                                                {% endif %}
                                        {% endfor %}
                                    </select>
                                </div>
                            </div>
                            <div class="row max-width-initial">
                                <div class="large-4 medium-4 small-12 columns">
                                    <label>HSAT (Mobile) Date From</label>
                                    <input type="text" class="date" id="hsat_mobile_date_from" value=""/>
                                </div>
                                <div class="large-4 medium-4 small-12 columns">
                                    <label>HSAT (Mobile) Date To</label>
                                    <input type="text" class="date" id="hsat_mobile_date_to" value=""/>
                                </div>
                                <div class="large-4 medium-4 small-12 columns">
                                    <label>HSAT (Mobile) Status</label>
                                    <select id="hsat_mobile_status">
                                        <option value="null">All
                                        {% for cs in cpapStatus %}
                                            {% if cs.chartType == 'HSAT (Mobile)' %}
                                                <option value="{{ cs.description }}">{{ cs.description }}</option>
                                            {% endif %}
                                        {% endfor %}
                                    </select>
                                </div>
                            </div>
                            <div class="row max-width-initial hide">
                                <div class="large-4 medium-4 small-12 columns">
                                    <label>Oximetry Date From</label>
                                    <input type="text" class="date" id="oximetry_date_from" value=""/>
                                </div>
                                <div class="large-4 medium-4 small-12 columns">
                                    <label>Oximetry Date To</label>
                                    <input type="text" class="date" id="oximetry_date_to" value=""/>
                                </div>
                                <div class="large-4 medium-4 small-12 columns">
                                    <label>Oximetry Status</label>
                                    <select id="oximetry_status">
                                        <option value="null">All
                                        {% for cs in cpapStatus %}
                                            {% if cs.chartType == 'Oximetry' %}
                                                <option value="{{ cs.description }}">{{ cs.description }}</option>
                                            {% endif %}
                                        {% endfor %}
                                    </select>
                                </div>
                            </div>
                            <div class="row max-width-initial">
                                <div class="large-4 medium-4 small-12 columns">
                                    <label>HSAT Results Interpretation Date From</label>
                                    <input type="text" class="date" id="hsat_ri_date_from" value=""/>
                                </div>
                                <div class="large-4 medium-4 small-12 columns">
                                    <label>HSAT Results Interpretation Date To</label>
                                    <input type="text" class="date" id="hsat_ri_date_to" value=""/>
                                </div>
                                <div class="large-4 medium-4 small-12 columns">
                                    <label>HSAT Results Interpretation Status</label>
                                    <select id="hsat_ri_status">
                                        <option value="null">All
                                         {% for cs in cpapStatus %}
                                            {% if cs.chartType == 'HSAT Results Interpretation' %}
                                                <option value="{{ cs.description }}">{{ cs.description }}</option>
                                            {% endif %}
                                        {% endfor %}
                                    </select>
                                </div>
                            </div>
                            <div class="row max-width-initial">
                                <div class="large-4 medium-4 small-12 columns">
                                    <label>CPAP Setup Date From</label>
                                    <input type="text" class="date" id="cpap_date_from"
                                           value=""/>
                                </div>
                                <div class="large-4 medium-4 small-12 columns">
                                    <label>CPAP Setup Date To</label>
                                    <input type="text" class="date" id="cpap_date_to"
                                           value=""/>
                                </div>
                                <div class="large-4 medium-4 small-12 columns">
                                    <label>CPAP Setup Status</label>
                                    <select id="cpap_status">
                                        <option value="null">All
                                        {% for cs in cpapStatus %}
                                            {% if cs.chartType == 'CPAP Setup' %}
                                                <option value="{{ cs.description }}">{{ cs.description }}</option>
                                            {% endif %}
                                        {% endfor %}
                                    </select>
                                </div>
                            </div>
                            <div class="row max-width-initial">
                                <div class="large-4 medium-4 small-12 columns">
                                    <label>CPAP Setup Sold Date From</label>
                                    <input type="text" class="date" id="cpap_sold_date_from"
                                           value=""/>
                                </div>
                                <div class="large-4 medium-4 small-12 columns">
                                    <label>CPAP Setup Sold Date To</label>
                                    <input type="text" class="date" id="cpap_sold_date_to"
                                           value=""/>
                                </div>
                                <div class="large-4 medium-4 small-12 columns">
                                    <label>CPAP Setup Sold Status</label>
                                    <select id="cpap_sold_status">
                                        <option value="null">All</option>
                                        {% for cs in cpapStatus %}
                                            {% if cs.chartType == 'CPAP Setup Sold' %}
                                                <option value="{{ cs.description }}">{{ cs.description }}</option>
                                            {% endif %}
                                        {% endfor %}
                                    </select>
                                </div>
                            </div>
                            <div class="row max-width-initial">
                                <div class="large-4 medium-4 small-12 columns">
                                    <label>CPAP Eval Date From</label>
                                    <input type="text" class="date" id="cpap_eval_date_from"
                                           value=""/>
                                </div>
                                <div class="large-4 medium-4 small-12 columns">
                                    <label>CPAP Eval Date To</label>
                                    <input type="text" class="date" id="cpap_eval_date_to"
                                           value=""/>
                                </div>
                                <div class="large-4 medium-4 small-12 columns">
                                    <label>CPAP Eval Status</label>
                                    <select id="cpap_eval_status">
                                        <option value="null">All</option>
                                        {% for cs in cpapStatus %}
                                            {% if cs.chartType == 'CPAP Eval' %}
                                                <option value="{{ cs.description }}">{{ cs.description }}</option>
                                            {% endif %}
                                        {% endfor %}
                                    </select>
                                </div>
                            </div>
                            <div class="row max-width-initial">
                                <div class="large-4 medium-4 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-4 medium-4 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-health-facility-id" />
                                </div>
                                <div class="large-4 medium-4 small-12 columns">
                                    <label>Billing Branch</label>
                                    <select class="js-multiple-billingBranch" name="" id="billing_branches" multiple="multiple" style="">
                                        {% for branches in branch %}
                                            <option value="{{ branches.id }}">{{ branches.description }}</option>
                                        {% endfor %}
                                    </select>
                                    <input type="hidden" id="form-billing-health-facility-id"/>
                                </div>
                            </div>
                            <input type="hidden" id="form-encounter-type-cycle"/>
                            <input type="hidden" id="form-booked"/>
                            <input type="hidden" id="form-unbooked"/>
                            <div class="row max-width-initial hide">
                                <div class="large-4 medium-4 small-12 columns hide">
                                    <label>Encounter Type</label>
                                    <input type="text" id="form-encounter-type"/>
                                    <input type="hidden" id="form-encounter-type-id"/>
                                </div>
                                <div class="large-4 medium-4 small-12 columns">
                                    <label>Encounter Status</label>
                                    <select id="encounter-status">
                                        <option value="null">All</option>
                                        {% for encounterStatus in chartStatus  %}
                                            <option value="{{ encounterStatus.status }}">{{ encounterStatus.status }}</option>
                                        {% endfor %}
                                    </select>
                                </div>
                            </div>
                            <div class="row max-width-initial">
                                <div class="large-4 medium-4 small-12 columns">
                                    <label>Primary Clinician</label>
                                    <input type="text" id="form-clinician-fullName"/>
                                    <input type="hidden" id="form-clinician-id"/>
                                </div>
                            </div>
                        </div>
                    </div>
                    {% include '@RxConnexion/Report/buttons.html.twig'
                        with {
                        'preview_url': 'main/report/patient_progress/preview',
                        'export_to_pdf_url': 'main/report/patient_progress/export_to_pdf',
                        'export_to_excel_url': 'main/report/patient_progress/export_to_excel',
                        'paramsIds': 'date_from|date_to|received_date_from|received_date_to|form-patient-id|form-company-id|form-health-facility-id|form-billing-health-facility-id|form-encounter-type-id|encounter-status|cpap_date_from|cpap_date_to|cpap_status|cpap_sold_date_from|cpap_sold_date_to|cpap_sold_status|hsat_date_from|hsat_date_to|hsat_status|hsat_mobile_date_from|hsat_mobile_date_to|hsat_mobile_status|oximetry_date_from|oximetry_date_to|oximetry_status|hsat_ri_date_from|hsat_ri_date_to|hsat_ri_status|cpap_eval_date_from|cpap_eval_date_to|cpap_eval_status|form-encounter-type-cycle|form-clinician-id|form-booked|form-unbooked'
                    } %}
                </div>
            </div>
        </div>
    </div>
    {% include '@RxConnexion/Admin/js.html.twig' %}
    <script language="javascript">
        //<![CDATA[
        patientProgress.settings.patient_autocompleteUrl = '{{ path('patient_autocomplete') }}';
        patientProgress.settings.company_autocomplete_url = '{{ path('company_autocomplete') }}';
        patientProgress.settings.primary_clinician_autocomplete_url = '{{ path('provider_autocomplete') }}';
        patientProgress.settings.health_facility_autocomplete_url = '{{ path('health_facility_autocomplete') }}';
        patientProgress.settings.chartType_autocomplete_url = '{{ path('chart_type_autocomplete') }}';
        patientProgress.settings.chartStatus_autocomplete_url = '{{ path('chart_status_autocomplete') }}';
        jQ(document).ready(function () {
            jQ('.js-multiple, .js-multiple-company, .js-multiple-billingBranch').select2();
            report.init('{{ app.environment }}');
            patientProgress.init();
        });
        //]]>
    </script>
{% endblock %}