Exemple #1
0
        /// <summary>
        /// Binds the dropdown.
        /// </summary>
        void BindDropdown()
        {
            //if (base.Session["TechnicalAreaId"] == null)
            //{
            BindFunctions        BindManager = new BindFunctions();
            IPatientRegistration ptnMgr      = (IPatientRegistration)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientRegistration, BusinessProcess.Clinical");
            DataSet DSModules = ptnMgr.GetModuleNames(Convert.ToInt32(Session["AppLocationId"]));

            DataView theModDV = new DataView(DSModules.Tables[0]);

            theModDV.RowFilter = "ModuleId NOT IN(206,207)";
            IQCareUtils theModUtils = new IQCareUtils();

            DataTable theDT = new DataTable();

            theDT = theModUtils.CreateTableFromDataView(theModDV);
            //theDT = DSModules.Tables[0];

            if (theDT.Rows.Count > 0)
            {
                BindManager.BindCombo(ddlCostCenter, theDT, "ModuleName", "ModuleID");
                ptnMgr = null;
            }
            ///}
        }
        /// <summary>
        /// Populates the published service area.
        /// </summary>
        void PopulateServiceArea()
        {
            IPatientRegistration ptnMgr = (IPatientRegistration)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientRegistration, BusinessProcess.Clinical");
            DataSet DSModules           = ptnMgr.GetModuleNames(this.FacilityID);

            DataTable theDT = new DataTable();

            theDT = DSModules.Tables[0];
            ddlReferral.Items.Clear();
            DataRow[] toBeDeleted;
            toBeDeleted = theDT.Select("ModuleName in('RECORDS', 'Pharmacy Dispense')");
            if (toBeDeleted.Length > 0)
            {
                foreach (DataRow dr in toBeDeleted)
                {
                    theDT.Rows.Remove(dr);
                    theDT.AcceptChanges();
                }
            }

            ddlReferral.Items.Add(new ListItem("Select", ""));
            foreach (DataRow dr in theDT.Rows)
            {
                ddlReferral.Items.Add(new ListItem(dr["ModuleName"].ToString(), dr["ModuleName"].ToString()));
            }
            // ddlReferral.DataTextField = "ModuleName";
            //ddlReferral.DataValueField = "ModuleName";
            //ddlReferral.DataSource = theDT;
            // ddlReferral.DataBind();

            this.ddlReferral.Items.Add(new ListItem("Others", "Others"));
        }
    protected void BindServiceDropdown()
    {
        BindFunctions        BindManager = new BindFunctions();
        IPatientRegistration ptnMgr      = (IPatientRegistration)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientRegistration, BusinessProcess.Clinical");
        DataSet DSModules = ptnMgr.GetModuleNames(Convert.ToInt32(Session["AppLocationId"]), Convert.ToInt32(Session["AppUserId"]));

        DataTable theDT = new DataTable();

        //if Admin user load all service areas
        if (Convert.ToString(Session["AppUserId"]) == "1")
        {
            theDT = DSModules.Tables[0];
        }
        else
        {
            theDT = DSModules.Tables[2];
        }


        if (theDT.Rows.Count > 0)
        {
            BindManager.BindCombo(ddlServices, theDT, "ModuleName", "ModuleID");
            ptnMgr = null;
        }
    }
Exemple #4
0
        private void Init_page()
        {
            Session["PatientId"] = 0;
            IPatientRegistration ptnMgr = (IPatientRegistration)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientRegistration, BusinessProcess.Clinical");
            DataSet DSModules           = ptnMgr.GetModuleNames(Convert.ToInt32(Session["AppLocationId"]));

            DataTable theDT = new DataTable();

            theDT = DSModules.Tables[0];
            createserviceButtons(theDT);
        }
