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 Wed, Jan 30, 2019 16:19-0500 for FHIR v4.0.0 033 034import org.hl7.fhir.exceptions.FHIRException; 035 036public enum GoalPriority { 037 038 /** 039 * Indicates that the goal is of considerable importance and should be a primary 040 * focus of care delivery. 041 */ 042 HIGHPRIORITY, 043 /** 044 * Indicates that the goal has a reasonable degree of importance and that 045 * concrete action should be taken towards the goal. Attainment is not as 046 * critical as high-priority goals. 047 */ 048 MEDIUMPRIORITY, 049 /** 050 * The goal is desirable but is not sufficiently important to devote significant 051 * resources to. Achievement of the goal may be sought when incidental to 052 * achieving other goals. 053 */ 054 LOWPRIORITY, 055 /** 056 * added to help the parsers 057 */ 058 NULL; 059 060 public static GoalPriority fromCode(String codeString) throws FHIRException { 061 if (codeString == null || "".equals(codeString)) 062 return null; 063 if ("high-priority".equals(codeString)) 064 return HIGHPRIORITY; 065 if ("medium-priority".equals(codeString)) 066 return MEDIUMPRIORITY; 067 if ("low-priority".equals(codeString)) 068 return LOWPRIORITY; 069 throw new FHIRException("Unknown GoalPriority code '" + codeString + "'"); 070 } 071 072 public String toCode() { 073 switch (this) { 074 case HIGHPRIORITY: 075 return "high-priority"; 076 case MEDIUMPRIORITY: 077 return "medium-priority"; 078 case LOWPRIORITY: 079 return "low-priority"; 080 case NULL: 081 return null; 082 default: 083 return "?"; 084 } 085 } 086 087 public String getSystem() { 088 return "http://terminology.hl7.org/CodeSystem/goal-priority"; 089 } 090 091 public String getDefinition() { 092 switch (this) { 093 case HIGHPRIORITY: 094 return "Indicates that the goal is of considerable importance and should be a primary focus of care delivery."; 095 case MEDIUMPRIORITY: 096 return "Indicates that the goal has a reasonable degree of importance and that concrete action should be taken towards the goal. Attainment is not as critical as high-priority goals."; 097 case LOWPRIORITY: 098 return "The goal is desirable but is not sufficiently important to devote significant resources to. Achievement of the goal may be sought when incidental to achieving other goals."; 099 case NULL: 100 return null; 101 default: 102 return "?"; 103 } 104 } 105 106 public String getDisplay() { 107 switch (this) { 108 case HIGHPRIORITY: 109 return "High Priority"; 110 case MEDIUMPRIORITY: 111 return "Medium Priority"; 112 case LOWPRIORITY: 113 return "Low Priority"; 114 case NULL: 115 return null; 116 default: 117 return "?"; 118 } 119 } 120 121}