コード例 #1
0
        internal static bool PatientUpdate(Guid guid, string firstName, string middleName, string lastName, int gender, int age, string address, string city,
/*patientDetails fields*/ string district, string taluko, string contactNo, string otherNo, string residenceNo, int maritalstatus, decimal marragetimeyear, int childern, string notes,
                                           Guid wardGuid, Guid roomGuid, DateTime admittedDate, string admittedtime, string admittedBy, string operation, DateTime followUpDate, decimal amount, bool isIpd,
                                           bool isOpd, Guid referenceDoctorGuid, decimal referenceDoctorShare, string PatientOccupation, string PatientOccupationFullAddress, string PatientReference,
                                           string PatientInsurance, string PatientInsuranceCompany, string insuranceAmount, DateTime PatientOperationDateTime, string PatientSigningPersonName,
                                           string PatientRelationshipWith, string PatientDoctorIncharge, string PatientDivison, string PatientPSOName, string PatientReceivingStaff, string receivingStaffReceptionMO,
                                           string PatientMO, string PatientProvisionalDiagnosis, string PatientCamePreviously, DateTime?patientBirthDate, string senderName, string chiefComplaint,
                                           string typeOfCase, string ht, string dm, string ihd, string majorIllness, string drugAllergy, string pregenency, string bt, string admittedTimetemperature,
                                           string admittedTimePulse, string admittedTimeRR, string admittedTimeSpo2, string admittedTimeBp, string admittedTimeHr, string admittedTimeRbs,
                                           string admittedTimeEcg, string admittedTimeOther, string admittedTimeWeight, string admittedTimeHeight, string systemicExamination,
                                           string rs, string cvs, string cns, string pa, string other, string suggestedInvestigation, string clinicalNote, string admittedTimeTreatment,
                                           DateTime?operationDate, string operationTime,
/*mlc form*/ bool isMlc, string mlcFormFillupName, string PatientMLCNo, string PatientEntryNo, string PatientMarkOfIdentity, string PatientEventDetail,
                                           string PatientFetcherPersonName, string PatientFetcherPersonFullAddress,
                                           string InformerStaffPerson, string PatientInformTime, string RelatedPoliceStation, string RelatedPoliceOfficer,
/*dischage fields*/ bool isDischarge, DateTime dischargeDate, string dischargeTime, string dischargeBy, string dischargeStaffReception, string dischargeStaffReceptionMO,
                                           int invoiceNo, DateTime invoiceDate, string PatientFinalDiagnosis, string conditionOnDischarge, string typeOfDischarge, string dischargeTypeTemperature,
                                           string dischargeTimePulse, string dischargeTimeRR, string dischargeTimeSpo2, string dischargeTimeBp, string dischargeTimeHr, string dischargeTimeRbs,
                                           string dischargeTimeEcg, string dischargeTimeRcg, string dischargeTimeOther, string dischargeTimeWeight, string dischargeTimeHeight, string dischargeTimeClinicalExamination,
                                           string dischargeTimeOperativeNote, string dischargeTimeInvestigation, string dischargeTimeTreatment, string advice, string status, string medicalOfficer, string indoorno, string billno,
                                           DateTime?medicalOfficeDate, string medicalOfficeTime, Guid modifiedByUser, out DateTime modifiedOn)
        {
            bool r = false;

            modifiedOn = DateTime.MinValue;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(Patient_Update))
            {
                PatientParameters(cmd, guid, firstName, middleName, lastName, gender, age, address, city, district, taluko, contactNo, otherNo, residenceNo, maritalstatus,
/*patientDetails fields*/ marragetimeyear, childern, notes, wardGuid, roomGuid, admittedDate, admittedtime, admittedBy, operation, followUpDate, amount, isIpd, isOpd, referenceDoctorGuid,
                                  referenceDoctorShare, PatientOccupation, PatientOccupationFullAddress, PatientReference, PatientInsurance, PatientInsuranceCompany, insuranceAmount,
                                  PatientOperationDateTime, PatientSigningPersonName, PatientRelationshipWith, PatientDoctorIncharge, PatientDivison, PatientPSOName, PatientReceivingStaff,
                                  receivingStaffReceptionMO, PatientMO, PatientProvisionalDiagnosis, PatientCamePreviously, patientBirthDate, senderName, chiefComplaint, typeOfCase,
                                  ht, dm, ihd, majorIllness, drugAllergy, pregenency, bt, admittedTimetemperature, admittedTimePulse, admittedTimeRR, admittedTimeSpo2, admittedTimeBp, admittedTimeHr,
                                  admittedTimeRbs, admittedTimeEcg, admittedTimeOther, admittedTimeWeight, admittedTimeHeight, systemicExamination, rs, cvs, cns, pa, other,
                                  suggestedInvestigation, clinicalNote, admittedTimeTreatment, operationDate, operationTime,
/*mlc form*/ isMlc, mlcFormFillupName, PatientMLCNo, PatientEntryNo, PatientMarkOfIdentity, PatientEventDetail, PatientFetcherPersonName, PatientFetcherPersonFullAddress,
                                  InformerStaffPerson, PatientInformTime, RelatedPoliceStation, RelatedPoliceOfficer,
/*dischage fields*/ isDischarge, dischargeDate, dischargeTime, dischargeBy, dischargeStaffReception, dischargeStaffReceptionMO, invoiceNo, invoiceDate, PatientFinalDiagnosis,
                                  conditionOnDischarge, typeOfDischarge, dischargeTypeTemperature, dischargeTimePulse, dischargeTimeRR, dischargeTimeSpo2, dischargeTimeBp, dischargeTimeHr,
                                  dischargeTimeRbs, dischargeTimeEcg, dischargeTimeRcg, dischargeTimeOther, dischargeTimeWeight, dischargeTimeHeight, dischargeTimeClinicalExamination,
                                  dischargeTimeOperativeNote, dischargeTimeInvestigation, dischargeTimeTreatment, advice, status, medicalOfficer, indoorno, billno,
                                  medicalOfficeDate, medicalOfficeTime, modifiedByUser);
                SqlParameter prmDate = AppDatabase.AddOutParameter(cmd, Patient.Columns.PatientModifiedOn, SqlDbType.DateTime);

                AppDatabase db = OpenDatabase();
                r = db != null && db.ExecuteCommand(cmd);
                if (r)
                {
                    modifiedOn = AppShared.DbValueToDateTime(prmDate.Value);
                }
            }

            return(r);
        }
