Dictionary Modes
Dictionaries are created via CO > Configuration > Dictionaries. Dictionaries can operate in several Modes:
- Department: The Dictionary is automatically constructed from the Department Registry, using the object id and name as entries in the Dictionary.
- Organization: The Dictionary is automatically constructed from the Organization Registry, using the object id and name as entries in the Dictionary.
- Standard: Standard Dictionaries use Dictionary Entries, described below.
Dictionary Entries
Entries can be added manually, using a pre-defined list, or by uploading a file of entries.
Dictionary Entries consist of the following components:
- Value: The entry, as a human-readable text string. The only required field.
- Code: A code representing the entry. The use is context-specific, but may (for example) be used in constructing IDs for HTML Select lists.
- Order: An integer representing the order of the entry within the Dictionary. The use is context-specific, but may (for example) be used to bubble specific entries to the top of the Dictionary list.
Pre-Defined Standard Dictionaries
Some Pre-Defined Standard Dictionaries are available out of the box:
- Coded Passport Issuers: An English language list of Passport Issuing Authorities (as defined here and here) which also have an ISO-3166 Alpha-3 Country Code assigned. This Dictionary includes the Country Code in the Code field.
- Coded Passport Issuers 2: An English language list of Passport Issuing Authorities (as defined here and here) which also have an ISO-3166 Alpha-2 Country Code assigned. This Dictionary includes the Country Code in the Code field.
- Passport Issuers: An English language list of Passport Issuing Authorities (as defined here and here) which also have an ISO-3166 Alpha-3 Country Code assigned. Note this Dictionary does not include the Alpha-3 codes, they are only used for inclusion criteria.
- US States and Possessions: United States of America States and Possessions as defined by the US Postal Service.
- US States and Possessions with Postal Abbreviations: United States of America States and Possessions as defined by the US Postal Service. This Dictionary includes the State Codes in the Code field.
- US and Canada States and Provinces: United States of America States and Possessions as defined by the US Postal Service, and Canadian Provinces and Territories as defined by the Canadian Postal Service.
- US and Canada States and Provinces with Postal Abbreviations: United States of America States and Possessions as defined by the US Postal Service, and Canadian Provinces and Territories as defined by the Canadian Postal Service. This Dictionary includes the State and Province Codes in the Code field.
(Pre-Defined Dictionaries are distributed in the Lib/Dictionary
directory, and use the Dictionary File Format defined below.)
Standard Dictionary File Format
Registry Dictionary Files are JSON documents, consisting of an object with the following members:
description
: An optional string describing the Dictionary.format
: The Dictionary File Format definition used to construct the Dictionary. The current format is "v1
".source
: An optional string describing the source material for constructing the Dictionary.title
: A short title for the Dictionary, suitable for use in Select lists and other similar contexts.version
: A Dictionary-specific version number. Must be a valid JSON number.dictionary
: A JSON array consisting of zero or more objects, each of which may have the following members:code
: An optional code representing the entry.ordr
: An optional integer representing the order of the entry within the Dictionary. Note that, for compatibility with database reserved keywords, there is no e in ordr.value
: The value of the entry.
Example
Code Block |
---|
{ "format": "v1", "version": 1, "title": "USDA Egg Grades", "source": "https://www.ams.usda.gov/grades-standards/egg/grade-shields", "description": "Egg categories for consumer grades", "dictionary": [ { "code": "AA", "value": "The freshest and highest quality eggs (AA)", "ordr": 1 }, { "code": "A", "value": "Very high quality eggs (A)", "ordr": 2 }, { "code": "B", "value": "Eggs suitable for liquid and baking purposes (B)", "ordr": 3 }, ] } |
Info | ||||
---|---|---|---|---|
When uploading, a Dictionary File may replace all existing Dictionary Entries (if any), or merge into them. When merging, only the value field is examined – code and ordr are ignored. As an example, if this Dictionary Entry already exists:
and the following entry is uploaded:
on merge, the |
Info |
---|
A Dictionary with no entries is a valid file, and can be used to create an empty Dictionary (or empty an existing one). |
CSS Stylesheet |
---|
.home-banner { background: #ffffff; color: #d44415; font-size: 20px; padding: 20px; } .home-banner h1 { color: #5e2b97; font-size:2.5em; } .title-box { border: 0px solid #ff5b2d padding: 10px; padding-bottom: 30px; } .title-box > h2 { /*background: #5e2b97;*/ border-top: 3px solid #c2d6d6; bottom: 10px; /*color: #c2d6d6;*/ /*margin-left: -10px;*/ /*margin-right: -10px;*/ padding: 1em 0 0; position: relative; } .cfm-blog-image > img { display: block; margin-left: auto; margin-right: auto; } .lead > p { line-height: 2; font-size: 1.5em; } .about-box { border-top: 1px solid #c2d6d6; border-bottom: 2px solid #c2d6d6; padding: 10px; padding-top: 30px; padding-bottom: 30px; } .about-box > p { font-size: 0.9em; font-style: italic; } .about-box > h3 { font-size: 0.9em; } } |