package org.hl7.fhir.dstu2016may.model.codesystems;




/*
  Copyright (c) 2011+, HL7, Inc.
  All rights reserved.
  
  Redistribution and use in source and binary forms, with or without modification, 
  are permitted provided that the following conditions are met:
  
   * Redistributions of source code must retain the above copyright notice, this 
     list of conditions and the following disclaimer.
   * Redistributions in binary form must reproduce the above copyright notice, 
     this list of conditions and the following disclaimer in the documentation 
     and/or other materials provided with the distribution.
   * Neither the name of HL7 nor the names of its contributors may be used to 
     endorse or promote products derived from this software without specific 
     prior written permission.
  
  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
  POSSIBILITY OF SUCH DAMAGE.
  
*/

// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0


import org.hl7.fhir.dstu2016may.model.EnumFactory;

public class V3ReligiousAffiliationEnumFactory implements EnumFactory<V3ReligiousAffiliation> {

  public V3ReligiousAffiliation fromCode(String codeString) throws IllegalArgumentException {
    if (codeString == null || "".equals(codeString))
      return null;
    if ("1001".equals(codeString))
      return V3ReligiousAffiliation._1001;
    if ("1002".equals(codeString))
      return V3ReligiousAffiliation._1002;
    if ("1003".equals(codeString))
      return V3ReligiousAffiliation._1003;
    if ("1004".equals(codeString))
      return V3ReligiousAffiliation._1004;
    if ("1005".equals(codeString))
      return V3ReligiousAffiliation._1005;
    if ("1006".equals(codeString))
      return V3ReligiousAffiliation._1006;
    if ("1007".equals(codeString))
      return V3ReligiousAffiliation._1007;
    if ("1008".equals(codeString))
      return V3ReligiousAffiliation._1008;
    if ("1009".equals(codeString))
      return V3ReligiousAffiliation._1009;
    if ("1010".equals(codeString))
      return V3ReligiousAffiliation._1010;
    if ("1011".equals(codeString))
      return V3ReligiousAffiliation._1011;
    if ("1012".equals(codeString))
      return V3ReligiousAffiliation._1012;
    if ("1013".equals(codeString))
      return V3ReligiousAffiliation._1013;
    if ("1014".equals(codeString))
      return V3ReligiousAffiliation._1014;
    if ("1015".equals(codeString))
      return V3ReligiousAffiliation._1015;
    if ("1016".equals(codeString))
      return V3ReligiousAffiliation._1016;
    if ("1017".equals(codeString))
      return V3ReligiousAffiliation._1017;
    if ("1018".equals(codeString))
      return V3ReligiousAffiliation._1018;
    if ("1019".equals(codeString))
      return V3ReligiousAffiliation._1019;
    if ("1020".equals(codeString))
      return V3ReligiousAffiliation._1020;
    if ("1021".equals(codeString))
      return V3ReligiousAffiliation._1021;
    if ("1022".equals(codeString))
      return V3ReligiousAffiliation._1022;
    if ("1023".equals(codeString))
      return V3ReligiousAffiliation._1023;
    if ("1024".equals(codeString))
      return V3ReligiousAffiliation._1024;
    if ("1025".equals(codeString))
      return V3ReligiousAffiliation._1025;
    if ("1026".equals(codeString))
      return V3ReligiousAffiliation._1026;
    if ("1027".equals(codeString))
      return V3ReligiousAffiliation._1027;
    if ("1028".equals(codeString))
      return V3ReligiousAffiliation._1028;
    if ("1029".equals(codeString))
      return V3ReligiousAffiliation._1029;
    if ("1030".equals(codeString))
      return V3ReligiousAffiliation._1030;
    if ("1031".equals(codeString))
      return V3ReligiousAffiliation._1031;
    if ("1032".equals(codeString))
      return V3ReligiousAffiliation._1032;
    if ("1033".equals(codeString))
      return V3ReligiousAffiliation._1033;
    if ("1034".equals(codeString))
      return V3ReligiousAffiliation._1034;
    if ("1035".equals(codeString))
      return V3ReligiousAffiliation._1035;
    if ("1036".equals(codeString))
      return V3ReligiousAffiliation._1036;
    if ("1037".equals(codeString))
      return V3ReligiousAffiliation._1037;
    if ("1038".equals(codeString))
      return V3ReligiousAffiliation._1038;
    if ("1039".equals(codeString))
      return V3ReligiousAffiliation._1039;
    if ("1040".equals(codeString))
      return V3ReligiousAffiliation._1040;
    if ("1041".equals(codeString))
      return V3ReligiousAffiliation._1041;
    if ("1042".equals(codeString))
      return V3ReligiousAffiliation._1042;
    if ("1043".equals(codeString))
      return V3ReligiousAffiliation._1043;
    if ("1044".equals(codeString))
      return V3ReligiousAffiliation._1044;
    if ("1045".equals(codeString))
      return V3ReligiousAffiliation._1045;
    if ("1046".equals(codeString))
      return V3ReligiousAffiliation._1046;
    if ("1047".equals(codeString))
      return V3ReligiousAffiliation._1047;
    if ("1048".equals(codeString))
      return V3ReligiousAffiliation._1048;
    if ("1049".equals(codeString))
      return V3ReligiousAffiliation._1049;
    if ("1050".equals(codeString))
      return V3ReligiousAffiliation._1050;
    if ("1051".equals(codeString))
      return V3ReligiousAffiliation._1051;
    if ("1052".equals(codeString))
      return V3ReligiousAffiliation._1052;
    if ("1053".equals(codeString))
      return V3ReligiousAffiliation._1053;
    if ("1054".equals(codeString))
      return V3ReligiousAffiliation._1054;
    if ("1055".equals(codeString))
      return V3ReligiousAffiliation._1055;
    if ("1056".equals(codeString))
      return V3ReligiousAffiliation._1056;
    if ("1057".equals(codeString))
      return V3ReligiousAffiliation._1057;
    if ("1058".equals(codeString))
      return V3ReligiousAffiliation._1058;
    if ("1059".equals(codeString))
      return V3ReligiousAffiliation._1059;
    if ("1060".equals(codeString))
      return V3ReligiousAffiliation._1060;
    if ("1061".equals(codeString))
      return V3ReligiousAffiliation._1061;
    if ("1062".equals(codeString))
      return V3ReligiousAffiliation._1062;
    if ("1063".equals(codeString))
      return V3ReligiousAffiliation._1063;
    if ("1064".equals(codeString))
      return V3ReligiousAffiliation._1064;
    if ("1065".equals(codeString))
      return V3ReligiousAffiliation._1065;
    if ("1066".equals(codeString))
      return V3ReligiousAffiliation._1066;
    if ("1067".equals(codeString))
      return V3ReligiousAffiliation._1067;
    if ("1068".equals(codeString))
      return V3ReligiousAffiliation._1068;
    if ("1069".equals(codeString))
      return V3ReligiousAffiliation._1069;
    if ("1070".equals(codeString))
      return V3ReligiousAffiliation._1070;
    if ("1071".equals(codeString))
      return V3ReligiousAffiliation._1071;
    if ("1072".equals(codeString))
      return V3ReligiousAffiliation._1072;
    if ("1073".equals(codeString))
      return V3ReligiousAffiliation._1073;
    if ("1074".equals(codeString))
      return V3ReligiousAffiliation._1074;
    if ("1075".equals(codeString))
      return V3ReligiousAffiliation._1075;
    if ("1076".equals(codeString))
      return V3ReligiousAffiliation._1076;
    if ("1077".equals(codeString))
      return V3ReligiousAffiliation._1077;
    if ("1078".equals(codeString))
      return V3ReligiousAffiliation._1078;
    if ("1079".equals(codeString))
      return V3ReligiousAffiliation._1079;
    if ("1080".equals(codeString))
      return V3ReligiousAffiliation._1080;
    if ("1081".equals(codeString))
      return V3ReligiousAffiliation._1081;
    if ("1082".equals(codeString))
      return V3ReligiousAffiliation._1082;
    throw new IllegalArgumentException("Unknown V3ReligiousAffiliation code '"+codeString+"'");
  }