コード例 #2
0
        internal static bool OPDPrescriptionProcedureMedicineInsert(Guid opdPrescriptionProcedureGuid, Guid PatientGuid, Guid MedicineGuid)
        {
            bool r = false;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(OPDPrescriptionProcedureMedicine_Insert))
            {
                OPDPrescriptionProcedureMedicineParameters(cmd, opdPrescriptionProcedureGuid, PatientGuid, MedicineGuid);
                AppDatabase db = OpenDatabase();
                r = db != null && db.ExecuteCommand(cmd);
            }
            return(r);
        }
コード例 #3
0
        internal static bool IPDPatientTreatmentSheetUpdate(Guid guid, Guid patientGuid, string diatAdvice, string sosDrug, string specialAdvice, DateTime treatmentDate)
        {
            bool r = false;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(IPDPatientTreatmentSheet_Update))
            {
                IPDPatientTreatmentParameter(cmd, guid, patientGuid, diatAdvice, sosDrug, specialAdvice, treatmentDate);
                AppDatabase db = OpenDatabase();
                r = db != null && db.ExecuteCommand(cmd);
            }
            return(r);
        }
コード例 #4
0
        internal static bool OPDTreatmentProcedureTreatmentInsert(Guid ProcedureGuid, Guid PatientGuid, Guid TreatmentGuid)
        {
            bool r = false;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(OPDTreatmentProcedureTreatment_Insert))
            {
                OPDTreatmentProcedureTreatmentParameters(cmd, ProcedureGuid, PatientGuid, TreatmentGuid);
                AppDatabase db = OpenDatabase();
                r = db != null && db.ExecuteCommand(cmd);
            }
            return(r);
        }