Exemple #5
0
        /// <summary>
        /// Binds the service dropdown.
        /// </summary>
        void PopulateServiceDropdown()
        {
            BindFunctions        BindManager = new BindFunctions();
            IPatientRegistration ptnMgr      = (IPatientRegistration)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientRegistration, BusinessProcess.Clinical");
            DataSet DSModules = ptnMgr.GetModuleNames(Convert.ToInt32(Session["AppLocationId"]));

            DataTable theDT = new DataTable();

            theDT = DSModules.Tables[0];

            if (theDT.Rows.Count > 0)
            {
                BindManager.BindCombo(ddlServices, theDT, "ModuleName", "ModuleID");
                ptnMgr = null;
            }
        }
        /// <summary>
        /// Binds the service dropdown.
        /// </summary>
        void PopulateServiceDropdown()
        {
            BindFunctions        BindManager = new BindFunctions();
            IPatientRegistration ptnMgr      = (IPatientRegistration)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientRegistration, BusinessProcess.Clinical");
            DataSet DSModules = ptnMgr.GetModuleNames(Convert.ToInt32(Session["AppLocationId"]));

            DataTable theDT = new DataTable();

            theDT = DSModules.Tables[0];
            DataView theDV = new DataView(theDT);

            theDV.RowFilter = "ModuleId NOT IN(206,207,7)";
            IQCareUtils theModUtils = new IQCareUtils();
            DataTable   theNewDT    = new DataTable();

            theNewDT = theModUtils.CreateTableFromDataView(theDV);
            if (theNewDT.Rows.Count > 0)
            {
                BindManager.BindCombo(ddlServices, theNewDT, "ModuleName", "ModuleID");
                ptnMgr = null;
            }
        }
        /// <summary>
        /// Populates the published service area.
        /// </summary>
        void PopulateServiceArea()
        {
            IPatientRegistration ptnMgr = (IPatientRegistration)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientRegistration, BusinessProcess.Clinical");
            DataSet DSModules           = ptnMgr.GetModuleNames(this.FacilityID);

            DataTable theDT = new DataTable();

            theDT = DSModules.Tables[0];
            ddlReferral.Items.Clear();

            ddlReferral.Items.Add(new ListItem("Select..", ""));
            foreach (DataRow dr in theDT.Rows)
            {
                ddlReferral.Items.Add(new ListItem(dr["ModuleName"].ToString(), dr["ModuleName"].ToString()));
            }
            // ddlReferral.DataTextField = "ModuleName";
            //ddlReferral.DataValueField = "ModuleName";
            //ddlReferral.DataSource = theDT;
            // ddlReferral.DataBind();

            this.ddlReferral.Items.Add(new ListItem("Others", "Others"));
        }
Exemple #8
0
        void PopulateModules()
        {
            try
            {
                BindFunctions        BindManager = new BindFunctions();
                IPatientRegistration ptnMgr      = (IPatientRegistration)ObjectFactory.CreateInstance("BusinessProcess.Clinical.BPatientRegistration, BusinessProcess.Clinical");
                DataSet DSModules = ptnMgr.GetModuleNames(Convert.ToInt32(Session["AppLocationId"]));

                DataTable theDT = new DataTable();
                theDT = DSModules.Tables[0];

                if (theDT.Rows.Count > 0)
                {
                    BindManager.BindCombo(ddlDepartment, theDT, "ModuleName", "ModuleID");
                    ptnMgr = null;
                }
            }
            catch (Exception ex)
            {
                this.ShowErrorMessage(ref ex);
            }
        }
Exemple #9
0
        private void createserviceButtons(DataTable modules)
        {
            IPatientRegistration ptnMgr = (IPatientRegistration)ObjectFactory.CreateInstance(ObjFactoryParameter);
            DataSet   DSModules         = new DataSet();
            DataTable theDT             = new DataTable();

            if (Convert.ToInt32(Session["AppUserId"]) > 1)
            {
                DSModules = ptnMgr.GetModuleNames(Convert.ToInt32(Session["AppLocationId"]), Convert.ToInt32(Session["AppUserId"]));
                theDT     = DSModules.Tables[2];
            }
            else
            {
                DSModules = ptnMgr.GetModuleNames(Convert.ToInt32(Session["AppLocationId"]));
                theDT     = DSModules.Tables[0];
            }
            //removing Workplan if KNH Static form service is not available
            Session["isKNHEnabled"] = false;
            DataTable dt = theDT;

            if (!object.Equals(theDT, null))
            {
                int tmp = dt.AsEnumerable().Where(p => p.Field <int>("moduleid") == Convert.ToInt32("204")).Select(p => p.Field <int>("moduleid")).FirstOrDefault();
                if (tmp > 0)
                {
                    Session["isKNHEnabled"] = true;
                }
            }

            //first add the records button which is default present
            int       i           = 0;
            int       cntr        = 0;
            TableRow  serviceRow  = new TableRow();
            TableCell recordsCell = new TableCell();

            recordsCell.Attributes.Add("align", "center");
            recordsCell.Attributes.Add("width", "25%");
            recordsCell.Attributes.Add("height", "100px");

            Button btnRecords = new Button();

            btnRecords.Text      = "Records";
            btnRecords.BackColor = System.Drawing.ColorTranslator.FromHtml(aTileBackgroundColor[1].ToString());
            btnRecords.Attributes.Add("class", "tileButton");
            btnRecords.BorderStyle   = BorderStyle.None;
            btnRecords.OnClientClick = String.Format("window.location = 'frmFindAddCustom.aspx?srvNm={0}&mod={1}'; return false;", "Records", 0);
            btnRecords.Height        = Unit.Pixel(100);

            if (theDT.Rows.Count == 1)
            {
                btnRecords.Width = Unit.Percentage(70);
            }
            else if (theDT.Rows.Count == 2)
            {
                btnRecords.Width = Unit.Percentage(90);
            }
            else
            {
                btnRecords.Width = Unit.Percentage(100);
            }

            recordsCell.Controls.Add(btnRecords);
            serviceRow.Cells.Add(recordsCell);
            mainTable.Controls.Add(serviceRow);
            i    = 1;
            cntr = 1;

            foreach (DataRow dr in theDT.Rows)
            {
                if (Convert.ToInt32(dr["ModuleID"]) != 201)
                {
                    if (i % 4 == 0)
                    {
                        serviceRow = new TableRow();
                    }


                    TableCell serviceCell = new TableCell();
                    serviceCell.Attributes.Add("align", "center");
                    serviceCell.Attributes.Add("width", "25%");
                    serviceCell.Attributes.Add("height", "100px");

                    Button btnService = new Button();
                    btnService.Text = dr[2].ToString();
                    btnService.Attributes.Add("data-moduleID", dr[1].ToString());
                    btnService.BackColor = System.Drawing.ColorTranslator.FromHtml(aTileBackgroundColor[cntr].ToString());
                    btnService.Attributes.Add("class", "tileButton");
                    btnService.BorderStyle   = BorderStyle.None;
                    btnService.OnClientClick = String.Format("window.location = 'frmFindAddCustom.aspx?srvNm={0}&mod={1}'; return false;", btnService.Text, dr[1]);
                    btnService.Height        = Unit.Pixel(100);
                    if (theDT.Rows.Count == 1)
                    {
                        btnService.Width = Unit.Percentage(70);
                    }
                    else if (theDT.Rows.Count == 2)
                    {
                        btnService.Width = Unit.Percentage(90);
                    }
                    else
                    {
                        btnService.Width = Unit.Percentage(100);
                    }

                    serviceCell.Controls.Add(btnService);
                    serviceRow.Cells.Add(serviceCell);
                    if (i % 4 == 0)
                    {
                        mainTable.Controls.Add(serviceRow);
                    }

                    i    += 1;
                    cntr += 1;
                    //resetting color counter
                    if (i > cntr)
                    {
                        cntr = 1;
                    }
                }
            }
            ptnMgr = null;
        }
