001package org.hl7.fhir.dstu3.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 Mon, Apr 17, 2017 17:38-0400 for FHIR v3.0.1
033
034
035import org.hl7.fhir.exceptions.FHIRException;
036
037public enum DataTypes {
038
039        /**
040         * 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 which might not be valid for mail delivery.  There are a variety of postal address formats defined around the world.
041         */
042        ADDRESS, 
043        /**
044         * A duration of time during which an organism (or a process) has existed.
045         */
046        AGE, 
047        /**
048         * A  text note which also  contains information about who made the statement and when.
049         */
050        ANNOTATION, 
051        /**
052         * For referring to data content defined in other formats.
053         */
054        ATTACHMENT, 
055        /**
056         * Base definition for all elements that are defined inside a resource - but not those in a data type.
057         */
058        BACKBONEELEMENT, 
059        /**
060         * A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.
061         */
062        CODEABLECONCEPT, 
063        /**
064         * A reference to a code defined by a terminology system.
065         */
066        CODING, 
067        /**
068         * Specifies contact information for a person or organization.
069         */
070        CONTACTDETAIL, 
071        /**
072         * Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.
073         */
074        CONTACTPOINT, 
075        /**
076         * A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers.
077         */
078        CONTRIBUTOR, 
079        /**
080         * 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.
081         */
082        COUNT, 
083        /**
084         * Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data.
085         */
086        DATAREQUIREMENT, 
087        /**
088         * A length - a value with a unit that is a physical distance.
089         */
090        DISTANCE, 
091        /**
092         * Indicates how the medication is/was taken or should be taken by the patient.
093         */
094        DOSAGE, 
095        /**
096         * A length of time.
097         */
098        DURATION, 
099        /**
100         * Base definition for all elements in a resource.
101         */
102        ELEMENT, 
103        /**
104         * Captures constraints on each element within the resource, profile, or extension.
105         */
106        ELEMENTDEFINITION, 
107        /**
108         * Optional Extension Element - found in all resources.
109         */
110        EXTENSION, 
111        /**
112         * A human's name with the ability to identify parts and usage.
113         */
114        HUMANNAME, 
115        /**
116         * A technical identifier - identifies some entity uniquely and unambiguously.
117         */
118        IDENTIFIER, 
119        /**
120         * 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.
121         */
122        META, 
123        /**
124         * An amount of economic utility in some recognized currency.
125         */
126        MONEY, 
127        /**
128         * A human-readable formatted text, including images.
129         */
130        NARRATIVE, 
131        /**
132         * 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.
133         */
134        PARAMETERDEFINITION, 
135        /**
136         * A time period defined by a start and end date and optionally time.
137         */
138        PERIOD, 
139        /**
140         * 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.
141         */
142        QUANTITY, 
143        /**
144         * A set of ordered Quantities defined by a low and high limit.
145         */
146        RANGE, 
147        /**
148         * A relationship of two Quantity values - expressed as a numerator and a denominator.
149         */
150        RATIO, 
151        /**
152         * A reference from one resource to another.
153         */
154        REFERENCE, 
155        /**
156         * Related artifacts such as additional documentation, justification, or bibliographic references.
157         */
158        RELATEDARTIFACT, 
159        /**
160         * A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data.
161         */
162        SAMPLEDDATA, 
163        /**
164         * 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.
165         */
166        SIGNATURE, 
167        /**
168         * null
169         */
170        SIMPLEQUANTITY, 
171        /**
172         * Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, 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, and may be used for reporting the schedule to which past regular activities were carried out.
173         */
174        TIMING, 
175        /**
176         * A description of a triggering event.
177         */
178        TRIGGERDEFINITION, 
179        /**
180         * Specifies clinical/business/etc metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care).
181         */
182        USAGECONTEXT, 
183        /**
184         * A stream of bytes
185         */
186        BASE64BINARY, 
187        /**
188         * Value of "true" or "false"
189         */
190        BOOLEAN, 
191        /**
192         * 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
193         */
194        CODE, 
195        /**
196         * 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.
197         */
198        DATE, 
199        /**
200         * 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.
201         */
202        DATETIME, 
203        /**
204         * A rational number with implicit precision
205         */
206        DECIMAL, 
207        /**
208         * 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.
209         */
210        ID, 
211        /**
212         * An instant in time - known at least to the second
213         */
214        INSTANT, 
215        /**
216         * A whole number
217         */
218        INTEGER, 
219        /**
220         * A string that may contain markdown syntax for optional processing by a mark down presentation engine
221         */
222        MARKDOWN, 
223        /**
224         * An OID represented as a URI
225         */
226        OID, 
227        /**
228         * An integer with a value that is positive (e.g. >0)
229         */
230        POSITIVEINT, 
231        /**
232         * A sequence of Unicode characters
233         */
234        STRING, 
235        /**
236         * A time during the day, with no date specified
237         */
238        TIME, 
239        /**
240         * An integer with a value that is not negative (e.g. >= 0)
241         */
242        UNSIGNEDINT, 
243        /**
244         * String of characters used to identify a name or a resource
245         */
246        URI, 
247        /**
248         * A UUID, represented as a URI
249         */
250        UUID, 
251        /**
252         * XHTML format, as defined by W3C, but restricted usage (mainly, no active content)
253         */
254        XHTML, 
255        /**
256         * added to help the parsers
257         */
258        NULL;
259        public static DataTypes fromCode(String codeString) throws FHIRException {
260            if (codeString == null || "".equals(codeString))
261                return null;
262        if ("Address".equals(codeString))
263          return ADDRESS;
264        if ("Age".equals(codeString))
265          return AGE;
266        if ("Annotation".equals(codeString))
267          return ANNOTATION;
268        if ("Attachment".equals(codeString))
269          return ATTACHMENT;
270        if ("BackboneElement".equals(codeString))
271          return BACKBONEELEMENT;
272        if ("CodeableConcept".equals(codeString))
273          return CODEABLECONCEPT;
274        if ("Coding".equals(codeString))
275          return CODING;
276        if ("ContactDetail".equals(codeString))
277          return CONTACTDETAIL;
278        if ("ContactPoint".equals(codeString))
279          return CONTACTPOINT;
280        if ("Contributor".equals(codeString))
281          return CONTRIBUTOR;
282        if ("Count".equals(codeString))
283          return COUNT;
284        if ("DataRequirement".equals(codeString))
285          return DATAREQUIREMENT;
286        if ("Distance".equals(codeString))
287          return DISTANCE;
288        if ("Dosage".equals(codeString))
289          return DOSAGE;
290        if ("Duration".equals(codeString))
291          return DURATION;
292        if ("Element".equals(codeString))
293          return ELEMENT;
294        if ("ElementDefinition".equals(codeString))
295          return ELEMENTDEFINITION;
296        if ("Extension".equals(codeString))
297          return EXTENSION;
298        if ("HumanName".equals(codeString))
299          return HUMANNAME;
300        if ("Identifier".equals(codeString))
301          return IDENTIFIER;
302        if ("Meta".equals(codeString))
303          return META;
304        if ("Money".equals(codeString))
305          return MONEY;
306        if ("Narrative".equals(codeString))
307          return NARRATIVE;
308        if ("ParameterDefinition".equals(codeString))
309          return PARAMETERDEFINITION;
310        if ("Period".equals(codeString))
311          return PERIOD;
312        if ("Quantity".equals(codeString))
313          return QUANTITY;
314        if ("Range".equals(codeString))
315          return RANGE;
316        if ("Ratio".equals(codeString))
317          return RATIO;
318        if ("Reference".equals(codeString))
319          return REFERENCE;
320        if ("RelatedArtifact".equals(codeString))
321          return RELATEDARTIFACT;
322        if ("SampledData".equals(codeString))
323          return SAMPLEDDATA;
324        if ("Signature".equals(codeString))
325          return SIGNATURE;
326        if ("SimpleQuantity".equals(codeString))
327          return SIMPLEQUANTITY;
328        if ("Timing".equals(codeString))
329          return TIMING;
330        if ("TriggerDefinition".equals(codeString))
331          return TRIGGERDEFINITION;
332        if ("UsageContext".equals(codeString))
333          return USAGECONTEXT;
334        if ("base64Binary".equals(codeString))
335          return BASE64BINARY;
336        if ("boolean".equals(codeString))
337          return BOOLEAN;
338        if ("code".equals(codeString))
339          return CODE;
340        if ("date".equals(codeString))
341          return DATE;
342        if ("dateTime".equals(codeString))
343          return DATETIME;
344        if ("decimal".equals(codeString))
345          return DECIMAL;
346        if ("id".equals(codeString))
347          return ID;
348        if ("instant".equals(codeString))
349          return INSTANT;
350        if ("integer".equals(codeString))
351          return INTEGER;
352        if ("markdown".equals(codeString))
353          return MARKDOWN;
354        if ("oid".equals(codeString))
355          return OID;
356        if ("positiveInt".equals(codeString))
357          return POSITIVEINT;
358        if ("string".equals(codeString))
359          return STRING;
360        if ("time".equals(codeString))
361          return TIME;
362        if ("unsignedInt".equals(codeString))
363          return UNSIGNEDINT;
364        if ("uri".equals(codeString))
365          return URI;
366        if ("uuid".equals(codeString))
367          return UUID;
368        if ("xhtml".equals(codeString))
369          return XHTML;
370        throw new FHIRException("Unknown DataTypes code '"+codeString+"'");
371        }
372        public String toCode() {
373          switch (this) {
374            case ADDRESS: return "Address";
375            case AGE: return "Age";
376            case ANNOTATION: return "Annotation";
377            case ATTACHMENT: return "Attachment";
378            case BACKBONEELEMENT: return "BackboneElement";
379            case CODEABLECONCEPT: return "CodeableConcept";
380            case CODING: return "Coding";
381            case CONTACTDETAIL: return "ContactDetail";
382            case CONTACTPOINT: return "ContactPoint";
383            case CONTRIBUTOR: return "Contributor";
384            case COUNT: return "Count";
385            case DATAREQUIREMENT: return "DataRequirement";
386            case DISTANCE: return "Distance";
387            case DOSAGE: return "Dosage";
388            case DURATION: return "Duration";
389            case ELEMENT: return "Element";
390            case ELEMENTDEFINITION: return "ElementDefinition";
391            case EXTENSION: return "Extension";
392            case HUMANNAME: return "HumanName";
393            case IDENTIFIER: return "Identifier";
394            case META: return "Meta";
395            case MONEY: return "Money";
396            case NARRATIVE: return "Narrative";
397            case PARAMETERDEFINITION: return "ParameterDefinition";
398            case PERIOD: return "Period";
399            case QUANTITY: return "Quantity";
400            case RANGE: return "Range";
401            case RATIO: return "Ratio";
402            case REFERENCE: return "Reference";
403            case RELATEDARTIFACT: return "RelatedArtifact";
404            case SAMPLEDDATA: return "SampledData";
405            case SIGNATURE: return "Signature";
406            case SIMPLEQUANTITY: return "SimpleQuantity";
407            case TIMING: return "Timing";
408            case TRIGGERDEFINITION: return "TriggerDefinition";
409            case USAGECONTEXT: return "UsageContext";
410            case BASE64BINARY: return "base64Binary";
411            case BOOLEAN: return "boolean";
412            case CODE: return "code";
413            case DATE: return "date";
414            case DATETIME: return "dateTime";
415            case DECIMAL: return "decimal";
416            case ID: return "id";
417            case INSTANT: return "instant";
418            case INTEGER: return "integer";
419            case MARKDOWN: return "markdown";
420            case OID: return "oid";
421            case POSITIVEINT: return "positiveInt";
422            case STRING: return "string";
423            case TIME: return "time";
424            case UNSIGNEDINT: return "unsignedInt";
425            case URI: return "uri";
426            case UUID: return "uuid";
427            case XHTML: return "xhtml";
428            default: return "?";
429          }
430        }
431        public String getSystem() {
432          return "http://hl7.org/fhir/data-types";
433        }
434        public String getDefinition() {
435          switch (this) {
436            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 which might not be valid for mail delivery.  There are a variety of postal address formats defined around the world.";
437            case AGE: return "A duration of time during which an organism (or a process) has existed.";
438            case ANNOTATION: return "A  text note which also  contains information about who made the statement and when.";
439            case ATTACHMENT: return "For referring to data content defined in other formats.";
440            case BACKBONEELEMENT: return "Base definition for all elements that are defined inside a resource - but not those in a data type.";
441            case CODEABLECONCEPT: return "A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.";
442            case CODING: return "A reference to a code defined by a terminology system.";
443            case CONTACTDETAIL: return "Specifies contact information for a person or organization.";
444            case CONTACTPOINT: return "Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc.";
445            case CONTRIBUTOR: return "A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers.";
446            case COUNT: 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.";
447            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.";
448            case DISTANCE: return "A length - a value with a unit that is a physical distance.";
449            case DOSAGE: return "Indicates how the medication is/was taken or should be taken by the patient.";
450            case DURATION: return "A length of time.";
451            case ELEMENT: return "Base definition for all elements in a resource.";
452            case ELEMENTDEFINITION: return "Captures constraints on each element within the resource, profile, or extension.";
453            case EXTENSION: return "Optional Extension Element - found in all resources.";
454            case HUMANNAME: return "A human's name with the ability to identify parts and usage.";
455            case IDENTIFIER: return "A technical identifier - identifies some entity uniquely and unambiguously.";
456            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.";
457            case MONEY: return "An amount of economic utility in some recognized currency.";
458            case NARRATIVE: return "A human-readable formatted text, including images.";
459            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.";
460            case PERIOD: return "A time period defined by a start and end date and optionally time.";
461            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.";
462            case RANGE: return "A set of ordered Quantities defined by a low and high limit.";
463            case RATIO: return "A relationship of two Quantity values - expressed as a numerator and a denominator.";
464            case REFERENCE: return "A reference from one resource to another.";
465            case RELATEDARTIFACT: return "Related artifacts such as additional documentation, justification, or bibliographic references.";
466            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.";
467            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.";
468            case SIMPLEQUANTITY: return "";
469            case TIMING: return "Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, 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, and may be used for reporting the schedule to which past regular activities were carried out.";
470            case TRIGGERDEFINITION: return "A description of a triggering event.";
471            case USAGECONTEXT: return "Specifies clinical/business/etc metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care).";
472            case BASE64BINARY: return "A stream of bytes";
473            case BOOLEAN: return "Value of \"true\" or \"false\"";
474            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";
475            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.";
476            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.";
477            case DECIMAL: return "A rational number with implicit precision";
478            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.";
479            case INSTANT: return "An instant in time - known at least to the second";
480            case INTEGER: return "A whole number";
481            case MARKDOWN: return "A string that may contain markdown syntax for optional processing by a mark down presentation engine";
482            case OID: return "An OID represented as a URI";
483            case POSITIVEINT: return "An integer with a value that is positive (e.g. >0)";
484            case STRING: return "A sequence of Unicode characters";
485            case TIME: return "A time during the day, with no date specified";
486            case UNSIGNEDINT: return "An integer with a value that is not negative (e.g. >= 0)";
487            case URI: return "String of characters used to identify a name or a resource";
488            case UUID: return "A UUID, represented as a URI";
489            case XHTML: return "XHTML format, as defined by W3C, but restricted usage (mainly, no active content)";
490            default: return "?";
491          }
492        }
493        public String getDisplay() {
494          switch (this) {
495            case ADDRESS: return "Address";
496            case AGE: return "Age";
497            case ANNOTATION: return "Annotation";
498            case ATTACHMENT: return "Attachment";
499            case BACKBONEELEMENT: return "BackboneElement";
500            case CODEABLECONCEPT: return "CodeableConcept";
501            case CODING: return "Coding";
502            case CONTACTDETAIL: return "ContactDetail";
503            case CONTACTPOINT: return "ContactPoint";
504            case CONTRIBUTOR: return "Contributor";
505            case COUNT: return "Count";
506            case DATAREQUIREMENT: return "DataRequirement";
507            case DISTANCE: return "Distance";
508            case DOSAGE: return "Dosage";
509            case DURATION: return "Duration";
510            case ELEMENT: return "Element";
511            case ELEMENTDEFINITION: return "ElementDefinition";
512            case EXTENSION: return "Extension";
513            case HUMANNAME: return "HumanName";
514            case IDENTIFIER: return "Identifier";
515            case META: return "Meta";
516            case MONEY: return "Money";
517            case NARRATIVE: return "Narrative";
518            case PARAMETERDEFINITION: return "ParameterDefinition";
519            case PERIOD: return "Period";
520            case QUANTITY: return "Quantity";
521            case RANGE: return "Range";
522            case RATIO: return "Ratio";
523            case REFERENCE: return "Reference";
524            case RELATEDARTIFACT: return "RelatedArtifact";
525            case SAMPLEDDATA: return "SampledData";
526            case SIGNATURE: return "Signature";
527            case SIMPLEQUANTITY: return "SimpleQuantity";
528            case TIMING: return "Timing";
529            case TRIGGERDEFINITION: return "TriggerDefinition";
530            case USAGECONTEXT: return "UsageContext";
531            case BASE64BINARY: return "base64Binary";
532            case BOOLEAN: return "boolean";
533            case CODE: return "code";
534            case DATE: return "date";
535            case DATETIME: return "dateTime";
536            case DECIMAL: return "decimal";
537            case ID: return "id";
538            case INSTANT: return "instant";
539            case INTEGER: return "integer";
540            case MARKDOWN: return "markdown";
541            case OID: return "oid";
542            case POSITIVEINT: return "positiveInt";
543            case STRING: return "string";
544            case TIME: return "time";
545            case UNSIGNEDINT: return "unsignedInt";
546            case URI: return "uri";
547            case UUID: return "uuid";
548            case XHTML: return "XHTML";
549            default: return "?";
550          }
551    }
552
553
554}
555