  public String toCode(V3ReligiousAffiliation code) {
    if (code == V3ReligiousAffiliation._1001)
      return "1001";
    if (code == V3ReligiousAffiliation._1002)
      return "1002";
    if (code == V3ReligiousAffiliation._1003)
      return "1003";
    if (code == V3ReligiousAffiliation._1004)
      return "1004";
    if (code == V3ReligiousAffiliation._1005)
      return "1005";
    if (code == V3ReligiousAffiliation._1006)
      return "1006";
    if (code == V3ReligiousAffiliation._1007)
      return "1007";
    if (code == V3ReligiousAffiliation._1008)
      return "1008";
    if (code == V3ReligiousAffiliation._1009)
      return "1009";
    if (code == V3ReligiousAffiliation._1010)
      return "1010";
    if (code == V3ReligiousAffiliation._1011)
      return "1011";
    if (code == V3ReligiousAffiliation._1012)
      return "1012";
    if (code == V3ReligiousAffiliation._1013)
      return "1013";
    if (code == V3ReligiousAffiliation._1014)
      return "1014";
    if (code == V3ReligiousAffiliation._1015)
      return "1015";
    if (code == V3ReligiousAffiliation._1016)
      return "1016";
    if (code == V3ReligiousAffiliation._1017)
      return "1017";
    if (code == V3ReligiousAffiliation._1018)
      return "1018";
    if (code == V3ReligiousAffiliation._1019)
      return "1019";
    if (code == V3ReligiousAffiliation._1020)
      return "1020";
    if (code == V3ReligiousAffiliation._1021)
      return "1021";
    if (code == V3ReligiousAffiliation._1022)
      return "1022";
    if (code == V3ReligiousAffiliation._1023)
      return "1023";
    if (code == V3ReligiousAffiliation._1024)
      return "1024";
    if (code == V3ReligiousAffiliation._1025)
      return "1025";
    if (code == V3ReligiousAffiliation._1026)
      return "1026";
    if (code == V3ReligiousAffiliation._1027)
      return "1027";
    if (code == V3ReligiousAffiliation._1028)
      return "1028";
    if (code == V3ReligiousAffiliation._1029)
      return "1029";
    if (code == V3ReligiousAffiliation._1030)
      return "1030";
    if (code == V3ReligiousAffiliation._1031)
      return "1031";
    if (code == V3ReligiousAffiliation._1032)
      return "1032";
    if (code == V3ReligiousAffiliation._1033)
      return "1033";
    if (code == V3ReligiousAffiliation._1034)
      return "1034";
    if (code == V3ReligiousAffiliation._1035)
      return "1035";
    if (code == V3ReligiousAffiliation._1036)
      return "1036";
    if (code == V3ReligiousAffiliation._1037)
      return "1037";
    if (code == V3ReligiousAffiliation._1038)
      return "1038";
    if (code == V3ReligiousAffiliation._1039)
      return "1039";
    if (code == V3ReligiousAffiliation._1040)
      return "1040";
    if (code == V3ReligiousAffiliation._1041)
      return "1041";
    if (code == V3ReligiousAffiliation._1042)
      return "1042";
    if (code == V3ReligiousAffiliation._1043)
      return "1043";
    if (code == V3ReligiousAffiliation._1044)
      return "1044";
    if (code == V3ReligiousAffiliation._1045)
      return "1045";
    if (code == V3ReligiousAffiliation._1046)
      return "1046";
    if (code == V3ReligiousAffiliation._1047)
      return "1047";
    if (code == V3ReligiousAffiliation._1048)
      return "1048";
    if (code == V3ReligiousAffiliation._1049)
      return "1049";
    if (code == V3ReligiousAffiliation._1050)
      return "1050";
    if (code == V3ReligiousAffiliation._1051)
      return "1051";
    if (code == V3ReligiousAffiliation._1052)
      return "1052";
    if (code == V3ReligiousAffiliation._1053)
      return "1053";
    if (code == V3ReligiousAffiliation._1054)
      return "1054";
    if (code == V3ReligiousAffiliation._1055)
      return "1055";
    if (code == V3ReligiousAffiliation._1056)
      return "1056";
    if (code == V3ReligiousAffiliation._1057)
      return "1057";
    if (code == V3ReligiousAffiliation._1058)
      return "1058";
    if (code == V3ReligiousAffiliation._1059)
      return "1059";
    if (code == V3ReligiousAffiliation._1060)
      return "1060";
    if (code == V3ReligiousAffiliation._1061)
      return "1061";
    if (code == V3ReligiousAffiliation._1062)
      return "1062";
    if (code == V3ReligiousAffiliation._1063)
      return "1063";
    if (code == V3ReligiousAffiliation._1064)
      return "1064";
    if (code == V3ReligiousAffiliation._1065)
      return "1065";
    if (code == V3ReligiousAffiliation._1066)
      return "1066";
    if (code == V3ReligiousAffiliation._1067)
      return "1067";
    if (code == V3ReligiousAffiliation._1068)
      return "1068";
    if (code == V3ReligiousAffiliation._1069)
      return "1069";
    if (code == V3ReligiousAffiliation._1070)
      return "1070";
    if (code == V3ReligiousAffiliation._1071)
      return "1071";
    if (code == V3ReligiousAffiliation._1072)
      return "1072";
    if (code == V3ReligiousAffiliation._1073)
      return "1073";
    if (code == V3ReligiousAffiliation._1074)
      return "1074";
    if (code == V3ReligiousAffiliation._1075)
      return "1075";
    if (code == V3ReligiousAffiliation._1076)
      return "1076";
    if (code == V3ReligiousAffiliation._1077)
      return "1077";
    if (code == V3ReligiousAffiliation._1078)
      return "1078";
    if (code == V3ReligiousAffiliation._1079)
      return "1079";
    if (code == V3ReligiousAffiliation._1080)
      return "1080";
    if (code == V3ReligiousAffiliation._1081)
      return "1081";
    if (code == V3ReligiousAffiliation._1082)
      return "1082";
    return "?";
  }

    public String toSystem(V3ReligiousAffiliation code) {
      return code.getSystem();
      }

}