OrgUnitPicker Reference |
[This is preliminary documentation and is subject to change.]
An OrgUnitPicker element is used to select a single OrgUnit. The key values of the selected OrgUnit are saved in fields that are automatically generated in the form.
Note |
---|
Most field types generate 1 database field (named after the DataName property. OrgUnitPicker is special - it generates 2 fields in the database table (one field with field name suffix _TYPE and one field with field name suffix _CODE). |
Each OrgUnitPicker element may be configured as dropdown or floating/popup window. These modes have very different set of configurations possibilites, and they generate very different user interface for the end user. Chosing between these modes is the first (and most important) decision to make when configuring an OrgUnitPicker.
This page only describes the properties specific for OrgUnitPicker. These propeties are grouped on the "OrgUnitPicker" tab in the form editor. Several propeties are inherited from base classes. The inherited properties are described elsewhere (TODO!).
See OrgUnitPicker for comments extracted from the source code.
Field | Type | Description | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Mode | PickerMode enumeration |
| |||||||||||
InputField | Boolean | Default value is false, which results in that the input field is not shown, and the user cannot key in anything. When set to true, an input field is displayed, allowing the user to key-in (part of) key for an organizational unit.
When user types in a key of an existing OrgUnit, the corresponding dropdown or read-only text field is automatically updated accordingly. The other way around - when user selects an ORgUnit using dropdon ro popup window, the input field is automatically updated.
The end user needs to specify the key of the requested OrgUnit. How this is done depends on property TypeFilter:
| |||||||||||
TypeFilter | String | Specifies the organizational unit type used to filter the list of selectable OrgUnits. |
Field | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
PopUpMode | PopUpMode enumeration |
| ||||||||||||
Search | Boolean | Default value is false. Note however, that if Tree is false, the default behavior is like when Search is true! When set to true, a search form is displayed in the popup window. In this search form the end user may enter search criterias for OrgUnits: type, code and/or name. When clicking the "Search" button, the found OrgUnits are diosplayed in a grid with paging. | ||||||||||||
Tree | Boolean | Default value is false. When set to true, a tree view (hierarchical organization structure) is displayed. In this tree the end user may expand/collapse branches and ultimately select one OrgUnit. |
Search and Tree are not mutually exclusive:
If both Search and Tree are false, the search form is displayed.
If both Search and Tree are true, both the search form and the tree view are displayed - in separate tabs.
As described above, when using dropdown mode it is the configurators's responsibility to make sure, that the OrgUnitPicker does not contain too many OrgUnits.
The properties in this table are used to limit the list of Selectable OrgUnits in the dropdown.
These propeties may also be used to define some "business logic". For example to configure that the end user should only be able to select department on a the "current" hospital, and/or only departments having some specific functions or clinical specialties.
One useful pattern for using these properties are:
Establish a "starting point" (an OrgUnit in the hierarchy) from the context. Use property OrgUnitSelection to define this.
Optionally move from the "starting point" to the "root" (an OrgUnit specifying the subset of the organization hierarchy to search in). Per default the "root" is the same as the "starting point". Use property TypeAncestor to specifiy the "root" as an OrgUnit "above" the "starting point".
Set property Descendants=true to populate the dropdown with OrgUnits "below" the "root".
Optionally set property TypeFilter to limit the selectable OrgUnits to a specific type.
Optionally set property FunctionFilter to limit the selectable OrgUnits to those having a specific function (e.g. medical specialty).
Field | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
OrgUnitSelection | OrgUnitSelection enumeration | This property specifies how to determine the "starting point" in the organizational hierarchy. The "starting point" may be determine from various information in the context.
| ||||||||||||||||||||||||
Ancestors | Boolean | Default value is false. When set to true, all ancestor organizational units from the so called "starting point" and upwards in the hierachy are selectable in the OrgUnitPicker. This is very rarely used. | ||||||||||||||||||||||||
Descendants | Boolean | Default value is false. When set to true, all descendants organizational units from the so called "starting point" and downwards in the hierarchy (optionally filtered by TypeFilter and/or FunctionFilter) are selectable in the OrgUnitPicker. When both Ancestors and Descendants are false, the effect is, that the end user may select only ONE OrgUnit in the dropdown (the "root"). This is not very useful. So in most situations, Descendants should be true on OrgUnitPicker elements dropdown mode. The "root" is called the "root" for a reason - it normally defines the common rot of all the OrgUnits selectable in the OrgUnitPicker, and this obviously requires, that Descendants should be set to true. | ||||||||||||||||||||||||
IncludeRoot | Boolean | Default value is false. When set to true, the so called "starting point" is selectable in the OrgUnitPicker. Example:
| ||||||||||||||||||||||||
TypeAncestor | String | Used only when OrgUnitSelection is DataOwnerAncestor or PatientOrgUnitAncestor Specifies the organizational unit type used to find the "root" ancestor (relative to the "starting point"). I.e.:
| ||||||||||||||||||||||||
FunctionFilter | String | Specifies the organizational function code used to filter the list of selectable OrgUnits. | ||||||||||||||||||||||||
ShowCurrent | Boolean | Default value is false, which results in no extra display of the current value. When set to true, the currently selected OrgUnit is displayed in the form (beside the dropdown). |