General

Download

Overview
Project History
People

Use Cases Scenarios
Use Case Requirements
Bugs and Known Limitations
LHA

User Manuals Getting Started
General Tour
Configuration Options
Logging Tool Tour
Administration Tool Tour

Developers Architecture
Analysis of Design
Creating Plugins
Future Enhancements

Model Driven Aspects of Development

CST uses a configuration file to generate the generic features of both the Administration Tool and the Logging Tool. Configuration properties are described under different sections of the file, each of which is used to generate different parts of the application:
Configuration Section Description Area of Software Generation
general properties describes general project information such as the title, and contact details of the authors who configured CST for the use case
  • used to help generate titles for the Administration and Logging Tools.
  • Also used to generate the help page that appears when users press the "Help" options in the Help menu.
database properties includes details about ports and servers that are needed to generate the database. used to generate names of certain tables in the MySQL database and to create database connections.
tracked object properties describes the primary key used to describe subjects and various subject attributes which are used in filtering but which are not curated.
  • Used to generate the main subjects table in the MySQL database. The primary key field in this section is identical in all the activity tables that are generated.
  • Definitions of subject attributes are also used to support filtering operations in the Logging Tool.
  • Also used to create dialogs used to import subject attribute data.
activity properties describes activities and activity steps used to generate the activity forms in the tabbed pane of the Logging Tool. Also used to generate some of the filter options in the Filters menu and in the dialogs used to import activity data.
plugin properties describes properties of plugins used to do tasks in the Logging Tool such as importing and exporting data, retrieving additional information about subjects and generating reports used to generate the menu items in the Database, Options and Reports menus of the Logging Tool.
Specific properties are described in the section Configuration Options. At runtime, ConfigurationManager reads the configuration file. The settings are used to produce a template TrialSubjectModel which is used by TrialSubjectModelFactory to generate blank instances of subject and activity records. The template record serves two purposes: to hold data and to hold property data which can be used to support most of the model-driven software generation activities.

The following sections describe in more detail how the configuration data are used to create most of the software.

Model Driven Development in the Business Concepts Layer

CST uses two generic data structures whose properties are derived from the configuration file. Study subjects are described by TrialSubjectModel. TrialActivityModel is used to describe activities. The attributes of these classes are defined in the configuration file. See section Properties of tracked_object_properties tag to find out more about the tags used to define subject attributes in TrialSubjectModel. See section Properties of form tag to see the properties used to generate definitions of each TrialActivityModel used to represent an activity in the clinical study.

To better understand the relationships between form properties and properties in TrialSubjectModel and TrialActivityModel, it is useful to review these topics:

Model Driven Development in the Presentation Layer

There are three examples in the Logging Tool of where settings in the configuration file are used to generate the user interface:

Settings in the configuration file are used to generate many aspects of the main forms. Figure MDD-1 shows how general information properties are used to label the dialog titles and generate the Help file that can be accessed via the Help Menu of the Logging Tool.

Fig. MDD-1 - Generating dialog titles and the help file. The project_title attribute is used in the the title of both the Administration Tool and the Logging Tool. Most of the other general information attributes are used to generate a Help file.

The next figure shows how form properties are used to generate tabbed panes in the main display of the Logging Tool. The display_name form attribute provides the titles of the tabbed panes. The order form tag determines the order in which the tabbed panes appear.

Fig. MDD-2 - Generating the main activity forms. Form properties help name and order the tabbed panes. Field properties help name and order the activity steps on each form.

CST generates the main display of tabbed panes in the Logging Tool by introspecting on activities that are part of the currently displayed TrialSubjectModel record. A TrialActivityView. is created for each of the TrialSubjectModel's TrialActivityModels. Each view introspects properties of its model object in order to generate a sequence of DateFieldView displays to create the main part of the form. A CommentFieldView is created to match the comments member of a TrialActivityModel.

Figure MDD-3 shows how properties of the database_properties are used to help define the lower and upper limit of choices the users can select in the spinners of form date fields. Note that in future, these parameters will probably be moved into a more appropriate section such as general_properties.

Fig. MDD-4 - Supporting guided data entry in date fields. The start and end dates of the study are used to help constrain the choices a user has to fill in a legal date value. on each form.

The configuration file settings are also used to control the appearance of menu items. Figure MDD-5 shows how subject attribute definitions are used to present corresponding filters in the Filters Menu of the Logging Tool.

Fig. MDD-6 - Generating subject attribute filters. Here, the subject attribute "Location" appears as a menu choice in the Filters menu. The Location menu has its own sub-menu comprising unique attribute values taken from the collection of subject records.

Date filters are also generated by the configuration file. Figure MDD-7 shows how definitions of activities and activity steps are used to make cascading menu choices.

Fig. MDD-7 - Generating date filters. The Filter Menu of the Logging Tool contains a sub-menu for each activity which in turn comprises filters for each activity step. Users can further specify whether the filter should accept completed dates, blank dates, or values that fall between two dates for a given step.

The configuration file also specifies where plugins appear in the Logging Tool. Plugins with the tag import_export_plugin appear in the Database menu. subject_information_plugin plugins appear in the Options Menu and report_plugin plugins appear in the Reports menu. Fig. MDD-8 shows an example of this:

Fig. MDD-8 - Generating menu items for plugins. Plugins defined in the configuration file are triggered by choices that appear in the Dataabase, Options or Reports menus of the Logging Tool.

Model Driven Development in the Data Persistence Layer

CST uses the configuration file to generate databases for both the demonstration and production version of services. The in-memory database used by demonstration services simply manages a collection of business objects (see the first section of this topic).

The software uses a number of configuration settings to generate the MySQL database. The database_properties section of the configuration file lets project members customise the names of core database tables needed by CST. It also contains properties which help define the length in characters of certain text fields. Fig. MDD-9 shows how these properties are expressed in the database that is generated by the software.

Fig. MDD-9 - Generating the core tables in CST. Properties of the configuration file are used to name the subject table, the trial activity changes table and the user table. Other properties define the length of text fields in the database.

Most of the fields in the subject table are generated using definitions of subject attributes which appear in the configuration file. Fig. MDD-10 shows how the data_storage_name tag of a subject attribute is used to produce a database field with the same name.

Fig. MDD-10 - Generating fields in the subject table. Definitions of subject attributes which appear in the configuration file are used to generate fields in the subject table.

Each activity defined in the configuration file corresponds to a table in the database. The data_storage_name property of each form tag is used to name an activity table. Activity step definitions are used to generate the columns of each activity table. Fig. MDD-11 shows how activity and activity step definitions are expressed in the database.

Fig. MDD-11 - Generating activity tables. Definitions of activities and activity steps in the configuration file are used to generate activity tables in the database.

The subject and activity tables are all linked through the use of a common primary key field which is defined in the tracked_object_properties section of the configuration file. Fig. MDD-12 illustrates how the key attribute is used to generate a database having a star schema.

Fig. MDD-12 - Linking subject and activities together through a shared key. The primary_key_attribute tag in the configuration file defines the primary key used by the subject and activity tables. When the subject and activities tables are generated, CST automatically creates database indices for all the primary key fields.

Author: Kevin Garwood


(c)2010 Medical Research Council. Licensed under Apache 2.0.