package org.hl7.fhir.instance.model.valuesets;



// Generated on Wed, Nov 11, 2015 10:54-0500 for FHIR v1.0.2


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

public class V3QueryPriorityEnumFactory implements EnumFactory<V3QueryPriority> {

  public V3QueryPriority fromCode(String codeString) throws IllegalArgumentException {
    if (codeString == null || "".equals(codeString))
      return null;
    if ("D".equals(codeString))
      return V3QueryPriority.D;
    if ("I".equals(codeString))
      return V3QueryPriority.I;
    throw new IllegalArgumentException("Unknown V3QueryPriority code '"+codeString+"'");
  }

  public String toCode(V3QueryPriority code) {
    if (code == V3QueryPriority.D)
      return "D";
    if (code == V3QueryPriority.I)
      return "I";
    return "?";
  }


}

