Class Active Group

The Active Group provides information on the presently selected group or subgroup of patients in the CyDAS application. Only one instance of it is present throughout the application (but this behavior is not fully enforced by the ActiveGroup class).

On the database, the active group is represented by a (temporary) table which contains the patient identifiers only. The table name is retrieved from the ConfigData class via the ConfigData.ActiveGroupTableName property in order to maintain one table for one whole session and thus to provide simulatenous multi-user functionality.

Overview

ActiveGroup
New()
GroupID(): Integer {read-only}
GroupName(): String {read-only}
SubGroupID(): Integer {read-only}
SubGroupName(): String {read-only}
addPatient(PatientID: Integer): void
addPatients(PatientIDs: Integer())
calculateKaryotypesAndCGHCollections(): void
copyFrom(GroupID: Integer, SubGroupID: Integer): ActiveGroup {static}
getKaryotypesAndCGHCollections(ByRef oKarCol: KaryotypesCollection, ByRef oCGHCol: CGHCollection): void
getPatients(Optional LoadInvestigations: Boolean = True, Optional LoadKaryotypes: Boolean = True): PatientElements
getPatientIDs(): Integer()
removePatient(PatientID: Integer): void
removePatients(): void

Programming Language

  • Microsoft Visual Basic .Net.

Availability

Constructors

Private Sub New()

Instantiates a new ActiveGroup object.

This constructor is private. The instantiation of an ActiveGroup object is to be done via the copyFrom() function which returns an ActiveGroup object.

Interfaces

The class does not implement any interfaces.

Enumerations

The class does not provide enumerations.

Properties

ReadOnly GroupID As Integer

Gets the internal group identifier of the patient group connected with the ActiveGroup.

Property Value

  • the internal group identifier of the patient group.

Remarks

  • The property is read-only. It is set during initialisation with the copyFrom() function.

ReadOnly GroupName As String

Gets the short name of the patient group connected with the ActiveGroup.

Property Value

  • the short name of the patient group

Remarks

  • The property is read-only. It is set during initialisation with the copyFrom() function or via the friend setGroupName() function.

ReadOnly SubGroupID As Integer

Gets the internal sub group identifier of the patient subgroup connected with the ActiveGroup.

Property Value

  • the internal subgroup identifier of the patient subgroup.
  • "0", if a group but not a subgroup is selected.

Remarks

  • The property is read-only. It is set during initialisation with the copyFrom() function.

ReadOnly SubGroupName As String

Gets the short name of the patient subgroup connected with the ActiveGroup.

Property Value

  • the short name of the patient subgroup.
  • An empty string, if a group but not a subgroup is selected.

Remarks

  • The property is read-only. It is set during initialisation with the copyFrom() function or via the friend setSubGroupName() function.

Methods

Public Sub addPatient(ByVal PatientID As Integer)

Adds the patient identified by PatientID to the underlying group or subgroup.

Return Value

  • None.

Parameters

  • PatientID: the identifier of the patient to be added to the underlying group or subgroup.

Remarks

  • The patient is added to the underlying group or subgroup, not to the active group proper. The active group is just invalidated and requires a new instantiation.

Public Sub addPatients(PatientIDs As Integer())

Adds the patients identified by PatientIDs to the underlying group or subgroup.

Return Value

  • None.

Parameters

  • PatientIDs: an array with the identifiers of the patients to be added to the underlying group or subgroup.

Remarks

  • The patients are added to the underlying group or subgroup, not to the active group proper. The active group is just invalidated and requires a new instantiation.

Friend Sub calculateKaryotypesAndCGHCollections()

Loads the karyotype and CGH data for the patients of the active group.

Return Value

  • None.

Parameters

  • None.

Remarks

  • Karyotypes and CGH data are not analysed immediately. Rather, analysis is started later when Karyotypes.analyseAll() or  CGHs.isValid() are invoked e.g. during the preparation of the data for mining.

Public Shared Function copyFrom(ByVal GroupID As Integer, ByVal SubGroupID As Integer) As ActiveGroup

A new ActiveGroup object is established and filled with the data of the patients from the group or subgroup indicated.

This function is actually the constructor to be used.

Return Value

  • an ActiveGroup object for the specified group or subgroup.

Parameters

  • GroupID: the internal identifier of the group the patients have to be loaded from.
  • SubGroupID: the internal identifier of the subgroup the patients have to be loaded from; if the patients are to be loaded from a group only instead of a subgroup, the value is set to "0"..

Remarks

  • This function is actually the constructor to be used.
  • The function retrieves the database table name from ConfigData.ActiveGroupTableName.
  • The database table is cleared first. Then the identifiers of the patients are copied into this table. Finally, it is loaded.
  • Investigations, karyotypes, CGH data are not yet loaded. That is done on later request, e.g. by  getPatients() or getKaryotypesAndCGHCollections().

Public Sub getKaryotypesAndCGHCollections(ByRef oKarCol As KaryotypesCollection, ByRef oCGHCol As CGHCollection)

Returns the karyotype and CGH data.

Return Value

  • there is no proper return value. Instead, the collections passed by reference are changed to the resulting values.

Parameters

  • oKaryoCol: the collection of ISCN cases.
  • oCGHCol: the collection of CGH cases.

Remarks

  • For reasons of performance, the return values are given as parameters passed by reference.
  • The data are calculated only once; on later requests, the previous result is returned.
  • Internally, the function passes on to calculateKaryotypesAndCGHCollections().

Public Function getPatientIDs() As Integer()

Returns the internal identifiers of the patients.

Return Value

  • an array with the internal identifiers of the patients.

Parameters

  • None.

Remarks

  • The array is calculated during the initialisation process in copyFrom().

Public Function getPatients(Optional ByVal LoadInvestigations As Boolean = True, Optional ByVal LoadKaryotypes As Boolean = True) As PatientElements

Returns the patient data for the active group. Investigations and karyotypes / CGH data of the patients can be loaded optionally.

Return Value

  • a PatientElements object containing the patient data of the active group.

Parameters

  • LoadInvestigations: indicates if the patients' investigations (examinations) are to be loaded too; by default true.
  • LoadKaryotypes: indicates if the patients' karyotype and CGH data are to be loaded too; by default true.

Remarks

  • Karyotype and CGH data are not loaded when no investigations are loaded.
  • The PatientElements is calculated only once. When requested a second time, the previous result will be returned, regardless of differring values of the optional parameters.
  • The function passes on to PatientElements.load().
  • Each investigation is regarded as a case of its own.

Public Sub removePatient(ByVal PatientID As Integer)

Removes a patient from the underlying group or subgroup.

Return Value

  • None.

Parameters

  • PatientID: the internal identifier of the patient to be removed.

Remarks

  • The patient is removed from the underlying group or subgroup, not to the active group proper. The active group is just invalidated and requires a new instantiation.

Public Sub removePatients()

Removes all patients from the underlying group or subgroup.

Return Value

  • None.

Parameters

  • None.

Remarks

  • All patients are removed from the underlying group or subgroup, not to the active group proper. The active group is just invalidated and requires a new instantiation.