TOPICA Basic and Context |
[This is preliminary documentation and is subject to change.]
In TOPICA Basic, global variables are used to give information on context.
The context types described in context (needed for configuring reports etc.) are reflected in the below global variables:
Context | OrgUnit | Employee | Patient | Record |
---|---|---|---|---|
System context (= no object in context) | null | null | null | null |
Organizational unit | <> null | null | null | null |
Employee / user | null | <> null | null | null |
Patient | null | null | <> null | null |
Record | null | null | <> null | <> null |
When configuring form templates, these global variables should be used:
Patient will always set set (Patient <> null).
Record is used to differentiate between "create mode" and "edit mode":
"Create mode":
Record = null
Table <> null (refers to the table, the new record will be created in)
When the new record is created directly "below" the patient, ParentRecord=null.
Otherwise, ParentRecord refers to the "parent" record, the new record will created below.
"Edit mode" (or rather: all modes that are NOT "create" mode - including "read only" mode).
Record <> null
Table = null
ParentRecord = null
The contents of the structure file controls the behavior of the patient record tree, both in terms of "look & feel" and in terms of security.
When configuring the structure file, these global variables should be used:
Patient will always set set (Patient <> null).
Record is used to differentiate between "open nodes" and "edit mode":
"Create nodes":
Record = null
Table <> null (refers to the table, the new record will be created in)
When the new record is created directly "below" the patient, ParentRecord=null.
Otherwise, ParentRecord refers to the "parent" record, the new record will created below.
"Open nodes":
Record <> null
Table = null
ParentRecord = null
"Group nodes" (1:N relations, where DisplayAtTop = true):
Record <> null
Table <> null
When the gropu is directly "below" the patient, ParentRecord=null.
Otherwise, ParentRecord refers to the "parent" record of the group.
When configuring validation rules (and ONLY in this case), the following global variables should be used:
Patient will always set set (Patient <> null).
Form will be set (Form <> null). It is used to access values entered in form fields (by the user). These values are NOT stored in the database yet. This is important, because the whole idea of validating form input is to be able to STOP updating of the database, if certain validation rules fail.
FormItem will be set (FormItem <> null). It refers to the item (e.g. field) being validated.