var accounting_billing_form = {
    settings: {
        patientBilling_autocomplete: '',
        patientPayment_autocomplete: '',
        patientRefund_autocomplete: '',
    },
    init: function() {
        this.initAutocomplete();
    },
    initAutocomplete: function() {
        global.autocomplete.bind(this.settings.patientBilling_autocomplete,
            '#accountingBilling_patientBillingInvoiceNumber',
            '#accountingBilling_patientBilling',
            {
                onSelect: function(data) {
                    jQ('#accountingBilling_status').val(data.billingStatus);
                    jQ('#accountingBilling_amount').val(data.amountDue);
                }
            });

        global.autocomplete.bind(this.settings.patientPayment_autocomplete,
            '#accountingBilling_patientPaymentNumber',
            '#accountingBilling_patientPayment',
            {
                onSelect: function(data) {
                    jQ('#accountingBilling_status').val(data.billingStatus);
                    jQ('#accountingBilling_amount').val(data.amountDue);
                }
            });

        global.autocomplete.bind(this.settings.patientRefund_autocomplete,
            '#accountingBilling_patientBillingRefundNumber',
            '#accountingBilling_patientBillingRefund',
            {
                onSelect: function(data) {
                    jQ('#accountingBilling_status').val(data.billingStatus);
                    jQ('#accountingBilling_amount').val(data.amountDue);
                }
            });
    }
};