Exemple #1
0
        }//End getConfigurationRecordSelectionList method.

        // =====================================================================================
        /// <summary>
        /// This method gets a list of record for the record table QueryType
        /// </summary>
        /// <param name="Application">String: (Mandatory) The trial identifier.</param>
        /// <param name="EntityId">String: the milestone identifier</param>
        /// <param name="RecordTable">EvDataChange.DataChangeTableNames: The table name</param>
        /// <returns>List of EvOption: the list of selection options</returns>
        /// <remarks>
        /// This method consists of the following steps:
        ///
        /// 1. Switch the table name and execute the method for retrieving the option list
        ///
        /// 2. Return the list of options.
        /// </remarks>
        // -------------------------------------------------------------------------------------
        public List <EvOption> getRecordSelectionList(
            String EntityId,
            EvDataChange.DataChangeTableNames RecordTable)
        {
            //
            // Initialise the methods objects and variables.
            //
            this._DebugLog.AppendLine(Evado.Digital.Model.EvcStatics.CONST_METHOD_START
                                      + "Evado.Digital.Bll.Clinical.EvDataChanges.getRecordSelectionList");
            this._DebugLog.AppendLine("EntityId: " + EntityId);
            this._DebugLog.AppendLine("RecordTable: " + RecordTable);

            //
            // Fill the testReport selection list
            //
            switch (RecordTable)
            {
            case EvDataChange.DataChangeTableNames.EvRecords:
            {
                return(this.GetRecordList(EntityId));
            }

            case EvDataChange.DataChangeTableNames.EvAncilliaryRecords:
            {
                return(this.GetSubjectRecordsList(EntityId));
            }
            }
            return(new List <EvOption> ( ));
        }//End getRecordSelectionList method.
Exemple #2
0
        }//End getRecordList method.

        #endregion

        #region get Table name lists

        // =====================================================================================
        /// <summary>
        /// This class returns a list of record for the configuration records
        /// </summary>
        /// <param name="ProjectId">String: (Mandatory) The trial identifier.</param>
        /// <param name="VersionGuid">Guid: The version's global unique identifier</param>
        /// <param name="ArmIndex">EvTrialArm.ArmIndexes: The Arm Index</param>
        /// <param name="RecordTable">EvDataChange.DataChangeTableNames: The table name</param>
        /// <returns>List of EvOption: the list of selection options</returns>
        /// <remarks>
        /// This method consists of the following steps:
        ///
        /// 1. Switch the table name to execute the method for retrieving the associated options list.
        ///
        /// 2. Return the new options list.
        /// </remarks>
        // -------------------------------------------------------------------------------------
        public List <EvOption> getConfigurationRecordSelectionList(
            String ProjectId,
            Guid VersionGuid,
            int ArmIndex,
            EvDataChange.DataChangeTableNames RecordTable)
        {
            //
            // Initialise the methods objects and variables.
            //
            this._DebugLog.AppendLine(Evado.Digital.Model.EvcStatics.CONST_METHOD_START
                                      + "Evado.Digital.Bll.Clinical.EvDataChanges.getConfigurationRecordSelectionList method. ");
            this._DebugLog.AppendLine("ProjectId: " + ProjectId);
            this._DebugLog.AppendLine("ScheduleGuid: " + VersionGuid);
            this._DebugLog.AppendLine("ArmIndex: " + ArmIndex);
            this._DebugLog.AppendLine("RecordTable: " + RecordTable);

            //
            // Fill the testReport selection list
            //
            switch (RecordTable)
            {
            case EvDataChange.DataChangeTableNames.EvAlerts:
            {
                return(this.GetTrialAlerts(ProjectId));
            }

            case EvDataChange.DataChangeTableNames.EvForms:
            {
                return(this.GetFormsList( ));
            }

            case EvDataChange.DataChangeTableNames.EvUserProfiles:
            {
                return(this.GetUserList( ));
            }
            }
            this._DebugLog.AppendLine("No matching list.");

            return(new List <EvOption> ( ));
        }//End getConfigurationRecordSelectionList method.
Exemple #3
0
        }//End getRecordSelectionList method.

        // =====================================================================================
        /// <summary>
        /// This method gets a list of record for the record table QueryType
        /// </summary>
        /// <param name="ProjectId">String: (Mandatory) The trial identifier.</param>
        /// <param name="RecordTable">EvDataChange.DataChangeTableNames: The table name</param>
        /// <returns>List of EvOption: the list of selection options</returns>
        /// <remarks>
        /// This method consists of the following steps:
        ///
        /// 1. Switch the table name and execute the method for retrieving the option list
        ///
        /// 2. Return the list of options.
        /// </remarks>
        // -------------------------------------------------------------------------------------
        public List <EvOption> getItemRecordSelectionList(
            EvDataChange.DataChangeTableNames RecordTable)
        {
            //
            // Initialise the methods objects and variables.
            //
            this._DebugLog.AppendLine(Evado.Digital.Model.EvcStatics.CONST_METHOD_START
                                      + "Evado.Digital.Bll.Clinical.EvDataChanges.getItemRecordSelectionList. ");
            this._DebugLog.AppendLine("RecordTable: " + RecordTable);

            //
            // Fill the testReport selection list
            //
            switch (RecordTable)
            {
            case EvDataChange.DataChangeTableNames.EvFormFields:
            {
                return(this.GetFormsList( ));
            }
            }
            return(new List <EvOption> ( ));
        }//End getItemRecordSelectionList method.
