var schedule = {
    settings: {
        patient_autocompleteUrl: '',
        provider_autocompleteUrl: '',
        company_autocompleteUrl: '',
        healthFacility_autocompleteUrl: '',
        accountUser_autocomplete_url: '',
    },
        init: function () {
            this.bindAutoComplete();

            jQ('#companies').bind('change', function () {
                var val = jQ(this).val();
                jQ('#form-company-id').val(val);
            });

            jQ('#branches').bind('change', function () {
                var val = jQ(this).val();
                jQ('#form-branch-id').val(val);
            });

            jQ('#clinicians').bind('change', function () {
                var val = jQ(this).val();
                jQ('#form-clinician-id').val(val);
            });

        },
        bindAutoComplete: function () {
            global.autocomplete.bind(schedule.settings.patient_autocompleteUrl, '#form-patient-fullName', '#form-patient-id');
            global.autocomplete.bind(schedule.settings.provider_autocompleteUrl, '#form-provider-fullName', '#form-provider-id');
            global.autocomplete.bind(schedule.settings.company_autocompleteUrl, '#form-company-desc', '#form-company-id');
            global.autocomplete.bind(schedule.settings.healthFacility_autocompleteUrl, '#form-healthFacility-fullName', '#form-healthFacility-id');
            global.autocomplete.bind(schedule.settings.accountUser_autocomplete_url, '#form-user-fullName', '#form-user-id');

        }
};