Esempio n. 1
0
 public static LinkageType fromCode(String codeString) throws FHIRException {
   if (codeString == null || "".equals(codeString)) return null;
   if ("source".equals(codeString)) return SOURCE;
   if ("alternate".equals(codeString)) return ALTERNATE;
   if ("historical".equals(codeString)) return HISTORICAL;
   if (Configuration.isAcceptInvalidEnums()) return null;
   else throw new FHIRException("Unknown LinkageType code '" + codeString + "'");
 }
Esempio n. 2
0
 public static QuantityComparator fromCode(String codeString) throws FHIRException {
   if (codeString == null || "".equals(codeString)) return null;
   if ("<".equals(codeString)) return LESS_THAN;
   if ("<=".equals(codeString)) return LESS_OR_EQUAL;
   if (">=".equals(codeString)) return GREATER_OR_EQUAL;
   if (">".equals(codeString)) return GREATER_THAN;
   if (Configuration.isAcceptInvalidEnums()) return null;
   else throw new FHIRException("Unknown QuantityComparator code '" + codeString + "'");
 }