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 DataelementStringency {
038
039        /**
040         * The data element is sufficiently well-constrained that multiple pieces of data captured according to the constraints of the data element will be comparable (though in some cases, a degree of automated conversion/normalization may be required).
041         */
042        COMPARABLE, 
043        /**
044         * The data element is fully specified down to a single value set, single unit of measure, single data type, etc.  Multiple pieces of data associated with this data element are fully comparable.
045         */
046        FULLYSPECIFIED, 
047        /**
048         * The data element allows multiple units of measure having equivalent meaning; e.g. "cc" (cubic centimeter) and "mL" (milliliter).
049         */
050        EQUIVALENT, 
051        /**
052         * The data element allows multiple units of measure that are convertable between each other (e.g. inches and centimeters) and/or allows data to be captured in multiple value sets for which a known mapping exists allowing conversion of meaning.
053         */
054        CONVERTABLE, 
055        /**
056         * A convertable data element where unit conversions are different only by a power of 10; e.g. g, mg, kg.
057         */
058        SCALEABLE, 
059        /**
060         * The data element is unconstrained in units, choice of data types and/or choice of vocabulary such that automated comparison of data captured using the data element is not possible.
061         */
062        FLEXIBLE, 
063        /**
064         * added to help the parsers
065         */
066        NULL;
067        public static DataelementStringency fromCode(String codeString) throws FHIRException {
068            if (codeString == null || "".equals(codeString))
069                return null;
070        if ("comparable".equals(codeString))
071          return COMPARABLE;
072        if ("fully-specified".equals(codeString))
073          return FULLYSPECIFIED;
074        if ("equivalent".equals(codeString))
075          return EQUIVALENT;
076        if ("convertable".equals(codeString))
077          return CONVERTABLE;
078        if ("scaleable".equals(codeString))
079          return SCALEABLE;
080        if ("flexible".equals(codeString))
081          return FLEXIBLE;
082        throw new FHIRException("Unknown DataelementStringency code '"+codeString+"'");
083        }
084        public String toCode() {
085          switch (this) {
086            case COMPARABLE: return "comparable";
087            case FULLYSPECIFIED: return "fully-specified";
088            case EQUIVALENT: return "equivalent";
089            case CONVERTABLE: return "convertable";
090            case SCALEABLE: return "scaleable";
091            case FLEXIBLE: return "flexible";
092            default: return "?";
093          }
094        }
095        public String getSystem() {
096          return "http://hl7.org/fhir/dataelement-stringency";
097        }
098        public String getDefinition() {
099          switch (this) {
100            case COMPARABLE: return "The data element is sufficiently well-constrained that multiple pieces of data captured according to the constraints of the data element will be comparable (though in some cases, a degree of automated conversion/normalization may be required).";
101            case FULLYSPECIFIED: return "The data element is fully specified down to a single value set, single unit of measure, single data type, etc.  Multiple pieces of data associated with this data element are fully comparable.";
102            case EQUIVALENT: return "The data element allows multiple units of measure having equivalent meaning; e.g. \"cc\" (cubic centimeter) and \"mL\" (milliliter).";
103            case CONVERTABLE: return "The data element allows multiple units of measure that are convertable between each other (e.g. inches and centimeters) and/or allows data to be captured in multiple value sets for which a known mapping exists allowing conversion of meaning.";
104            case SCALEABLE: return "A convertable data element where unit conversions are different only by a power of 10; e.g. g, mg, kg.";
105            case FLEXIBLE: return "The data element is unconstrained in units, choice of data types and/or choice of vocabulary such that automated comparison of data captured using the data element is not possible.";
106            default: return "?";
107          }
108        }
109        public String getDisplay() {
110          switch (this) {
111            case COMPARABLE: return "Comparable";
112            case FULLYSPECIFIED: return "Fully Specified";
113            case EQUIVALENT: return "Equivalent";
114            case CONVERTABLE: return "Convertable";
115            case SCALEABLE: return "Scaleable";
116            case FLEXIBLE: return "Flexible";
117            default: return "?";
118          }
119    }
120
121
122}
123