Phrases |
Overview |
|
|
Phrases allow you to predefine commonly used textual phrases for ease of entry when filling in supported form fields. A shortcut code (cnd = Could Not Deliver) or a suggestion type approach (type-ahead) can be used to quickly select from a set of available Phrases that match the value typed.
To organize Phrases into related groups, you can define a Reference Value for the "Phrase Type" Reference Type. For example, to group commonly used Phrases when processing Arrays, you might create a Reference Value called "Array Phrases", and create several Array-related Phrases under this.
Phrases are added and maintained on the Phrase List page (Lab Admin → Tests → Phrases).
![]() |
Adding Phrases |
|
|
Clicking "Add" opens the Phrase Maintenance page.
![]() |
Field | Description |
Phrase | Automatically generated identifier for the Phrase. |
Description | Description of the Phrase. |
Phrase Short Cut | Shortcut for the Phrase. When the shortcut is entered, the matching Phrase is displayed. |
Type | Although this is labeled "Type", this is actually a Reference Value defined for the "Phrase Type" Reference Type. For example, the "Phrase Type" Reference Type can define Reference Values of "Test Phrases", "SOP Phrases", and "Audit Phrases". Each of these Reference Values is referred to as a "Type" on the Phrases form, and you can define multiple Phrases for each. |
Text | Text of the Phrase. |
Rich Text Phrase | When this is not checked, text is rendered
in the "Text" field as plain text. Checking this opens the Formatted
Text Editor for Phrases, copies any plain text you have entered into
the Formatted Text Editor (and allows you to continue using the Formatted
Text Editor), and enables (checks) the "Generate Plain Text Automatically"
option (below).
The Phrase List page contains a column that shows if the Phrase has a formatted text version. |
Generate Plain Text Automatically | When checked, the "Text" (plain text) field is disabled and plain text is automatically generated based on the formatted text as you type. The plain text (a text-only version of the formatted text) will be used for searching and in places outside of the Formatted Text Editor. If the formatted text is too long in the plain text version, the first 4000 characters are taken and a warning is shown beside the checkbox to indicate that the plain text phrase has been cut. |
Use in Notes and Attachments |
|
|
The "Suggestion Phrase Type" property in the sdinotes Element lets you associate a set of specific Phrases with Notes.
The "Phrases For Rich Text" property in the Attachment Policy lets you associate a set of specific Phrases with Attachments.
Use in Maintenance Pages |
|
|
To make Phrases available using the "Dynamic Lookup" property in the maint and sdclinkmaint element do the following:
1. | Configure four lookup columns, with columnid(mode) as phraseid(Hidden Only), phrasedesc(Hidden Only), phrasetext(Display and Return), phraseshortcut( ). |
2. | Give phrasetext a wider display, 400 or more to allow user friendly display of longer phrases. Text is wrapped if it does not fit in the defined width. |
3. | Configure appropriate restrictive where clause such as phrasetype='ExamplePhraseType'. |
To use phrases for any input or textarea field, a dynamic lookup JavaScript method showPhraseSuggestion( phrasetype ) is provided. It should be triggered by onkeyup event:
Below is the resulting lookup. Both phrasetext and phraseshortcut are searched. If matches are for phraseshortcut, the phraseshortcut will be replaced with the phrasetext on selection. Note that entering "m" finds the shortcut "my", which shows the entire text of the Phrase.