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