Пример #1
0
        public DataSet FindPatient(string strFind, string dataSet)
        {
            SqlCommand com = DataAccessHelper.CreateCommand("spFindPatient");

            DataAccessHelper.AddStringInputParam(com, "strFind", strFind);
            DataAccessHelper.AddLongStringInputParam(com, "dataSet", dataSet);
            return(DataAccessHelper.GetList(com));
        }
Пример #2
0
        //contact status must select within the dataset
        public DataSet GetDistinctContactStatus(string dataSet)
        {
            SqlCommand com = DataAccessHelper.CreateCommand("spGetDistinctPtContactStatus");

            DataAccessHelper.AddLongStringInputParam(com, "dataSet", dataSet);
            DataSet statusDs = DataAccessHelper.GetList(com);

            return(statusDs);
        }
Пример #3
0
        public DataSet GetEformsClinicList(string datasetSql, string apptPhysician, string apptClinicDate)
        {
            SqlCommand com = DataAccessHelper.CreateCommand("spListEFormClinic");

            DataAccessHelper.AddLongStringInputParam(com, "Dataset", datasetSql);
            DataAccessHelper.AddStringInputParam(com, "ApptPhysician", apptPhysician);
            //DataAccessHelper.AddStringInputParam(com, "ApptClinicDate", apptClinicDate);
            DataAccessHelper.AddDateTimeInputParam(com, "ApptClinicDate", DataAccessHelper.ToDBDate(apptClinicDate));
            return(DataAccessHelper.GetRecord(com));
        }
Пример #4
0
        public bool UpdateGroupAccessCode(int groupId, string groupAccessCode)
        {
            SqlCommand com = DataAccessHelper.CreateCommand("spUpdateGroupAccessCode");

            DataAccessHelper.AddIntInputParam(com, "GroupId", groupId);
            DataAccessHelper.AddLongStringInputParam(com, "GroupAccessCode", groupAccessCode);
            DataAccessHelper.AddDateTimeInputParam(com, "UpdatedTime", DateTime.Now);

            DataAccessHelper.ExecuteScalar(com);

            return(true);
        }
Пример #5
0
        //public int InsertRole(string role, string roleDescription)
        //{
        //    SqlCommand com = DataAccessHelper.CreateCommand("spInsertRolesRecord");
        //    DataAccessHelper.AddStringInputParam(com, "Role", role);
        //    DataAccessHelper.AddLongStringInputParam(com, "RoleDescription", roleDescription);
        //    DataAccessHelper.AddDateTimeInputParam(com, "EnteredTime", DateTime.Now);
        //    DataAccessHelper.AddDateTimeInputParam(com, "UpdatedTime", DateTime.Now);
        //    DataAccessHelper.AddDateTimeInputParam(com, "DeactivatedTime", null);

        //    DataAccessHelper.AddIntOutputParam(com, "NewPrimaryKey");

        //    Hashtable outParams = DataAccessHelper.ExecuteScalar(com);

        //    if(outParams["NewPrimaryKey"] != System.DBNull.Value)
        //    {
        //        return (int)outParams["NewPrimaryKey"];
        //    }
        //    else
        //    {
        //        return -1;
        //    }
        //}

        public bool UpdateRole(int roleId, string role, string roleDescription)
        {
            SqlCommand com = DataAccessHelper.CreateCommand("spUpdateRolesRecord");

            DataAccessHelper.AddIntInputParam(com, "RoleId", roleId);
            //DataAccessHelper.AddIntInputParam(com, "RoleId", roleId);
            DataAccessHelper.AddStringInputParam(com, "Role", role);
            DataAccessHelper.AddLongStringInputParam(com, "RoleDescription", roleDescription);
            DataAccessHelper.AddDateTimeInputParam(com, "UpdatedTime", DateTime.Now);
            DataAccessHelper.AddDateTimeInputParam(com, "DeactivatedTime", null);

            DataAccessHelper.ExecuteScalar(com);

            return(true);
        }
Пример #6
0
 public DataSet FindPatientByIdentifier(string strFind, string idType, string dataSet)
 {
     // special case
     if (idType == "Study Id")
     {
         return(FindPatientByStudyId(strFind, dataSet));
     }
     else
     {
         SqlCommand com = DataAccessHelper.CreateCommand("spFindPatient");
         DataAccessHelper.AddStringInputParam(com, "strFind", strFind);
         DataAccessHelper.AddStringInputParam(com, "strIdType", idType);
         DataAccessHelper.AddLongStringInputParam(com, "dataSet", dataSet);
         return(DataAccessHelper.GetList(com));
     }
 }
Пример #7
0
        //TODO: remove this and use Biz Object to update from admin
        //TODO: remove hardcoded group access code
        public bool InsertGroup(int roleId, string groupName, string groupDescription)
        {
            SqlCommand com = DataAccessHelper.CreateCommand("spInsertGroupsRecord");

            DataAccessHelper.AddIntInputParam(com, "RoleId", roleId);
            DataAccessHelper.AddStringInputParam(com, "GroupName", groupName);
            DataAccessHelper.AddLongStringInputParam(com, "GroupDescription", groupDescription);
            // This access code gives access to all standard tabs and menus
            // When admin is revised, this should no longer be hardcoded and should become part of the
            // workflow
            DataAccessHelper.AddStringInputParam(com, "GroupAccessCode", "1FE1FC1F81C0000000");
            DataAccessHelper.AddDateTimeInputParam(com, "EnteredTime", DateTime.Now);
            DataAccessHelper.AddDateTimeInputParam(com, "UpdatedTime", DateTime.Now);
            DataAccessHelper.AddDateTimeInputParam(com, "DeactivatedTime", null);

            DataAccessHelper.ExecuteScalar(com);

            return(true);
        }
Пример #8
0
        /// <summary>
        /// Populates all drop down menus other than clinic and last name: Categories, Protocols, Contact Status and Referring Physician
        /// </summary>
        /// <param name="dataSetId">sql string DatasetId in Session</param>
        /// <param name="listName">List name, eg, Protocol, Category..</param>
        /// <param name="listValue">The selected option, eg, 00-290 (protocol value)</param>
        /// <param name="orderBy">Order by defaults to alphabetical</param>
        /// <param name="startRow">Start row for lists greater than 200</param>
        /// <param name="numRows">The number of rows to display</param>
        /// <returns>Dataset of patients that match criteria name and type and in working dataset</returns>
        public DataSet ListPatients(string dataSet, string listName, string listValue, string listModifier, string orderBy,
                                    int startRow, int numRows, string listUser)
        {
            SqlCommand com = DataAccessHelper.CreateCommand("spListPatients");

            DataAccessHelper.AddLongStringInputParam(com, "DataSet", dataSet);
            DataAccessHelper.AddStringInputParam(com, "listName", listName);
            DataAccessHelper.AddStringInputParam(com, "listValue", listValue);

            if (listModifier != null && !listModifier.Equals(""))
            {
                DataAccessHelper.AddStringInputParam(com, "listModifier", listModifier);
            }
            if (orderBy != null && !orderBy.Equals(""))
            {
                DataAccessHelper.AddStringInputParam(com, "orderByField", orderBy);
            }
            if (listUser != null && !listUser.Equals(""))
            {
                DataAccessHelper.AddStringInputParam(com, "UserName", listUser);
            }

            return(DataAccessHelper.GetList(com, startRow, numRows));
        }