001package org.hl7.fhir.dstu3.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 Sat, Mar 25, 2017 21:03-0400 for FHIR v3.0.0
036
037
038import org.hl7.fhir.exceptions.FHIRException;
039
040public enum ConceptMapEquivalence {
041
042        /**
043         * The concepts are related to each other, and have at least some overlap in meaning, but the exact relationship is not known
044         */
045        RELATEDTO, 
046        /**
047         * The definitions of the concepts mean the same thing (including when structural implications of meaning are considered) (i.e. extensionally identical).
048         */
049        EQUIVALENT, 
050        /**
051         * The definitions of the concepts are exactly the same (i.e. only grammatical differences) and structural implications of meaning are identical or irrelevant (i.e. intentionally identical).
052         */
053        EQUAL, 
054        /**
055         * The target mapping is wider in meaning than the source concept.
056         */
057        WIDER, 
058        /**
059         * The target mapping subsumes the meaning of the source concept (e.g. the source is-a target).
060         */
061        SUBSUMES, 
062        /**
063         * The target mapping is narrower in meaning than the source concept. The sense in which the mapping is narrower SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally.
064         */
065        NARROWER, 
066        /**
067         * The target mapping specializes the meaning of the source concept (e.g. the target is-a source).
068         */
069        SPECIALIZES, 
070        /**
071         * The target mapping overlaps with the source concept, but both source and target cover additional meaning, or the definitions are imprecise and it is uncertain whether they have the same boundaries to their meaning. The sense in which the mapping is narrower SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally.
072         */
073        INEXACT, 
074        /**
075         * There is no match for this concept in the destination concept system.
076         */
077        UNMATCHED, 
078        /**
079         * This is an explicit assertion that there is no mapping between the source and target concept.
080         */
081        DISJOINT, 
082        /**
083         * added to help the parsers
084         */
085        NULL;
086        public static ConceptMapEquivalence fromCode(String codeString) throws FHIRException {
087            if (codeString == null || "".equals(codeString))
088                return null;
089        if ("relatedto".equals(codeString))
090          return RELATEDTO;
091        if ("equivalent".equals(codeString))
092          return EQUIVALENT;
093        if ("equal".equals(codeString))
094          return EQUAL;
095        if ("wider".equals(codeString))
096          return WIDER;
097        if ("subsumes".equals(codeString))
098          return SUBSUMES;
099        if ("narrower".equals(codeString))
100          return NARROWER;
101        if ("specializes".equals(codeString))
102          return SPECIALIZES;
103        if ("inexact".equals(codeString))
104          return INEXACT;
105        if ("unmatched".equals(codeString))
106          return UNMATCHED;
107        if ("disjoint".equals(codeString))
108          return DISJOINT;
109        throw new FHIRException("Unknown ConceptMapEquivalence code '"+codeString+"'");
110        }
111        public String toCode() {
112          switch (this) {
113            case RELATEDTO: return "relatedto";
114            case EQUIVALENT: return "equivalent";
115            case EQUAL: return "equal";
116            case WIDER: return "wider";
117            case SUBSUMES: return "subsumes";
118            case NARROWER: return "narrower";
119            case SPECIALIZES: return "specializes";
120            case INEXACT: return "inexact";
121            case UNMATCHED: return "unmatched";
122            case DISJOINT: return "disjoint";
123            case NULL: return null;
124            default: return "?";
125          }
126        }
127        public String getSystem() {
128          return "http://hl7.org/fhir/concept-map-equivalence";
129        }
130        public String getDefinition() {
131          switch (this) {
132            case RELATEDTO: return "The concepts are related to each other, and have at least some overlap in meaning, but the exact relationship is not known";
133            case EQUIVALENT: return "The definitions of the concepts mean the same thing (including when structural implications of meaning are considered) (i.e. extensionally identical).";
134            case EQUAL: return "The definitions of the concepts are exactly the same (i.e. only grammatical differences) and structural implications of meaning are identical or irrelevant (i.e. intentionally identical).";
135            case WIDER: return "The target mapping is wider in meaning than the source concept.";
136            case SUBSUMES: return "The target mapping subsumes the meaning of the source concept (e.g. the source is-a target).";
137            case NARROWER: return "The target mapping is narrower in meaning than the source concept. The sense in which the mapping is narrower SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally.";
138            case SPECIALIZES: return "The target mapping specializes the meaning of the source concept (e.g. the target is-a source).";
139            case INEXACT: return "The target mapping overlaps with the source concept, but both source and target cover additional meaning, or the definitions are imprecise and it is uncertain whether they have the same boundaries to their meaning. The sense in which the mapping is narrower SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally.";
140            case UNMATCHED: return "There is no match for this concept in the destination concept system.";
141            case DISJOINT: return "This is an explicit assertion that there is no mapping between the source and target concept.";
142            case NULL: return null;
143            default: return "?";
144          }
145        }
146        public String getDisplay() {
147          switch (this) {
148            case RELATEDTO: return "Related To";
149            case EQUIVALENT: return "Equivalent";
150            case EQUAL: return "Equal";
151            case WIDER: return "Wider";
152            case SUBSUMES: return "Subsumes";
153            case NARROWER: return "Narrower";
154            case SPECIALIZES: return "Specializes";
155            case INEXACT: return "Inexact";
156            case UNMATCHED: return "Unmatched";
157            case DISJOINT: return "Disjoint";
158            case NULL: return null;
159            default: return "?";
160          }
161    }
162
163
164}