private void frmPharmacynotes_Load(object sender, EventArgs e)
        {
            patientDetails();
            rptDocument = new ReportDocument();
            IQCareUtils theUtil       = new IQCareUtils();
            IDrug       ReportDetails = (IDrug)ObjectFactory.CreateInstance("BusinessProcess.Pharmacy.BDrug,BusinessProcess.Pharmacy");
            DataSet     theDS         = (DataSet)ReportDetails.GetPharmacyNotes(GblIQCare.patientID);

            theDS.WriteXmlSchema(GblIQCare.GetXMLPath() + "\\PharmacyNotes.xml");

            rptPharmacyNotes rep = new rptPharmacyNotes();

            rep.SetDataSource(theDS);
            //frmPharmacyNotes theRepViewer = new frmPharmacyNotes();
            frmReportViewer theRepViewer = new frmReportViewer();

            theRepViewer.MdiParent              = this.MdiParent;
            theRepViewer.Location               = new Point(0, 0);
            theRepViewer.crViewer.ReportSource  = rep;
            theRepViewer.crViewer.ToolPanelView = CrystalDecisions.Windows.Forms.ToolPanelViewType.None;
            theRepViewer.Width             = 902;
            theRepViewer.Height            = 650;
            theRepViewer.crViewer.Width    = 880;
            theRepViewer.crViewer.Height   = 600;
            theRepViewer.crViewer.Location = new Point(11, 11);
            theRepViewer.btnExit_position(451, 615);
            theRepViewer.Show();
            this.Close();
        }
Example #2
0
        private void getAllPatients()
        {
            IDrug     drug  = (IDrug)ObjectFactory.CreateInstance("BusinessProcess.SCM.BDrug, BusinessProcess.SCM");
            DataTable theDT = drug.getPatientsRegistered();

            BindPharmacyDispenseGrid(theDT);
        }
Example #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            stockMgtManager = (IDrug)ObjectFactory.CreateInstance("BusinessProcess.SCM.BDrug, BusinessProcess.SCM");
            (Master.FindControl("pnlExtruder") as Panel).Visible        = false;
            (Master.FindControl("level2Navigation") as Control).Visible = true;
            //(Master.FindControl("levelTwoNavigationUserControl1").FindControl("lblformname") as Label).Text = "Stock Management";
            (Master.FindControl("levelTwoNavigationUserControl1").FindControl("patientLevelMenu") as Menu).Visible           = false;
            (Master.FindControl("levelTwoNavigationUserControl1").FindControl("PharmacyDispensingMenu") as Menu).Visible     = true;
            (Master.FindControl("levelTwoNavigationUserControl1").FindControl("UserControl_Alerts1") as UserControl).Visible = false;
            (Master.FindControl("levelTwoNavigationUserControl1").FindControl("PanelPatiInfo") as Panel).Visible             = false;
            //(Master.FindControl("facilityBanner") as Control).Visible = false;
            //(Master.FindControl("patientBanner") as Control).Visible = false;
            //(Master.FindControl("username1") as Control).Visible = false;
            //(Master.FindControl("currentdate1") as Control).Visible = false;
            //(Master.FindControl("facilityName") as Control).Visible = false;
            //(Master.FindControl("imageFlipLevel2") as Control).Visible = false;
            if (!IsPostBack)
            {
                BindCombo();

                addAttributes();
            }

            //ScriptManager.RegisterStartupScript(this, this.GetType(), "showHide", "showHideTransactionType('" + ddlTransactionType.ClientID + "');", true);
            //ScriptManager.RegisterStartupScript(this, this.GetType(), "showHidesupplier", "showHideSupplierStore('" + ddlSourceStore.ClientID + "');", true);
            userRights();
        }
Example #4
0
        private void searchPatients()
        {
            IDrug     drug  = (IDrug)ObjectFactory.CreateInstance("BusinessProcess.SCM.BDrug, BusinessProcess.SCM");
            DataTable theDT = drug.searchPatientsRegistered(txtFName.Text, txtMName.Text, txtLName.Text, txtPatientNumber.Text);

            BindPharmacyDispenseGrid(theDT);
        }
Example #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            IDrug   thePharmacyManager1 = (IDrug)ObjectFactory.CreateInstance("BusinessProcess.SCM.BDrug, BusinessProcess.SCM");
            DataSet theDS = thePharmacyManager1.GetPharmacyDrugHistory_Web(Convert.ToInt32(Session["PatientID"]));

            GridView1.DataSource = theDS.Tables[0];
            GridView1.DataBind();
        }
Example #6
0
 public Property(IDrug drug, double size, double timeUnits, double weightUnits)
 {
     this.Drug        = drug;
     this.Size        = size;
     this.TimeUnits   = timeUnits;
     this.WeightUnits = weightUnits;
     this.Storage     = StorageFactory.Storage[drug.GetType()](this);
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            IDrug   theAllergyData = (IDrug)ObjectFactory.CreateInstance("BusinessProcess.SCM.BDrug, BusinessProcess.SCM");
            DataSet theDS          = theAllergyData.GetAllergyData(Convert.ToInt32(Session["PatientID"]));

            GridView1.DataSource = theDS.Tables[0];
            GridView1.DataBind();
        }
