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 VerificationresultPrimarySourceType {
037
038  /**
039   * null
040   */
041  LICBOARD,
042  /**
043   * null
044   */
045  PRIM,
046  /**
047   * null
048   */
049  CONTED,
050  /**
051   * null
052   */
053  POSTSERV,
054  /**
055   * null
056   */
057  RELOWN,
058  /**
059   * null
060   */
061  REGAUTH,
062  /**
063   * null
064   */
065  LEGAL,
066  /**
067   * null
068   */
069  ISSUER,
070  /**
071   * null
072   */
073  AUTHSOURCE,
074  /**
075   * added to help the parsers
076   */
077  NULL;
078
079  public static VerificationresultPrimarySourceType fromCode(String codeString) throws FHIRException {
080    if (codeString == null || "".equals(codeString))
081      return null;
082    if ("lic-board".equals(codeString))
083      return LICBOARD;
084    if ("prim".equals(codeString))
085      return PRIM;
086    if ("cont-ed".equals(codeString))
087      return CONTED;
088    if ("post-serv".equals(codeString))
089      return POSTSERV;
090    if ("rel-own".equals(codeString))
091      return RELOWN;
092    if ("reg-auth".equals(codeString))
093      return REGAUTH;
094    if ("legal".equals(codeString))
095      return LEGAL;
096    if ("issuer".equals(codeString))
097      return ISSUER;
098    if ("auth-source".equals(codeString))
099      return AUTHSOURCE;
100    throw new FHIRException("Unknown VerificationresultPrimarySourceType code '" + codeString + "'");
101  }
102
103  public String toCode() {
104    switch (this) {
105    case LICBOARD:
106      return "lic-board";
107    case PRIM:
108      return "prim";
109    case CONTED:
110      return "cont-ed";
111    case POSTSERV:
112      return "post-serv";
113    case RELOWN:
114      return "rel-own";
115    case REGAUTH:
116      return "reg-auth";
117    case LEGAL:
118      return "legal";
119    case ISSUER:
120      return "issuer";
121    case AUTHSOURCE:
122      return "auth-source";
123    case NULL:
124      return null;
125    default:
126      return "?";
127    }
128  }
129
130  public String getSystem() {
131    return "http://terminology.hl7.org/CodeSystem/primary-source-type";
132  }
133
134  public String getDefinition() {
135    switch (this) {
136    case LICBOARD:
137      return "";
138    case PRIM:
139      return "";
140    case CONTED:
141      return "";
142    case POSTSERV:
143      return "";
144    case RELOWN:
145      return "";
146    case REGAUTH:
147      return "";
148    case LEGAL:
149      return "";
150    case ISSUER:
151      return "";
152    case AUTHSOURCE:
153      return "";
154    case NULL:
155      return null;
156    default:
157      return "?";
158    }
159  }
160
161  public String getDisplay() {
162    switch (this) {
163    case LICBOARD:
164      return "License Board";
165    case PRIM:
166      return "Primary Education";
167    case CONTED:
168      return "Continuing Education";
169    case POSTSERV:
170      return "Postal Service";
171    case RELOWN:
172      return "Relationship owner";
173    case REGAUTH:
174      return "Registration Authority";
175    case LEGAL:
176      return "Legal source";
177    case ISSUER:
178      return "Issuing source";
179    case AUTHSOURCE:
180      return "Authoritative source";
181    case NULL:
182      return null;
183    default:
184      return "?";
185    }
186  }
187
188}