001package org.hl7.fhir.r4.model.codesystems;
002
003/*
004  Copyright (c) 2011+, HL7, Inc.
005  All rights reserved.
006  
007  Redistribution and use in source and binary forms, with or without modification, 
008  are permitted provided that the following conditions are met:
009  
010   * Redistributions of source code must retain the above copyright notice, this 
011     list of conditions and the following disclaimer.
012   * Redistributions in binary form must reproduce the above copyright notice, 
013     this list of conditions and the following disclaimer in the documentation 
014     and/or other materials provided with the distribution.
015   * Neither the name of HL7 nor the names of its contributors may be used to 
016     endorse or promote products derived from this software without specific 
017     prior written permission.
018  
019  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
020  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
021  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
022  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
023  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
024  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
025  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
026  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
027  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
028  POSSIBILITY OF SUCH DAMAGE.
029  
030*/
031
032// Generated on Thu, Sep 13, 2018 09:04-0400 for FHIR v3.5.0
033
034
035import org.hl7.fhir.exceptions.FHIRException;
036
037public enum QuestionnaireItemControl {
038
039        /**
040         * UI controls relevant to organizing groups of questions
041         */
042        GROUP, 
043        /**
044         * Questions within the group should be listed sequentially
045         */
046        LIST, 
047        /**
048         * Questions within the group are rows in the table with possible answers as columns.  Used for 'choice' questions.
049         */
050        TABLE, 
051        /**
052         * Questions within the group are columns in the table with possible answers as rows.  Used for 'choice' questions.
053         */
054        HTABLE, 
055        /**
056         * Questions within the group are columns in the table with each group repetition as a row.  Used for single-answer questions.
057         */
058        GTABLE, 
059        /**
060         * This table has one row - for the question.  Permitted answers are columns.  Used for choice questions.
061         */
062        ATABLE, 
063        /**
064         * The group is to be continuously visible at the top of the questionnaire
065         */
066        HEADER, 
067        /**
068         * The group is to be continuously visible at the bottom of the questionnaire
069         */
070        FOOTER, 
071        /**
072         * UI controls relevant to rendering questionnaire text items
073         */
074        TEXT, 
075        /**
076         * Text is displayed as a paragraph in a sequential position between sibling items (default behavior)
077         */
078        INLINE, 
079        /**
080         * Text is displayed immediately below or within the answer-entry area of the containing question item (typically as a guide for what to enter)
081         */
082        PROMPT, 
083        /**
084         * Text is displayed adjacent (horizontally or vertically) to the answer space for the parent question, typically to indicate a unit of measure
085         */
086        UNIT, 
087        /**
088         * Text is displayed to the left of the set of answer choices or a scaling control for the parent question item to indicate the meaning of the 'lower' bound.  E.g. 'Strongly disagree'
089         */
090        LOWER, 
091        /**
092         * Text is displayed to the right of the set of answer choices or a scaling control for the parent question item to indicate the meaning of the 'upper' bound.  E.g. 'Strongly agree'
093         */
094        UPPER, 
095        /**
096         * Text is temporarily visible over top of an item if the mouse is positioned over top of the text for the containing item
097         */
098        FLYOVER, 
099        /**
100         * Text is displayed in a dialog box or similar control if invoked by pushing a button or some other UI-appropriate action to request 'help' for a question, group or the questionnaire as a whole (depending what the text is nested within)
101         */
102        HELP, 
103        /**
104         * UI controls relevant to capturing question data
105         */
106        QUESTION, 
107        /**
108         * A control which provides a list of potential matches based on text entered into a control.  Used for large choice sets where text-matching is an appropriate discovery mechanism.
109         */
110        AUTOCOMPLETE, 
111        /**
112         * A control where an item (or multiple items) can be selected from a list that is only displayed when the user is editing the field.
113         */
114        DROPDOWN, 
115        /**
116         * A control where choices are listed with a box beside them.  The box can be toggled to select or de-select a given choice.  Multiple selections may be possible.
117         */
118        CHECKBOX, 
119        /**
120         * A control where editing an item spawns a separate dialog box or screen permitting a user to navigate, filter or otherwise discover an appropriate match.  Useful for large choice sets where text matching is not an appropriate discovery mechanism.  Such screens must generally be tuned for the specific choice list structure.
121         */
122        LOOKUP, 
123        /**
124         * A control where choices are listed with a button beside them.  The button can be toggled to select or de-select a given choice.  Selecting one item deselects all others.
125         */
126        RADIOBUTTON, 
127        /**
128         * A control where an axis is displayed between the high and low values and the control can be visually manipulated to select a value anywhere on the axis.
129         */
130        SLIDER, 
131        /**
132         * A control where a list of numeric or other ordered values can be scrolled through via arrows.
133         */
134        SPINNER, 
135        /**
136         * A control where a user can type in their answer freely.
137         */
138        TEXTBOX, 
139        /**
140         * added to help the parsers
141         */
142        NULL;
143        public static QuestionnaireItemControl fromCode(String codeString) throws FHIRException {
144            if (codeString == null || "".equals(codeString))
145                return null;
146        if ("group".equals(codeString))
147          return GROUP;
148        if ("list".equals(codeString))
149          return LIST;
150        if ("table".equals(codeString))
151          return TABLE;
152        if ("htable".equals(codeString))
153          return HTABLE;
154        if ("gtable".equals(codeString))
155          return GTABLE;
156        if ("atable".equals(codeString))
157          return ATABLE;
158        if ("header".equals(codeString))
159          return HEADER;
160        if ("footer".equals(codeString))
161          return FOOTER;
162        if ("text".equals(codeString))
163          return TEXT;
164        if ("inline".equals(codeString))
165          return INLINE;
166        if ("prompt".equals(codeString))
167          return PROMPT;
168        if ("unit".equals(codeString))
169          return UNIT;
170        if ("lower".equals(codeString))
171          return LOWER;
172        if ("upper".equals(codeString))
173          return UPPER;
174        if ("flyover".equals(codeString))
175          return FLYOVER;
176        if ("help".equals(codeString))
177          return HELP;
178        if ("question".equals(codeString))
179          return QUESTION;
180        if ("autocomplete".equals(codeString))
181          return AUTOCOMPLETE;
182        if ("drop-down".equals(codeString))
183          return DROPDOWN;
184        if ("check-box".equals(codeString))
185          return CHECKBOX;
186        if ("lookup".equals(codeString))
187          return LOOKUP;
188        if ("radio-button".equals(codeString))
189          return RADIOBUTTON;
190        if ("slider".equals(codeString))
191          return SLIDER;
192        if ("spinner".equals(codeString))
193          return SPINNER;
194        if ("text-box".equals(codeString))
195          return TEXTBOX;
196        throw new FHIRException("Unknown QuestionnaireItemControl code '"+codeString+"'");
197        }
198        public String toCode() {
199          switch (this) {
200            case GROUP: return "group";
201            case LIST: return "list";
202            case TABLE: return "table";
203            case HTABLE: return "htable";
204            case GTABLE: return "gtable";
205            case ATABLE: return "atable";
206            case HEADER: return "header";
207            case FOOTER: return "footer";
208            case TEXT: return "text";
209            case INLINE: return "inline";
210            case PROMPT: return "prompt";
211            case UNIT: return "unit";
212            case LOWER: return "lower";
213            case UPPER: return "upper";
214            case FLYOVER: return "flyover";
215            case HELP: return "help";
216            case QUESTION: return "question";
217            case AUTOCOMPLETE: return "autocomplete";
218            case DROPDOWN: return "drop-down";
219            case CHECKBOX: return "check-box";
220            case LOOKUP: return "lookup";
221            case RADIOBUTTON: return "radio-button";
222            case SLIDER: return "slider";
223            case SPINNER: return "spinner";
224            case TEXTBOX: return "text-box";
225            default: return "?";
226          }
227        }
228        public String getSystem() {
229          return "http://hl7.org/fhir/questionnaire-item-control";
230        }
231        public String getDefinition() {
232          switch (this) {
233            case GROUP: return "UI controls relevant to organizing groups of questions";
234            case LIST: return "Questions within the group should be listed sequentially";
235            case TABLE: return "Questions within the group are rows in the table with possible answers as columns.  Used for 'choice' questions.";
236            case HTABLE: return "Questions within the group are columns in the table with possible answers as rows.  Used for 'choice' questions.";
237            case GTABLE: return "Questions within the group are columns in the table with each group repetition as a row.  Used for single-answer questions.";
238            case ATABLE: return "This table has one row - for the question.  Permitted answers are columns.  Used for choice questions.";
239            case HEADER: return "The group is to be continuously visible at the top of the questionnaire";
240            case FOOTER: return "The group is to be continuously visible at the bottom of the questionnaire";
241            case TEXT: return "UI controls relevant to rendering questionnaire text items";
242            case INLINE: return "Text is displayed as a paragraph in a sequential position between sibling items (default behavior)";
243            case PROMPT: return "Text is displayed immediately below or within the answer-entry area of the containing question item (typically as a guide for what to enter)";
244            case UNIT: return "Text is displayed adjacent (horizontally or vertically) to the answer space for the parent question, typically to indicate a unit of measure";
245            case LOWER: return "Text is displayed to the left of the set of answer choices or a scaling control for the parent question item to indicate the meaning of the 'lower' bound.  E.g. 'Strongly disagree'";
246            case UPPER: return "Text is displayed to the right of the set of answer choices or a scaling control for the parent question item to indicate the meaning of the 'upper' bound.  E.g. 'Strongly agree'";
247            case FLYOVER: return "Text is temporarily visible over top of an item if the mouse is positioned over top of the text for the containing item";
248            case HELP: return "Text is displayed in a dialog box or similar control if invoked by pushing a button or some other UI-appropriate action to request 'help' for a question, group or the questionnaire as a whole (depending what the text is nested within)";
249            case QUESTION: return "UI controls relevant to capturing question data";
250            case AUTOCOMPLETE: return "A control which provides a list of potential matches based on text entered into a control.  Used for large choice sets where text-matching is an appropriate discovery mechanism.";
251            case DROPDOWN: return "A control where an item (or multiple items) can be selected from a list that is only displayed when the user is editing the field.";
252            case CHECKBOX: return "A control where choices are listed with a box beside them.  The box can be toggled to select or de-select a given choice.  Multiple selections may be possible.";
253            case LOOKUP: return "A control where editing an item spawns a separate dialog box or screen permitting a user to navigate, filter or otherwise discover an appropriate match.  Useful for large choice sets where text matching is not an appropriate discovery mechanism.  Such screens must generally be tuned for the specific choice list structure.";
254            case RADIOBUTTON: return "A control where choices are listed with a button beside them.  The button can be toggled to select or de-select a given choice.  Selecting one item deselects all others.";
255            case SLIDER: return "A control where an axis is displayed between the high and low values and the control can be visually manipulated to select a value anywhere on the axis.";
256            case SPINNER: return "A control where a list of numeric or other ordered values can be scrolled through via arrows.";
257            case TEXTBOX: return "A control where a user can type in their answer freely.";
258            default: return "?";
259          }
260        }
261        public String getDisplay() {
262          switch (this) {
263            case GROUP: return "group";
264            case LIST: return "List";
265            case TABLE: return "Vertical Answer Table";
266            case HTABLE: return "Horizontal Answer Table";
267            case GTABLE: return "Group Table";
268            case ATABLE: return "Answer Table";
269            case HEADER: return "Header";
270            case FOOTER: return "Footer";
271            case TEXT: return "text";
272            case INLINE: return "In-line";
273            case PROMPT: return "Prompt";
274            case UNIT: return "Unit";
275            case LOWER: return "Lower-bound";
276            case UPPER: return "Upper-bound";
277            case FLYOVER: return "Fly-over";
278            case HELP: return "Help-Button";
279            case QUESTION: return "question";
280            case AUTOCOMPLETE: return "Auto-complete";
281            case DROPDOWN: return "Drop down";
282            case CHECKBOX: return "Check-box";
283            case LOOKUP: return "Lookup";
284            case RADIOBUTTON: return "Radio Button";
285            case SLIDER: return "Slider";
286            case SPINNER: return "Spinner";
287            case TEXTBOX: return "Text Box";
288            default: return "?";
289          }
290    }
291
292
293}
294