001package org.hl7.fhir.dstu2016may.model.codesystems;
002
003
004
005
006/*
007  Copyright (c) 2011+, HL7, Inc.
008  All rights reserved.
009  
010  Redistribution and use in source and binary forms, with or without modification, 
011  are permitted provided that the following conditions are met:
012  
013   * Redistributions of source code must retain the above copyright notice, this 
014     list of conditions and the following disclaimer.
015   * Redistributions in binary form must reproduce the above copyright notice, 
016     this list of conditions and the following disclaimer in the documentation 
017     and/or other materials provided with the distribution.
018   * Neither the name of HL7 nor the names of its contributors may be used to 
019     endorse or promote products derived from this software without specific 
020     prior written permission.
021  
022  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
023  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
024  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
025  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
026  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
027  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
028  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
029  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
030  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
031  POSSIBILITY OF SUCH DAMAGE.
032  
033*/
034
035// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0
036
037
038import org.hl7.fhir.exceptions.FHIRException;
039
040public enum DataTypes {
041
042        /**
043         * The definition of an action to be performed. Some aspects of the definition are specified statically, and some aspects can be specified dynamically by referencing logic defined in a library.
044         */
045        ACTIONDEFINITION, 
046        /**
047         * An address expressed using postal conventions (as opposed to GPS or other location definition formats).  This data type may be used to convey addresses for use in delivering mail as well as for visiting locations and which might not be valid for mail delivery.  There are a variety of postal address formats defined around the world.
048         */
049        ADDRESS, 
050        /**
051         * null
052         */
053        AGE, 
054        /**
055         * A  text note which also  contains information about who made the statement and when.
056         */
057        ANNOTATION, 
058        /**
059         * For referring to data content defined in other formats.
060         */
061        ATTACHMENT, 
062        /**
063         * Base definition for all elements that are defined inside a resource - but not those in a data type.
064         */
065        BACKBONEELEMENT, 
066        /**
067         * A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.
068         */
069        CODEABLECONCEPT, 
070        /**
071         * A reference to a code defined by a terminology system.
072         */
073        CODING, 
074        /**
075         * Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.
076         */
077        CONTACTPOINT, 
078        /**
079         * null
080         */
081        COUNT, 
082        /**
083         * Describes a required data item for evaluation in terms of the type of data, and optional code- or date-based filters of the data.
084         */
085        DATAREQUIREMENT, 
086        /**
087         * null
088         */
089        DISTANCE, 
090        /**
091         * null
092         */
093        DURATION, 
094        /**
095         * Base definition for all elements in a resource.
096         */
097        ELEMENT, 
098        /**
099         * Captures constraints on each element within the resource, profile, or extension.
100         */
101        ELEMENTDEFINITION, 
102        /**
103         * Optional Extensions Element - found in all resources.
104         */
105        EXTENSION, 
106        /**
107         * A human's name with the ability to identify parts and usage.
108         */
109        HUMANNAME, 
110        /**
111         * A technical identifier - identifies some entity uniquely and unambiguously.
112         */
113        IDENTIFIER, 
114        /**
115         * The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource.
116         */
117        META, 
118        /**
119         * The ModuleMetadata structure defines the common metadata elements used by quality improvement artifacts. This information includes descriptive and topical metadata to enable repository searches, as well as governance and evidentiary support information.
120         */
121        MODULEMETADATA, 
122        /**
123         * null
124         */
125        MONEY, 
126        /**
127         * A human-readable formatted text, including images.
128         */
129        NARRATIVE, 
130        /**
131         * The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse.
132         */
133        PARAMETERDEFINITION, 
134        /**
135         * A time period defined by a start and end date and optionally time.
136         */
137        PERIOD, 
138        /**
139         * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.
140         */
141        QUANTITY, 
142        /**
143         * A set of ordered Quantities defined by a low and high limit.
144         */
145        RANGE, 
146        /**
147         * A relationship of two Quantity values - expressed as a numerator and a denominator.
148         */
149        RATIO, 
150        /**
151         * A reference from one resource to another.
152         */
153        REFERENCE, 
154        /**
155         * A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.
156         */
157        SAMPLEDDATA, 
158        /**
159         * A digital signature along with supporting context. The signature may be electronic/cryptographic in nature, or a graphical image representing a hand-written signature, or a signature process. Different Signature approaches have different utilities.
160         */
161        SIGNATURE, 
162        /**
163         * null
164         */
165        SIMPLEQUANTITY, 
166        /**
167         * Specifies an event that may occur multiple times. Timing schedules are used to record when things are expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds.
168         */
169        TIMING, 
170        /**
171         * A description of a triggering event.
172         */
173        TRIGGERDEFINITION, 
174        /**
175         * A stream of bytes
176         */
177        BASE64BINARY, 
178        /**
179         * Value of "true" or "false"
180         */
181        BOOLEAN, 
182        /**
183         * A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents
184         */
185        CODE, 
186        /**
187         * A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date.  Dates SHALL be valid dates.
188         */
189        DATE, 
190        /**
191         * A date, date-time or partial date (e.g. just year or year + month).  If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored.                 Dates SHALL be valid dates.
192         */
193        DATETIME, 
194        /**
195         * A rational number with implicit precision
196         */
197        DECIMAL, 
198        /**
199         * Any combination of letters, numerals, "-" and ".", with a length limit of 64 characters.  (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.)  Ids are case-insensitive.
200         */
201        ID, 
202        /**
203         * An instant in time - known at least to the second
204         */
205        INSTANT, 
206        /**
207         * A whole number
208         */
209        INTEGER, 
210        /**
211         * A string that may contain markdown syntax for optional processing by a mark down presentation engine
212         */
213        MARKDOWN, 
214        /**
215         * An oid represented as a URI
216         */
217        OID, 
218        /**
219         * An integer with a value that is positive (e.g. >0)
220         */
221        POSITIVEINT, 
222        /**
223         * A sequence of Unicode characters
224         */
225        STRING, 
226        /**
227         * A time during the day, with no date specified
228         */
229        TIME, 
230        /**
231         * An integer with a value that is not negative (e.g. >= 0)
232         */
233        UNSIGNEDINT, 
234        /**
235         * String of characters used to identify a name or a resource
236         */
237        URI, 
238        /**
239         * A UUID, represented as a URI
240         */
241        UUID, 
242        /**
243         * XHTML format, as defined by W3C, but restricted usage (mainly, no active content)
244         */
245        XHTML, 
246        /**
247         * added to help the parsers
248         */
249        NULL;
250        public static DataTypes fromCode(String codeString) throws FHIRException {
251            if (codeString == null || "".equals(codeString))
252                return null;
253        if ("ActionDefinition".equals(codeString))
254          return ACTIONDEFINITION;
255        if ("Address".equals(codeString))
256          return ADDRESS;
257        if ("Age".equals(codeString))
258          return AGE;
259        if ("Annotation".equals(codeString))
260          return ANNOTATION;
261        if ("Attachment".equals(codeString))
262          return ATTACHMENT;
263        if ("BackboneElement".equals(codeString))
264          return BACKBONEELEMENT;
265        if ("CodeableConcept".equals(codeString))
266          return CODEABLECONCEPT;
267        if ("Coding".equals(codeString))
268          return CODING;
269        if ("ContactPoint".equals(codeString))
270          return CONTACTPOINT;
271        if ("Count".equals(codeString))
272          return COUNT;
273        if ("DataRequirement".equals(codeString))
274          return DATAREQUIREMENT;
275        if ("Distance".equals(codeString))
276          return DISTANCE;
277        if ("Duration".equals(codeString))
278          return DURATION;
279        if ("Element".equals(codeString))
280          return ELEMENT;
281        if ("ElementDefinition".equals(codeString))
282          return ELEMENTDEFINITION;
283        if ("Extension".equals(codeString))
284          return EXTENSION;
285        if ("HumanName".equals(codeString))
286          return HUMANNAME;
287        if ("Identifier".equals(codeString))
288          return IDENTIFIER;
289        if ("Meta".equals(codeString))
290          return META;
291        if ("ModuleMetadata".equals(codeString))
292          return MODULEMETADATA;
293        if ("Money".equals(codeString))
294          return MONEY;
295        if ("Narrative".equals(codeString))
296          return NARRATIVE;
297        if ("ParameterDefinition".equals(codeString))
298          return PARAMETERDEFINITION;
299        if ("Period".equals(codeString))
300          return PERIOD;
301        if ("Quantity".equals(codeString))
302          return QUANTITY;
303        if ("Range".equals(codeString))
304          return RANGE;
305        if ("Ratio".equals(codeString))
306          return RATIO;
307        if ("Reference".equals(codeString))
308          return REFERENCE;
309        if ("SampledData".equals(codeString))
310          return SAMPLEDDATA;
311        if ("Signature".equals(codeString))
312          return SIGNATURE;
313        if ("SimpleQuantity".equals(codeString))
314          return SIMPLEQUANTITY;
315        if ("Timing".equals(codeString))
316          return TIMING;
317        if ("TriggerDefinition".equals(codeString))
318          return TRIGGERDEFINITION;
319        if ("base64Binary".equals(codeString))
320          return BASE64BINARY;
321        if ("boolean".equals(codeString))
322          return BOOLEAN;
323        if ("code".equals(codeString))
324          return CODE;
325        if ("date".equals(codeString))
326          return DATE;
327        if ("dateTime".equals(codeString))
328          return DATETIME;
329        if ("decimal".equals(codeString))
330          return DECIMAL;
331        if ("id".equals(codeString))
332          return ID;
333        if ("instant".equals(codeString))
334          return INSTANT;
335        if ("integer".equals(codeString))
336          return INTEGER;
337        if ("markdown".equals(codeString))
338          return MARKDOWN;
339        if ("oid".equals(codeString))
340          return OID;
341        if ("positiveInt".equals(codeString))
342          return POSITIVEINT;
343        if ("string".equals(codeString))
344          return STRING;
345        if ("time".equals(codeString))
346          return TIME;
347        if ("unsignedInt".equals(codeString))
348          return UNSIGNEDINT;
349        if ("uri".equals(codeString))
350          return URI;
351        if ("uuid".equals(codeString))
352          return UUID;
353        if ("xhtml".equals(codeString))
354          return XHTML;
355        throw new FHIRException("Unknown DataTypes code '"+codeString+"'");
356        }
357        public String toCode() {
358          switch (this) {
359            case ACTIONDEFINITION: return "ActionDefinition";
360            case ADDRESS: return "Address";
361            case AGE: return "Age";
362            case ANNOTATION: return "Annotation";
363            case ATTACHMENT: return "Attachment";
364            case BACKBONEELEMENT: return "BackboneElement";
365            case CODEABLECONCEPT: return "CodeableConcept";
366            case CODING: return "Coding";
367            case CONTACTPOINT: return "ContactPoint";
368            case COUNT: return "Count";
369            case DATAREQUIREMENT: return "DataRequirement";
370            case DISTANCE: return "Distance";
371            case DURATION: return "Duration";
372            case ELEMENT: return "Element";
373            case ELEMENTDEFINITION: return "ElementDefinition";
374            case EXTENSION: return "Extension";
375            case HUMANNAME: return "HumanName";
376            case IDENTIFIER: return "Identifier";
377            case META: return "Meta";
378            case MODULEMETADATA: return "ModuleMetadata";
379            case MONEY: return "Money";
380            case NARRATIVE: return "Narrative";
381            case PARAMETERDEFINITION: return "ParameterDefinition";
382            case PERIOD: return "Period";
383            case QUANTITY: return "Quantity";
384            case RANGE: return "Range";
385            case RATIO: return "Ratio";
386            case REFERENCE: return "Reference";
387            case SAMPLEDDATA: return "SampledData";
388            case SIGNATURE: return "Signature";
389            case SIMPLEQUANTITY: return "SimpleQuantity";
390            case TIMING: return "Timing";
391            case TRIGGERDEFINITION: return "TriggerDefinition";
392            case BASE64BINARY: return "base64Binary";
393            case BOOLEAN: return "boolean";
394            case CODE: return "code";
395            case DATE: return "date";
396            case DATETIME: return "dateTime";
397            case DECIMAL: return "decimal";
398            case ID: return "id";
399            case INSTANT: return "instant";
400            case INTEGER: return "integer";
401            case MARKDOWN: return "markdown";
402            case OID: return "oid";
403            case POSITIVEINT: return "positiveInt";
404            case STRING: return "string";
405            case TIME: return "time";
406            case UNSIGNEDINT: return "unsignedInt";
407            case URI: return "uri";
408            case UUID: return "uuid";
409            case XHTML: return "xhtml";
410            case NULL: return null;
411            default: return "?";
412          }
413        }
414        public String getSystem() {
415          return "http://hl7.org/fhir/data-types";
416        }
417        public String getDefinition() {
418          switch (this) {
419            case ACTIONDEFINITION: return "The definition of an action to be performed. Some aspects of the definition are specified statically, and some aspects can be specified dynamically by referencing logic defined in a library.";
420            case ADDRESS: return "An address expressed using postal conventions (as opposed to GPS or other location definition formats).  This data type may be used to convey addresses for use in delivering mail as well as for visiting locations and which might not be valid for mail delivery.  There are a variety of postal address formats defined around the world.";
421            case AGE: return "";
422            case ANNOTATION: return "A  text note which also  contains information about who made the statement and when.";
423            case ATTACHMENT: return "For referring to data content defined in other formats.";
424            case BACKBONEELEMENT: return "Base definition for all elements that are defined inside a resource - but not those in a data type.";
425            case CODEABLECONCEPT: return "A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.";
426            case CODING: return "A reference to a code defined by a terminology system.";
427            case CONTACTPOINT: return "Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.";
428            case COUNT: return "";
429            case DATAREQUIREMENT: return "Describes a required data item for evaluation in terms of the type of data, and optional code- or date-based filters of the data.";
430            case DISTANCE: return "";
431            case DURATION: return "";
432            case ELEMENT: return "Base definition for all elements in a resource.";
433            case ELEMENTDEFINITION: return "Captures constraints on each element within the resource, profile, or extension.";
434            case EXTENSION: return "Optional Extensions Element - found in all resources.";
435            case HUMANNAME: return "A human's name with the ability to identify parts and usage.";
436            case IDENTIFIER: return "A technical identifier - identifies some entity uniquely and unambiguously.";
437            case META: return "The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content may not always be associated with version changes to the resource.";
438            case MODULEMETADATA: return "The ModuleMetadata structure defines the common metadata elements used by quality improvement artifacts. This information includes descriptive and topical metadata to enable repository searches, as well as governance and evidentiary support information.";
439            case MONEY: return "";
440            case NARRATIVE: return "A human-readable formatted text, including images.";
441            case PARAMETERDEFINITION: return "The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse.";
442            case PERIOD: return "A time period defined by a start and end date and optionally time.";
443            case QUANTITY: return "A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies.";
444            case RANGE: return "A set of ordered Quantities defined by a low and high limit.";
445            case RATIO: return "A relationship of two Quantity values - expressed as a numerator and a denominator.";
446            case REFERENCE: return "A reference from one resource to another.";
447            case SAMPLEDDATA: return "A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.";
448            case SIGNATURE: return "A digital signature along with supporting context. The signature may be electronic/cryptographic in nature, or a graphical image representing a hand-written signature, or a signature process. Different Signature approaches have different utilities.";
449            case SIMPLEQUANTITY: return "";
450            case TIMING: return "Specifies an event that may occur multiple times. Timing schedules are used to record when things are expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds.";
451            case TRIGGERDEFINITION: return "A description of a triggering event.";
452            case BASE64BINARY: return "A stream of bytes";
453            case BOOLEAN: return "Value of \"true\" or \"false\"";
454            case CODE: return "A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents";
455            case DATE: return "A date or partial date (e.g. just year or year + month). There is no time zone. The format is a union of the schema types gYear, gYearMonth and date.  Dates SHALL be valid dates.";
456            case DATETIME: return "A date, date-time or partial date (e.g. just year or year + month).  If hours and minutes are specified, a time zone SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored.                 Dates SHALL be valid dates.";
457            case DECIMAL: return "A rational number with implicit precision";
458            case ID: return "Any combination of letters, numerals, \"-\" and \".\", with a length limit of 64 characters.  (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.)  Ids are case-insensitive.";
459            case INSTANT: return "An instant in time - known at least to the second";
460            case INTEGER: return "A whole number";
461            case MARKDOWN: return "A string that may contain markdown syntax for optional processing by a mark down presentation engine";
462            case OID: return "An oid represented as a URI";
463            case POSITIVEINT: return "An integer with a value that is positive (e.g. >0)";
464            case STRING: return "A sequence of Unicode characters";
465            case TIME: return "A time during the day, with no date specified";
466            case UNSIGNEDINT: return "An integer with a value that is not negative (e.g. >= 0)";
467            case URI: return "String of characters used to identify a name or a resource";
468            case UUID: return "A UUID, represented as a URI";
469            case XHTML: return "XHTML format, as defined by W3C, but restricted usage (mainly, no active content)";
470            case NULL: return null;
471            default: return "?";
472          }
473        }
474        public String getDisplay() {
475          switch (this) {
476            case ACTIONDEFINITION: return "ActionDefinition";
477            case ADDRESS: return "Address";
478            case AGE: return "Age";
479            case ANNOTATION: return "Annotation";
480            case ATTACHMENT: return "Attachment";
481            case BACKBONEELEMENT: return "BackboneElement";
482            case CODEABLECONCEPT: return "CodeableConcept";
483            case CODING: return "Coding";
484            case CONTACTPOINT: return "ContactPoint";
485            case COUNT: return "Count";
486            case DATAREQUIREMENT: return "DataRequirement";
487            case DISTANCE: return "Distance";
488            case DURATION: return "Duration";
489            case ELEMENT: return "Element";
490            case ELEMENTDEFINITION: return "ElementDefinition";
491            case EXTENSION: return "Extension";
492            case HUMANNAME: return "HumanName";
493            case IDENTIFIER: return "Identifier";
494            case META: return "Meta";
495            case MODULEMETADATA: return "ModuleMetadata";
496            case MONEY: return "Money";
497            case NARRATIVE: return "Narrative";
498            case PARAMETERDEFINITION: return "ParameterDefinition";
499            case PERIOD: return "Period";
500            case QUANTITY: return "Quantity";
501            case RANGE: return "Range";
502            case RATIO: return "Ratio";
503            case REFERENCE: return "Reference";
504            case SAMPLEDDATA: return "SampledData";
505            case SIGNATURE: return "Signature";
506            case SIMPLEQUANTITY: return "SimpleQuantity";
507            case TIMING: return "Timing";
508            case TRIGGERDEFINITION: return "TriggerDefinition";
509            case BASE64BINARY: return "base64Binary";
510            case BOOLEAN: return "boolean";
511            case CODE: return "code";
512            case DATE: return "date";
513            case DATETIME: return "dateTime";
514            case DECIMAL: return "decimal";
515            case ID: return "id";
516            case INSTANT: return "instant";
517            case INTEGER: return "integer";
518            case MARKDOWN: return "markdown";
519            case OID: return "oid";
520            case POSITIVEINT: return "positiveInt";
521            case STRING: return "string";
522            case TIME: return "time";
523            case UNSIGNEDINT: return "unsignedInt";
524            case URI: return "uri";
525            case UUID: return "uuid";
526            case XHTML: return "XHTML";
527            case NULL: return null;
528            default: return "?";
529          }
530    }
531
532
533}