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 ListExampleCodes { 041 042 /** 043 * A list of alerts for the patient. 044 */ 045 ALERTS, 046 /** 047 * A list of part adverse reactions. 048 */ 049 ADVERSERXNS, 050 /** 051 * A list of Allergies for the patient. 052 */ 053 ALLERGIES, 054 /** 055 * A list of medication statements for the patient. 056 */ 057 MEDICATIONS, 058 /** 059 * A list of problems that the patient is known of have (or have had in the past). 060 */ 061 PROBLEMS, 062 /** 063 * A list of items that constitute a set of work to be performed (typically this code would be specialized for more specific uses, such as a ward round list). 064 */ 065 WORKLIST, 066 /** 067 * A list of items waiting for an event (perhaps a surgical patient waiting list). 068 */ 069 WAITING, 070 /** 071 * A set of protocols to be followed. 072 */ 073 PROTOCOLS, 074 /** 075 * A set of care plans that apply in a particular context of care. 076 */ 077 PLANS, 078 /** 079 * added to help the parsers 080 */ 081 NULL; 082 public static ListExampleCodes fromCode(String codeString) throws FHIRException { 083 if (codeString == null || "".equals(codeString)) 084 return null; 085 if ("alerts".equals(codeString)) 086 return ALERTS; 087 if ("adverserxns".equals(codeString)) 088 return ADVERSERXNS; 089 if ("allergies".equals(codeString)) 090 return ALLERGIES; 091 if ("medications".equals(codeString)) 092 return MEDICATIONS; 093 if ("problems".equals(codeString)) 094 return PROBLEMS; 095 if ("worklist".equals(codeString)) 096 return WORKLIST; 097 if ("waiting".equals(codeString)) 098 return WAITING; 099 if ("protocols".equals(codeString)) 100 return PROTOCOLS; 101 if ("plans".equals(codeString)) 102 return PLANS; 103 throw new FHIRException("Unknown ListExampleCodes code '"+codeString+"'"); 104 } 105 public String toCode() { 106 switch (this) { 107 case ALERTS: return "alerts"; 108 case ADVERSERXNS: return "adverserxns"; 109 case ALLERGIES: return "allergies"; 110 case MEDICATIONS: return "medications"; 111 case PROBLEMS: return "problems"; 112 case WORKLIST: return "worklist"; 113 case WAITING: return "waiting"; 114 case PROTOCOLS: return "protocols"; 115 case PLANS: return "plans"; 116 case NULL: return null; 117 default: return "?"; 118 } 119 } 120 public String getSystem() { 121 return "http://hl7.org/fhir/list-example-use-codes"; 122 } 123 public String getDefinition() { 124 switch (this) { 125 case ALERTS: return "A list of alerts for the patient."; 126 case ADVERSERXNS: return "A list of part adverse reactions."; 127 case ALLERGIES: return "A list of Allergies for the patient."; 128 case MEDICATIONS: return "A list of medication statements for the patient."; 129 case PROBLEMS: return "A list of problems that the patient is known of have (or have had in the past)."; 130 case WORKLIST: return "A list of items that constitute a set of work to be performed (typically this code would be specialized for more specific uses, such as a ward round list)."; 131 case WAITING: return "A list of items waiting for an event (perhaps a surgical patient waiting list)."; 132 case PROTOCOLS: return "A set of protocols to be followed."; 133 case PLANS: return "A set of care plans that apply in a particular context of care."; 134 case NULL: return null; 135 default: return "?"; 136 } 137 } 138 public String getDisplay() { 139 switch (this) { 140 case ALERTS: return "Alerts"; 141 case ADVERSERXNS: return "Adverse Reactions"; 142 case ALLERGIES: return "Allergies"; 143 case MEDICATIONS: return "Medication List"; 144 case PROBLEMS: return "Problem List"; 145 case WORKLIST: return "Worklist"; 146 case WAITING: return "Waiting List"; 147 case PROTOCOLS: return "Protocols"; 148 case PLANS: return "Care Plans"; 149 case NULL: return null; 150 default: return "?"; 151 } 152 } 153 154 155}