public OutDoorBill GetDischargeBill(OutDoorBill outDoor)
        {
            DataTable dt = new OpdGateway().GetDischargeBillByPatientId(outDoor.OPID);

            if (dt != null && dt.Rows.Count > 0)
            {
                outDoor.OPID        = dt.Rows[0]["OPID"].ToString();
                outDoor.PatientName = dt.Rows[0]["PatientName"].ToString();
                outDoor.DiscTime    = "";
                //outDoor.DeisDate = Convert.ToDateTime(dt.Rows[0]["DischargeOn"]).Date;
                //outDoor.RegNo = dt.Rows[0]["RegNo"].ToString();
                outDoor.OTMedicine     = Convert.ToDouble(dt.Rows[0]["OT_Med_Total"]);
                outDoor.HospitalCharge = Convert.ToDouble(dt.Rows[0]["Hsptl_Total"]);
                outDoor.OTservice      = Convert.ToDouble(dt.Rows[0]["OT_Total"]);
                outDoor.PharmacyBill   = Convert.ToDouble(dt.Rows[0]["Phar_Total"]);
                outDoor.Age            = dt.Rows[0]["Age"].ToString();
                outDoor.BloodGroup     = dt.Rows[0]["BloodGroup"].ToString();
                //  opidDischargeBill.OT_TOtalBill = dt.Rows[0]["OT_TOtalBill"].ToString();
                outDoor.PBill          = Convert.ToDouble(dt.Rows[0]["Path_Total"].ToString());
                outDoor.NoOfDay        = dt.Rows[0]["NoOfDay"].ToString();
                outDoor.TotalBedCharge = dt.Rows[0]["cabin_Total"].ToString();
                outDoor.TConsultBill   = dt.Rows[0]["Con_Total"].ToString();
                outDoor.TotalBill      = Convert.ToDouble(dt.Rows[0]["TotalBill"]);
                outDoor.AdvancedPayble = Convert.ToDouble(dt.Rows[0]["Advance"]);
            }


            return(outDoor);
        }
Beispiel #2
0
        public void GetPatient(string pid)
        {
            DataTable patienTable = new OPD_Manager().OutDoorBillPatient();

            gridControl1.DataSource = patienTable;

            DataTable existingBillList = new OpdGateway().GetOutdoorPatient();

            gridControl2.DataSource = existingBillList;
        }
        public MessageModel SaveDischargeBill(OutDoorBill aDischargeBill)
        {
            MessageModel message = new MessageModel();

            int count = new OpdGateway().SaveDischargeBill(aDischargeBill);

            if (count > 0)
            {
                message.MessageBody  = "OutDoor BILL Submited";
                message.MessageTitle = "Message";
            }
            return(message);
        }
        public MessageModel SaveOtIssueMedine(Service service)
        {
            int          update       = new OpdGateway().UpdateOPService(service);
            int          cout         = new OpdGateway().SaveOtIssueMedine(service);
            MessageModel messageModel = new MessageModel();

            if (cout > 0)
            {
                messageModel.MessageBody  = "Save Issue Medinine";
                messageModel.MessageTitle = "Sucess";
            }

            return(messageModel);
        }
Beispiel #5
0
        public void printBill(string getBill)
        {
            getBill = gridView2.GetFocusedRowCellValue("OPID").ToString();
            DataTable   dt    = new OpdGateway().GetOutdoorPatient(getBill);
            ReportModel model = new ReportModel();

            model.Parameters = new List <ReportParameter>
            {
                new ReportParameter("Company", model.Company.ToUpper()),
                new ReportParameter("Address", model.Address),
            };
            model.ReportDataSource.Name = "outdoorpatientbill";

            model.ReportDataSource.Value = dt;
            model.ReportPath             = "GHospital_Care.Report.rptOutdoorPatientBill.rdlc";
            model.Show(model, this);
        }
        public List <IssueMedine> GetOPMedicineListByPatientId(Service paitentId)
        {
            try
            {
                DataTable list = new OpdGateway().GetOPMedicineConsumListByPatientId(paitentId);
                foreach (DataRow dataRow in list.Rows)
                {
                    OPMedicnineList.Add(new IssueMedine {
                        batchId = dataRow["batchId"].ToString(), ProductId = dataRow["ProductId"].ToString(), ProductName = dataRow["ProductName"].ToString(), Qty = Convert.ToInt16(dataRow["Qty"]), Rate = Convert.ToDecimal(dataRow["Rate"]), date = Convert.ToDateTime(dataRow["date"]), VoucherNo = Convert.ToInt64(dataRow["VoucherNo"]), BatchName = Convert.ToString(dataRow["batchName"]), expd = Convert.ToString(dataRow["expd"]), ServiceTotal = Convert.ToString(dataRow["TotalAmount"])
                    });
                }
                OPMedicnineList.Add(new IssueMedine());

                return(OPMedicnineList);
            }
            catch (Exception)
            {
                return(null);
            }
        }
        public Patient GetPatientInformationBySl(string patientSlNo)
        {
            DataTable table   = new OpdGateway().GetPatientInformationBySl(patientSlNo);
            Patient   patient = new Patient();

            if (table.Rows.Count > 0)
            {
                patient.PatientName = table.Rows[0]["PatientName"].ToString();
                patient.Address     = table.Rows[0]["Address"].ToString();
                patient.Age         = table.Rows[0]["Age"].ToString();
                patient.BloodGroup  = table.Rows[0]["BloodGroup"].ToString();
                string docId  = table.Rows[0]["Doctor"].ToString();
                Doctor doctor = new MedicalManager().GetAllDoctorbyId(docId);
                patient.Doctor      = doctor.DoctorName; patient.Gender = table.Rows[0]["Gender"].ToString();
                patient.Mobile      = table.Rows[0]["Mobile"].ToString();
                patient.Nationality = table.Rows[0]["Nationality"].ToString();
                patient.Phone       = table.Rows[0]["Phone"].ToString();
            }
            return(patient);
        }