Click or drag to resize
Status Closed

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

Records (= form instances) may have a status "closed". The purpose of status "closed" is to "lock" the record for editing by the end user. So obviously this has an effect on the security.

This topic contains the following sections.

Closable property

The structure file is constructed by a number of StructureElement items. Each StructureElement generates one table in the Dynamic Data Structure.

StructureElement has a property Closable. The value of this property gets stored in the corresponding Data Dictionary table. When Closable is set to true on a table, records in the corresponding table are "closable".

All tables in the dynamic data structure have a column STATUS_CLOSED (type: BIT). That a record has status "closed" means that the record has STATUS_CLOSED=1 in the database.

Tip Tip

"Closed" records are displayed in a special way in the patient record tree - a special background color on the date part of the node. Per default, closed records are displayed with red background on the date part. This color is configurable - so it might be different in some applications.

FormEditLockHours

FormEditLockHours is a .config file parameter, that has an important effect on how "closed" records behave.

The function of FormEditLockHours is to add a "delay" to the time the record actually was closed until it gets locked for editing by end users. Example:

  • A record is closed at 10:00 (status is set to "closed"), and FormEditLockHours has the value 2.

  • Result: the end user may continue to edit the record (and any child records below) until 11:59. At 12:00, editing is not possible any more.

Note Note

The default value of FormEditLockHours (in Web.config) is empty. When FormEditLockHours is empty, the behavior of "closed" records depends on the framework version (a backward incompatibility has been introduced - unintentionally):

  • In older versions of the TOPICA framework:

    • When a record has status "closed", the record and any child records are NOT editable.

  • In newer versions of the TOPICA framework:

    • When a record has status "closed", and FormEditLockHours is empty, the record and any child records are editable.

    • When a record has status "closed", and FormEditLockHours is NOT empty, the record and any child records are NOTE editable (after the specified number of hours).

    • To get same behavior as in older versions, set FormEditLockHours=0 (in Application.config).

ClosedLockHours

ClosedLockHours is a .config file parameter, that has another impact on security.

The function of ClosedLockHours is to compute a "virtual" status "closed", to lock records for editing by end users automatically after the specified number of hours. Example:

  • FormEditLockHours has the value 12.

  • A record is created at 09:00.

  • The record is updated at 10:00.

  • Any end user may update the record within the next 12 hours, e.g. until 21:59.

  • If no user updates the record in the meantime, at 22:00 editing is not possible any more.

Note Note

The status "closed" is never set on the record in the database with this mechanism (e.g. column STATUS_CLOSED is NOT set in the database). This is why it is called that the record is "virtually" closed.

If it is desired to have status "closed" updated in the database, it is necessary to create a scheduled job, that sets status "closed" on records, that have not been updated within the number of hours specified by ClosedLockHours. Such a job is NOT part of the framework.