{% extends '@RxConnexion/Admin/global.html.twig' %}
{% block body %}
    <div class="top-bar" id="main-menu">
        <div class="top-bar-title">
            <span data-responsive-toggle="main-menu-responsive" data-hide-for="medium">
              <button class="menu-icon dark" type="button" data-toggle></button>
            </span>
            <a href="{{ path('main') }}">
                {#ZAP<span>CONEXION</span>#}
                <img src="{{ asset('bundles/rxconnexion/admin/images/logo.png') }}" />
            </a>
            <form class="main-menu-search">
                {#<div class="main-menu-search-txt-container">
                    <input type="text" placeholder="Search..." />
                </div>#}
                {#<button type="submit" class="button"><i class="fa fa-search"></i></button>#}
            </form>
        </div>
        <div id="main-menu-responsive" data-animate="true">
            <div class="top-bar-right">
                <ul class="vertical medium-horizontal align-right menu" data-responsive-menu="accordion medium-dropdown">
                    <li class="main-menu-avatar-container">
                        <a href="javascript:void(0);">
                            <img id="main-menu-avatar" src="{{ userData.profilePic is defined and userData.profilePic is not empty ? userData.profilePic : asset('bundles/rxconnexion/admin/images/main-menu-default-avatar.png') }}" />
                            {{ userData.fullName }}
                        </a>
                        <ul class="vertical menu">
                            {#<li><a href="{{ path('user_change_profile_pic') }}"><i class="fa fa-photo"></i> Change Profile Picture</a></li>#}
                            <li><a href="{{ path('user_change_password') }}"><i class="fa fa-lock"></i> Change Password</a></li>
                            <li><a href="{{ path('logout') }}"><i class="fa fa-sign-out"></i> Logout</a></li>
                        </ul>
                    </li>
                    {#<li class="main-menu-avatar-container" style="padding: 7px;">
                        <a href="javascript:void(0)" id="global-notif-toggle"><i class="fa fa-bell"></i> <span class="badge alert" id="global-notif-ctr">0</span></a>
                        <div id="global-notif-container">
                            <div id="global-notif-content">
                                <h5>Notification</h5>
                                <div id="global-notif-list-container"></div>
                                <div id="global-notif-see-all-container"><a href="javascript:void(0)" id="global-notif-see-all">See All</a></div>
                            </div>
                        </div>
                    </li>#}
                    {% if userData.type != 'Super Admin' and 'Admin Chat' in userData.accesses %}
                        <li class="main-menu-avatar-container" style="padding: 7px;" title="Messages">
                            <a href="javascript:void(0)" id="global-chat-toggle"><i class="fa fa-comments"></i> <span class="badge alert hide" id="global-chat-ctr">0</span></a>
                            <div id="global-chat-container">
                                <div id="global-chat-content">
                                    <p>Recent messages (<span id="global-recent-chat-ctr"><i class="fa fa-spinner fa-spin"></i></span>) <a href="javascript:void(0)" onclick="location.href='{{ path('chat_form') }}'">New Message</a></p>
                                    <div class="has-loading" id="global-chat-list-container"></div>
                                    <div class="text-center">
                                        <a style="color: #333;" id="global-chat-see-all" href="javascript:void(0)"><small>See all</small></a>
                                    </div>
                                </div>
                            </div>
                        </li>
                    {% endif %}
                    {% if userData.type != 'Super Admin' and 'Admin Account User Reminder' in userData.accesses %}
                        <li class="main-menu-avatar-container" style="padding: 7px;">
                            <a href="javascript:void(0)" id="global-reminder-toggle" title="Reminders">{#<img src="{{ asset('bundles/rxconnexion/images/alarm-clock.png') }}" id="global-reminder-icon">#}<i class="fa fa-bell"></i> <span class="badge alert hide" id="global-reminder-ctr">0</span></a>
                            <div id="global-reminder-container">
                                <div id="global-reminder-content">
                                    <p>Reminders (<span id="global-recent-reminder-ctr"><i class="fa fa-spinner fa-spin"></i></span>) <a href="javascript:void(0)" id="global-reminder-add-button" >Add Reminder</a></p>
                                    <div class="has-loading" id="global-reminder-list-content"></div>
                                    <div class="text-center">
                                        <a style="color: #333;" href="{{ path('account_user_reminder') }}"><small>See all</small></a>
                                    </div>
                                </div>
                            </div>
                        </li>
                    {% endif %}
                    <li class="main-menu-avatar-container" style="padding: 7px;">
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <div id="content-wrapper">
        <div id="main-side-menu-container" {{ app.request.cookies.get('msm-hidden') == 'yes' ? 'style="margin-left: -222px;"' }}>
            <ul id="main-side-menu" class="vertical menu accordion-menu" data-accordion-menu data-multi-open="false" data-submenu-toggle="true">
                <li><h4><i class="fa fa-bars"></i> Menu</h4></li>
                    <li><a href="{{ path('main') }}"><i class="fa fa-home"></i> Home {% if date() <= date("10/27/2019") and userData.type == 'Clinician' %} <span class="badge">New</span> {% endif %}</a></li>
                {% if userData.type == 'Super Admin' or 'Admin Management Dashboard' in userData.accesses %}
                    <li><a href="{{ path('management_dashboard') }}"><i class="fa fa-dashboard"></i> Management Dashboard</a></li>
                {% endif %}
                {% if userData.type == 'Super Admin' or 'Admin Clinician Dashboard' in userData.accesses %}
                    <li><a href="{{ path('dashboard_clinician_preview') }}"><i class="fa fa-dashboard"></i> Clinician Dashboard</a></li>
                {% endif %}
                {#{% if userData.type == 'Super Admin' or 'Admin Clinician Dashboard' in userData.accesses %}
                    <li><a href="{{ path('cbt_dashboard') }}"><i class="fa fa-dashboard"></i> CBT Dashboard</a></li>
                {% endif %}#}
                {% if userData.type == 'Super Admin' or 'Admin Patient' in userData.accesses %}
                    <li><a href="{{ path('patient') }}"><i class="fa fa-heartbeat"></i> Patient</a></li>
                {% endif %}
                {% if userData.type == 'Super Admin' or 'Admin Provider' in userData.accesses %}
                    {% if userData.type == 'Clinician' or userData.providerId is not defined %}
                        <li><a href="{{ path('provider') }}"><i class="fa fa-stethoscope"></i> Clinician</a></li>
                    {% endif %}
                {% endif %}
                {% if userData.type == 'Super Admin' or 'Admin Marketing Staff' in userData.accesses %}
                    {% if userData.type != 'Marketing Staff' or userData.marketingStaffId is not defined %}
                        <li><a href="{{ path('marketing_staff') }}"><i class="fa fa-paperclip"></i> Marketing Staff</a></li>
                    {% endif %}
                {% endif %}
                {% if userData.type == 'Super Admin' or 'Admin Calendar' in userData.accesses %}
                    <li><a href="{{ path('calendar_appointment') }}"><i class="fa fa-calendar-minus-o"></i> Appointment</a></li>
                {% endif %}
                {% if userData.type == 'Super Admin' or 'Admin Marketing Staff Calendar' in userData.accesses %}
                    <li><a href="{{ path('marketing_staff_calendar_appointment') }}"><i class="fa fa-calendar"></i> Marketing Appointment</a></li>
                {% endif %}
                {% if userData.type == 'Super Admin' or 'Admin Insurance' in userData.accesses %}
                    <li><a href="{{ path('insurance') }}"><i class="fa fa-id-card"></i> Insurance</a></li>
                {% endif %}
                {% if userData.type == 'Super Admin' or 'Admin Referral' in userData.accesses %}
                    <li><a href="{{ path('referral') }}"><i class="fa fa-user-plus"></i> Referral</a></li>
                {% endif %}
                {% if userData.type == 'Super Admin' or 'Admin Report Specialist Referral Tracker' in userData.accesses %}
                    <li><a href="{{ path('report_specialist_referral_tracker') }}"><i class="fa fa-medkit"></i> Specialist Referral</a></li>
                {% endif %}
                {% if userData.type == 'Super Admin' or 'Admin Ticket' in userData.accesses %}
                    {#<li><a href="{{ path('ticket') }}"><i class="fa fa-ticket"></i> Ticket</a></li>#}
                    <li><a href="{{ path('ticket') }}"><i class="fa fa-ticket"></i> Endorsement</a></li>
                {% endif %}
                {% if userData.type == 'Super Admin' or 'Admin Report Letter' in userData.accesses %}
                    <li><a href="{{ path('report_letter') }}"><i class="fa fa-envelope"></i> Letter</a></li>
                {% endif %}
                {% if userData.type == 'Super Admin' or 'Admin Portal' in userData.accesses %}
                    <li><a href="{{ path('portal') }}"><i class="fa fa-cloud-upload"></i> Portal</a></li>
                {% endif %}
                {% if userData.type == 'Super Admin' or 'Admin Fax' in userData.accesses %}
                    <li><a href="{{ path('fax') }}"><i class="fa fa-fax"></i> Fax</a></li>
                {% endif %}
                {% if userData.type == 'Super Admin' or 'Admin Faxing Option' in userData.accesses %}
                    <li><a href="{{ path('faxing_option') }}"><i class="fa fa-fax"></i> Faxing Option</a></li>
                {% endif %}
                {% if userData.type == 'Super Admin' or 'Admin Map' in userData.accesses %}
                    <li><a href="{{ path('map') }}"><i class="fa fa-map-marker"></i> Map</a></li>
                {% endif %}
                {% if userData.type == 'Super Admin' or 'Admin Account User' in userData.accesses %}
                    <li><a href="{{ path('account_user') }}"><i class="fa fa-user"></i>User</a></li>
                {% endif %}
                {% if userData.type == 'Super Admin' or 'Admin Specialist' in userData.accesses %}
                    <li><a href="{{ path('specialist') }}"><i class="fa fa-medkit"></i>Specialist</a></li>
                {% endif %}
                {% if userData.type == 'Super Admin' or 'Admin Referring Provider' in userData.accesses %}
                    <li><a href="{{ path('referring_provider') }}"><i class="fa fa-user-md"></i>Referring Physician</a></li>
                {% endif %}
                {% if userData.type == 'Super Admin' or 'Admin Referring Health Facility' in userData.accesses %}
                    <li><a href="{{ path('referring_health_facility') }}"><i class="fa fa-medkit"></i>Referring Affiliate</a></li>
                {% endif %}
                {% if userData.type == 'Super Admin' or 'Admin Inventory' in userData.accesses %}
                    <li>
                        <a href="javascript:void(0);"><i class="fa fa-gears"></i> Inventory</a>
                        <ul class="vertical menu nested">
                            <li><a href="{{ path('inventory') }}">Manage Inventory</a></li>
                            {% if userData.type == 'Super Admin' or 'Admin Add Inventory' in userData.accesses %}
                                <li><a href="{{ path('add_inventory') }}">Purchase Inventory</a></li>
                            {% endif %}
                            {#{% if userData.type == 'Super Admin' or 'Admin Use Inventory' in userData.accesses %}#}
                                {#<li><a href="{{ path('use_inventory') }}">Consume Inventory</a></li>#}
                            {#{% endif %}#}
                            {#{% if userData.type == 'Super Admin' or 'Admin Convert Inventory' in userData.accesses %}#}
                                {#<li><a href="{{ path('convert_inventory') }}">Convert Inventory</a></li>#}
                            {#{% endif %}#}
                            {% if userData.type == 'Super Admin' or 'Admin Transfer Inventory' in userData.accesses %}
                                <li><a href="{{ path('transfer_inventory') }}">Transfer Inventory</a></li>
                            {% endif %}
                        </ul>
                    </li>
                {% endif %}
                {% if userData.type == 'Super Admin' or 'Admin Accounting' in userData.accesses %}
                    <li>
                        <a href="javascript:void(0);"><i class="fa fa-dollar"></i> Accounting</a>
                        <ul class="vertical menu nested">
                            {% if userData.type == 'Super Admin' or 'Admin Report Accounting Dashboard' in userData.accesses %}
                                <li><a href="{{ path('accounting_dashboard') }}">Dashboard</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Report Accounting File' in userData.accesses %}
                                <li><a href="{{ path('accounting_file') }}">Accounting File</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Report Accounting Encode' in userData.accesses %}
                                <li><a href="{{ path('accounting_encoding') }}"> Accounting Encode</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Report Accounting Billing' in userData.accesses %}
                                <li><a href="{{ path('accounting_billing') }}"> Accounting Billing</a></li>
                            {% endif %}
                        </ul>
                    </li>
                {% endif %}
                <li>
                    {% if userData.type == 'Super Admin' or 'Admin Report' in userData.accesses %}
                        <a href="javascript:void(0);"><i class="fa fa-pie-chart"></i> Reports</a>
                    {% endif %}
                    <ul class="vertical menu nested">
                        {% if userData.type == 'Super Admin' or 'Admin Report Patient' in userData.accesses %}
                            {% if userData.type == 'Super Admin' or 'Admin Report Productivity' in userData.accesses %}
                                <li>
                                    <a href="javascript:void(0);">Productivity</a>
                                    <ul class="vertical menu nested">
                                        {% if userData.type == 'Super Admin' or 'Admin Report Productivity Clinical' in userData.accesses %}
                                            <li><a href="{{ path('report_productivity') }}">Productivity (Clinical)</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Report Productivity Billing' in userData.accesses %}
                                            <li><a href="{{ path('report_productivity_billing') }}">Productivity (Billing)</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Report Productivity Clinician' in userData.accesses %}
                                            <li><a href="{{ path('report_clinician_productivity') }}">Clinician Productivity</a></li>
                                        {% endif %}
                                    </ul>
                                </li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Report Productivity(CBT)' in userData.accesses %}
                                <li>
                                    <a href="javascript:void(0);">Productivity (CBT)</a>
                                    <ul class="vertical menu nested">
                                        {% if userData.type == 'Super Admin' or 'Admin Report Daily Encounter Target' in userData.accesses %}
                                            <li><a href="{{ path('report_daily_encounter_target') }}">Daily Encounter Target</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Report Patient With Different Branches' in userData.accesses %}
                                            <li><a href="{{ path('report_patient_with_different_branches') }}">Patient With Different Branches</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Report Patient With Different Branches Invoice' in userData.accesses %}
                                            <li><a href="{{ path('report_patient_with_different_branches_invoice') }}">Patient With Different Branches (Invoice)</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Report Patient With Different Branches' in userData.accesses %}
                                            <li><a href="{{ path('report_patient_cycle') }}">Patient Cycle</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Report Fax Summary' in userData.accesses %}
                                            <li><a href="{{ path('report_productivity_new_referral') }}">Fax Summary</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Report Productivity CBT Scheduling' in userData.accesses %}
                                            <li><a href="{{ path('report_productivity_cbt_scheduling') }}">Scheduling</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Report Productivity CBT Encounter' in userData.accesses %}
                                            <li><a href="{{ path('report_productivity_cbt_encounter') }}">Encounters</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Report KPI' in userData.accesses %}
                                            <li><a href="{{ path('report_kpi') }}">Key Performance Indicator</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Report Booked Encounter' in userData.accesses %}
                                            <li><a href="{{ path('report_booked_per_encounter') }}">Booked Encounter</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Report User Endorsed' in userData.accesses %}
                                            <li><a href="{{ path('report_endorsed_per_encounter_and_user') }}">Count of Endorsed</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Report Status Rebooking' in userData.accesses %}
                                            <li><a href="{{ path('report_status_rebooking') }}">Status Rebooking</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Report Reminder' in userData.accesses %}
                                            <li><a href="{{ path('report_reminder') }}">Reminder</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Report CBT Tracker' in userData.accesses %}
                                            <li><a href="{{ path('report_cbt_tracker') }}">CBT Tracker</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Report Login Tracker' in userData.accesses %}
                                            <li><a href="{{ path('report_login_tracker') }}">Login Tracker</a></li>
                                        {% endif %}
                                    </ul>
                                </li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Report Marketing' in userData.accesses %}
                                <li>
                                    <a href="javascript:void(0);">Marketing</a>
                                    <ul class="vertical menu nested">
                                        {% if userData.type == 'Super Admin' or 'Admin Report Marketing' in userData.accesses %}
                                           <li><a href="{{ path('report_marketing') }}">Marketing</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Report Referral Marketing' in userData.accesses %}
                                            <li><a href="{{ path('report_referral_marketing') }}">Marketing Referral</a></li>
                                        {% endif %}
                                    </ul>
                                </li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Report Billing' in userData.accesses %}
                                <li>
                                    <a href="javascript:void(0);">Billing</a>
                                    <ul class="vertical menu nested">
                                        {% if userData.type == 'Super Admin' or 'Admin Report Invoice' in userData.accesses %}
                                            <li><a href="{{ path('report_invoice') }}">Invoice</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Report Invoice Itemised' in userData.accesses %}
                                            <li><a href="{{ path('report_invoice_itemised') }}">Invoice Itemize</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Report Rent to Own and Long Term Rental' in userData.accesses %}
                                            <li><a href="{{ path('report_rent_to_own_long_term_rental') }}">Rental</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Report Accounts Receivable' in userData.accesses %}
                                            <li><a href="{{ path('report_ar') }}">Accounts Receivable</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Report AR Summary' in userData.accesses %}
                                            <li><a href="{{ path('report_ar_summary') }}">AR Summary</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Report Billing Refund' in userData.accesses %}
                                            <li><a href="{{ path('report_refund') }}">Refund</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Report Payment' in userData.accesses %}
                                            <li><a href="{{ path('report_payment') }}">Payment</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Report Payment Without Invoice' in userData.accesses %}
                                            <li><a href="{{ path('report_payment_without_invoice') }}">Payment Without Invoice</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Report Patient Billing File' in userData.accesses %}
                                            <li><a href="{{ path('report_patient_billing_file') }}">Patient Billing Files</a></li>
                                        {% endif %}
                                    </ul>
                                </li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Report Letter Tracker' in userData.accesses %}
                                <li><a href="{{ path('report_letter_tracker') }}">Letter Tracker</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Report Fax Outbound' in userData.accesses %}
                                <li><a href="{{ path('fax_outbound_report') }}">Fax Outbound</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Report Ticket' in userData.accesses %}
                                <li><a href="{{ path('report_my_task') }}">My Task</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Report Appointment History' in userData.accesses %}
                                <li><a href="{{ path('report_appointment_history') }}">Appointment History</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Report Affiliation' in userData.accesses %}
                                <li><a href="{{ path('report_affiliation') }}">Affiliation</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Report Patient Referring Provider' in userData.accesses %}
                                <li><a href="{{ path('report_count_patient_referring_provider') }}">Patient Referring Affiliate</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Report Appointment' in userData.accesses %}
                                <li><a href="{{ path('report_schedule') }}">Appointment</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Report Conversion' in userData.accesses %}
                                <li><a href="{{ path('report_conversion') }}">Conversion</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Report Diagnosis' in userData.accesses %}
                                <li><a href="{{ path('report_diagnosis') }}">Diagnosis</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Report Encounter' in userData.accesses %}
                                <li><a href="{{ path('report_encounter') }}">Encounter</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Report Marketing Encounter' in userData.accesses %}
                                <li><a href="{{ path('report_marketing_encounter') }}">Marketing Encounter</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Report Fax' in userData.accesses %}
                                <li><a href="{{ path('report_fax') }}">Fax</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Report File' in userData.accesses %}
                                <li><a href="{{ path('report_file') }}">File</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Report Insurance' in userData.accesses %}
                                <li><a href="{{ path('report_insurance') }}">Insurance</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Report Insurance Coverage' in userData.accesses %}
                                <li><a href="{{ path('report_insurance_coverage') }}">Insurance Coverage</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Report Medication' in userData.accesses %}
                                <li><a href="{{ path('report_medication') }}">Medication</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Report Patient' in userData.accesses %}
                                <li><a href="{{ path('report_patient') }}">Patient</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Report Referred By Tracking' in userData.accesses %}
                                <li><a href="{{ path('report_patient_source_referral') }}">Referred By</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Report Patient Data Transfer' in userData.accesses %}
                                <li><a href="{{ path('report_patient_data_transfer') }}">Patient Data Transfer</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Report Patient Progress' in userData.accesses %}
                                <li><a href="{{ path('report_patient_progress') }}">Patient Progress</a></li>
                            {% endif %}
                            {#{% if userData.type == 'Super Admin' or 'Admin Report Pending Payment' in userData.accesses %}#}
                                {#<li><a href="{{ path('report_pending_payment') }}">Pending Payment</a></li>#}
                            {#{% endif %}#}
                            {% if userData.type == 'Super Admin' or 'Admin Report Referral' in userData.accesses %}
                                <li><a href="{{ path('report_referral') }}">Referral</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Report Status' in userData.accesses %}
                                <li><a href="{{ path('report_status') }}">Status Report</a></li>
                            {% endif %}
                        {% endif %}
                    </ul>
                </li>
                {% if userData.type == 'Super Admin' or 'Admin Cms' in userData.accesses %}
                    <li>
                        <a href="javascript:void(0);"><i class="fa fa-th-list"></i> CMS</a>
                        <ul class="vertical menu nested">
                            {% if userData.type == 'Super Admin' or 'Admin Account CMS' in userData.accesses %}
                                <li>
                                    <a href="javascript:void(0);"><i class="fa fa-th-list"></i> Account</a>
                                    <ul class="vertical menu nested">
                                        {% if userData.type == 'Super Admin' or 'Admin Account' in userData.accesses %}
                                            <li><a href="{{ path('account') }}">Account</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Company' in userData.accesses %}
                                            <li><a href="{{ path('company') }}">Company</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Branch' in userData.accesses %}
                                            <li><a href="{{ path('health_facility') }}">Branch</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Financing Company' in userData.accesses %}
                                            <li><a href="{{ path('financing_company') }}">Financing Company</a></li>
                                        {% endif %}
                                    </ul>
                                </li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Users CMS' in userData.accesses %}
                                <li>
                                    <a href="javascript:void(0);"><i class="fa fa-users"></i> Users</a>
                                    <ul class="vertical menu nested">
                                        {% if userData.type == 'Super Admin' or 'Admin User' in userData.accesses %}
                                            <li><a href="{{ path('account_user') }}">User</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin User Group' in userData.accesses %}
                                            <li><a href="{{ path('user_group') }}">User Group {% if date() <= date("10/27/2019") %} <span class="badge">New</span> {% endif %}</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Account User Billing' in userData.accesses %}
                                            <li><a href="{{ path('account_user_billing') }}">Account User Billing</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Account Staff' in userData.accesses %}
                                            <li><a href="{{ path('account_staff') }}">Account Staff</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Sales Agent' in userData.accesses %}
                                            <li><a href="{{ path('sales_agent') }}">Sales Agent</a></li>
                                        {% endif %}
                                    </ul>
                                </li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Encounter CMS' in userData.accesses %}
                                <li>
                                    <a href="javascript:void(0);"><i class="fa fa-th-list"></i> Encounter</a>
                                    <ul class="vertical menu nested">
                                        {% if userData.type == 'Super Admin' or 'Admin Chart Type' in userData.accesses %}
                                            <li><a href="{{ path('chart_type') }}">Encounter Type</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Chart Type Method' in userData.accesses %}
                                            <li><a href="{{ path('chart_type_method') }}">Method</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Chart Type Status' in userData.accesses %}
                                            <li><a href="{{ path('chart_status') }}">Status</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Chart Sub Status' in userData.accesses %}
                                            <li><a href="{{ path('chart_sub_status') }}">Sub Status</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Chart Type Billing' in userData.accesses %}
                                            <li><a href="{{ path('chart_procedure') }}">Billing</a></li>
                                        {% endif %}
                                    </ul>
                                </li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Appointment CMS' in userData.accesses %}
                                <li>
                                    <a href="javascript:void(0);"><i class="fa fa-calendar"></i> Appointment</a>
                                    <ul class="vertical menu nested">
                                        {% if userData.type == 'Super Admin' or 'Admin Schedule Status' in userData.accesses %}
                                            <li><a href="{{ path('schedule_status') }}">Appointment Status</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Schedule Queued Status' in userData.accesses %}
                                            <li><a href="{{ path('schedule_queued_status') }}">Queuing Status</a></li>
                                        {% endif %}
                                    </ul>
                                </li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Marketing Staff Appointment CMS' in userData.accesses %}
                                <li>
                                    <a href="javascript:void(0);"><i class="fa fa-calendar"></i> Marketing Appointment</a>
                                    <ul class="vertical menu nested">
                                        {% if userData.type == 'Super Admin' or 'Admin Marketing Staff Schedule Status' in userData.accesses %}
                                            <li><a href="{{ path('marketing_staff_schedule_status') }}">Appointment Status</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Marketing Staff Schedule Queued Status' in userData.accesses %}
                                            <li><a href="{{ path('marketing_staff_schedule_queued_status') }}">Queuing Status</a></li>
                                        {% endif %}
                                    </ul>
                                </li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin RX CMS' in userData.accesses %}
                                <li>
                                    <a href="javascript:void(0);"><i class="fa fa-user-md"></i> RX</a>
                                    <ul class="vertical menu nested">
                                        {% if userData.type == 'Super Admin' or 'Admin Diagnosis' in userData.accesses %}
                                            <li><a href="{{ path('diagnosis') }}">Diagnosis</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Medication' in userData.accesses %}
                                            <li><a href="{{ path('medication') }}">Medication</a></li>
                                        {% endif %}
                                    </ul>
                                </li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Referral CMS' in userData.accesses %}
                                <li>
                                    <a href="javascript:void(0);"><i class="fa fa-black-tie"></i> Referral</a>
                                    <ul class="vertical menu nested">
                                        {% if userData.type == 'Super Admin' or 'Admin Source' in userData.accesses %}
                                            <li><a href="{{ path('source') }}">Source</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Referring Provider CMS' in userData.accesses %}
                                            <li><a href="{{ path('referring_provider') }}">Referring Physician</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Referring Health Facility CMS' in userData.accesses %}
                                            <li><a href="{{ path('referring_health_facility') }}">Referring Affiliate</a></li>
                                        {% endif %}
                                    </ul>
                                </li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Faq' in userData.accesses %}
                                <li><a href="{{ path('faq') }}"><i class="fa fa-question"></i> FAQ</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Bank' in userData.accesses %}
                                <li><a href="{{ path('bank') }}"><i class="fa fa-briefcase"></i> Bank</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Location' in userData.accesses %}
                                <li><a href="{{ path('location') }}"><i class="fa fa-hospital-o"></i> Location</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Service CMS' in userData.accesses %}
                                <li><a href="{{ path('service') }}"><i class="fa fa-hospital-o"></i> Services</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Treatment Consideration CMS' in userData.accesses %}
                                <li><a href="{{ path('treatment_consideration') }}"><i class="fa fa-stethoscope"></i> Treatment Consideration</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Treatment Plan CMS' in userData.accesses %}
                                <li><a href="{{ path('treatment_plan') }}"><i class="fa fa-medkit"></i> Treatment Plan</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Appointment Target' in userData.accesses %}
                                <li><a href="{{ path('appointment_target') }}"><i class="fa fa-tasks"></i> Appointment Target</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Email' in userData.accesses %}
                                <li><a href="{{ path('email') }}"><i class="fa fa-mail-forward"></i> Email</a></li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Items Devices CMS' in userData.accesses %}
                                <li>
                                    <a href="javascript:void(0);"><i class="fa fa-stethoscope"></i> Item/Devices</a>
                                    <ul class="vertical menu nested">
                                        {% if userData.type == 'Super Admin' or 'Admin Items' in userData.accesses %}
                                            <li><a href="{{ path('item') }}">Items</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Device' in userData.accesses %}
                                            <li><a href="{{ path('device') }}">Devices</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Item Category' in userData.accesses %}
                                            <li><a href="{{ path('item_category') }}">Item Category</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Item Subcategory' in userData.accesses %}
                                            <li><a href="{{ path('item_subcategory') }}">Item Subcategory</a></li>
                                        {% endif %}
                                    </ul>
                                </li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin Address CMS' in userData.accesses %}
                                <li>
                                    <a href="javascript:void(0);"><i class="fa fa-map"></i> Address</a>
                                    <ul class="vertical menu nested">
                                        {% if userData.type == 'Super Admin' or 'Admin Country' in userData.accesses %}
                                            <li><a href="{{ path('country') }}">Country</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Province' in userData.accesses %}
                                            <li><a href="{{ path('province') }}">State</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin City' in userData.accesses %}
                                            <li><a href="{{ path('city') }}">City</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Postal Code' in userData.accesses %}
                                            <li><a href="{{ path('postal_code') }}">Postal Code</a></li>
                                        {% endif %}
                                    </ul>
                                </li>
                            {% endif %}
                            {% if userData.type == 'Super Admin' or 'Admin System Parameters' in userData.accesses %}
                                <li>
                                    <a href="javascript:void(0);"><i class="fa fa-desktop"></i> System Parameters</a>
                                    <ul class="vertical menu nested">
                                        {% if userData.type == 'Super Admin' or 'Admin Letter Template' in userData.accesses %}
                                            <li><a href="{{ path('letter_template') }}">Letter Template</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Account User Type' in userData.accesses %}
                                            <li><a href="{{ path('account_user_type') }}">Account User Type</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Patient Type' in userData.accesses %}
                                            <li><a href="{{ path('patient_type') }}">Patient Type</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Insurance Type' in userData.accesses %}
                                            <li><a href="{{ path('insurance_type') }}">Insurance Type</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin File Type' in userData.accesses %}
                                            <li><a href="{{ path('file_type') }}">File Type</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Clinician Type' in userData.accesses %}
                                            <li><a href="{{ path('provider_type') }}">Clinician Type</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Marketing Staff Type' in userData.accesses %}
                                            <li><a href="{{ path('marketing_staff_type') }}">Marketing Staff Type</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Branch Type' in userData.accesses %}
                                            <li><a href="{{ path('health_facility_type') }}">Branch Type</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Medication Type' in userData.accesses %}
                                            <li><a href="{{ path('medication_type') }}">Medication Type</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Diagnosis Type' in userData.accesses %}
                                            <li><a href="{{ path('diagnosis_type') }}">Diagnosis Type</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Super Admin' in userData.accesses %}
                                            <li><a href="{{ path('user_access') }}">User Access</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin AuditTrail' in userData.accesses %}
                                            <li><a href="{{ path('audit_trail') }}">Audit Trail</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Internal Status' in userData.accesses %}
                                            <li><a href="{{ path('internal_status') }}">Internal Status</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Ticket Status' in userData.accesses %}
                                            <li><a href="{{ path('ticket_status') }}">Ticket Status</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Ticket Severity' in userData.accesses %}
                                            <li><a href="{{ path('ticket_severity') }}">Ticket Severity</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Letter Status' in userData.accesses %}
                                            <li><a href="{{ path('patient_letter_status') }}">Patient Letter Status</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin Reminder Type' in userData.accesses %}
                                            <li><a href="{{ path('reminder_type') }}">Reminder Type {% if date() <= date("10/27/2019") %} <span class="badge">New</span> {% endif %}</a></li>
                                        {% endif %}
                                        {% if userData.type == 'Super Admin' or 'Admin System Parameter' in userData.accesses %}
                                            <li><a href="{{ path('sys_params') }}">System Params</a></li>
                                        {% endif %}
                                    </ul>
                                </li>
                            {% endif %}
                        </ul>
                    </li>
                {% endif %}
                <li><hr></li>
                {#<li><a href="{{ path('user_change_profile_pic') }}"><i class="fa fa-photo"></i> Change Profile Picture</a></li>#}
                {% if userData.type == 'Clinician' and userData.providerId is defined %}
                    <li><a href="{{ path('provider_detail', {provider_id: userData.providerId}) }}"><i class="fa fa-stethoscope"></i> Clinician Profile</a></li>
                {% endif %}
                <li><a href="{{ path('user_change_password') }}"><i class="fa fa-lock"></i> Change Password</a></li>
                <li><a href="{{ path('logout') }}"><i class="fa fa-sign-out"></i> Logout</a></li>
            </ul>
        </div>
        <div id="content-container" {{ app.request.cookies.get('msm-hidden') == 'yes' ? 'style="width: 100%;"' }}>
            <div id="content">
                {% include '@RxConnexion/Admin/flash_messages.html.twig' %}
                <h4 class="subheader page-title"><a href="javascript:void(0)" class="main-side-menu-toggle"><i class="fa fa-bars"></i></a>&nbsp;&nbsp;{{ page_title }}</h4>
                {% block content %}{% endblock %}
            </div>
            <div id="footer-container">
                <p class="footer-text">&copy; <a href="{{ path('main') }}"></a> 2017 - {{ 'now'|date('Y') }}. All Rights Reserved.</p>
            </div>
        </div>
        <div style="clear: both;"></div>
    </div>
    {% if hasBackToTop is defined and hasBackToTop %}
        <div class="back-to-top-container">
            <a href="javascript:void(0)"><i class="fa fa-arrow-up"></i></a>
        </div>
    {% endif %}
{% endblock %}