コード例 #5
0
        internal static bool PatientMedicineSaleInsert(Guid PatientMedicineSaleGuid, Guid PatientMedicineSaleBillGuid, Guid CategoryGuid, Guid CompanyGuid, Guid ItemGuid, decimal Quantity, decimal Amount, string Note)
        {
            bool r = false;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(PatientMedicineSale_Insert))
            {
                PatientMedicineSaleParameters(cmd, PatientMedicineSaleGuid, PatientMedicineSaleBillGuid, CategoryGuid, CompanyGuid, ItemGuid, Quantity, Amount, Note);
                AppDatabase db = OpenDatabase();
                r = db != null && db.ExecuteCommand(cmd);
            }
            return(r);
        }
コード例 #6
0
        internal static bool PatientBillUpdate(Guid guid, Guid patientGuid, DateTime patientBillDate, string otherPatientName)
        {
            bool r = false;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(PatientBill_Update))
            {
                PatientBillParameter(cmd, guid, patientGuid, patientBillDate, otherPatientName);
                AppDatabase db = OpenDatabase();
                r = db != null && db.ExecuteCommand(cmd);
            }
            return(r);
        }
コード例 #7
0
ファイル: AppDAL.cs プロジェクト: rshanx/HospitalManagement
        private static bool Execute(string storeProcName, string paramName, SqlDbType paramType, object paramValue)
        {
            bool r = false;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(storeProcName))
            {
                AppDatabase.AddInParameter(cmd, paramName, paramType, paramValue);
                AppDatabase db = OpenDatabase();
                r = (db != null && db.ExecuteCommand(cmd));
            }
            return(r);
        }
コード例 #8
0
        internal static bool PatientVitalUpdate(Guid Guid, Guid PatientGuid, DateTime VitalDate, string VitalTime, string Bp, string Hr, string Rr, string Temp, string Rbs, string Ecg, string Weight, string Height, string Other, string Spo2, string Pulse)
        {
            bool r = false;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(PatientVital_Update))
            {
                PatientVitalParameters(cmd, Guid, PatientGuid, VitalDate, VitalTime, Bp, Hr, Rr, Temp, Rbs, Ecg, Weight, Height, Other, Spo2, Pulse);

                AppDatabase db = OpenDatabase();
                r = db != null && db.ExecuteCommand(cmd);
            }
            return(r);
        }
コード例 #9
0
        internal static bool CompanyInsert(Guid CompanyGuid, Guid CategoryGuid, string CompanyName)
        {
            bool r = false;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(Company_Insert))
            {
                CompanyParameters(cmd, CompanyGuid, CategoryGuid, CompanyName);

                AppDatabase db = OpenDatabase();
                r = db != null && db.ExecuteCommand(cmd);
            }
            return(r);
        }
コード例 #10
0
ファイル: ItemDAL.cs プロジェクト: rshanx/HospitalManagement
        internal static bool ItemUpdate(Guid ItemGuid, Guid CategoryGuid, Guid CompanyGuid, string ItemName)
        {
            bool r = false;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(Item_Update))
            {
                ItemParameters(cmd, ItemGuid, CategoryGuid, CompanyGuid, ItemName);

                AppDatabase db = OpenDatabase();
                r = db != null && db.ExecuteCommand(cmd);
            }
            return(r);
        }
コード例 #11
0
        internal static bool IPDPatientTreatmentSheetDetailsUpdate(Guid guid, Guid treatmentGuid, Guid patientGuid, string description, string morningTime, string noonTime, string eveningTime,
                                                                   string nightTime)
        {
            bool r = false;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(IPDPatientTreatmentSheetDetails_Update))
            {
                IPDPatientTreatmentSheetDetailsParameters(cmd, guid, treatmentGuid, patientGuid, description, morningTime, noonTime, eveningTime, nightTime);
                AppDatabase db = OpenDatabase();
                r = db != null && db.ExecuteCommand(cmd);
            }
            return(r);
        }
