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 V3PatientImportance {
037
038  /**
039   * Board member of health care organization
040   */
041  BM,
042  /**
043   * Family member of staff physician
044   */
045  DFM,
046  /**
047   * Member of the health care organization physician staff
048   */
049  DR,
050  /**
051   * Financial donor to the health care organization
052   */
053  FD,
054  /**
055   * Foreign citizen dignitary of interest to the health care organization
056   */
057  FOR,
058  /**
059   * Government dignitary of interest to the organization
060   */
061  GOVT,
062  /**
063   * Family member of staff member
064   */
065  SFM,
066  /**
067   * Staff member of the health care organization
068   */
069  STF,
070  /**
071   * Very important person of interest to the health care organization
072   */
073  VIP,
074  /**
075   * added to help the parsers
076   */
077  NULL;
078
079  public static V3PatientImportance fromCode(String codeString) throws FHIRException {
080    if (codeString == null || "".equals(codeString))
081      return null;
082    if ("BM".equals(codeString))
083      return BM;
084    if ("DFM".equals(codeString))
085      return DFM;
086    if ("DR".equals(codeString))
087      return DR;
088    if ("FD".equals(codeString))
089      return FD;
090    if ("FOR".equals(codeString))
091      return FOR;
092    if ("GOVT".equals(codeString))
093      return GOVT;
094    if ("SFM".equals(codeString))
095      return SFM;
096    if ("STF".equals(codeString))
097      return STF;
098    if ("VIP".equals(codeString))
099      return VIP;
100    throw new FHIRException("Unknown V3PatientImportance code '" + codeString + "'");
101  }
102
103  public String toCode() {
104    switch (this) {
105    case BM:
106      return "BM";
107    case DFM:
108      return "DFM";
109    case DR:
110      return "DR";
111    case FD:
112      return "FD";
113    case FOR:
114      return "FOR";
115    case GOVT:
116      return "GOVT";
117    case SFM:
118      return "SFM";
119    case STF:
120      return "STF";
121    case VIP:
122      return "VIP";
123    case NULL:
124      return null;
125    default:
126      return "?";
127    }
128  }
129
130  public String getSystem() {
131    return "http://terminology.hl7.org/CodeSystem/v3-PatientImportance";
132  }
133
134  public String getDefinition() {
135    switch (this) {
136    case BM:
137      return "Board member of health care organization";
138    case DFM:
139      return "Family member of staff physician";
140    case DR:
141      return "Member of the health care organization physician staff";
142    case FD:
143      return "Financial donor to the health care organization";
144    case FOR:
145      return "Foreign citizen dignitary of interest to the health care organization";
146    case GOVT:
147      return "Government dignitary of interest to the organization";
148    case SFM:
149      return "Family member of staff member";
150    case STF:
151      return "Staff member of the health care organization";
152    case VIP:
153      return "Very important person of interest to the health care organization";
154    case NULL:
155      return null;
156    default:
157      return "?";
158    }
159  }
160
161  public String getDisplay() {
162    switch (this) {
163    case BM:
164      return "Board Member";
165    case DFM:
166      return "Physician Family Member";
167    case DR:
168      return "Staff Physician";
169    case FD:
170      return "Financial Donor";
171    case FOR:
172      return "Foreign Dignitary";
173    case GOVT:
174      return "Government Dignitary";
175    case SFM:
176      return "Staff Family Member";
177    case STF:
178      return "Staff Member";
179    case VIP:
180      return "Very Important Person";
181    case NULL:
182      return null;
183    default:
184      return "?";
185    }
186  }
187
188}