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.dstu3.model.EnumFactory;
039
040public class V3AcknowledgementDetailCodeEnumFactory implements EnumFactory<V3AcknowledgementDetailCode> {
041
042  public V3AcknowledgementDetailCode fromCode(String codeString) throws IllegalArgumentException {
043    if (codeString == null || "".equals(codeString))
044      return null;
045    if ("_AcknowledgementDetailNotSupportedCode".equals(codeString))
046      return V3AcknowledgementDetailCode._ACKNOWLEDGEMENTDETAILNOTSUPPORTEDCODE;
047    if ("NS200".equals(codeString))
048      return V3AcknowledgementDetailCode.NS200;
049    if ("NS202".equals(codeString))
050      return V3AcknowledgementDetailCode.NS202;
051    if ("NS203".equals(codeString))
052      return V3AcknowledgementDetailCode.NS203;
053    if ("NS250".equals(codeString))
054      return V3AcknowledgementDetailCode.NS250;
055    if ("NS260".equals(codeString))
056      return V3AcknowledgementDetailCode.NS260;
057    if ("NS261".equals(codeString))
058      return V3AcknowledgementDetailCode.NS261;
059    if ("INTERR".equals(codeString))
060      return V3AcknowledgementDetailCode.INTERR;
061    if ("NOSTORE".equals(codeString))
062      return V3AcknowledgementDetailCode.NOSTORE;
063    if ("RTEDEST".equals(codeString))
064      return V3AcknowledgementDetailCode.RTEDEST;
065    if ("RTUDEST".equals(codeString))
066      return V3AcknowledgementDetailCode.RTUDEST;
067    if ("RTWDEST".equals(codeString))
068      return V3AcknowledgementDetailCode.RTWDEST;
069    if ("SYN".equals(codeString))
070      return V3AcknowledgementDetailCode.SYN;
071    if ("SYN102".equals(codeString))
072      return V3AcknowledgementDetailCode.SYN102;
073    if ("SYN105".equals(codeString))
074      return V3AcknowledgementDetailCode.SYN105;
075    if ("SYN100".equals(codeString))
076      return V3AcknowledgementDetailCode.SYN100;
077    if ("SYN101".equals(codeString))
078      return V3AcknowledgementDetailCode.SYN101;
079    if ("SYN114".equals(codeString))
080      return V3AcknowledgementDetailCode.SYN114;
081    if ("SYN106".equals(codeString))
082      return V3AcknowledgementDetailCode.SYN106;
083    if ("SYN103".equals(codeString))
084      return V3AcknowledgementDetailCode.SYN103;
085    if ("SYN104".equals(codeString))
086      return V3AcknowledgementDetailCode.SYN104;
087    if ("SYN107".equals(codeString))
088      return V3AcknowledgementDetailCode.SYN107;
089    if ("SYN108".equals(codeString))
090      return V3AcknowledgementDetailCode.SYN108;
091    if ("SYN110".equals(codeString))
092      return V3AcknowledgementDetailCode.SYN110;
093    if ("SYN112".equals(codeString))
094      return V3AcknowledgementDetailCode.SYN112;
095    if ("SYN109".equals(codeString))
096      return V3AcknowledgementDetailCode.SYN109;
097    if ("SYN111".equals(codeString))
098      return V3AcknowledgementDetailCode.SYN111;
099    if ("SYN113".equals(codeString))
100      return V3AcknowledgementDetailCode.SYN113;
101    throw new IllegalArgumentException("Unknown V3AcknowledgementDetailCode code '"+codeString+"'");
102  }
103
104  public String toCode(V3AcknowledgementDetailCode code) {
105       if (code == V3AcknowledgementDetailCode.NULL)
106           return null;
107       if (code == V3AcknowledgementDetailCode._ACKNOWLEDGEMENTDETAILNOTSUPPORTEDCODE)
108      return "_AcknowledgementDetailNotSupportedCode";
109    if (code == V3AcknowledgementDetailCode.NS200)
110      return "NS200";
111    if (code == V3AcknowledgementDetailCode.NS202)
112      return "NS202";
113    if (code == V3AcknowledgementDetailCode.NS203)
114      return "NS203";
115    if (code == V3AcknowledgementDetailCode.NS250)
116      return "NS250";
117    if (code == V3AcknowledgementDetailCode.NS260)
118      return "NS260";
119    if (code == V3AcknowledgementDetailCode.NS261)
120      return "NS261";
121    if (code == V3AcknowledgementDetailCode.INTERR)
122      return "INTERR";
123    if (code == V3AcknowledgementDetailCode.NOSTORE)
124      return "NOSTORE";
125    if (code == V3AcknowledgementDetailCode.RTEDEST)
126      return "RTEDEST";
127    if (code == V3AcknowledgementDetailCode.RTUDEST)
128      return "RTUDEST";
129    if (code == V3AcknowledgementDetailCode.RTWDEST)
130      return "RTWDEST";
131    if (code == V3AcknowledgementDetailCode.SYN)
132      return "SYN";
133    if (code == V3AcknowledgementDetailCode.SYN102)
134      return "SYN102";
135    if (code == V3AcknowledgementDetailCode.SYN105)
136      return "SYN105";
137    if (code == V3AcknowledgementDetailCode.SYN100)
138      return "SYN100";
139    if (code == V3AcknowledgementDetailCode.SYN101)
140      return "SYN101";
141    if (code == V3AcknowledgementDetailCode.SYN114)
142      return "SYN114";
143    if (code == V3AcknowledgementDetailCode.SYN106)
144      return "SYN106";
145    if (code == V3AcknowledgementDetailCode.SYN103)
146      return "SYN103";
147    if (code == V3AcknowledgementDetailCode.SYN104)
148      return "SYN104";
149    if (code == V3AcknowledgementDetailCode.SYN107)
150      return "SYN107";
151    if (code == V3AcknowledgementDetailCode.SYN108)
152      return "SYN108";
153    if (code == V3AcknowledgementDetailCode.SYN110)
154      return "SYN110";
155    if (code == V3AcknowledgementDetailCode.SYN112)
156      return "SYN112";
157    if (code == V3AcknowledgementDetailCode.SYN109)
158      return "SYN109";
159    if (code == V3AcknowledgementDetailCode.SYN111)
160      return "SYN111";
161    if (code == V3AcknowledgementDetailCode.SYN113)
162      return "SYN113";
163    return "?";
164   }
165
166    public String toSystem(V3AcknowledgementDetailCode code) {
167      return code.getSystem();
168      }
169
170}