コード例 #12
0
        internal static bool UserUpdateWindowsUserName(Guid userGuid, string windowsUser)
        {
            bool r = false;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(User_WindowsUserNameUpdate))
            {
                AppDatabase.AddInParameter(cmd, User.Columns.UserGuid, SqlDbType.UniqueIdentifier, userGuid);
                AppDatabase.AddInParameter(cmd, User.Columns.UserWindowsUserName, SqlDbType.NVarChar, AppShared.ToDbValueNullable(windowsUser));
                AppDatabase db = AppDAL.OpenDatabase();
                r = db != null && db.ExecuteCommand(cmd);
            }
            return(r);
        }
コード例 #13
0
        internal static bool PermissionDelete(Guid userGuid, Guid entityGuid)
        {
            bool r = false;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(UserPermission_Delete))
            {
                AppDatabase.AddInParameter(cmd, "@PermissionUserRoleGuid", SqlDbType.UniqueIdentifier, userGuid);
                AppDatabase.AddInParameter(cmd, "@PermissionEntityGuid", SqlDbType.UniqueIdentifier, entityGuid);
                AppDatabase db = OpenDatabase();
                r = (db != null && db.ExecuteCommand(cmd));
            }
            return(r);
        }
コード例 #14
0
        internal static bool MedicinesUpdate(Guid Medicinesguid, Guid CategoryGuid, Guid CompanyGuid, Guid ItemGuid, int ReOrderLevel)
        {
            bool r = false;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(Medicines_Update))
            {
                MedicinesParameters(cmd, Medicinesguid, CategoryGuid, CompanyGuid, ItemGuid, ReOrderLevel);

                AppDatabase db = OpenDatabase();
                r = db != null && db.ExecuteCommand(cmd);
            }
            return(r);
        }
コード例 #15
0
        internal static bool MedicinePurchaseUpdate(Guid MedicinePurchaseguid, Guid CategoryGuid, Guid CompanyGuid, Guid ItemGuid, string BillType, int Quantity, decimal WholesaleRate, decimal Amount, DateTime ExpiryDate, decimal MRP)
        {
            bool r = false;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(MedicinePurchase_Update))
            {
                MedicinePurchaseParameters(cmd, MedicinePurchaseguid, CategoryGuid, CompanyGuid, ItemGuid, BillType, Quantity, WholesaleRate, Amount, ExpiryDate, MRP);

                AppDatabase db = OpenDatabase();
                r = db != null && db.ExecuteCommand(cmd);
            }
            return(r);
        }
コード例 #16
0
        internal static bool CategoryUpdate(Guid CategoryGuid, string CategoryName)
        {
            bool r = false;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(Category_Update))
            {
                CategoryParameters(cmd, CategoryGuid, CategoryName);

                AppDatabase db = OpenDatabase();
                r = db != null && db.ExecuteCommand(cmd);
            }
            return(r);
        }
コード例 #17
0
        internal static bool MedicineSaleUpdate(Guid MedicineSaleguid, string Haste, Guid CategoryGuid, Guid CompanyGuid, Guid ItemGuid, decimal Quantity, decimal Amount)
        {
            bool r = false;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(MedicineSale_Update))
            {
                MedicineSaleParameters(cmd, MedicineSaleguid, Haste, CategoryGuid, CompanyGuid, ItemGuid, Quantity, Amount);

                AppDatabase db = OpenDatabase();
                r = db != null && db.ExecuteCommand(cmd);
            }
            return(r);
        }
コード例 #18
0
        internal static bool OPDHistoryProcedureHistoryInsert(Guid opdHistoryProcedureGuid, Guid PatientGuid, Guid HistoryGuid)
        {
            bool r = false;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(OPDHistoryProcedureHistory_Insert))
            {
                OPDHistoryProcedureHistoryParameters(cmd, opdHistoryProcedureGuid, PatientGuid, HistoryGuid);
                // SqlParameter prmModifiedOn = AppDatabase.AddOutParameter(cmd, OPDHistoryProcedureChiefComplain.Columns.OPDHistoryProcedureModifiedOn, SqlDbType.DateTime);
                AppDatabase db = OpenDatabase();
                r = db != null && db.ExecuteCommand(cmd);
                //if (r)
                //    createdOn = AppShared.DbValueToDateTime(prmModifiedOn.Value);
            }
            return(r);
        }
