| /** |
| */ |
| package org.hl7.fhir; |
| |
| import java.lang.String; |
| |
| import java.util.Arrays; |
| import java.util.Collections; |
| import java.util.List; |
| |
| import org.eclipse.emf.common.util.Enumerator; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * A representation of the literals of the enumeration '<em><b>Questionnaire Item Type List</b></em>', |
| * and utility methods for working with them. |
| * <!-- end-user-doc --> |
| * @see org.hl7.fhir.FhirPackage#getQuestionnaireItemTypeList() |
| * @model extendedMetaData="name='QuestionnaireItemType-list'" |
| * @generated |
| */ |
| public enum QuestionnaireItemTypeList implements Enumerator { |
| /** |
| * The '<em><b>Group</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #GROUP_VALUE |
| * @generated |
| * @ordered |
| */ |
| GROUP(0, "group", "group"), |
| |
| /** |
| * The '<em><b>Display</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #DISPLAY_VALUE |
| * @generated |
| * @ordered |
| */ |
| DISPLAY(1, "display", "display"), |
| |
| /** |
| * The '<em><b>Question</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #QUESTION_VALUE |
| * @generated |
| * @ordered |
| */ |
| QUESTION(2, "question", "question"), |
| |
| /** |
| * The '<em><b>Boolean</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #BOOLEAN_VALUE |
| * @generated |
| * @ordered |
| */ |
| BOOLEAN(3, "boolean", "boolean"), |
| |
| /** |
| * The '<em><b>Decimal</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #DECIMAL_VALUE |
| * @generated |
| * @ordered |
| */ |
| DECIMAL(4, "decimal", "decimal"), |
| |
| /** |
| * The '<em><b>Integer</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #INTEGER_VALUE |
| * @generated |
| * @ordered |
| */ |
| INTEGER(5, "integer", "integer"), |
| |
| /** |
| * The '<em><b>Date</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #DATE_VALUE |
| * @generated |
| * @ordered |
| */ |
| DATE(6, "date", "date"), |
| |
| /** |
| * The '<em><b>Date Time</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #DATE_TIME_VALUE |
| * @generated |
| * @ordered |
| */ |
| DATE_TIME(7, "dateTime", "dateTime"), |
| |
| /** |
| * The '<em><b>Instant</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #INSTANT_VALUE |
| * @generated |
| * @ordered |
| */ |
| INSTANT(8, "instant", "instant"), |
| |
| /** |
| * The '<em><b>Time</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #TIME_VALUE |
| * @generated |
| * @ordered |
| */ |
| TIME(9, "time", "time"), |
| |
| /** |
| * The '<em><b>String</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #STRING_VALUE |
| * @generated |
| * @ordered |
| */ |
| STRING(10, "string", "string"), |
| |
| /** |
| * The '<em><b>Text</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #TEXT_VALUE |
| * @generated |
| * @ordered |
| */ |
| TEXT(11, "text", "text"), |
| |
| /** |
| * The '<em><b>Url</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #URL_VALUE |
| * @generated |
| * @ordered |
| */ |
| URL(12, "url", "url"), |
| |
| /** |
| * The '<em><b>Choice</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #CHOICE_VALUE |
| * @generated |
| * @ordered |
| */ |
| CHOICE(13, "choice", "choice"), |
| |
| /** |
| * The '<em><b>Open Choice</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #OPEN_CHOICE_VALUE |
| * @generated |
| * @ordered |
| */ |
| OPEN_CHOICE(14, "openChoice", "open-choice"), |
| |
| /** |
| * The '<em><b>Attachment</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #ATTACHMENT_VALUE |
| * @generated |
| * @ordered |
| */ |
| ATTACHMENT(15, "attachment", "attachment"), |
| |
| /** |
| * The '<em><b>Reference</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #REFERENCE_VALUE |
| * @generated |
| * @ordered |
| */ |
| REFERENCE(16, "reference", "reference"), |
| |
| /** |
| * The '<em><b>Quantity</b></em>' literal object. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @see #QUANTITY_VALUE |
| * @generated |
| * @ordered |
| */ |
| QUANTITY(17, "quantity", "quantity"); |
| |
| /** |
| * The '<em><b>Group</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * An item with no direct answer but which has descendant items that are questions |
| * <!-- end-model-doc --> |
| * @see #GROUP |
| * @model name="group" |
| * @generated |
| * @ordered |
| */ |
| public static final int GROUP_VALUE = 0; |
| |
| /** |
| * The '<em><b>Display</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * Text for display that will not capture an answer or have descendants |
| * <!-- end-model-doc --> |
| * @see #DISPLAY |
| * @model name="display" |
| * @generated |
| * @ordered |
| */ |
| public static final int DISPLAY_VALUE = 1; |
| |
| /** |
| * The '<em><b>Question</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * An item that defines a specific answer to be captured (and may have descendant items) |
| * <!-- end-model-doc --> |
| * @see #QUESTION |
| * @model name="question" |
| * @generated |
| * @ordered |
| */ |
| public static final int QUESTION_VALUE = 2; |
| |
| /** |
| * The '<em><b>Boolean</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * Question with a yes/no answer |
| * <!-- end-model-doc --> |
| * @see #BOOLEAN |
| * @model name="boolean" |
| * @generated |
| * @ordered |
| */ |
| public static final int BOOLEAN_VALUE = 3; |
| |
| /** |
| * The '<em><b>Decimal</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * Question with is a real number answer |
| * <!-- end-model-doc --> |
| * @see #DECIMAL |
| * @model name="decimal" |
| * @generated |
| * @ordered |
| */ |
| public static final int DECIMAL_VALUE = 4; |
| |
| /** |
| * The '<em><b>Integer</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * Question with an integer answer |
| * <!-- end-model-doc --> |
| * @see #INTEGER |
| * @model name="integer" |
| * @generated |
| * @ordered |
| */ |
| public static final int INTEGER_VALUE = 5; |
| |
| /** |
| * The '<em><b>Date</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * Question with adate answer |
| * <!-- end-model-doc --> |
| * @see #DATE |
| * @model name="date" |
| * @generated |
| * @ordered |
| */ |
| public static final int DATE_VALUE = 6; |
| |
| /** |
| * The '<em><b>Date Time</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * Question with a date and time answer |
| * <!-- end-model-doc --> |
| * @see #DATE_TIME |
| * @model name="dateTime" |
| * @generated |
| * @ordered |
| */ |
| public static final int DATE_TIME_VALUE = 7; |
| |
| /** |
| * The '<em><b>Instant</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * Question with a system timestamp answer |
| * <!-- end-model-doc --> |
| * @see #INSTANT |
| * @model name="instant" |
| * @generated |
| * @ordered |
| */ |
| public static final int INSTANT_VALUE = 8; |
| |
| /** |
| * The '<em><b>Time</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * Question with a time (hour/minute/second) answer independent of date. |
| * <!-- end-model-doc --> |
| * @see #TIME |
| * @model name="time" |
| * @generated |
| * @ordered |
| */ |
| public static final int TIME_VALUE = 9; |
| |
| /** |
| * The '<em><b>String</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * Question with a short (few words to short sentence) free-text entry answer |
| * <!-- end-model-doc --> |
| * @see #STRING |
| * @model name="string" |
| * @generated |
| * @ordered |
| */ |
| public static final int STRING_VALUE = 10; |
| |
| /** |
| * The '<em><b>Text</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * Question with a long (potentially multi-paragraph) free-text entry (still captured as a string) answer |
| * <!-- end-model-doc --> |
| * @see #TEXT |
| * @model name="text" |
| * @generated |
| * @ordered |
| */ |
| public static final int TEXT_VALUE = 11; |
| |
| /** |
| * The '<em><b>Url</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * Question with a url (website, FTP site, etc.) answer |
| * <!-- end-model-doc --> |
| * @see #URL |
| * @model name="url" |
| * @generated |
| * @ordered |
| */ |
| public static final int URL_VALUE = 12; |
| |
| /** |
| * The '<em><b>Choice</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * Question with a Coding drawn from a list of options as an answer |
| * <!-- end-model-doc --> |
| * @see #CHOICE |
| * @model name="choice" |
| * @generated |
| * @ordered |
| */ |
| public static final int CHOICE_VALUE = 13; |
| |
| /** |
| * The '<em><b>Open Choice</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * Answer is a Coding drawn from a list of options or a free-text entry captured as Coding.display |
| * <!-- end-model-doc --> |
| * @see #OPEN_CHOICE |
| * @model name="openChoice" literal="open-choice" |
| * @generated |
| * @ordered |
| */ |
| public static final int OPEN_CHOICE_VALUE = 14; |
| |
| /** |
| * The '<em><b>Attachment</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * Question with binary content such as a image, PDF, etc. as an answer |
| * <!-- end-model-doc --> |
| * @see #ATTACHMENT |
| * @model name="attachment" |
| * @generated |
| * @ordered |
| */ |
| public static final int ATTACHMENT_VALUE = 15; |
| |
| /** |
| * The '<em><b>Reference</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * Question with a reference to another resource (practitioner, organization, etc.) as an answer |
| * <!-- end-model-doc --> |
| * @see #REFERENCE |
| * @model name="reference" |
| * @generated |
| * @ordered |
| */ |
| public static final int REFERENCE_VALUE = 16; |
| |
| /** |
| * The '<em><b>Quantity</b></em>' literal value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * <!-- begin-model-doc --> |
| * Question with a combination of a numeric value and unit, potentially with a comparator (<, >, etc.) as an answer. |
| * <!-- end-model-doc --> |
| * @see #QUANTITY |
| * @model name="quantity" |
| * @generated |
| * @ordered |
| */ |
| public static final int QUANTITY_VALUE = 17; |
| |
| /** |
| * An array of all the '<em><b>Questionnaire Item Type List</b></em>' enumerators. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private static final QuestionnaireItemTypeList[] VALUES_ARRAY = |
| new QuestionnaireItemTypeList[] { |
| GROUP, |
| DISPLAY, |
| QUESTION, |
| BOOLEAN, |
| DECIMAL, |
| INTEGER, |
| DATE, |
| DATE_TIME, |
| INSTANT, |
| TIME, |
| STRING, |
| TEXT, |
| URL, |
| CHOICE, |
| OPEN_CHOICE, |
| ATTACHMENT, |
| REFERENCE, |
| QUANTITY, |
| }; |
| |
| /** |
| * A public read-only list of all the '<em><b>Questionnaire Item Type List</b></em>' enumerators. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static final List<QuestionnaireItemTypeList> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); |
| |
| /** |
| * Returns the '<em><b>Questionnaire Item Type List</b></em>' literal with the specified literal value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @param literal the literal. |
| * @return the matching enumerator or <code>null</code>. |
| * @generated |
| */ |
| public static QuestionnaireItemTypeList get(String literal) { |
| for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
| QuestionnaireItemTypeList result = VALUES_ARRAY[i]; |
| if (result.toString().equals(literal)) { |
| return result; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * Returns the '<em><b>Questionnaire Item Type List</b></em>' literal with the specified name. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @param name the name. |
| * @return the matching enumerator or <code>null</code>. |
| * @generated |
| */ |
| public static QuestionnaireItemTypeList getByName(String name) { |
| for (int i = 0; i < VALUES_ARRAY.length; ++i) { |
| QuestionnaireItemTypeList result = VALUES_ARRAY[i]; |
| if (result.getName().equals(name)) { |
| return result; |
| } |
| } |
| return null; |
| } |
| |
| /** |
| * Returns the '<em><b>Questionnaire Item Type List</b></em>' literal with the specified integer value. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @param value the integer value. |
| * @return the matching enumerator or <code>null</code>. |
| * @generated |
| */ |
| public static QuestionnaireItemTypeList get(int value) { |
| switch (value) { |
| case GROUP_VALUE: return GROUP; |
| case DISPLAY_VALUE: return DISPLAY; |
| case QUESTION_VALUE: return QUESTION; |
| case BOOLEAN_VALUE: return BOOLEAN; |
| case DECIMAL_VALUE: return DECIMAL; |
| case INTEGER_VALUE: return INTEGER; |
| case DATE_VALUE: return DATE; |
| case DATE_TIME_VALUE: return DATE_TIME; |
| case INSTANT_VALUE: return INSTANT; |
| case TIME_VALUE: return TIME; |
| case STRING_VALUE: return STRING; |
| case TEXT_VALUE: return TEXT; |
| case URL_VALUE: return URL; |
| case CHOICE_VALUE: return CHOICE; |
| case OPEN_CHOICE_VALUE: return OPEN_CHOICE; |
| case ATTACHMENT_VALUE: return ATTACHMENT; |
| case REFERENCE_VALUE: return REFERENCE; |
| case QUANTITY_VALUE: return QUANTITY; |
| } |
| return null; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private final int value; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private final String name; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private final String literal; |
| |
| /** |
| * Only this class can construct instances. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| private QuestionnaireItemTypeList(int value, String name, String literal) { |
| this.value = value; |
| this.name = name; |
| this.literal = literal; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public int getValue() { |
| return value; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getName() { |
| return name; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public String getLiteral() { |
| return literal; |
| } |
| |
| /** |
| * Returns the literal value of the enumerator, which is its string representation. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public String toString() { |
| return literal; |
| } |
| |
| } //QuestionnaireItemTypeList |