Click or drag to resize
* Data Dictionary

[This is preliminary documentation and is subject to change.]

The Data Dictionary contains metadata about the dynamic data model, i.e. the part of the data model that is defined by The Structure File and forms designed by the configurator.

Contents of the Data Dictionary

The Data Dictionary contains data on the following:

  • All fields defined in all input forms, and some internal fields generated automatically (e.g. "foreign keys").

    • Note that a given field (identified by name) may be used in more than one table.

    • Some field types define enumeration values (e.g. dropdown, list, group or table of radiobuttons). For fields of these types, the Data Dictionary contains the list of enumerations value and associated texts.

  • All dynamically generated tables.

    • The root table (currently the root table is always "Patient") is stored in the Data Dictionary, too - but only for the purpose of defining relations.

  • The relationship between tables and fields.

  • The relationship between tables (1:1 or 1:N relations).

  • Computations per table (see Computation Reference) - used for:

Data Dictionary commands

In the main menu of the web application there is an item "Configuration" with a sub-item "Data Dictionary". Activating this sub-item displays a sub-menu (tabstrip) with the following commands:

  • View (browse) the Data Dictionary.

    • The left pane displays the dynamic data structure as a tree (more or less as defined in The Structure File).

    • Each node in this tree corresponds to one table in the Data Dictionary. Clicking a node opens a page that shows information on the table in the right pane.

  • Print the Data Dictionary.

    • All information in the Data Dictionary is displayed in one page to make it possible to print the contents (or export to some other system).

  • Update the Data Dictionary (see below).

  • Delete the Data Dictionary.

  • Log

    • Each run of the Create/update Data Dictionary generates a set of log files, that are stored in separete folders having time stamps as folder names).

  • Webservices

Updating the Data Dictionary

Changes to The Structure File, ALWAYS require updating the Data Dictionary - otherwise the performed changes will not have any effect.

Some, not all, changes to form templates will also require updating the Data Dictionary.

  • Changes that adds or removes fields, or change field type, etc. will require updating the Data Dictionary - otherwise errors may occur when trying to save data entered in dynamic forms.

    Tip Tip

    Edited form templates (with changes to fields) may be tested in CREATE MODE. Attempting to save data entered in such forms will generate errors.

  • Changes to form templates that only change sequence of fields, location in form, layout, styling, JavaScript, etc. will NOT require updating the Data Dictionary.

Updating the Data Dictionary involves:

  • The system constructs a new Data Dictionary in memory, and compares it to the Data Dictionary stored in the database. The detected differences are converted to SQL DDL commands (CREATE TABLE, DROP TABLE, ALTER TABLE, etc.)

  • Caution note Caution

    It is imperative, that you know what you are doing in this process. If you for example remove a form from the structure file, the corresponding database table will be DROPPED from the database, dicarding any data stored in that table (without the possibility for undoing)!

  • To help the configurator check (and double check!) that data is not unintentionally dicarded, the command to update the Data Dictionary may be run in test mode. This mode displays debug output that shows which modifications will be done to the database without actually performing these changes. Updating the Data Dictionary should always be done in test mode first, and the output analysed. If this output shows the expected changes, then the update may be run again with test mode turned off. Naturally this is especially important when updating Data Dictionary in applications that run in production mode.

  • Each run of the Create/Update Data Dictionary generates a set of log files (the files from each run in stored in a separte folder). Thies log files contain more information thatn the ouput that is automatically displayed after updating Data Dictionary. When in doubt, consult these log files (thery are accessible from the web user interface).

  • If the update is not run in test mode, the generated DDL is executed (updating the database table structure), and the contents of the Data Dictionary (the metadata) is updated to reflect the new updated data structure in the database.