コード例 #19
0
        internal static SqlDataReader UserSelectForAdmin(Guid ownGuid)
        {
            SqlDataReader r = null;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(User_SelectForAdmin))
            {
                AppDatabase.AddInParameter(cmd, User.Columns.UserGuid, SqlDbType.UniqueIdentifier, ownGuid);
                AppDatabase db = OpenDatabase();
                if (db != null)
                {
                    r = db.GetSqlDataReader(cmd);
                }
            }
            return(r);
        }
コード例 #20
0
ファイル: AppDAL.cs プロジェクト: rshanx/HospitalManagement
        private static SqlDataReader GetReader(string storeProcName)
        {
            SqlDataReader r = null;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(storeProcName))
            {
                AppDatabase db = OpenDatabase();
                if (db != null)
                {
                    r = db.GetSqlDataReader(cmd);
                }
            }

            return(r);
        }
コード例 #21
0
ファイル: FieldDAL.cs プロジェクト: rshanx/HospitalManagement
        internal static bool FieldUpdate(Guid guid, string name)
        {
            bool r = false;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(Field_Update))
            {
                FieldParameters(cmd, guid, name);
                AppDatabase db = OpenDatabase();
                if (db != null && db.ExecuteCommand(cmd))
                {
                    r = true;
                }
            }
            return(r);
        }
コード例 #22
0
        internal static SqlDataReader PermssionSelect(Guid userRoleGuid, Guid entityGuid)
        {
            SqlDataReader dr = null;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(UserPermission_Select))
            {
                AppDatabase.AddInParameter(cmd, "@RoleGuid", SqlDbType.UniqueIdentifier, userRoleGuid);
                AppDatabase.AddInParameter(cmd, "@EntityGuid", SqlDbType.UniqueIdentifier, entityGuid);
                AppDatabase db = OpenDatabase();
                if (db != null)
                {
                    dr = db.GetSqlDataReader(cmd);
                }
            }
            return(dr);
        }
コード例 #23
0
        internal static DataTable OPDTreatmentData(DateTime dt)
        {
            DataTable r = null;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(OPDTreatment_Report))
            {
                AppDatabase.AddInParameter(cmd, "@Date", SqlDbType.DateTime, AppShared.ToDbValueNullable(dt));

                AppDatabase db = OpenDatabase();
                if (db != null)
                {
                    r = db.GetDataTable(cmd);
                }
            }
            return(r);
        }
コード例 #24
0
        internal static SqlDataReader UserSelectNonDisable(bool isDisable)
        {
            SqlDataReader r = null;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(User_SelectNonDisabled))
            {
                AppDatabase.AddInParameter(cmd, User.Columns.UserIsDisable, SqlDbType.Bit, isDisable);
                AppDatabase db = OpenDatabase();
                if (db != null)
                {
                    r = db.GetSqlDataReader(cmd);
                }
            }

            return(r);
        }
コード例 #25
0
        internal static bool ChangePassword(Guid userGuid, string oldPassword, string newPassword)
        {
            bool r = false;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(User_ChangePassword))
            {
                AppDatabase.AddInParameter(cmd, "@UserGuid", SqlDbType.UniqueIdentifier, userGuid);
                AppDatabase.AddInParameter(cmd, "@UserOldPassword", SqlDbType.NVarChar, oldPassword);
                AppDatabase.AddInParameter(cmd, "@UserNewPassword", SqlDbType.NVarChar, newPassword);
                SqlParameter prmSucess = AppDatabase.AddOutParameter(cmd, "@IsSuccess", SqlDbType.Bit);

                AppDatabase db = OpenDatabase();
                r = db != null && db.ExecuteCommand(cmd) && AppShared.DbValueToBoolean(prmSucess.Value);
            }
            return(r);
        }
