001package org.hl7.fhir.r4.model.codesystems; 002 003/*- 004 * #%L 005 * org.hl7.fhir.r4 006 * %% 007 * Copyright (C) 2014 - 2019 Health Level 7 008 * %% 009 * Licensed under the Apache License, Version 2.0 (the "License"); 010 * you may not use this file except in compliance with the License. 011 * You may obtain a copy of the License at 012 * 013 * http://www.apache.org/licenses/LICENSE-2.0 014 * 015 * Unless required by applicable law or agreed to in writing, software 016 * distributed under the License is distributed on an "AS IS" BASIS, 017 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 018 * See the License for the specific language governing permissions and 019 * limitations under the License. 020 * #L% 021 */ 022 023 024/* 025 Copyright (c) 2011+, HL7, Inc. 026 All rights reserved. 027 028 Redistribution and use in source and binary forms, with or without modification, 029 are permitted provided that the following conditions are met: 030 031 * Redistributions of source code must retain the above copyright notice, this 032 list of conditions and the following disclaimer. 033 * Redistributions in binary form must reproduce the above copyright notice, 034 this list of conditions and the following disclaimer in the documentation 035 and/or other materials provided with the distribution. 036 * Neither the name of HL7 nor the names of its contributors may be used to 037 endorse or promote products derived from this software without specific 038 prior written permission. 039 040 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 041 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 042 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 043 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 044 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 045 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 046 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 047 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 048 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 049 POSSIBILITY OF SUCH DAMAGE. 050 051*/ 052 053// Generated on Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0 054 055 056import org.hl7.fhir.exceptions.FHIRException; 057 058public enum ConceptMapEquivalence { 059 060 /** 061 * The concepts are related to each other, and have at least some overlap in meaning, but the exact relationship is not known. 062 */ 063 RELATEDTO, 064 /** 065 * The definitions of the concepts mean the same thing (including when structural implications of meaning are considered) (i.e. extensionally identical). 066 */ 067 EQUIVALENT, 068 /** 069 * 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). 070 */ 071 EQUAL, 072 /** 073 * The target mapping is wider in meaning than the source concept. 074 */ 075 WIDER, 076 /** 077 * The target mapping subsumes the meaning of the source concept (e.g. the source is-a target). 078 */ 079 SUBSUMES, 080 /** 081 * 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. 082 */ 083 NARROWER, 084 /** 085 * The target mapping specializes the meaning of the source concept (e.g. the target is-a source). 086 */ 087 SPECIALIZES, 088 /** 089 * 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 inexact SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally. 090 */ 091 INEXACT, 092 /** 093 * There is no match for this concept in the target code system. 094 */ 095 UNMATCHED, 096 /** 097 * This is an explicit assertion that there is no mapping between the source and target concept. 098 */ 099 DISJOINT, 100 /** 101 * added to help the parsers 102 */ 103 NULL; 104 public static ConceptMapEquivalence fromCode(String codeString) throws FHIRException { 105 if (codeString == null || "".equals(codeString)) 106 return null; 107 if ("relatedto".equals(codeString)) 108 return RELATEDTO; 109 if ("equivalent".equals(codeString)) 110 return EQUIVALENT; 111 if ("equal".equals(codeString)) 112 return EQUAL; 113 if ("wider".equals(codeString)) 114 return WIDER; 115 if ("subsumes".equals(codeString)) 116 return SUBSUMES; 117 if ("narrower".equals(codeString)) 118 return NARROWER; 119 if ("specializes".equals(codeString)) 120 return SPECIALIZES; 121 if ("inexact".equals(codeString)) 122 return INEXACT; 123 if ("unmatched".equals(codeString)) 124 return UNMATCHED; 125 if ("disjoint".equals(codeString)) 126 return DISJOINT; 127 throw new FHIRException("Unknown ConceptMapEquivalence code '"+codeString+"'"); 128 } 129 public String toCode() { 130 switch (this) { 131 case RELATEDTO: return "relatedto"; 132 case EQUIVALENT: return "equivalent"; 133 case EQUAL: return "equal"; 134 case WIDER: return "wider"; 135 case SUBSUMES: return "subsumes"; 136 case NARROWER: return "narrower"; 137 case SPECIALIZES: return "specializes"; 138 case INEXACT: return "inexact"; 139 case UNMATCHED: return "unmatched"; 140 case DISJOINT: return "disjoint"; 141 default: return "?"; 142 } 143 } 144 public String getSystem() { 145 return "http://hl7.org/fhir/concept-map-equivalence"; 146 } 147 public String getDefinition() { 148 switch (this) { 149 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."; 150 case EQUIVALENT: return "The definitions of the concepts mean the same thing (including when structural implications of meaning are considered) (i.e. extensionally identical)."; 151 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)."; 152 case WIDER: return "The target mapping is wider in meaning than the source concept."; 153 case SUBSUMES: return "The target mapping subsumes the meaning of the source concept (e.g. the source is-a target)."; 154 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."; 155 case SPECIALIZES: return "The target mapping specializes the meaning of the source concept (e.g. the target is-a source)."; 156 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 inexact SHALL be described in the comments in this case, and applications should be careful when attempting to use these mappings operationally."; 157 case UNMATCHED: return "There is no match for this concept in the target code system."; 158 case DISJOINT: return "This is an explicit assertion that there is no mapping between the source and target concept."; 159 default: return "?"; 160 } 161 } 162 public String getDisplay() { 163 switch (this) { 164 case RELATEDTO: return "Related To"; 165 case EQUIVALENT: return "Equivalent"; 166 case EQUAL: return "Equal"; 167 case WIDER: return "Wider"; 168 case SUBSUMES: return "Subsumes"; 169 case NARROWER: return "Narrower"; 170 case SPECIALIZES: return "Specializes"; 171 case INEXACT: return "Inexact"; 172 case UNMATCHED: return "Unmatched"; 173 case DISJOINT: return "Disjoint"; 174 default: return "?"; 175 } 176 } 177 178 179} 180