Example #8
0
    private DataSet GetDSPrintPrescription()
    {
        IDrug PediatricManager = (IDrug)ObjectFactory.CreateInstance("BusinessProcess.Pharmacy.BDrug, BusinessProcess.Pharmacy");
        //int PharmacyID = Convert.ToInt32(Session["PatientVisitId"]);
        int PharmacyID = Convert.ToInt32(Session["ptnPharmacyPK"]);
        int PatientID  = Convert.ToInt32(Session["PatientId"]);

        ViewState["PatientId"] = PatientID;

        DataSet theDS = PediatricManager.GetPharmacyPrescriptionDetails(PharmacyID, PatientID, 1);

        //Image Streaming
        DataTable dtFacility = new DataTable();
        // object of data row
        DataRow drow = null;

        // add the column in table to store the image of Byte array type
        dtFacility.Columns.Add("FacilityImage", System.Type.GetType("System.Byte[]"));
        drow = dtFacility.NewRow();
        // define the filestream object to read the image
        FileStream fs = default(FileStream);
        // define te binary reader to read the bytes of image
        BinaryReader br = default(BinaryReader);

        // check the existance of image
        if (File.Exists(GblIQCare.GetPath() + theDS.Tables[3].Rows[0]["FacilityLogo"].ToString()))
        {
            // open image in file stream
            fs = new FileStream(GblIQCare.GetPath() + theDS.Tables[3].Rows[0]["FacilityLogo"].ToString(), FileMode.Open);

            // initialise the binary reader from file streamobject
            br = new BinaryReader(fs);
            // define the byte array of filelength
            byte[] imgbyte = new byte[fs.Length + 1];
            // read the bytes from the binary reader
            imgbyte   = br.ReadBytes(Convert.ToInt32((fs.Length)));
            drow[0]   = imgbyte;
            ImageFlag = 1;
            // add the image in bytearray
            dtFacility.Rows.Add(drow);
            // add row into the datatable
            br.Close();
            // close the binary reader
            fs.Close();
            // close the file stream
        }

        theDS.Tables.Add(dtFacility);
        ////////////////////////////////////////

        theDS.WriteXmlSchema(Server.MapPath("..\\XMLFiles\\PatientPharmacyPrescription.xml"));
        PediatricManager = null;
        return(theDS);
    }
Example #9
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (txtFName.Text == "")
            {
                MessageBox.Show("Please enter First Name");
                return;
            }

            if (txtLName.Text == "")
            {
                MessageBox.Show("Please enter Last Name");
                return;
            }

            if (cmbGender.SelectedValue.ToString() == "0")
            {
                MessageBox.Show("Please select the gender");
                return;
            }
            if (cmbService.SelectedValue.ToString() == "0")
            {
                MessageBox.Show("Please select the Service");
                return;
            }



            IDrug drug = (IDrug)ObjectFactory.CreateInstance("BusinessProcess.SCM.BDrug, BusinessProcess.SCM");

            try
            {
                drug.saveUpdatePatientRegistration(txtFName.Text, txtMName.Text, txtLName.Text, txtPatientNumber.Text, dtDOB.Value.ToString(),
                                                   cmbGender.SelectedValue.ToString(), GblIQCare.AppLocationId.ToString(), dtRegDate.Value.ToString(),
                                                   GblIQCare.AppUserId.ToString(), cmbService.SelectedValue.ToString());
                MessageBox.Show("Registration successful");
                getAllPatients();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Example #10
0
        public bool PatientAllergicToDrug(int PatientID, int DrugID)
        {
            bool    IsAllergic = false;
            DataSet Ds;

            IDrug DrugsManager = (IDrug)ObjectFactory.CreateInstance("BusinessProcess.Pharmacy.BDrug,BusinessProcess.Pharmacy");

            Ds = (DataSet)DrugsManager.GetPatientDrugAllergies(PatientID);

            foreach (DataRow row in Ds.Tables[0].Rows)
            {
                if (Convert.ToInt16(row["AllergicDrugs"]) == DrugID)
                {
                    IsAllergic = true;
                    break;
                }
            }

            return(IsAllergic);
        }
Example #11
0
 public static DrugViewModel ToModel(this IDrug entity)
 {
     return(new DrugViewModel
     {
         CreatedBy = entity.CreatedBy,
         CreatedOn = entity.CreatedOn,
         Directions = entity.Directions,
         Description = entity.Description,
         DrugClassId = entity.DrugClassId,
         DrugTypeId = entity.DrugTypeId,
         Id = entity.Id,
         IsActive = entity.IsActive,
         Name = entity.Name,
         SortOrder = entity.SortOrder,
         Status = entity.Status,
         StudyId = entity.StudyId,
         UpdatedBy = entity.UpdatedBy,
         UpdatedOn = entity.UpdatedOn,
         DrugCategoryId = entity.DrugClass.DrugCategoryId
     });
 }
 public DrugsController()
 {
     _drugObject = new DrugRepository();
 }
 public DrugsController(IDrug _drug)
 {
     _drugObject = _drug;
 }
Example #14
0
 public RuralProperty(IDrug drug, double size, double timeUnits, double weightUnits)
     : base(drug, size, timeUnits, weightUnits)
 {
 }
Example #15
0
 public DrugsController(IDrug con)
 {
     _con     = con;
     _log4net = log4net.LogManager.GetLogger(typeof(DrugsController));
 }
 public DrugController()
 {
     _drug = this.GetInstance <IDrug>();
 }
Example #17
0
 public DrugsController(IDrug con)
 {
     _con = con;
 }