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 KnowledgeResourceTypes { 038 039 /** 040 * The definition of a specific activity to be taken, independent of any particular patient or context. 041 */ 042 ACTIVITYDEFINITION, 043 /** 044 * A set of codes drawn from one or more code systems. 045 */ 046 CODESYSTEM, 047 /** 048 * A map from one set of concepts to one or more other concepts. 049 */ 050 CONCEPTMAP, 051 /** 052 * Represents a library of quality improvement components. 053 */ 054 LIBRARY, 055 /** 056 * A quality measure definition. 057 */ 058 MEASURE, 059 /** 060 * The definition of a plan for a series of actions, independent of any specific patient or context. 061 */ 062 PLANDEFINITION, 063 /** 064 * Structural Definition. 065 */ 066 STRUCTUREDEFINITION, 067 /** 068 * A Map of relationships between 2 structures that can be used to transform data. 069 */ 070 STRUCTUREMAP, 071 /** 072 * A set of codes drawn from one or more code systems. 073 */ 074 VALUESET, 075 /** 076 * added to help the parsers 077 */ 078 NULL; 079 public static KnowledgeResourceTypes fromCode(String codeString) throws FHIRException { 080 if (codeString == null || "".equals(codeString)) 081 return null; 082 if ("ActivityDefinition".equals(codeString)) 083 return ACTIVITYDEFINITION; 084 if ("CodeSystem".equals(codeString)) 085 return CODESYSTEM; 086 if ("ConceptMap".equals(codeString)) 087 return CONCEPTMAP; 088 if ("Library".equals(codeString)) 089 return LIBRARY; 090 if ("Measure".equals(codeString)) 091 return MEASURE; 092 if ("PlanDefinition".equals(codeString)) 093 return PLANDEFINITION; 094 if ("StructureDefinition".equals(codeString)) 095 return STRUCTUREDEFINITION; 096 if ("StructureMap".equals(codeString)) 097 return STRUCTUREMAP; 098 if ("ValueSet".equals(codeString)) 099 return VALUESET; 100 throw new FHIRException("Unknown KnowledgeResourceTypes code '"+codeString+"'"); 101 } 102 public String toCode() { 103 switch (this) { 104 case ACTIVITYDEFINITION: return "ActivityDefinition"; 105 case CODESYSTEM: return "CodeSystem"; 106 case CONCEPTMAP: return "ConceptMap"; 107 case LIBRARY: return "Library"; 108 case MEASURE: return "Measure"; 109 case PLANDEFINITION: return "PlanDefinition"; 110 case STRUCTUREDEFINITION: return "StructureDefinition"; 111 case STRUCTUREMAP: return "StructureMap"; 112 case VALUESET: return "ValueSet"; 113 default: return "?"; 114 } 115 } 116 public String getSystem() { 117 return "http://hl7.org/fhir/knowledge-resource-types"; 118 } 119 public String getDefinition() { 120 switch (this) { 121 case ACTIVITYDEFINITION: return "The definition of a specific activity to be taken, independent of any particular patient or context."; 122 case CODESYSTEM: return "A set of codes drawn from one or more code systems."; 123 case CONCEPTMAP: return "A map from one set of concepts to one or more other concepts."; 124 case LIBRARY: return "Represents a library of quality improvement components."; 125 case MEASURE: return "A quality measure definition."; 126 case PLANDEFINITION: return "The definition of a plan for a series of actions, independent of any specific patient or context."; 127 case STRUCTUREDEFINITION: return "Structural Definition."; 128 case STRUCTUREMAP: return "A Map of relationships between 2 structures that can be used to transform data."; 129 case VALUESET: return "A set of codes drawn from one or more code systems."; 130 default: return "?"; 131 } 132 } 133 public String getDisplay() { 134 switch (this) { 135 case ACTIVITYDEFINITION: return "ActivityDefinition"; 136 case CODESYSTEM: return "CodeSystem"; 137 case CONCEPTMAP: return "ConceptMap"; 138 case LIBRARY: return "Library"; 139 case MEASURE: return "Measure"; 140 case PLANDEFINITION: return "PlanDefinition"; 141 case STRUCTUREDEFINITION: return "StructureDefinition"; 142 case STRUCTUREMAP: return "StructureMap"; 143 case VALUESET: return "ValueSet"; 144 default: return "?"; 145 } 146 } 147 148 149} 150