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