CyDAS Home funded by   Sponsor: DFG
CyDAS Application Technical Documentation Active Group Import Filter Data Class Documentation Section HowTo Section Online Analysis Section Download Section Resources Section About Section

Configuration Data Class

The class ConfigData provides global application data which are stored in static (shared) variables.

Overview

ConfigData
...()
ActiveGroup: ActiveGroup
ActiveGroupTableName: String
FilterAnalysis: Hashtable
FilterMining: Hashtable
Icon(): Icon
closeAllForms()
DependentForm_Closing(...)
formatDate(ByRef InputDate: Date): String
formatDate(ByVal InputDate: String): Date
getColorFromDialog(ByRef DefaultColor: Color): Color
getDatabaseConnection(): IDbConnection
getDatabaseEngine(): String
getDeletionWildCard(): String
getGeneralWildCard(): String
getImportFilter(Name: String): ImportFilterData
getImportFilterNames(): String()
getNextInsertID(Table: String): Integer
getQuotes(): String
getSharedDatabaseConnection(ByRef con: IDbConnection)
getSystemGroupNewName(): String
getSystemGroupNewID(): Integer
handleException(ByRef exc: Exception)
handleForm(ByRef DependentForm: Form): void
quoteString(input: String): String
unquoteString(input: String): String
removeActiveGroupTableFromDB(): void
saveImage(ByRef BitmapImage: Bitmap): void
start(): void
translateBooleanToString(InputValue: Boolean): String
translateStringToBoolean(InputValue: String): Boolean

Programming Language

Availability

Constructors

Since all data and functions of this class are meant to be global, they are all declared static (=shared). Hence, no constructor is available.

Interfaces

The class does not implement any interfaces.

Enumerations

The class does not provide enumerations.

Properties

Public Shared Property ActiveGroup as ActiveGroup

Gets or sets the presently selected group or subgroup of patients in the CyDAS application.

Property Value

Remarks

Public Shared ReadOnly Property ActiveGroupTableName as String

Gets the name of the database table for the ActiveGroup for this session.

Property Value

Remarks

Public Shared Property FilterAnalysis as Hashtable

Gets or sets the general paramters for data analysis.

Property Value

Remarks

Public Shared Property FilterMining as Hashtable

Gets or sets the general parameters for data mining.

Property Value

Remarks

Public Shared Property Icon as Icon

Gets or sets the default icon for the windows of the CyDAS application.

Property Value

Remarks

Methods

When accessing any of the functions below, a call to the private function init(see also start()) is made in order to ensure the correct initialisation of all values.

Public Shared Sub closeAllForms()

Closes all forms pertaining to the presently active group.

Return Value

Parameters

Remarks

Private Shared Sub DependentForm_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs)

This function handles the Form_Closing event of dependent forms. It removes the closing form from the collection of dependent forms.

Return Value

Parameters

Remarks

Public Shared Function formatDate(ByRef InputDate As Date) As String

Formats a date into a string in "YYYYMMDD" format.

Return Value

Parameters

Remarks

Public Shared Function formatDate(ByVal InputDate As String) As Date

Instantiates a date object from a string representation of the date.

Return Value

Parameters

Remarks

Public Shared Function getColorFromDialog(ByRef DefaultColor As Color) As Color

Opens a standard windows color dialog and retrieves the user selection from it.

Return Value

Parameters

Remarks

Public Shared Function getDatabaseConnection() As IDbConnection

Establishes a new database connection and returns it.

Return Value

Parameters

Remarks

Public Shared Function getDatabaseEngine() As String

Returns the name of the database engine as stated in the CyDAS.ini file.

Return Value

Parameters

Remarks

Public Shared Function getDeletionWildCard() As String

Returns the wild card character to be used in an SQL DELETE statement.

Return Value

Parameters

Remarks

Public Shared Function getGeneralWildCard() As String

Returns the wild card character to be used in an SQL LIKE statement for a non-defined number of characters.

Return Value

Parameters

Remarks

Public Shared Function getImportFilter(ByVal Name As String) As ImportFilterData

Returns an ImportFilterData object representing the import filter given by Name.

Return Value

Parameters

Remarks

Public Shared Function getImportFilterNames() As String()

Returns a string array with the names of all available import filters.

Return Value

Parameters

Remarks

Public Shared Function getNextInsertID(ByVal Table As String) As Integer

CyDAS database tables use an integer number as an internal data row identifier; it is always named "ID". With this function, the next higher value for such an ID can be retrieved.

Return Value

Parameters

Remarks

Public Shared Function getQuotes() As String

Returns the quotation marks to be used with the current database engine.

Return Value

Parameters

Remarks

Public Shared Sub getSharedDatabaseConnection(ByRef con As IDbConnection)

Returns a reference to the database connection which is established during start up.

Return Value

Parameters

Remarks

Known Problems

Public Shared Function getSystemGroupNewName() As String

Returns the name of the system group "New".

Return Value

Parameters

Remarks

Public Shared Function getSystemGroupNewID() As Integer

Returns the internal number of the system group "New".

Return Value

Parameters

Remarks

Public Shared Sub handleException(ByRef exc As Exception)

This function is generally used to handle exceptions caught by a Try ... Catch() clause in the CyDAS application. It displays the descriptions of the exception (Exception.Message) followed by the Stack Trace (Exception.StackTrace) in a message box to the user. If an Inner Exception is present, these items of information are also displayed for the inner exception(s) recursively.

Return Value

Parameters

Remarks

To do

Public Shared Sub handleForm(ByRef DependentForm As Form)

When the acxtive group is changed or closed, all analysis and mining windows associated with the previously active group must be closed. This function stores all those windows in a collection and adds appropriate event handlers to them.

Return Value

Parameters

Remarks

Public Shared Function quoteString(ByVal input As String) As String

Replaces quotation marks by a neutral character.

When data containing quotes have to be stored in the database, these quotation marks would destroy the SQL query. Hence they are replaced by a neutral character (upto now hard-coded: "|").

Return Value

Parameters

Remarks

Public Shared Function unquoteString(ByVal input As String) As String

Re-introduces quotation marks into a string whose quotation marks had been replaced by a replacement character.

When data containing quotes have to be stored in the database, these quotation marks would destroy the SQL query. Hence they are replaced by a neutral character (upto now hard-coded: "|").

Return Value

Parameters

Remarks

Public Shared Sub removeActiveGroupTableFromDB()

Removes the temporary table for the ActiveGroup from the database.

Return Value

Parameters

Remarks

Public Shared Sub saveImage(ByRef BitmapImage As Bitmap)

The function saves a bitmap into a disk file. A standard windows "save as" dialog is used for determining the file name.

Return Value

Parameters

Remarks

Public Shared Sub start()

Causes the initialisation of the variables of the class.

The initialisation is delegated to the private function init(). It checks if initialisation has already been performed. Then it sets up the collections for the import filters and the dependent forms, and reads the configuration file and the import filters. There after, the shared database connection is established and opened.

Return Value

Parameters

Remarks

Friend Shared Function translateBooleanToString(ByVal InputValue As Boolean) As String

Translates a boolean value into a string ("Y" / "N").

Return Value

Parameters

Remarks

Friend Shared Function translateStringToBoolean(ByVal InputValue As String) As Boolean

Translates a string ("Y" / "N") into a boolean value.

Return Value

Parameters

Remarks