blob: 9708918112ba07a6e8f1004092b65f9ec1b373ab [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2016 David Carlson and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* David Carlson (Clinical Cloud Solutions, LLC) - initial API and implementation
*******************************************************************************/
/**
*/
package org.eclipse.mdht.uml.fhir.core.valueset;
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>Discharge Disposition</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
* @see org.eclipse.mdht.uml.fhir.core.valueset.FhirValuesetPackage#getDischargeDisposition()
* @model
* @generated
*/
public enum DischargeDisposition implements Enumerator {
/**
* The '<em><b>Home</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #HOME_VALUE
* @generated
* @ordered
*/
HOME(0, "home", "home"),
/**
* The '<em><b>Otherhcf</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #OTHERHCF_VALUE
* @generated
* @ordered
*/
OTHERHCF(1, "otherhcf", "otherhcf"),
/**
* The '<em><b>Hosp</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #HOSP_VALUE
* @generated
* @ordered
*/
HOSP(2, "hosp", "hosp"),
/**
* The '<em><b>Long</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #LONG_VALUE
* @generated
* @ordered
*/
LONG(3, "long", "long"),
/**
* The '<em><b>Aadvice</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #AADVICE_VALUE
* @generated
* @ordered
*/
AADVICE(4, "aadvice", "aadvice"),
/**
* The '<em><b>Exp</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #EXP_VALUE
* @generated
* @ordered
*/
EXP(5, "exp", "exp"),
/**
* The '<em><b>Psy</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #PSY_VALUE
* @generated
* @ordered
*/
PSY(6, "psy", "psy"),
/**
* The '<em><b>Rehab</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #REHAB_VALUE
* @generated
* @ordered
*/
REHAB(7, "rehab", "rehab"),
/**
* The '<em><b>Oth</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #OTH_VALUE
* @generated
* @ordered
*/
OTH(8, "oth", "oth");
/**
* The '<em><b>Home</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Home</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #HOME
* @model name="home"
* @generated
* @ordered
*/
public static final int HOME_VALUE = 0;
/**
* The '<em><b>Otherhcf</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Otherhcf</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #OTHERHCF
* @model name="otherhcf"
* annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='other-hcf'"
* @generated
* @ordered
*/
public static final int OTHERHCF_VALUE = 1;
/**
* The '<em><b>Hosp</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Hosp</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #HOSP
* @model name="hosp"
* @generated
* @ordered
*/
public static final int HOSP_VALUE = 2;
/**
* The '<em><b>Long</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Long</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #LONG
* @model name="long"
* @generated
* @ordered
*/
public static final int LONG_VALUE = 3;
/**
* The '<em><b>Aadvice</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Aadvice</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #AADVICE
* @model name="aadvice"
* @generated
* @ordered
*/
public static final int AADVICE_VALUE = 4;
/**
* The '<em><b>Exp</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Exp</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #EXP
* @model name="exp"
* @generated
* @ordered
*/
public static final int EXP_VALUE = 5;
/**
* The '<em><b>Psy</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Psy</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #PSY
* @model name="psy"
* @generated
* @ordered
*/
public static final int PSY_VALUE = 6;
/**
* The '<em><b>Rehab</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Rehab</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #REHAB
* @model name="rehab"
* @generated
* @ordered
*/
public static final int REHAB_VALUE = 7;
/**
* The '<em><b>Oth</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
* If the meaning of '<em><b>Oth</b></em>' literal object isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @see #OTH
* @model name="oth"
* @generated
* @ordered
*/
public static final int OTH_VALUE = 8;
/**
* An array of all the '<em><b>Discharge Disposition</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final DischargeDisposition[] VALUES_ARRAY =
new DischargeDisposition[] {
HOME,
OTHERHCF,
HOSP,
LONG,
AADVICE,
EXP,
PSY,
REHAB,
OTH,
};
/**
* A public read-only list of all the '<em><b>Discharge Disposition</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<DischargeDisposition> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
/**
* Returns the '<em><b>Discharge Disposition</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 DischargeDisposition get(String literal) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
DischargeDisposition result = VALUES_ARRAY[i];
if (result.toString().equals(literal)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Discharge Disposition</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 DischargeDisposition getByName(String name) {
for (int i = 0; i < VALUES_ARRAY.length; ++i) {
DischargeDisposition result = VALUES_ARRAY[i];
if (result.getName().equals(name)) {
return result;
}
}
return null;
}
/**
* Returns the '<em><b>Discharge Disposition</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 DischargeDisposition get(int value) {
switch (value) {
case HOME_VALUE: return HOME;
case OTHERHCF_VALUE: return OTHERHCF;
case HOSP_VALUE: return HOSP;
case LONG_VALUE: return LONG;
case AADVICE_VALUE: return AADVICE;
case EXP_VALUE: return EXP;
case PSY_VALUE: return PSY;
case REHAB_VALUE: return REHAB;
case OTH_VALUE: return OTH;
}
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 DischargeDisposition(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;
}
} //DischargeDisposition