Exemple #4
0
        // =====================================================================================
        /// <summary>
        /// This class returns a list of datachange object based on the RecordGuid and tableName.
        /// </summary>
        /// <param name="RecordGuid">Guid: (Mandatory) The record's global unique identifier.</param>
        /// <param name="TableName">EvDataChange.DataChangeTableNames: the table name .</param>
        /// <returns>List of EvDataChange: a list of ResultData change objects.</returns>
        /// <remarks>
        /// This method consists of the following steps:
        ///
        /// 1. Execute the method for retrieving the list of datachange objects based on Guid and table name
        ///
        /// 2. Return the list of ResultData change object.
        /// </remarks>
        // -------------------------------------------------------------------------------------
        public List <EvDataChange> GetDataChangeList(
            Guid RecordGuid,
            EvDataChange.DataChangeTableNames TableName)
        {
            //
            // Initialise the methods objects and variables.
            //
            this._DebugLog.AppendLine(Evado.Digital.Model.EvcStatics.CONST_METHOD_START
                                      + "Evado.Digital.Bll.Clinical.EvDataChanges.GetView");
            this._DebugLog.AppendLine("RecordGuid: " + RecordGuid);
            this._DebugLog.AppendLine("Record Type: " + TableName);

            //
            // Query the database
            //
            List <EvDataChange> view = this._dalChanges.GetView(RecordGuid, TableName);

            this._DebugLog.AppendLine(this._dalChanges.Log);

            this._DebugLog.AppendLine("current schedule count: " + view.Count);

            return(view);
        }//End getRecordList method.
Exemple #5
0
        }//END getRowData method.

        // +++++++++++++++++++++++++++ END RECORD READER SECTION  ++++++++++++++++++++++++++++++
        #endregion

        #region DataChange Queries

        // =====================================================================================
        /// <summary>
        /// This method queries the data changes for a record.
        /// </summary>
        /// <param name="RecordGuid">Guid: (Mandatory) Record global Unique identifier.</param>
        /// <param name="TableName">EvDataChange.DataChangeTableNames: (Mandatory) table name.</param>
        /// <returns>List of EvDataChange: a list of data change items</returns>
        /// <remarks>
        /// This method consists of the following steps:
        ///
        /// 1. Defines the sql query parameters and the sql query string.
        ///
        /// 2. Execute the sql query string with parameters and store the results on datatable.
        ///
        /// 3. Loop through the table and extract data row to the data change object.
        ///
        /// 4. Add the object to the Datachanges list.
        ///
        /// 5. Return the Datachanges list.
        /// </remarks>
        // -------------------------------------------------------------------------------------
        public List <EvDataChange> GetView(
            Guid RecordGuid,
            EvDataChange.DataChangeTableNames TableName)
        {
            //
            // Initialize the status and the return data change list
            //
            this.LogMethod("GetView method. ");
            this.LogDebug("SiteGuid: " + EvDataChanges._SiteGuid);
            this.LogDebug("RecordGuid: " + RecordGuid);
            this.LogDebug("Record Type: " + TableName);
            List <EvDataChange> View = new List <EvDataChange> ( );

            //
            // If the site guid is empty exit.
            //
            if (EvDataChanges._SiteGuid == Guid.Empty)
            {
                return(new List <EvDataChange> ( ));
            }

            //
            // Define the SQL query parameters.
            //
            SqlParameter [] cmdParms = new SqlParameter []
            {
                new SqlParameter(_parmRecordGuid, SqlDbType.UniqueIdentifier),
                new SqlParameter(_parmTableName, SqlDbType.NVarChar, 50)
            };
            cmdParms [0].Value = RecordGuid;
            cmdParms [1].Value = TableName.ToString( );

            //
            // Define the query string.
            //
            _sqlQueryString = _sqlQueryView + " WHERE (DC_RecordGuid = @RecordGuid) "
                              + " AND (DC_TableName = @TableName) "
                              + " ORDER BY DC_DateStamp;";

            this.LogClass(_sqlQueryString);

            //
            // Execute the query against the database.
            //
            using (DataTable table = EvSqlMethods.RunQuery(_sqlQueryString, cmdParms))
            {
                //
                // Iterate through the results extracting the role information.
                //
                for (int Count = 0; Count < table.Rows.Count; Count++)
                {
                    //
                    // Extract the table row
                    //
                    DataRow row = table.Rows [Count];

                    //
                    // Read the row data.
                    //
                    EvDataChange Item = this.getRowData(row);

                    //
                    // Append the new Change object to the array.
                    //
                    View.Add(Item);
                } //END record iteration loop.
            }     //END Using statement
            this.LogDebug("Record Count: " + View.Count);

            //
            // Pass back the result arrray.
            //
            return(View);
        } // Close GetView method.