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 ListExampleCodes {
037
038  /**
039   * A list of alerts for the patient.
040   */
041  ALERTS,
042  /**
043   * A list of part adverse reactions.
044   */
045  ADVERSERXNS,
046  /**
047   * A list of Allergies for the patient.
048   */
049  ALLERGIES,
050  /**
051   * A list of medication statements for the patient.
052   */
053  MEDICATIONS,
054  /**
055   * A list of problems that the patient is known of have (or have had in the
056   * past).
057   */
058  PROBLEMS,
059  /**
060   * A list of items that constitute a set of work to be performed (typically this
061   * code would be specialized for more specific uses, such as a ward round list).
062   */
063  WORKLIST,
064  /**
065   * A list of items waiting for an event (perhaps a surgical patient waiting
066   * list).
067   */
068  WAITING,
069  /**
070   * A set of protocols to be followed.
071   */
072  PROTOCOLS,
073  /**
074   * A set of care plans that apply in a particular context of care.
075   */
076  PLANS,
077  /**
078   * added to help the parsers
079   */
080  NULL;
081
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
106  public String toCode() {
107    switch (this) {
108    case ALERTS:
109      return "alerts";
110    case ADVERSERXNS:
111      return "adverserxns";
112    case ALLERGIES:
113      return "allergies";
114    case MEDICATIONS:
115      return "medications";
116    case PROBLEMS:
117      return "problems";
118    case WORKLIST:
119      return "worklist";
120    case WAITING:
121      return "waiting";
122    case PROTOCOLS:
123      return "protocols";
124    case PLANS:
125      return "plans";
126    case NULL:
127      return null;
128    default:
129      return "?";
130    }
131  }
132
133  public String getSystem() {
134    return "http://terminology.hl7.org/CodeSystem/list-example-use-codes";
135  }
136
137  public String getDefinition() {
138    switch (this) {
139    case ALERTS:
140      return "A list of alerts for the patient.";
141    case ADVERSERXNS:
142      return "A list of part adverse reactions.";
143    case ALLERGIES:
144      return "A list of Allergies for the patient.";
145    case MEDICATIONS:
146      return "A list of medication statements for the patient.";
147    case PROBLEMS:
148      return "A list of problems that the patient is known of have (or have had in the past).";
149    case WORKLIST:
150      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).";
151    case WAITING:
152      return "A list of items waiting for an event (perhaps a surgical patient waiting list).";
153    case PROTOCOLS:
154      return "A set of protocols to be followed.";
155    case PLANS:
156      return "A set of care plans that apply in a particular context of care.";
157    case NULL:
158      return null;
159    default:
160      return "?";
161    }
162  }
163
164  public String getDisplay() {
165    switch (this) {
166    case ALERTS:
167      return "Alerts";
168    case ADVERSERXNS:
169      return "Adverse Reactions";
170    case ALLERGIES:
171      return "Allergies";
172    case MEDICATIONS:
173      return "Medication List";
174    case PROBLEMS:
175      return "Problem List";
176    case WORKLIST:
177      return "Worklist";
178    case WAITING:
179      return "Waiting List";
180    case PROTOCOLS:
181      return "Protocols";
182    case PLANS:
183      return "Care Plans";
184    case NULL:
185      return null;
186    default:
187      return "?";
188    }
189  }
190
191}