Exemple #10
0
        private void createserviceButtons()
        {
            try
            {
                IPatientRegistration ptnMgr = (IPatientRegistration)ObjectFactory.CreateInstance(ObjFactoryParameter);
                DataSet   DSModules         = new DataSet();
                DataTable theDT             = new DataTable();
                DataTable theDTIdent        = new DataTable();
                if (Convert.ToInt32(Session["AppUserId"]) > 1)
                {
                    DSModules  = ptnMgr.GetModuleNames(Convert.ToInt32(Session["AppLocationId"]), Convert.ToInt32(Session["AppUserId"]));
                    theDT      = DSModules.Tables[2];
                    theDTIdent = DSModules.Tables[3];
                }
                else
                {
                    DSModules            = ptnMgr.GetModuleNames(Convert.ToInt32(Session["AppLocationId"]));
                    theDT                = DSModules.Tables[0];
                    theDTIdent           = DSModules.Tables[2];
                    Session["AppModule"] = DSModules.Tables[3];
                }
                ViewState["theDTIdent"] = theDTIdent;// Add this line by Rahmat(29 March-2017) which is used at RepeaterseriveAreas_ItemCommand
                //removing Workplan if KNH Static form service is not available
                Session["isKNHEnabled"] = false;
                DataTable dt = theDT;

                if (!object.Equals(theDT, null))
                {
                    int tmp = dt.AsEnumerable().Where(p => p.Field <int>("moduleid") == Convert.ToInt32("204")).Select(p => p.Field <int>("moduleid")).FirstOrDefault();
                    if (tmp > 0)
                    {
                        Session["isKNHEnabled"] = true;
                    }
                }

                //DataTable dtTiles = DSModules.Tables[0];
                DataTable dtTiles = dt;



                //returns true if user has at least some rights in billing and billing is enabled
                if (setBillingRights())
                {
                    DataRow dr          = dtTiles.NewRow();
                    int     maxSequence = DSModules.Tables[0].AsEnumerable().Max(r => r.Field <int>("Sequence"));
                    dr["FacilityID"] = Convert.ToInt32(Session["FacilityID"].ToString());
                    dr["ModuleID"]   = 9999;
                    dr["ModuleName"] = "Billing";
                    dr["Sequence"]   = maxSequence + 1;
                    dtTiles.Rows.Add(dr);
                }

                //Add the Wards button only if wards is enabled and user has rights to it
                if (Session["Wards"].ToString() == "1" && Authentication.HasFeatureRight(ApplicationAccess.Wards, (DataTable)Session["UserRight"]))
                {
                    DataRow dr          = dtTiles.NewRow();
                    int     maxSequence = DSModules.Tables[0].AsEnumerable().Max(r => r.Field <int>("Sequence"));
                    dr["FacilityID"] = Convert.ToInt32(Session["FacilityID"].ToString());
                    dr["ModuleID"]   = 9998;
                    dr["ModuleName"] = "Wards";
                    dr["Sequence"]   = maxSequence + 1;
                    dtTiles.Rows.Add(dr);
                }

                theDT = this.GetTileData(dtTiles);
                RepeaterseriveAreas.DataSource = theDT;
                RepeaterseriveAreas.DataBind();
            }
            catch (Exception)
            {
                throw;
            }
        }