private void setupReportData(int docID, int value, int unit, bool inactive)
        {
            DateTime date;
            switch (unit)
            {
                case 0:
                    date = DateTime.Now.AddDays(-(7 * value));
                    break;
                case 1:
                    date = DateTime.Now.AddMonths(-value);
                    break;
                case 2:
                    date = DateTime.Now.AddYears(-value);
                    break;
                default:
                    // This code, really, should never execute.
                    date = DateTime.Now;
                    break;
            }

            List<Database.Reporting.PatientActivityReportModel> data;
            if (inactive)
            {
                data = Database.Reporting.PatientActivityReportModel.getInactivePatientActivityModel(date, docID);
            }
            else
            {
                data = null;
            }

            // Set the datasource to the report list
            patientActivityBindingSource.DataSource = data;
            patientActivityReport.SetDataSource(patientActivityBindingSource);

            // Setup report params
            if (inactive)
            {
                patientActivityReport.SetParameterValue("ReportDesc", "Inactive Since");
            }
            else
            {
                patientActivityReport.SetParameterValue("ReportDesc", "Active up to");
            }
            String docName;
            if(docID != 0)
            {
                Database.DoctorMgr docMgr = new Database.DoctorMgr();
                docName = docMgr.getDoctor(docID).docFullName;

            }
            else
            {
                docName = "Clinic"; // Shows for all doctors
            }
            patientActivityReport.SetParameterValue("DoctorName", docName);
            patientActivityReport.SetParameterValue("Date", date);
        }
        public DailyBillingReportForm(DateTime date, int docID)
        {
            InitializeComponent();

            Database.DoctorMgr docMgr = new Database.DoctorMgr();
            String doctorName = (docID > 0) ? "Dr. " + docMgr.getDoctor(docID).docFullName : "All Doctors";

            dailyBillingBindingSource.DataSource = Database.Reporting.DailyBillingsViewModel.getDailyBillingsViewModel(date, docID);
            DailyBillingsReport1.SetDataSource(dailyBillingBindingSource);
            DailyBillingsReport1.SetParameterValue("StartDate", date);
            DailyBillingsReport1.SetParameterValue("DocName", doctorName);
        }
        public void loadData()
        {
            BindingSource accRecBindingSource = new BindingSource();
            accRecBindingSource.DataSource = Database.Reporting.AccountsReceivableModel.getAccountsReceiveableModel(startDate, endDate, callBack, docID);
            AccountsReceivable1.SetDataSource(accRecBindingSource);

            if (docID > 0)
            {
                Database.DoctorMgr docMgr = new Database.DoctorMgr();
                AccountsReceivable1.SetParameterValue("DoctorName", docMgr.getDoctor(docID).docFullName);
            }
        }
Ejemplo n.º 4
0
        private void DailyBillingsDialog_Load(object sender, EventArgs e)
        {
            Database.DoctorMgr docMgr = new Database.DoctorMgr();
            List<Database.doctor> docs = docMgr.getActiveDoctors().ToList();

            Database.doctor allDocs = new Database.doctor();
            allDocs.docID = 0;
            allDocs.docFirstName = "All";

            docs.Insert(0, allDocs);

            cbDoctor.DataSource = docs;
            cbDoctor.DisplayMember = "docFullName";
            cbDoctor.ValueMember = "docID";
        }
Ejemplo n.º 5
0
        private void ChangePaymentDialog_Load(object sender, EventArgs e)
        {
            dtpDate.Value = m_payment.payDate;

            Database.DoctorMgr docMgr = new Database.DoctorMgr();

            cbDoctor.DataSource = docMgr.getActiveDoctors();
            cbDoctor.ValueMember = "docID";
            cbDoctor.DisplayMember = "docFullName";

            cbDoctor.SelectedValue = m_payment.docID;

            cbPaymentType.SelectedValue = m_payment.ptID;

            Database.InvoiceMgr invMgr = Database.InvoiceMgr.Instance;

            invoiceBindingSource.DataSource = invMgr.getOutstandingInvoices(m_payment.patID);
        }
        private void PatientActivityDialog_Load(object sender, EventArgs e)
        {
            cbMode.SelectedIndex = 0;

            // Setup doctors list will "All" options
            Database.DoctorMgr docMgr = new Database.DoctorMgr();
            List<Database.doctor> docs = docMgr.getActiveDoctors().ToList();

            Database.doctor allDocs = new Database.doctor();
            allDocs.docID = 0;
            allDocs.docFirstName = "All";

            docs.Insert(0, allDocs);

            cbDoctor.DataSource = docs;
            cbDoctor.DisplayMember = "docFullName";
            cbDoctor.ValueMember = "docID";

            cbTime.SelectedIndex = 0;
        }
Ejemplo n.º 7
0
        private void InvoiceForm_Load(object sender, EventArgs e)
        {
            Database.DoctorMgr docMgr = new Database.DoctorMgr();

            cbDoctor.DataSource = docMgr.getActiveDoctors();
            cbDoctor.ValueMember = "docID";
            cbDoctor.DisplayMember = "docFullName";

            if (m_bIsUpdate)
            {
                cbDoctor.SelectedValue = m_currentInvoice.docID;
            }
            else if (m_currentPatient != null)
            {
                cbDoctor.SelectedValue = m_currentPatient.docID;
            }
        }
Ejemplo n.º 8
0
        private void PaymentForm_Load(object sender, EventArgs e)
        {
            Database.DoctorMgr docMgr = new Database.DoctorMgr();

            cbDoctor.DataSource = docMgr.getActiveDoctors();
            cbDoctor.ValueMember = "docID";
            cbDoctor.DisplayMember = "docFullName";

            if (m_patient != null)
            {
                cbDoctor.SelectedValue = m_patient.docID;
            }
        }