コード例 #26
0
ファイル: AppDAL.cs プロジェクト: rshanx/HospitalManagement
        private static SqlDataReader GetReader(string storeProcName, string paramName, SqlDbType paramType, object paramValue)
        {
            SqlDataReader r = null;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(storeProcName))
            {
                AppDatabase.AddInParameter(cmd, paramName, paramType, paramValue);
                AppDatabase db = OpenDatabase();
                if (db != null)
                {
                    r = db.GetSqlDataReader(cmd);
                }
            }

            return(r);
        }
コード例 #27
0
        //internal static DataTable IPDPatientTreamentSheetReport(Guid IPDPatientTreatmentSheetGuid)
        //{
        //    return GetDataTable(IPDPatientTreamentSheetReports, Report.Columns.IPDPatientTreatmentSheetGuid, IPDPatientTreatmentSheetGuid);
        //}

        internal static DataTable IPDPatientVitalByDate(Guid patientGuid, DateTime treatMentDate)
        {
            DataTable r = null;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(IPDPatientVitalReport_ByDate))
            {
                AppDatabase.AddInParameter(cmd, "@PatientGuid", SqlDbType.UniqueIdentifier, AppShared.ToDbValueNullable(patientGuid));
                AppDatabase.AddInParameter(cmd, "@IPDPatientTreatmentSheetDate", SqlDbType.DateTime, AppShared.ToDbValueNullable(treatMentDate));

                AppDatabase db = OpenDatabase();
                if (db != null)
                {
                    r = db.GetDataTable(cmd);
                }
            }
            return(r);
        }
コード例 #28
0
        internal static SqlDataReader UserLogin(string userName, string password)
        {
            SqlDataReader r = null;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(User_Login))
            {
                AppDatabase.AddInParameter(cmd, User.Columns.UserLoginName, SqlDbType.NVarChar, AppShared.SafeString(userName));
                AppDatabase.AddInParameter(cmd, User.Columns.UserPassword, SqlDbType.NVarChar, AppShared.SafeString(password));
                AppDatabase db = OpenDatabase();
                if (db != null)
                {
                    r = db.GetSqlDataReader(cmd);
                }
            }

            return(r);
        }
コード例 #29
0
        internal static SqlDataReader IPDPatientTreatmentSheetSearch(string searchText, DateTime dateFrom, DateTime dateTo)
        {
            SqlDataReader r = null;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(IPDPatientTreatmentSheet_Search))
            {
                AppDatabase.AddInParameter(cmd, "@SearchText", SqlDbType.NVarChar, AppShared.ToDbLikeText(searchText));
                AppDatabase.AddInParameter(cmd, "@DateFrom", SqlDbType.DateTime, AppShared.ToDbValueNullable(dateFrom));
                AppDatabase.AddInParameter(cmd, "@DateTo", SqlDbType.DateTime, AppShared.ToDbValueNullable(dateTo));
                AppDatabase db = OpenDatabase();
                if (db != null)
                {
                    r = db.GetSqlDataReader(cmd);
                }
            }
            return(r);
        }
コード例 #30
0
        internal static DataTable OPDAppointmentReport7Days(DateTime fromDate, DateTime toDate)
        {
            DataTable r = null;

            using (SqlCommand cmd = AppDatabase.GetStoreProcCommand(OPDAppointment_Report7Days))
            {
                AppDatabase.AddInParameter(cmd, "@AppointmentDateFrom", SqlDbType.DateTime, AppShared.ToDbValueNullable(fromDate));
                AppDatabase.AddInParameter(cmd, "@AppointmentDateTo", SqlDbType.DateTime, AppShared.ToDbValueNullable(toDate));
                AppDatabase db = OpenDatabase();
                if (db != null)
                {
                    r = db.GetDataTable(cmd);
                }
            }
            return(r);

            //return GetDataTable(OPDAppointment_Report7Days);
        }