All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ca.uhn.fhir.model.dstu2.valueset.AnswerFormatEnum Maven / Gradle / Ivy

The newest version!

package ca.uhn.fhir.model.dstu2.valueset;

import ca.uhn.fhir.model.api.*;
import java.util.HashMap;
import java.util.Map;

public enum AnswerFormatEnum {

	/**
	 * Display: Boolean
* Code Value: boolean * * Answer is a yes/no answer. */ BOOLEAN("boolean", "http://hl7.org/fhir/answer-format"), /** * Display: Decimal
* Code Value: decimal * * Answer is a floating point number. */ DECIMAL("decimal", "http://hl7.org/fhir/answer-format"), /** * Display: Integer
* Code Value: integer * * Answer is an integer. */ INTEGER("integer", "http://hl7.org/fhir/answer-format"), /** * Display: Date
* Code Value: date * * Answer is a date. */ DATE("date", "http://hl7.org/fhir/answer-format"), /** * Display: Date Time
* Code Value: dateTime * * Answer is a date and time. */ DATE_TIME("dateTime", "http://hl7.org/fhir/answer-format"), /** * Display: Instant
* Code Value: instant * * Answer is a system timestamp. */ INSTANT("instant", "http://hl7.org/fhir/answer-format"), /** * Display: Time
* Code Value: time * * Answer is a time (hour/minute/second) independent of date. */ TIME("time", "http://hl7.org/fhir/answer-format"), /** * Display: String
* Code Value: string * * Answer is a short (few words to short sentence) free-text entry. */ STRING("string", "http://hl7.org/fhir/answer-format"), /** * Display: Text
* Code Value: text * * Answer is a long (potentially multi-paragraph) free-text entry (still captured as a string). */ TEXT("text", "http://hl7.org/fhir/answer-format"), /** * Display: Url
* Code Value: url * * Answer is a url (website, FTP site, etc.). */ URL("url", "http://hl7.org/fhir/answer-format"), /** * Display: Choice
* Code Value: choice * * Answer is a Coding drawn from a list of options. */ CHOICE("choice", "http://hl7.org/fhir/answer-format"), /** * Display: Open Choice
* Code Value: open-choice * * Answer is a Coding drawn from a list of options or a free-text entry. */ OPEN_CHOICE("open-choice", "http://hl7.org/fhir/answer-format"), /** * Display: Attachment
* Code Value: attachment * * Answer is binary content such as a image, PDF, etc. */ ATTACHMENT("attachment", "http://hl7.org/fhir/answer-format"), /** * Display: Reference
* Code Value: reference * * Answer is a reference to another resource (practitioner, organization, etc.). */ REFERENCE("reference", "http://hl7.org/fhir/answer-format"), /** * Display: Quantity
* Code Value: quantity * * Answer is a combination of a numeric value and unit, potentially with a comparator (<, >, etc.). */ QUANTITY("quantity", "http://hl7.org/fhir/answer-format"), ; /** * Identifier for this Value Set: * */ public static final String VALUESET_IDENTIFIER = ""; /** * Name for this Value Set: * AnswerFormat */ public static final String VALUESET_NAME = "AnswerFormat"; private static Map CODE_TO_ENUM = new HashMap(); private static Map> SYSTEM_TO_CODE_TO_ENUM = new HashMap>(); private final String myCode; private final String mySystem; static { for (AnswerFormatEnum next : AnswerFormatEnum.values()) { CODE_TO_ENUM.put(next.getCode(), next); if (!SYSTEM_TO_CODE_TO_ENUM.containsKey(next.getSystem())) { SYSTEM_TO_CODE_TO_ENUM.put(next.getSystem(), new HashMap()); } SYSTEM_TO_CODE_TO_ENUM.get(next.getSystem()).put(next.getCode(), next); } } /** * Returns the code associated with this enumerated value */ public String getCode() { return myCode; } /** * Returns the code system associated with this enumerated value */ public String getSystem() { return mySystem; } /** * Returns the enumerated value associated with this code */ public static AnswerFormatEnum forCode(String theCode) { AnswerFormatEnum retVal = CODE_TO_ENUM.get(theCode); return retVal; } /** * Converts codes to their respective enumerated values */ public static final IValueSetEnumBinder VALUESET_BINDER = new IValueSetEnumBinder() { @Override public String toCodeString(AnswerFormatEnum theEnum) { return theEnum.getCode(); } @Override public String toSystemString(AnswerFormatEnum theEnum) { return theEnum.getSystem(); } @Override public AnswerFormatEnum fromCodeString(String theCodeString) { return CODE_TO_ENUM.get(theCodeString); } @Override public AnswerFormatEnum fromCodeString(String theCodeString, String theSystemString) { Map map = SYSTEM_TO_CODE_TO_ENUM.get(theSystemString); if (map == null) { return null; } return map.get(theCodeString); } }; /** * Constructor */ AnswerFormatEnum(String theCode, String theSystem) { myCode = theCode; mySystem = theSystem; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy