package org.hl7.fhir.dstu3.model.codesystems; /* Copyright (c) 2011+, HL7, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of HL7 nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ // Generated on Mon, Apr 17, 2017 17:38-0400 for FHIR v3.0.1 import org.hl7.fhir.exceptions.FHIRException; public enum DataelementStringency { /** * 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). */ COMPARABLE, /** * 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. */ FULLYSPECIFIED, /** * The data element allows multiple units of measure having equivalent meaning; e.g. "cc" (cubic centimeter) and "mL" (milliliter). */ EQUIVALENT, /** * 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. */ CONVERTABLE, /** * A convertable data element where unit conversions are different only by a power of 10; e.g. g, mg, kg. */ SCALEABLE, /** * 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. */ FLEXIBLE, /** * added to help the parsers */ NULL; public static DataelementStringency fromCode(String codeString) throws FHIRException { if (codeString == null || "".equals(codeString)) return null; if ("comparable".equals(codeString)) return COMPARABLE; if ("fully-specified".equals(codeString)) return FULLYSPECIFIED; if ("equivalent".equals(codeString)) return EQUIVALENT; if ("convertable".equals(codeString)) return CONVERTABLE; if ("scaleable".equals(codeString)) return SCALEABLE; if ("flexible".equals(codeString)) return FLEXIBLE; throw new FHIRException("Unknown DataelementStringency code '"+codeString+"'"); } public String toCode() { switch (this) { case COMPARABLE: return "comparable"; case FULLYSPECIFIED: return "fully-specified"; case EQUIVALENT: return "equivalent"; case CONVERTABLE: return "convertable"; case SCALEABLE: return "scaleable"; case FLEXIBLE: return "flexible"; default: return "?"; } } public String getSystem() { return "http://hl7.org/fhir/dataelement-stringency"; } public String getDefinition() { switch (this) { 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)."; 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."; case EQUIVALENT: return "The data element allows multiple units of measure having equivalent meaning; e.g. \"cc\" (cubic centimeter) and \"mL\" (milliliter)."; 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."; case SCALEABLE: return "A convertable data element where unit conversions are different only by a power of 10; e.g. g, mg, kg."; 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."; default: return "?"; } } public String getDisplay() { switch (this) { case COMPARABLE: return "Comparable"; case FULLYSPECIFIED: return "Fully Specified"; case EQUIVALENT: return "Equivalent"; case CONVERTABLE: return "Convertable"; case SCALEABLE: return "Scaleable"; case FLEXIBLE: return "Flexible"; default: return "?"; } } }