Merge branch 'master' into rdf-wg-r5

This commit is contained in:
Jim Balhoff 2023-02-14 13:47:28 -05:00
commit 97772ada1e
628 changed files with 1213451 additions and 1207864 deletions

2
.gitignore vendored
View File

@ -304,3 +304,5 @@ local.properties
/org.hl7.fhir.r5.new /org.hl7.fhir.r5.new
/org.hl7.fhir.r5.newc /org.hl7.fhir.r5.newc
/org.hl7.fhir.r4b.new /org.hl7.fhir.r4b.new
org.hl7.fhir.r5/var/lib/.fhir/packages/

View File

@ -43,7 +43,7 @@ correct implementation of the core FHIR specification that it implements.
### Prerequisites ### Prerequisites
This project uses [Java](https://www.java.com) (minumum version 11), [Apache Maven](http://maven.apache.org), and [Lombok](https://projectlombok.org/) to build. You can find detailed instructions on setting up this project in your IDE [here](https://hl7.github.io/docs/core/ide). This project uses [Java](https://www.java.com) (minumum version 11), [Apache Maven](http://maven.apache.org), and [Lombok](https://projectlombok.org/) to build. You can find detailed instructions on setting up this project in your IDE [here](https://hl7.github.io/docs/core/getting-started).
### Build Commands ### Build Commands

View File

@ -1,7 +1,6 @@
## Validator Changes ## Validator Changes
* Add support for fhir_comments in R2/R2B * no changes
* Add validator checking around versions in extension URLs
## Other code changes ## Other code changes

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId> <artifactId>org.hl7.fhir.core</artifactId>
<version>5.6.89-SNAPSHOT</version> <version>5.6.98-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

View File

@ -405,6 +405,8 @@ public class VersionConvertorResourceNameMapper {
return org.hl7.fhir.dstu3.model.MedicationRequest.class.getSimpleName(); return org.hl7.fhir.dstu3.model.MedicationRequest.class.getSimpleName();
case "MedicationUsage": case "MedicationUsage":
return org.hl7.fhir.dstu3.model.MedicationStatement.class.getSimpleName(); return org.hl7.fhir.dstu3.model.MedicationStatement.class.getSimpleName();
case "MedicationStatement":
return org.hl7.fhir.dstu3.model.MedicationStatement.class.getSimpleName();
case "MessageDefinition": case "MessageDefinition":
return org.hl7.fhir.dstu3.model.MessageDefinition.class.getSimpleName(); return org.hl7.fhir.dstu3.model.MessageDefinition.class.getSimpleName();
case "MessageHeader": case "MessageHeader":

View File

@ -17,13 +17,13 @@ import org.hl7.fhir.utilities.SimpleHTTPClient.HTTPResult;
import org.hl7.fhir.utilities.TextFile; import org.hl7.fhir.utilities.TextFile;
import org.hl7.fhir.utilities.Utilities; import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.utilities.json.model.JsonArray; import org.hl7.fhir.utilities.json.model.JsonArray;
import org.hl7.fhir.utilities.json.model.JsonElement;
import org.hl7.fhir.utilities.json.model.JsonObject; import org.hl7.fhir.utilities.json.model.JsonObject;
import org.hl7.fhir.utilities.json.parser.JsonParser; import org.hl7.fhir.utilities.json.parser.JsonParser;
import org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager; import org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager;
import org.hl7.fhir.utilities.npm.NpmPackage; import org.hl7.fhir.utilities.npm.NpmPackage;
import org.hl7.fhir.utilities.npm.PackageClient; import org.hl7.fhir.utilities.npm.PackageClient;
import org.hl7.fhir.utilities.npm.PackageInfo; import org.hl7.fhir.utilities.npm.PackageInfo;
import org.hl7.fhir.utilities.npm.PackageServer;
import org.hl7.fhir.utilities.npm.ToolsVersion; import org.hl7.fhir.utilities.npm.ToolsVersion;
import org.hl7.fhir.utilities.xml.XMLUtil; import org.hl7.fhir.utilities.xml.XMLUtil;
import org.w3c.dom.Document; import org.w3c.dom.Document;
@ -108,7 +108,7 @@ public class PackageVisitor {
public void visitPackages() throws IOException, ParserConfigurationException, SAXException { public void visitPackages() throws IOException, ParserConfigurationException, SAXException {
System.out.println("Finding packages"); System.out.println("Finding packages");
pc = new PackageClient(PackageClient.PRIMARY_SERVER); pc = new PackageClient(PackageServer.primaryServer());
pcm = new FilesystemPackageCacheManager(true, ToolsVersion.TOOLS_VERSION); pcm = new FilesystemPackageCacheManager(true, ToolsVersion.TOOLS_VERSION);
Map<String, String> cpidMap = getAllCIPackages(); Map<String, String> cpidMap = getAllCIPackages();

View File

@ -10,7 +10,6 @@ import org.hl7.fhir.convertors.conv30_40.datatypes30_40.primitivetypes30_40.Bool
import org.hl7.fhir.convertors.conv30_40.datatypes30_40.primitivetypes30_40.Date30_40; import org.hl7.fhir.convertors.conv30_40.datatypes30_40.primitivetypes30_40.Date30_40;
import org.hl7.fhir.convertors.conv30_40.datatypes30_40.primitivetypes30_40.DateTime30_40; import org.hl7.fhir.convertors.conv30_40.datatypes30_40.primitivetypes30_40.DateTime30_40;
import org.hl7.fhir.convertors.conv30_40.datatypes30_40.primitivetypes30_40.String30_40; import org.hl7.fhir.convertors.conv30_40.datatypes30_40.primitivetypes30_40.String30_40;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4.model.Extension; import org.hl7.fhir.r4.model.Extension;
import org.hl7.fhir.r4.model.Immunization; import org.hl7.fhir.r4.model.Immunization;

View File

@ -3,7 +3,6 @@ package org.hl7.fhir.convertors.conv30_50.resources30_50;
import org.hl7.fhir.convertors.context.ConversionContext30_50; import org.hl7.fhir.convertors.context.ConversionContext30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.ContactDetail30_50; import org.hl7.fhir.convertors.conv30_50.datatypes30_50.ContactDetail30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.UsageContext30_50; import org.hl7.fhir.convertors.conv30_50.datatypes30_50.UsageContext30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.CodeableConcept30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Boolean30_50; import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Boolean30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Code30_50; import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Code30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.DateTime30_50; import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.DateTime30_50;

View File

@ -5,9 +5,7 @@ import org.hl7.fhir.convertors.conv30_50.datatypes30_50.ContactDetail30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.UsageContext30_50; import org.hl7.fhir.convertors.conv30_50.datatypes30_50.UsageContext30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.CodeableConcept30_50; import org.hl7.fhir.convertors.conv30_50.datatypes30_50.complextypes30_50.CodeableConcept30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Boolean30_50; import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Boolean30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Code30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.DateTime30_50; import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.DateTime30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Integer30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.MarkDown30_50; import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.MarkDown30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.String30_50; import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.String30_50;
import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Uri30_50; import org.hl7.fhir.convertors.conv30_50.datatypes30_50.primitivetypes30_50.Uri30_50;

View File

@ -53,9 +53,6 @@ public class DataRequirement40_50 {
private static String convertResourceName4to5(String name) { private static String convertResourceName4to5(String name) {
if (name == null) return null; if (name == null) return null;
if (name.equals("MedicationStatement")) {
return "MedicationUsage";
}
if (name.equals("DeviceUseStatement")) { if (name.equals("DeviceUseStatement")) {
return "DeviceUsage"; return "DeviceUsage";
} }
@ -64,9 +61,6 @@ public class DataRequirement40_50 {
private static String convertResourceName5to4(String name) { private static String convertResourceName5to4(String name) {
if (name == null) return null; if (name == null) return null;
if (name.equals("MedicationUsage")) {
return "MedicationStatement";
}
if (name.equals("DeviceUsage")) { if (name.equals("DeviceUsage")) {
return "DeviceUseStatement"; return "DeviceUseStatement";
} }

View File

@ -1,7 +1,6 @@
package org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50; package org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50;
import org.hl7.fhir.convertors.context.ConversionContext40_50; import org.hl7.fhir.convertors.context.ConversionContext40_50;
import org.hl7.fhir.convertors.context.ConversionContext43_50;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
public class DateTime40_50 { public class DateTime40_50 {

View File

@ -1,13 +1,10 @@
package org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50; package org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50;
import org.hl7.fhir.convertors.context.ConversionContext30_50;
import org.hl7.fhir.convertors.context.ConversionContext40_50; import org.hl7.fhir.convertors.context.ConversionContext40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.Identifier40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.Identifier40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.String40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.String40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Uri40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Uri40_50;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r4.model.Reference;
import org.hl7.fhir.r5.model.CanonicalType;
import org.hl7.fhir.r5.model.CodeableReference; import org.hl7.fhir.r5.model.CodeableReference;
public class Reference40_50 { public class Reference40_50 {

View File

@ -1,5 +1,6 @@
package org.hl7.fhir.convertors.conv40_50.resources40_50; package org.hl7.fhir.convertors.conv40_50.resources40_50;
import org.hl7.fhir.convertors.VersionConvertorConstants;
import org.hl7.fhir.convertors.context.ConversionContext40_50; import org.hl7.fhir.convertors.context.ConversionContext40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.CodeableConcept40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.CodeableConcept40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.Identifier40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.Identifier40_50;
@ -19,6 +20,7 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Uri40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Dosage40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Dosage40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Reference40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.special40_50.Reference40_50;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.CodeType;
import org.hl7.fhir.r5.model.CodeableReference; import org.hl7.fhir.r5.model.CodeableReference;
/* /*
@ -295,9 +297,10 @@ public class ActivityDefinition40_50 {
case SUPPLYREQUEST: case SUPPLYREQUEST:
tgt.setValue(org.hl7.fhir.r5.model.ActivityDefinition.RequestResourceTypes.SUPPLYREQUEST); tgt.setValue(org.hl7.fhir.r5.model.ActivityDefinition.RequestResourceTypes.SUPPLYREQUEST);
break; break;
// case TASK: case TASK:
// tgt.setValue(org.hl7.fhir.r5.model.ActivityDefinition.RequestResourceTypes.TASK); tgt.setValue(org.hl7.fhir.r5.model.ActivityDefinition.RequestResourceTypes.NULL);
// break; tgt.addExtension(VersionConvertorConstants.EXT_ACTUAL_RESOURCE_NAME, new CodeType("Task"));
break;
case VISIONPRESCRIPTION: case VISIONPRESCRIPTION:
tgt.setValue(org.hl7.fhir.r5.model.ActivityDefinition.RequestResourceTypes.VISIONPRESCRIPTION); tgt.setValue(org.hl7.fhir.r5.model.ActivityDefinition.RequestResourceTypes.VISIONPRESCRIPTION);
break; break;
@ -312,8 +315,11 @@ public class ActivityDefinition40_50 {
if (src == null || src.isEmpty()) if (src == null || src.isEmpty())
return null; return null;
org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionKind> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionKindEnumFactory()); org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionKind> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionKindEnumFactory());
ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt); ConversionContext40_50.INSTANCE.getVersionConvertor_40_50().copyElement(src, tgt, VersionConvertorConstants.EXT_ACTUAL_RESOURCE_NAME);
switch (src.getValue()) { if (src.hasExtension(VersionConvertorConstants.EXT_ACTUAL_RESOURCE_NAME)) {
tgt.setValueAsString(src.getExtensionString(VersionConvertorConstants.EXT_ACTUAL_RESOURCE_NAME));
} else {
switch (src.getValue()) {
case APPOINTMENT: case APPOINTMENT:
tgt.setValue(org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionKind.APPOINTMENT); tgt.setValue(org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionKind.APPOINTMENT);
break; break;
@ -353,15 +359,13 @@ public class ActivityDefinition40_50 {
case SUPPLYREQUEST: case SUPPLYREQUEST:
tgt.setValue(org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionKind.SUPPLYREQUEST); tgt.setValue(org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionKind.SUPPLYREQUEST);
break; break;
// case TASK:
// tgt.setValue(org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionKind.TASK);
// break;
case VISIONPRESCRIPTION: case VISIONPRESCRIPTION:
tgt.setValue(org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionKind.VISIONPRESCRIPTION); tgt.setValue(org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionKind.VISIONPRESCRIPTION);
break; break;
default: default:
tgt.setValue(org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionKind.NULL); tgt.setValue(org.hl7.fhir.r4.model.ActivityDefinition.ActivityDefinitionKind.NULL);
break; break;
}
} }
return tgt; return tgt;
} }

View File

@ -5,10 +5,7 @@ import org.hl7.fhir.convertors.conv40_50.datatypes40_50.general40_50.CodeableCon
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.metadata40_50.ContactDetail40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.metadata40_50.ContactDetail40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.metadata40_50.UsageContext40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.metadata40_50.UsageContext40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Boolean40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Boolean40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Canonical40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Code40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.DateTime40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.DateTime40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Integer40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.MarkDown40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.MarkDown40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.String40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.String40_50;
import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Uri40_50; import org.hl7.fhir.convertors.conv40_50.datatypes40_50.primitive40_50.Uri40_50;

View File

@ -53,9 +53,6 @@ public class DataRequirement43_50 {
private static String convertResourceName4to5(String name) { private static String convertResourceName4to5(String name) {
if (name == null) return null; if (name == null) return null;
if (name.equals("MedicationStatement")) {
return "MedicationUsage";
}
if (name.equals("DeviceUseStatement")) { if (name.equals("DeviceUseStatement")) {
return "DeviceUsage"; return "DeviceUsage";
} }
@ -64,9 +61,6 @@ public class DataRequirement43_50 {
private static String convertResourceName5to4(String name) { private static String convertResourceName5to4(String name) {
if (name == null) return null; if (name == null) return null;
if (name.equals("MedicationUsage")) {
return "MedicationStatement";
}
if (name.equals("DeviceUsage")) { if (name.equals("DeviceUsage")) {
return "DeviceUseStatement"; return "DeviceUseStatement";
} }

View File

@ -1,6 +1,5 @@
package org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50; package org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50;
import org.hl7.fhir.convertors.context.ConversionContext40_50;
import org.hl7.fhir.convertors.context.ConversionContext43_50; import org.hl7.fhir.convertors.context.ConversionContext43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.Identifier43_50; import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.Identifier43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.String43_50; import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.String43_50;

View File

@ -1,5 +1,6 @@
package org.hl7.fhir.convertors.conv43_50.resources43_50; package org.hl7.fhir.convertors.conv43_50.resources43_50;
import org.hl7.fhir.convertors.VersionConvertorConstants;
import org.hl7.fhir.convertors.context.ConversionContext43_50; import org.hl7.fhir.convertors.context.ConversionContext43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.CodeableConcept43_50; import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.CodeableConcept43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.Identifier43_50; import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.Identifier43_50;
@ -19,6 +20,7 @@ import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Uri43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50.Dosage43_50; import org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50.Dosage43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50.Reference43_50; import org.hl7.fhir.convertors.conv43_50.datatypes43_50.special43_50.Reference43_50;
import org.hl7.fhir.exceptions.FHIRException; import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.r5.model.CodeType;
import org.hl7.fhir.r5.model.CodeableReference; import org.hl7.fhir.r5.model.CodeableReference;
/* /*
@ -295,9 +297,10 @@ public class ActivityDefinition43_50 {
case SUPPLYREQUEST: case SUPPLYREQUEST:
tgt.setValue(org.hl7.fhir.r5.model.ActivityDefinition.RequestResourceTypes.SUPPLYREQUEST); tgt.setValue(org.hl7.fhir.r5.model.ActivityDefinition.RequestResourceTypes.SUPPLYREQUEST);
break; break;
// case TASK: case TASK:
// tgt.setValue(org.hl7.fhir.r5.model.ActivityDefinition.RequestResourceTypes.); tgt.setValue(org.hl7.fhir.r5.model.ActivityDefinition.RequestResourceTypes.NULL);
// break; tgt.addExtension(VersionConvertorConstants.EXT_ACTUAL_RESOURCE_NAME, new CodeType("Task"));
break;
case VISIONPRESCRIPTION: case VISIONPRESCRIPTION:
tgt.setValue(org.hl7.fhir.r5.model.ActivityDefinition.RequestResourceTypes.VISIONPRESCRIPTION); tgt.setValue(org.hl7.fhir.r5.model.ActivityDefinition.RequestResourceTypes.VISIONPRESCRIPTION);
break; break;
@ -312,8 +315,11 @@ public class ActivityDefinition43_50 {
if (src == null || src.isEmpty()) if (src == null || src.isEmpty())
return null; return null;
org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.ActivityDefinition.RequestResourceType> tgt = new org.hl7.fhir.r4b.model.Enumeration<>(new org.hl7.fhir.r4b.model.ActivityDefinition.RequestResourceTypeEnumFactory()); org.hl7.fhir.r4b.model.Enumeration<org.hl7.fhir.r4b.model.ActivityDefinition.RequestResourceType> tgt = new org.hl7.fhir.r4b.model.Enumeration<>(new org.hl7.fhir.r4b.model.ActivityDefinition.RequestResourceTypeEnumFactory());
ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt); ConversionContext43_50.INSTANCE.getVersionConvertor_43_50().copyElement(src, tgt, VersionConvertorConstants.EXT_ACTUAL_RESOURCE_NAME);
switch (src.getValue()) { if (src.hasExtension(VersionConvertorConstants.EXT_ACTUAL_RESOURCE_NAME)) {
tgt.setValueAsString(src.getExtensionString(VersionConvertorConstants.EXT_ACTUAL_RESOURCE_NAME));
} else {
switch (src.getValue()) {
case APPOINTMENT: case APPOINTMENT:
tgt.setValue(org.hl7.fhir.r4b.model.ActivityDefinition.RequestResourceType.APPOINTMENT); tgt.setValue(org.hl7.fhir.r4b.model.ActivityDefinition.RequestResourceType.APPOINTMENT);
break; break;
@ -353,15 +359,13 @@ public class ActivityDefinition43_50 {
case SUPPLYREQUEST: case SUPPLYREQUEST:
tgt.setValue(org.hl7.fhir.r4b.model.ActivityDefinition.RequestResourceType.SUPPLYREQUEST); tgt.setValue(org.hl7.fhir.r4b.model.ActivityDefinition.RequestResourceType.SUPPLYREQUEST);
break; break;
// case TASK:
// tgt.setValue(org.hl7.fhir.r4b.model.ActivityDefinition.RequestResourceType.TASK);
// break;
case VISIONPRESCRIPTION: case VISIONPRESCRIPTION:
tgt.setValue(org.hl7.fhir.r4b.model.ActivityDefinition.RequestResourceType.VISIONPRESCRIPTION); tgt.setValue(org.hl7.fhir.r4b.model.ActivityDefinition.RequestResourceType.VISIONPRESCRIPTION);
break; break;
default: default:
tgt.setValue(org.hl7.fhir.r4b.model.ActivityDefinition.RequestResourceType.NULL); tgt.setValue(org.hl7.fhir.r4b.model.ActivityDefinition.RequestResourceType.NULL);
break; break;
}
} }
return tgt; return tgt;
} }

View File

@ -5,10 +5,7 @@ import org.hl7.fhir.convertors.conv43_50.datatypes43_50.general43_50.CodeableCon
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.metadata43_50.ContactDetail43_50; import org.hl7.fhir.convertors.conv43_50.datatypes43_50.metadata43_50.ContactDetail43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.metadata43_50.UsageContext43_50; import org.hl7.fhir.convertors.conv43_50.datatypes43_50.metadata43_50.UsageContext43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Boolean43_50; import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Boolean43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Canonical43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Code43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.DateTime43_50; import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.DateTime43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Integer43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.MarkDown43_50; import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.MarkDown43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.String43_50; import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.String43_50;
import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Uri43_50; import org.hl7.fhir.convertors.conv43_50.datatypes43_50.primitive43_50.Uri43_50;

View File

@ -47,12 +47,10 @@ import org.hl7.fhir.r5.model.CanonicalType;
import org.hl7.fhir.r5.model.CodeSystem; import org.hl7.fhir.r5.model.CodeSystem;
import org.hl7.fhir.r5.model.ElementDefinition; import org.hl7.fhir.r5.model.ElementDefinition;
import org.hl7.fhir.r5.model.ElementDefinition.TypeRefComponent; import org.hl7.fhir.r5.model.ElementDefinition.TypeRefComponent;
import org.hl7.fhir.r5.model.Enumerations.BindingStrength;
import org.hl7.fhir.r5.model.Resource; import org.hl7.fhir.r5.model.Resource;
import org.hl7.fhir.r5.model.StructureDefinition; import org.hl7.fhir.r5.model.StructureDefinition;
import org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionKind; import org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionKind;
import org.hl7.fhir.r5.model.UriType; import org.hl7.fhir.r5.model.UriType;
import org.hl7.fhir.r5.utils.ToolingExtensions;
public class R5ToR5Loader extends BaseLoaderR5 { public class R5ToR5Loader extends BaseLoaderR5 {

View File

@ -0,0 +1,54 @@
package org.hl7.fhir.convertors.misc;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import org.hl7.fhir.utilities.TextFile;
import org.hl7.fhir.utilities.Utilities;
public class BOMRemover {
public static void main(String[] args) throws FileNotFoundException, IOException {
new BOMRemover().execute(new File(args[0]));
}
private void execute(File f) throws FileNotFoundException, IOException {
if (f.isDirectory()) {
for (File file : f.listFiles()) {
execute(file);
}
} else if (f.getName().endsWith(".java")) {
String src = fileToString(f);
String s = Utilities.stripBOM(src);
if (!s.equals(src)) {
System.out.println("Remove BOM from "+f.getAbsolutePath());
TextFile.stringToFile(s, f, false);
}
}
}
public static String fileToString(File f) throws FileNotFoundException, IOException {
return streamToString(new FileInputStream(f));
}
public static String streamToString(InputStream input) throws IOException {
InputStreamReader sr = new InputStreamReader(input, "UTF-8");
StringBuilder b = new StringBuilder();
//while (sr.ready()) { Commented out by Claude Nanjo (1/14/2014) - sr.ready() always returns false - please remove if change does not impact other areas of codebase
int i = -1;
while((i = sr.read()) > -1) {
char c = (char) i;
b.append(c);
}
sr.close();
return b.toString();
}
}

View File

@ -0,0 +1,208 @@
package org.hl7.fhir.convertors.misc;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;
import org.hl7.fhir.exceptions.FHIRFormatError;
import org.hl7.fhir.r5.context.CanonicalResourceManager;
import org.hl7.fhir.r5.formats.IParser.OutputStyle;
import org.hl7.fhir.r5.formats.JsonParser;
import org.hl7.fhir.r5.formats.XmlParser;
import org.hl7.fhir.r5.model.CanonicalResource;
import org.hl7.fhir.r5.model.CodeSystem;
import org.hl7.fhir.r5.model.ElementDefinition;
import org.hl7.fhir.r5.model.ElementDefinition.ElementDefinitionBindingAdditionalComponent;
import org.hl7.fhir.r5.model.StructureDefinition;
import org.hl7.fhir.r5.model.StructureDefinition.StructureDefinitionContextComponent;
import org.hl7.fhir.r5.model.StructureDefinition.TypeDerivationRule;
import org.hl7.fhir.r5.model.ValueSet;
import org.hl7.fhir.r5.model.ValueSet.ConceptSetComponent;
import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.utilities.json.model.JsonObject;
import org.hl7.fhir.utilities.npm.FilesystemPackageCacheManager;
import org.hl7.fhir.utilities.npm.NpmPackage;
import org.hl7.fhir.utilities.xml.XMLUtil;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
public class ExtensionExtractor {
public static void main(String[] args) throws FHIRFormatError, FileNotFoundException, IOException {
new ExtensionExtractor().process(args[0]);
}
private void process(String dst) throws IOException {
Set<String> ids = new HashSet<>();
FilesystemPackageCacheManager pcm = new FilesystemPackageCacheManager(true);
NpmPackage r5 = pcm.loadPackage("hl7.fhir.r5.core", "current");
CanonicalResourceManager<CodeSystem> cslist = new CanonicalResourceManager<CodeSystem>(true);
for (String r : r5.listResources("CodeSystem")) {
CodeSystem cs = (CodeSystem) new JsonParser().parse(r5.load(r));
cslist.see(cs, null);
}
CanonicalResourceManager<ValueSet> vslist = new CanonicalResourceManager<ValueSet>(true);
for (String r : r5.listResources("ValueSet")) {
ValueSet vs = (ValueSet) new JsonParser().parse(r5.load(r));
vslist.see(vs, null);
}
for (ValueSet vs : vslist.getList()) {
for (ConceptSetComponent inc : vs.getCompose().getInclude()) {
CodeSystem cs = cslist.get(inc.getSystem());
if (cs != null) {
if (!cs.hasUserData("vsl")) {
cs.setUserData("vsl", new ArrayList<ValueSet>());
}
((ArrayList<ValueSet>) cs.getUserData("vsl")).add(vs);
}
}
}
for (String r : r5.listResources("StructureDefinition")) {
StructureDefinition sd = (StructureDefinition) new JsonParser().parse(r5.load(r));
if (sd.getType().equals("Extension") && sd.getDerivation() == TypeDerivationRule.CONSTRAINT) {
for (ElementDefinition ed : sd.getSnapshot().getElement()) {
seeBinding(ed.getBinding().getValueSet(), vslist, "ext", sd);
for (ElementDefinitionBindingAdditionalComponent ab : ed.getBinding().getAdditional()) {
seeBinding(ab.getValueSet(), vslist, "ext", sd);
}
}
sd.setSnapshot(null);
String fn;
if (sd.getContext().size() == 0) {
save(sd, dst,"none", ids);
} else if (sd.getContext().size() > 1) {
boolean dt = true;
for (StructureDefinitionContextComponent x : sd.getContext()) {
String s = extractType(x.getExpression());
dt = dt && isDataType(s);
}
if (dt) {
save(sd, dst,"datatypes", ids);
} else {
save(sd, dst,"multiple", ids);
}
} else {
String s = extractType(sd.getContextFirstRep().getExpression());
if (isDataType(s)) {
save(sd, dst,"datatypes", ids);
} else {
save(sd, dst,s, ids);
}
}
} else {
for (ElementDefinition ed : sd.getSnapshot().getElement()) {
seeBinding(ed.getBinding().getValueSet(), vslist, "core", sd);
for (ElementDefinitionBindingAdditionalComponent ab : ed.getBinding().getAdditional()) {
seeBinding(ab.getValueSet(), vslist, "core", sd);
}
}
}
}
for (ValueSet vs : vslist.getList()) {
if (vs.hasUserData("core") || !vs.hasUserData("ext") || vs.getUrl().startsWith("http://terminology.")) {
vslist.drop(vs.getId());
}
}
for (CodeSystem cs : cslist.getList()) {
boolean keep = false;
if (cs.hasUserData("vsl") && !cs.getUrl().startsWith("http://terminology.")) {
keep = true;
for (ValueSet vs : (ArrayList<ValueSet>) cs.getUserData("vsl")) {
if (!vslist.has(vs.getUrl())) {
keep = false;
}
}
}
if (!keep) {
cslist.drop(cs.getId());
}
}
for (ValueSet vs : vslist.getList()) {
StructureDefinition sd = (StructureDefinition) vs.getUserData("ext");
String s = sd.getUserString("folder");
save(vs, dst, s, ids);
}
for (CodeSystem cs : cslist.getList()) {
ValueSet vs = ((ArrayList<ValueSet>) cs.getUserData("vsl")).get(0);
String s = vs.getUserString("folder");
save(cs, dst,s, ids);
}
deleteMatchingResources(ids, new File("/Users/grahamegrieve/work/r5/source"));
}
private void deleteMatchingResources(Set<String> ids, File folder) {
for (File f : folder.listFiles()) {
if (f.isDirectory()) {
deleteMatchingResources(ids, f);
} else if (f.getName().endsWith(".json")) {
try {
JsonObject json = org.hl7.fhir.utilities.json.parser.JsonParser.parseObject(f);
if (json.has("resourceType") && json.has("id") && ids.contains(json.asString("id"))) {
System.out.println("Delete "+f.getAbsolutePath());
f.delete();
}
} catch (Exception e) {
// nothing
}
} else if (f.getName().endsWith(".xml")) {
try {
Element xml = XMLUtil.parseFileToDom(f.getAbsolutePath()).getDocumentElement();
if (XMLUtil.hasNamedChild(xml, "id") && ids.contains(XMLUtil.getNamedChildValue(xml, "id"))) {
System.out.println("Delete "+f.getAbsolutePath());
f.delete();
}
} catch (Exception e) {
// nothing
}
}
}
}
private void save(CanonicalResource cr, String dst, String folder, Set<String> ids) throws IOException {
// TODO Auto-generated method stub
cr.setText(null);
if (!cr.hasTitle()) {
cr.setTitle(Utilities.unCamelCase(cr.getName()));
}
ids.add(cr.getId());
String fn = Utilities.path(dst, folder, cr.fhirType()+"-"+cr.getId()+".xml");
cr.setUserData("folder", folder);
if (!new File(fn).exists()) {
Utilities.createDirectory(Utilities.getDirectoryForFile(fn));
new XmlParser().setOutputStyle(OutputStyle.PRETTY).compose(new FileOutputStream(fn), cr);
}
}
private void seeBinding(String url, CanonicalResourceManager<ValueSet> vslist, String name, StructureDefinition sd) {
ValueSet vs = vslist.get(url);
if (vs != null) {
vs.setUserData(name, sd);
}
}
private boolean isDataType(String s) {
return Utilities.existsInList(s,
"PrimitiveType", "instant", "time", "date", "dateTime", "decimal", "boolean", "integer", "string",
"uri", "base64Binary", "code", "id", "oid", "unsignedInt", "positiveInt", "markdown", "url", "canonical",
"uuid", "integer64", "DataType", "BackboneType", "Identifier", "HumanName", "Address", "ContactPoint",
"Timing", "Quantity", "SimpleQuantity", "Attachment", "Range", "Period", "Ratio", "RatioRange", "CodeableConcept",
"Coding", "SampledData", "Age", "Distance", "Duration", "Count", "Money", "MoneyQuantity", "Annotation", "Signature", "DataType",
"ContactDetail", "Contributor", "DataRequirement", "ParameterDefinition", "RelatedArtifact", "TriggerDefinition", "UsageContext",
"Expression", "ExtendedContactDetail", "VirtualServiceDetail", "Availability", "MonetaryComponent", "DataType",
"BackboneType", "Reference", "Narrative", "Extension", "Meta", "ElementDefinition", "Dosage", "xhtml", "CodeableReference");
}
private String extractType(String x) {
String s = x;
if (s.contains(".")) {
s = s.substring(0, s.indexOf("."));
}
return s;
}
}

View File

@ -1,6 +1,5 @@
package org.hl7.fhir.convertors.misc; package org.hl7.fhir.convertors.misc;
import java.io.File;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;

View File

@ -4,6 +4,7 @@ import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@ -11,6 +12,8 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import javax.annotation.Nonnull;
import org.apache.commons.compress.archivers.tar.TarArchiveEntry; import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
import org.apache.commons.compress.archivers.tar.TarArchiveInputStream; import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream; import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream;
@ -38,8 +41,6 @@ import org.hl7.fhir.utilities.json.model.JsonObject;
import org.hl7.fhir.utilities.json.parser.JsonParser; import org.hl7.fhir.utilities.json.parser.JsonParser;
import org.hl7.fhir.utilities.npm.NpmPackageIndexBuilder; import org.hl7.fhir.utilities.npm.NpmPackageIndexBuilder;
import com.google.common.base.Charsets;
public class NpmPackageVersionConverter { public class NpmPackageVersionConverter {
private static final int BUFFER_SIZE = 1024; private static final int BUFFER_SIZE = 1024;
@ -76,40 +77,14 @@ public class NpmPackageVersionConverter {
} }
public void execute() throws IOException { public void execute() throws IOException {
GzipCompressorInputStream gzipIn; Map<String, byte[]> content = loadContentMap(new FileInputStream(source));
try {
gzipIn = new GzipCompressorInputStream(new FileInputStream(source));
} catch (Exception e) {
throw new IOException("Error reading " + source + ": " + e.getMessage(), e);
}
Map<String, byte[]> content = new HashMap<>();
try (TarArchiveInputStream tarIn = new TarArchiveInputStream(gzipIn)) {
TarArchiveEntry entry;
while ((entry = (TarArchiveEntry) tarIn.getNextEntry()) != null) {
String n = entry.getName();
if (!entry.isDirectory()) {
int count;
byte[] data = new byte[BUFFER_SIZE];
ByteArrayOutputStream fos = new ByteArrayOutputStream();
try (BufferedOutputStream dest = new BufferedOutputStream(fos, BUFFER_SIZE)) {
while ((count = tarIn.read(data, 0, BUFFER_SIZE)) != -1) {
dest.write(data, 0, count);
}
}
fos.close();
content.put(n, fos.toByteArray());
}
}
}
Map<String, byte[]> output = new HashMap<>(); Map<String, byte[]> output = new HashMap<>();
output.put("package/package.json", convertPackage(content.get("package/package.json"))); output.put("package/package.json", convertPackage(content.get("package/package.json")));
output.put("package/other/spec.internals", convertSpec(content.get("package/other/spec.internals"))); output.put("package/other/spec.internals", convertSpec(content.get("package/other/spec.internals")));
for (Entry<String, byte[]> e : content.entrySet()) { for (Entry<String, byte[]> e : content.entrySet()) {
if (!e.getKey().equals("package/package.json") && !e.getKey().equals("package/other/spec.internals")) { if (!e.getKey().equals("package/package.json") && !e.getKey().equals("package/other/spec.internals") && !e.getKey().endsWith("ig-r4.json")) {
byte[] cnv = e.getValue(); byte[] cnv = e.getValue();
try { try {
JsonObject json = JsonParser.parseObject(e.getValue()); JsonObject json = JsonParser.parseObject(e.getValue());
@ -180,6 +155,41 @@ public class NpmPackageVersionConverter {
TextFile.bytesToFile(b, dest); TextFile.bytesToFile(b, dest);
} }
@Nonnull
protected Map<String, byte[]> loadContentMap(InputStream inputStream) throws IOException {
GzipCompressorInputStream gzipIn;
try {
gzipIn = new GzipCompressorInputStream(inputStream);
} catch (Exception e) {
throw new IOException("Error reading " + source + ": " + e.getMessage(), e);
}
Map<String, byte[]> content = new HashMap<>();
try (TarArchiveInputStream tarIn = new TarArchiveInputStream(gzipIn)) {
TarArchiveEntry entry;
while ((entry = (TarArchiveEntry) tarIn.getNextEntry()) != null) {
String n = entry.getName();
if (n.contains("..")) {
throw new RuntimeException("Entry with an illegal name: " + n);
}
if (!entry.isDirectory()) {
int count;
byte[] data = new byte[BUFFER_SIZE];
ByteArrayOutputStream fos = new ByteArrayOutputStream();
try (BufferedOutputStream dest = new BufferedOutputStream(fos, BUFFER_SIZE)) {
while ((count = tarIn.read(data, 0, BUFFER_SIZE)) != -1) {
dest.write(data, 0, count);
}
}
fos.close();
content.put(n, fos.toByteArray());
}
}
}
return content;
}
private byte[] convertPackage(byte[] cnt) throws IOException { private byte[] convertPackage(byte[] cnt) throws IOException {
JsonObject json = JsonParser.parseObject(cnt); JsonObject json = JsonParser.parseObject(cnt);
currentVersion = json.getJsonArray("fhirVersions").get(0).asString(); currentVersion = json.getJsonArray("fhirVersions").get(0).asString();

View File

@ -3,7 +3,6 @@ package org.hl7.fhir.convertors.misc;
import java.io.File; import java.io.File;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.IOException; import java.io.IOException;
import java.util.Map.Entry;
import org.hl7.fhir.utilities.json.model.JsonObject; import org.hl7.fhir.utilities.json.model.JsonObject;
import org.hl7.fhir.utilities.json.model.JsonProperty; import org.hl7.fhir.utilities.json.model.JsonProperty;

View File

@ -3,7 +3,6 @@ package org.hl7.fhir.convertors.misc.xver;
import java.io.FileInputStream; import java.io.FileInputStream;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.nio.charset.StandardCharsets;
import org.hl7.fhir.convertors.factory.VersionConvertorFactory_10_30; import org.hl7.fhir.convertors.factory.VersionConvertorFactory_10_30;
import org.hl7.fhir.convertors.factory.VersionConvertorFactory_10_40; import org.hl7.fhir.convertors.factory.VersionConvertorFactory_10_40;
@ -14,7 +13,6 @@ import org.hl7.fhir.convertors.factory.VersionConvertorFactory_14_50;
import org.hl7.fhir.convertors.factory.VersionConvertorFactory_30_40; import org.hl7.fhir.convertors.factory.VersionConvertorFactory_30_40;
import org.hl7.fhir.convertors.factory.VersionConvertorFactory_30_50; import org.hl7.fhir.convertors.factory.VersionConvertorFactory_30_50;
import org.hl7.fhir.convertors.factory.VersionConvertorFactory_40_50; import org.hl7.fhir.convertors.factory.VersionConvertorFactory_40_50;
import org.hl7.fhir.convertors.misc.xver.CorePackageVersionConvertor.BaseConvertor;
import org.hl7.fhir.utilities.Utilities; import org.hl7.fhir.utilities.Utilities;
import org.hl7.fhir.utilities.VersionUtilities; import org.hl7.fhir.utilities.VersionUtilities;
import org.hl7.fhir.utilities.json.model.JsonArray; import org.hl7.fhir.utilities.json.model.JsonArray;

View File

@ -1,17 +1,16 @@
package org.hl7.fhir.convertors.conv30_40; package org.hl7.fhir.convertors.conv30_40;
import org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_30_40;
import org.hl7.fhir.convertors.factory.VersionConvertorFactory_30_40;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.util.stream.Stream; import java.util.stream.Stream;
import org.hl7.fhir.convertors.advisors.impl.BaseAdvisor_30_40;
import org.hl7.fhir.convertors.factory.VersionConvertorFactory_30_40;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
public class Immunization30_40Test { public class Immunization30_40Test {
private org.hl7.fhir.r4.formats.JsonParser r4Parser = new org.hl7.fhir.r4.formats.JsonParser(); private org.hl7.fhir.r4.formats.JsonParser r4Parser = new org.hl7.fhir.r4.formats.JsonParser();

View File

@ -80,9 +80,8 @@ public class AuditEvent40_50Test {
org.hl7.fhir.r5.model.Resource r5_streamed = (org.hl7.fhir.r5.model.AuditEvent) new org.hl7.fhir.r5.formats.XmlParser().parse(new ByteArrayInputStream(stream.toByteArray())); org.hl7.fhir.r5.model.Resource r5_streamed = (org.hl7.fhir.r5.model.AuditEvent) new org.hl7.fhir.r5.formats.XmlParser().parse(new ByteArrayInputStream(stream.toByteArray()));
System.out.println(((org.hl7.fhir.r5.model.AuditEvent)r5_conv).getEntity().get(0).getQueryElement().getValueAsString());
//FIXME we should not be even getting this far.
assertArrayEquals(((org.hl7.fhir.r5.model.AuditEvent)r5_conv).getEntity().get(0).getQuery(), INVALID_BASE_64_BINARY_BYTE_ARRAY); assertArrayEquals(((org.hl7.fhir.r5.model.AuditEvent)r5_conv).getEntity().get(0).getQuery(), INVALID_BASE_64_BINARY_BYTE_ARRAY);
assertArrayEquals(((org.hl7.fhir.r5.model.AuditEvent)r5_streamed).getEntity().get(0).getQuery(), INVALID_BASE_64_BINARY_BYTE_ARRAY); assertArrayEquals(((org.hl7.fhir.r5.model.AuditEvent)r5_streamed).getEntity().get(0).getQuery(), INVALID_BASE_64_BINARY_BYTE_ARRAY);

View File

@ -1,16 +1,12 @@
package org.hl7.fhir.convertors.conv40_50; package org.hl7.fhir.convertors.conv40_50;
import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream;
import org.apache.commons.codec.binary.Base64; import javax.annotation.Nullable;
import org.hl7.fhir.convertors.factory.VersionConvertorFactory_40_50; import org.hl7.fhir.convertors.factory.VersionConvertorFactory_40_50;
import org.hl7.fhir.r5.test.utils.TestingUtilities;
import org.hl7.fhir.utilities.TextFile; import org.hl7.fhir.utilities.TextFile;
import org.hl7.fhir.utilities.Utilities; import org.hl7.fhir.utilities.Utilities;
import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.DisplayName;
@ -22,8 +18,8 @@ public class StructureDefinition40_50Test {
@Test @Test
@DisplayName("Test r5 -> r4 AuditEvent conversion.") @DisplayName("Test r5 -> r4 AuditEvent conversion.")
public void testR5_R4() throws IOException { public void testR5_R4() throws IOException {
byte[] r4_input = TextFile.streamToBytes(this.getClass().getResourceAsStream("/sd-xpath-constraint-r4.xml")); byte[] r4_input = getLineSeparatorNormalizedBytes("/sd-xpath-constraint-r4.xml");
byte[] r5_input = TextFile.streamToBytes(this.getClass().getResourceAsStream("/sd-xpath-constraint-r5.xml")); byte[] r5_input = getLineSeparatorNormalizedBytes("/sd-xpath-constraint-r5.xml");
org.hl7.fhir.r5.model.StructureDefinition r5_actual = (org.hl7.fhir.r5.model.StructureDefinition) new org.hl7.fhir.r5.formats.XmlParser().parse(r5_input); org.hl7.fhir.r5.model.StructureDefinition r5_actual = (org.hl7.fhir.r5.model.StructureDefinition) new org.hl7.fhir.r5.formats.XmlParser().parse(r5_input);
org.hl7.fhir.r4.model.StructureDefinition r4_conv = (org.hl7.fhir.r4.model.StructureDefinition) VersionConvertorFactory_40_50.convertResource(r5_actual); org.hl7.fhir.r4.model.StructureDefinition r4_conv = (org.hl7.fhir.r4.model.StructureDefinition) VersionConvertorFactory_40_50.convertResource(r5_actual);
@ -36,12 +32,17 @@ public class StructureDefinition40_50Test {
assertArrayEquals(r4_input, r4_output); assertArrayEquals(r4_input, r4_output);
} }
@Nullable
private byte[] getLineSeparatorNormalizedBytes(String fileName) throws IOException {
return new String(TextFile.streamToBytes(this.getClass().getResourceAsStream(fileName))).replace(System.lineSeparator(), "\n").getBytes();
}
@Test @Test
@DisplayName("Test r4 -> r5 AuditEvent conversion.") @DisplayName("Test r4 -> r5 AuditEvent conversion.")
public void testR4_R5() throws IOException { public void testR4_R5() throws IOException {
byte[] r4_input = TextFile.streamToBytes(this.getClass().getResourceAsStream("/sd-xpath-constraint-r4.xml")); byte[] r4_input = getLineSeparatorNormalizedBytes("/sd-xpath-constraint-r4.xml");
byte[] r5_input = TextFile.streamToBytes(this.getClass().getResourceAsStream("/sd-xpath-constraint-r5.xml")); byte[] r5_input = getLineSeparatorNormalizedBytes("/sd-xpath-constraint-r5.xml");
org.hl7.fhir.r4.model.StructureDefinition r4_actual = (org.hl7.fhir.r4.model.StructureDefinition) new org.hl7.fhir.r4.formats.XmlParser().parse(r4_input); org.hl7.fhir.r4.model.StructureDefinition r4_actual = (org.hl7.fhir.r4.model.StructureDefinition) new org.hl7.fhir.r4.formats.XmlParser().parse(r4_input);
org.hl7.fhir.r5.model.StructureDefinition r5_conv = (org.hl7.fhir.r5.model.StructureDefinition) VersionConvertorFactory_40_50.convertResource(r4_actual); org.hl7.fhir.r5.model.StructureDefinition r5_conv = (org.hl7.fhir.r5.model.StructureDefinition) VersionConvertorFactory_40_50.convertResource(r4_actual);

View File

@ -0,0 +1,36 @@
package org.hl7.fhir.convertors.misc;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.StandardCharsets;
import java.util.Map;
import org.hl7.fhir.utilities.tests.ResourceLoaderTests;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
public class NpmPackageVersionConverterTests implements ResourceLoaderTests {
@org.junit.jupiter.api.Test
public void testNormalTgz() throws IOException {
InputStream tgzStream = getResourceAsInputStream("misc", "npmPackageVersionConverter", "tgz-normal.tgz");
NpmPackageVersionConverter converter = new NpmPackageVersionConverter(null, null, "r5", null);
Map<String, byte[]> contents = converter.loadContentMap(tgzStream);
String actual = new String(contents.get("depth1/test.txt"), StandardCharsets.UTF_8);
assertEquals("dummy file content", actual);
}
@Test
public void testEvilTgz() throws IOException {
RuntimeException thrown = Assertions.assertThrows(RuntimeException.class, () -> {
InputStream tgzStream = getResourceAsInputStream("misc", "npmPackageVersionConverter", "tgz-evil.tgz");
NpmPackageVersionConverter converter = new NpmPackageVersionConverter(null, null, "r5", null);
converter.loadContentMap(tgzStream);
});
assertNotNull(thrown);
assertEquals("Entry with an illegal name: ../evil.txt", thrown.getMessage());
}
}

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId> <artifactId>org.hl7.fhir.core</artifactId>
<version>5.6.89-SNAPSHOT</version> <version>5.6.98-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

View File

@ -99,7 +99,7 @@ public class Base64BinaryType extends PrimitiveType<byte[]> {
* @throws DataFormatException * @throws DataFormatException
*/ */
public void checkValidBase64(String toCheck) throws DataFormatException { public void checkValidBase64(String toCheck) throws DataFormatException {
if (!Base64.isBase64(toCheck.getBytes())) { if (!org.hl7.fhir.utilities.Base64.isBase64(toCheck.getBytes())) {
throw new DataFormatException(""); throw new DataFormatException("");
} }
} }

View File

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

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId> <artifactId>org.hl7.fhir.core</artifactId>
<version>5.6.89-SNAPSHOT</version> <version>5.6.98-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

View File

@ -100,7 +100,7 @@ public class Base64BinaryType extends PrimitiveType<byte[]> {
* @throws DataFormatException * @throws DataFormatException
*/ */
public void checkValidBase64(String toCheck) throws DataFormatException { public void checkValidBase64(String toCheck) throws DataFormatException {
if (!Base64.isBase64(toCheck.getBytes())) { if (!org.hl7.fhir.utilities.Base64.isBase64(toCheck.getBytes())) {
throw new DataFormatException(""); throw new DataFormatException("");
} }
} }

View File

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

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>org.hl7.fhir.core</artifactId> <artifactId>org.hl7.fhir.core</artifactId>
<version>5.6.89-SNAPSHOT</version> <version>5.6.98-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>

View File

@ -132,12 +132,12 @@ public class Account extends DomainResource {
return AccountStatus.ENTEREDINERROR; return AccountStatus.ENTEREDINERROR;
throw new IllegalArgumentException("Unknown AccountStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown AccountStatus code '"+codeString+"'");
} }
public Enumeration<AccountStatus> fromType(Base code) throws FHIRException { public Enumeration<AccountStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<AccountStatus>(this); return new Enumeration<AccountStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("active".equals(codeString)) if ("active".equals(codeString))

View File

@ -1533,12 +1533,12 @@ The primary difference between a medication statement and a medication administr
return ActivityDefinitionKind.VISIONPRESCRIPTION; return ActivityDefinitionKind.VISIONPRESCRIPTION;
throw new IllegalArgumentException("Unknown ActivityDefinitionKind code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ActivityDefinitionKind code '"+codeString+"'");
} }
public Enumeration<ActivityDefinitionKind> fromType(Base code) throws FHIRException { public Enumeration<ActivityDefinitionKind> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ActivityDefinitionKind>(this); return new Enumeration<ActivityDefinitionKind>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("Account".equals(codeString)) if ("Account".equals(codeString))
@ -2109,12 +2109,12 @@ The primary difference between a medication statement and a medication administr
return ActivityParticipantType.RELATEDPERSON; return ActivityParticipantType.RELATEDPERSON;
throw new IllegalArgumentException("Unknown ActivityParticipantType code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ActivityParticipantType code '"+codeString+"'");
} }
public Enumeration<ActivityParticipantType> fromType(Base code) throws FHIRException { public Enumeration<ActivityParticipantType> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ActivityParticipantType>(this); return new Enumeration<ActivityParticipantType>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("patient".equals(codeString)) if ("patient".equals(codeString))

View File

@ -143,12 +143,12 @@ public class Address extends Type implements ICompositeType {
return AddressUse.OLD; return AddressUse.OLD;
throw new IllegalArgumentException("Unknown AddressUse code '"+codeString+"'"); throw new IllegalArgumentException("Unknown AddressUse code '"+codeString+"'");
} }
public Enumeration<AddressUse> fromType(Base code) throws FHIRException { public Enumeration<AddressUse> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<AddressUse>(this); return new Enumeration<AddressUse>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("home".equals(codeString)) if ("home".equals(codeString))
@ -259,12 +259,12 @@ public class Address extends Type implements ICompositeType {
return AddressType.BOTH; return AddressType.BOTH;
throw new IllegalArgumentException("Unknown AddressType code '"+codeString+"'"); throw new IllegalArgumentException("Unknown AddressType code '"+codeString+"'");
} }
public Enumeration<AddressType> fromType(Base code) throws FHIRException { public Enumeration<AddressType> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<AddressType>(this); return new Enumeration<AddressType>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("postal".equals(codeString)) if ("postal".equals(codeString))

View File

@ -121,12 +121,12 @@ public class AdverseEvent extends DomainResource {
return AdverseEventCategory.PAE; return AdverseEventCategory.PAE;
throw new IllegalArgumentException("Unknown AdverseEventCategory code '"+codeString+"'"); throw new IllegalArgumentException("Unknown AdverseEventCategory code '"+codeString+"'");
} }
public Enumeration<AdverseEventCategory> fromType(Base code) throws FHIRException { public Enumeration<AdverseEventCategory> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<AdverseEventCategory>(this); return new Enumeration<AdverseEventCategory>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("AE".equals(codeString)) if ("AE".equals(codeString))
@ -217,12 +217,12 @@ public class AdverseEvent extends DomainResource {
return AdverseEventCausality.CAUSALITY2; return AdverseEventCausality.CAUSALITY2;
throw new IllegalArgumentException("Unknown AdverseEventCausality code '"+codeString+"'"); throw new IllegalArgumentException("Unknown AdverseEventCausality code '"+codeString+"'");
} }
public Enumeration<AdverseEventCausality> fromType(Base code) throws FHIRException { public Enumeration<AdverseEventCausality> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<AdverseEventCausality>(this); return new Enumeration<AdverseEventCausality>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("causality1".equals(codeString)) if ("causality1".equals(codeString))

View File

@ -134,12 +134,12 @@ public class AllergyIntolerance extends DomainResource {
return AllergyIntoleranceClinicalStatus.RESOLVED; return AllergyIntoleranceClinicalStatus.RESOLVED;
throw new IllegalArgumentException("Unknown AllergyIntoleranceClinicalStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown AllergyIntoleranceClinicalStatus code '"+codeString+"'");
} }
public Enumeration<AllergyIntoleranceClinicalStatus> fromType(Base code) throws FHIRException { public Enumeration<AllergyIntoleranceClinicalStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<AllergyIntoleranceClinicalStatus>(this); return new Enumeration<AllergyIntoleranceClinicalStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("active".equals(codeString)) if ("active".equals(codeString))
@ -258,12 +258,12 @@ public class AllergyIntolerance extends DomainResource {
return AllergyIntoleranceVerificationStatus.ENTEREDINERROR; return AllergyIntoleranceVerificationStatus.ENTEREDINERROR;
throw new IllegalArgumentException("Unknown AllergyIntoleranceVerificationStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown AllergyIntoleranceVerificationStatus code '"+codeString+"'");
} }
public Enumeration<AllergyIntoleranceVerificationStatus> fromType(Base code) throws FHIRException { public Enumeration<AllergyIntoleranceVerificationStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<AllergyIntoleranceVerificationStatus>(this); return new Enumeration<AllergyIntoleranceVerificationStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("unconfirmed".equals(codeString)) if ("unconfirmed".equals(codeString))
@ -362,12 +362,12 @@ public class AllergyIntolerance extends DomainResource {
return AllergyIntoleranceType.INTOLERANCE; return AllergyIntoleranceType.INTOLERANCE;
throw new IllegalArgumentException("Unknown AllergyIntoleranceType code '"+codeString+"'"); throw new IllegalArgumentException("Unknown AllergyIntoleranceType code '"+codeString+"'");
} }
public Enumeration<AllergyIntoleranceType> fromType(Base code) throws FHIRException { public Enumeration<AllergyIntoleranceType> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<AllergyIntoleranceType>(this); return new Enumeration<AllergyIntoleranceType>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("allergy".equals(codeString)) if ("allergy".equals(codeString))
@ -482,12 +482,12 @@ public class AllergyIntolerance extends DomainResource {
return AllergyIntoleranceCategory.BIOLOGIC; return AllergyIntoleranceCategory.BIOLOGIC;
throw new IllegalArgumentException("Unknown AllergyIntoleranceCategory code '"+codeString+"'"); throw new IllegalArgumentException("Unknown AllergyIntoleranceCategory code '"+codeString+"'");
} }
public Enumeration<AllergyIntoleranceCategory> fromType(Base code) throws FHIRException { public Enumeration<AllergyIntoleranceCategory> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<AllergyIntoleranceCategory>(this); return new Enumeration<AllergyIntoleranceCategory>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("food".equals(codeString)) if ("food".equals(codeString))
@ -598,12 +598,12 @@ public class AllergyIntolerance extends DomainResource {
return AllergyIntoleranceCriticality.UNABLETOASSESS; return AllergyIntoleranceCriticality.UNABLETOASSESS;
throw new IllegalArgumentException("Unknown AllergyIntoleranceCriticality code '"+codeString+"'"); throw new IllegalArgumentException("Unknown AllergyIntoleranceCriticality code '"+codeString+"'");
} }
public Enumeration<AllergyIntoleranceCriticality> fromType(Base code) throws FHIRException { public Enumeration<AllergyIntoleranceCriticality> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<AllergyIntoleranceCriticality>(this); return new Enumeration<AllergyIntoleranceCriticality>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("low".equals(codeString)) if ("low".equals(codeString))
@ -710,12 +710,12 @@ public class AllergyIntolerance extends DomainResource {
return AllergyIntoleranceSeverity.SEVERE; return AllergyIntoleranceSeverity.SEVERE;
throw new IllegalArgumentException("Unknown AllergyIntoleranceSeverity code '"+codeString+"'"); throw new IllegalArgumentException("Unknown AllergyIntoleranceSeverity code '"+codeString+"'");
} }
public Enumeration<AllergyIntoleranceSeverity> fromType(Base code) throws FHIRException { public Enumeration<AllergyIntoleranceSeverity> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<AllergyIntoleranceSeverity>(this); return new Enumeration<AllergyIntoleranceSeverity>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("mild".equals(codeString)) if ("mild".equals(codeString))

View File

@ -193,12 +193,12 @@ public class Appointment extends DomainResource {
return AppointmentStatus.ENTEREDINERROR; return AppointmentStatus.ENTEREDINERROR;
throw new IllegalArgumentException("Unknown AppointmentStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown AppointmentStatus code '"+codeString+"'");
} }
public Enumeration<AppointmentStatus> fromType(Base code) throws FHIRException { public Enumeration<AppointmentStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<AppointmentStatus>(this); return new Enumeration<AppointmentStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("proposed".equals(codeString)) if ("proposed".equals(codeString))
@ -325,12 +325,12 @@ public class Appointment extends DomainResource {
return ParticipantRequired.INFORMATIONONLY; return ParticipantRequired.INFORMATIONONLY;
throw new IllegalArgumentException("Unknown ParticipantRequired code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ParticipantRequired code '"+codeString+"'");
} }
public Enumeration<ParticipantRequired> fromType(Base code) throws FHIRException { public Enumeration<ParticipantRequired> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ParticipantRequired>(this); return new Enumeration<ParticipantRequired>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("required".equals(codeString)) if ("required".equals(codeString))
@ -449,12 +449,12 @@ public class Appointment extends DomainResource {
return ParticipationStatus.NEEDSACTION; return ParticipationStatus.NEEDSACTION;
throw new IllegalArgumentException("Unknown ParticipationStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ParticipationStatus code '"+codeString+"'");
} }
public Enumeration<ParticipationStatus> fromType(Base code) throws FHIRException { public Enumeration<ParticipationStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ParticipationStatus>(this); return new Enumeration<ParticipationStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("accepted".equals(codeString)) if ("accepted".equals(codeString))

View File

@ -143,12 +143,12 @@ public class AppointmentResponse extends DomainResource {
return ParticipantStatus.NEEDSACTION; return ParticipantStatus.NEEDSACTION;
throw new IllegalArgumentException("Unknown ParticipantStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ParticipantStatus code '"+codeString+"'");
} }
public Enumeration<ParticipantStatus> fromType(Base code) throws FHIRException { public Enumeration<ParticipantStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ParticipantStatus>(this); return new Enumeration<ParticipantStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("accepted".equals(codeString)) if ("accepted".equals(codeString))

View File

@ -157,12 +157,12 @@ public class AuditEvent extends DomainResource {
return AuditEventAction.E; return AuditEventAction.E;
throw new IllegalArgumentException("Unknown AuditEventAction code '"+codeString+"'"); throw new IllegalArgumentException("Unknown AuditEventAction code '"+codeString+"'");
} }
public Enumeration<AuditEventAction> fromType(Base code) throws FHIRException { public Enumeration<AuditEventAction> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<AuditEventAction>(this); return new Enumeration<AuditEventAction>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("C".equals(codeString)) if ("C".equals(codeString))
@ -289,12 +289,12 @@ public class AuditEvent extends DomainResource {
return AuditEventOutcome._12; return AuditEventOutcome._12;
throw new IllegalArgumentException("Unknown AuditEventOutcome code '"+codeString+"'"); throw new IllegalArgumentException("Unknown AuditEventOutcome code '"+codeString+"'");
} }
public Enumeration<AuditEventOutcome> fromType(Base code) throws FHIRException { public Enumeration<AuditEventOutcome> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<AuditEventOutcome>(this); return new Enumeration<AuditEventOutcome>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("0".equals(codeString)) if ("0".equals(codeString))
@ -429,12 +429,12 @@ public class AuditEvent extends DomainResource {
return AuditEventAgentNetworkType._5; return AuditEventAgentNetworkType._5;
throw new IllegalArgumentException("Unknown AuditEventAgentNetworkType code '"+codeString+"'"); throw new IllegalArgumentException("Unknown AuditEventAgentNetworkType code '"+codeString+"'");
} }
public Enumeration<AuditEventAgentNetworkType> fromType(Base code) throws FHIRException { public Enumeration<AuditEventAgentNetworkType> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<AuditEventAgentNetworkType>(this); return new Enumeration<AuditEventAgentNetworkType>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("1".equals(codeString)) if ("1".equals(codeString))

View File

@ -152,7 +152,7 @@ public class Base64BinaryType extends PrimitiveType<byte[]> implements IPrimitiv
* @throws DataFormatException * @throws DataFormatException
*/ */
public void checkValidBase64(String toCheck) throws DataFormatException { public void checkValidBase64(String toCheck) throws DataFormatException {
if (!Base64.isBase64(toCheck.getBytes())) { if (!org.hl7.fhir.utilities.Base64.isBase64(toCheck.getBytes())) {
throw new DataFormatException(""); throw new DataFormatException("");
} }
} }

View File

@ -208,12 +208,12 @@ public class Bundle extends Resource implements IBaseBundle {
return BundleType.COLLECTION; return BundleType.COLLECTION;
throw new IllegalArgumentException("Unknown BundleType code '"+codeString+"'"); throw new IllegalArgumentException("Unknown BundleType code '"+codeString+"'");
} }
public Enumeration<BundleType> fromType(Base code) throws FHIRException { public Enumeration<BundleType> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<BundleType>(this); return new Enumeration<BundleType>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("document".equals(codeString)) if ("document".equals(codeString))
@ -344,12 +344,12 @@ public class Bundle extends Resource implements IBaseBundle {
return SearchEntryMode.OUTCOME; return SearchEntryMode.OUTCOME;
throw new IllegalArgumentException("Unknown SearchEntryMode code '"+codeString+"'"); throw new IllegalArgumentException("Unknown SearchEntryMode code '"+codeString+"'");
} }
public Enumeration<SearchEntryMode> fromType(Base code) throws FHIRException { public Enumeration<SearchEntryMode> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<SearchEntryMode>(this); return new Enumeration<SearchEntryMode>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("match".equals(codeString)) if ("match".equals(codeString))
@ -468,12 +468,12 @@ public class Bundle extends Resource implements IBaseBundle {
return HTTPVerb.DELETE; return HTTPVerb.DELETE;
throw new IllegalArgumentException("Unknown HTTPVerb code '"+codeString+"'"); throw new IllegalArgumentException("Unknown HTTPVerb code '"+codeString+"'");
} }
public Enumeration<HTTPVerb> fromType(Base code) throws FHIRException { public Enumeration<HTTPVerb> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<HTTPVerb>(this); return new Enumeration<HTTPVerb>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("GET".equals(codeString)) if ("GET".equals(codeString))

View File

@ -141,12 +141,12 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
return CapabilityStatementKind.REQUIREMENTS; return CapabilityStatementKind.REQUIREMENTS;
throw new IllegalArgumentException("Unknown CapabilityStatementKind code '"+codeString+"'"); throw new IllegalArgumentException("Unknown CapabilityStatementKind code '"+codeString+"'");
} }
public Enumeration<CapabilityStatementKind> fromType(Base code) throws FHIRException { public Enumeration<CapabilityStatementKind> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<CapabilityStatementKind>(this); return new Enumeration<CapabilityStatementKind>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("instance".equals(codeString)) if ("instance".equals(codeString))
@ -265,12 +265,12 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
return UnknownContentCode.BOTH; return UnknownContentCode.BOTH;
throw new IllegalArgumentException("Unknown UnknownContentCode code '"+codeString+"'"); throw new IllegalArgumentException("Unknown UnknownContentCode code '"+codeString+"'");
} }
public Enumeration<UnknownContentCode> fromType(Base code) throws FHIRException { public Enumeration<UnknownContentCode> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<UnknownContentCode>(this); return new Enumeration<UnknownContentCode>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("no".equals(codeString)) if ("no".equals(codeString))
@ -369,12 +369,12 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
return RestfulCapabilityMode.SERVER; return RestfulCapabilityMode.SERVER;
throw new IllegalArgumentException("Unknown RestfulCapabilityMode code '"+codeString+"'"); throw new IllegalArgumentException("Unknown RestfulCapabilityMode code '"+codeString+"'");
} }
public Enumeration<RestfulCapabilityMode> fromType(Base code) throws FHIRException { public Enumeration<RestfulCapabilityMode> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<RestfulCapabilityMode>(this); return new Enumeration<RestfulCapabilityMode>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("client".equals(codeString)) if ("client".equals(codeString))
@ -549,12 +549,12 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
return TypeRestfulInteraction.SEARCHTYPE; return TypeRestfulInteraction.SEARCHTYPE;
throw new IllegalArgumentException("Unknown TypeRestfulInteraction code '"+codeString+"'"); throw new IllegalArgumentException("Unknown TypeRestfulInteraction code '"+codeString+"'");
} }
public Enumeration<TypeRestfulInteraction> fromType(Base code) throws FHIRException { public Enumeration<TypeRestfulInteraction> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<TypeRestfulInteraction>(this); return new Enumeration<TypeRestfulInteraction>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("read".equals(codeString)) if ("read".equals(codeString))
@ -685,12 +685,12 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
return ResourceVersionPolicy.VERSIONEDUPDATE; return ResourceVersionPolicy.VERSIONEDUPDATE;
throw new IllegalArgumentException("Unknown ResourceVersionPolicy code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ResourceVersionPolicy code '"+codeString+"'");
} }
public Enumeration<ResourceVersionPolicy> fromType(Base code) throws FHIRException { public Enumeration<ResourceVersionPolicy> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ResourceVersionPolicy>(this); return new Enumeration<ResourceVersionPolicy>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("no-version".equals(codeString)) if ("no-version".equals(codeString))
@ -809,12 +809,12 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
return ConditionalReadStatus.FULLSUPPORT; return ConditionalReadStatus.FULLSUPPORT;
throw new IllegalArgumentException("Unknown ConditionalReadStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ConditionalReadStatus code '"+codeString+"'");
} }
public Enumeration<ConditionalReadStatus> fromType(Base code) throws FHIRException { public Enumeration<ConditionalReadStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ConditionalReadStatus>(this); return new Enumeration<ConditionalReadStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("not-supported".equals(codeString)) if ("not-supported".equals(codeString))
@ -925,12 +925,12 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
return ConditionalDeleteStatus.MULTIPLE; return ConditionalDeleteStatus.MULTIPLE;
throw new IllegalArgumentException("Unknown ConditionalDeleteStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ConditionalDeleteStatus code '"+codeString+"'");
} }
public Enumeration<ConditionalDeleteStatus> fromType(Base code) throws FHIRException { public Enumeration<ConditionalDeleteStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ConditionalDeleteStatus>(this); return new Enumeration<ConditionalDeleteStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("not-supported".equals(codeString)) if ("not-supported".equals(codeString))
@ -1061,12 +1061,12 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
return ReferenceHandlingPolicy.LOCAL; return ReferenceHandlingPolicy.LOCAL;
throw new IllegalArgumentException("Unknown ReferenceHandlingPolicy code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ReferenceHandlingPolicy code '"+codeString+"'");
} }
public Enumeration<ReferenceHandlingPolicy> fromType(Base code) throws FHIRException { public Enumeration<ReferenceHandlingPolicy> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ReferenceHandlingPolicy>(this); return new Enumeration<ReferenceHandlingPolicy>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("literal".equals(codeString)) if ("literal".equals(codeString))
@ -1193,12 +1193,12 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
return SystemRestfulInteraction.HISTORYSYSTEM; return SystemRestfulInteraction.HISTORYSYSTEM;
throw new IllegalArgumentException("Unknown SystemRestfulInteraction code '"+codeString+"'"); throw new IllegalArgumentException("Unknown SystemRestfulInteraction code '"+codeString+"'");
} }
public Enumeration<SystemRestfulInteraction> fromType(Base code) throws FHIRException { public Enumeration<SystemRestfulInteraction> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<SystemRestfulInteraction>(this); return new Enumeration<SystemRestfulInteraction>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("transaction".equals(codeString)) if ("transaction".equals(codeString))
@ -1297,12 +1297,12 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
return EventCapabilityMode.RECEIVER; return EventCapabilityMode.RECEIVER;
throw new IllegalArgumentException("Unknown EventCapabilityMode code '"+codeString+"'"); throw new IllegalArgumentException("Unknown EventCapabilityMode code '"+codeString+"'");
} }
public Enumeration<EventCapabilityMode> fromType(Base code) throws FHIRException { public Enumeration<EventCapabilityMode> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<EventCapabilityMode>(this); return new Enumeration<EventCapabilityMode>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("sender".equals(codeString)) if ("sender".equals(codeString))
@ -1405,12 +1405,12 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
return MessageSignificanceCategory.NOTIFICATION; return MessageSignificanceCategory.NOTIFICATION;
throw new IllegalArgumentException("Unknown MessageSignificanceCategory code '"+codeString+"'"); throw new IllegalArgumentException("Unknown MessageSignificanceCategory code '"+codeString+"'");
} }
public Enumeration<MessageSignificanceCategory> fromType(Base code) throws FHIRException { public Enumeration<MessageSignificanceCategory> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<MessageSignificanceCategory>(this); return new Enumeration<MessageSignificanceCategory>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("Consequence".equals(codeString)) if ("Consequence".equals(codeString))
@ -1505,12 +1505,12 @@ public class CapabilityStatement extends MetadataResource implements IBaseConfor
return DocumentMode.CONSUMER; return DocumentMode.CONSUMER;
throw new IllegalArgumentException("Unknown DocumentMode code '"+codeString+"'"); throw new IllegalArgumentException("Unknown DocumentMode code '"+codeString+"'");
} }
public Enumeration<DocumentMode> fromType(Base code) throws FHIRException { public Enumeration<DocumentMode> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<DocumentMode>(this); return new Enumeration<DocumentMode>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("producer".equals(codeString)) if ("producer".equals(codeString))

View File

@ -181,12 +181,12 @@ public class CarePlan extends DomainResource {
return CarePlanStatus.UNKNOWN; return CarePlanStatus.UNKNOWN;
throw new IllegalArgumentException("Unknown CarePlanStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown CarePlanStatus code '"+codeString+"'");
} }
public Enumeration<CarePlanStatus> fromType(Base code) throws FHIRException { public Enumeration<CarePlanStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<CarePlanStatus>(this); return new Enumeration<CarePlanStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("draft".equals(codeString)) if ("draft".equals(codeString))
@ -323,12 +323,12 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use
return CarePlanIntent.OPTION; return CarePlanIntent.OPTION;
throw new IllegalArgumentException("Unknown CarePlanIntent code '"+codeString+"'"); throw new IllegalArgumentException("Unknown CarePlanIntent code '"+codeString+"'");
} }
public Enumeration<CarePlanIntent> fromType(Base code) throws FHIRException { public Enumeration<CarePlanIntent> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<CarePlanIntent>(this); return new Enumeration<CarePlanIntent>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("proposal".equals(codeString)) if ("proposal".equals(codeString))
@ -487,12 +487,12 @@ Refer to [[[RequestGroup]]] for additional information on how this status is use
return CarePlanActivityStatus.UNKNOWN; return CarePlanActivityStatus.UNKNOWN;
throw new IllegalArgumentException("Unknown CarePlanActivityStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown CarePlanActivityStatus code '"+codeString+"'");
} }
public Enumeration<CarePlanActivityStatus> fromType(Base code) throws FHIRException { public Enumeration<CarePlanActivityStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<CarePlanActivityStatus>(this); return new Enumeration<CarePlanActivityStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("not-started".equals(codeString)) if ("not-started".equals(codeString))

View File

@ -156,12 +156,12 @@ public class CareTeam extends DomainResource {
return CareTeamStatus.ENTEREDINERROR; return CareTeamStatus.ENTEREDINERROR;
throw new IllegalArgumentException("Unknown CareTeamStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown CareTeamStatus code '"+codeString+"'");
} }
public Enumeration<CareTeamStatus> fromType(Base code) throws FHIRException { public Enumeration<CareTeamStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<CareTeamStatus>(this); return new Enumeration<CareTeamStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("proposed".equals(codeString)) if ("proposed".equals(codeString))

View File

@ -185,12 +185,12 @@ public class ChargeItem extends DomainResource {
return ChargeItemStatus.UNKNOWN; return ChargeItemStatus.UNKNOWN;
throw new IllegalArgumentException("Unknown ChargeItemStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ChargeItemStatus code '"+codeString+"'");
} }
public Enumeration<ChargeItemStatus> fromType(Base code) throws FHIRException { public Enumeration<ChargeItemStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ChargeItemStatus>(this); return new Enumeration<ChargeItemStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("planned".equals(codeString)) if ("planned".equals(codeString))

View File

@ -148,12 +148,12 @@ public class Claim extends DomainResource {
return ClaimStatus.ENTEREDINERROR; return ClaimStatus.ENTEREDINERROR;
throw new IllegalArgumentException("Unknown ClaimStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ClaimStatus code '"+codeString+"'");
} }
public Enumeration<ClaimStatus> fromType(Base code) throws FHIRException { public Enumeration<ClaimStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ClaimStatus>(this); return new Enumeration<ClaimStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("active".equals(codeString)) if ("active".equals(codeString))
@ -276,12 +276,12 @@ public class Claim extends DomainResource {
return Use.OTHER; return Use.OTHER;
throw new IllegalArgumentException("Unknown Use code '"+codeString+"'"); throw new IllegalArgumentException("Unknown Use code '"+codeString+"'");
} }
public Enumeration<Use> fromType(Base code) throws FHIRException { public Enumeration<Use> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<Use>(this); return new Enumeration<Use>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("complete".equals(codeString)) if ("complete".equals(codeString))

View File

@ -147,12 +147,12 @@ public class ClaimResponse extends DomainResource {
return ClaimResponseStatus.ENTEREDINERROR; return ClaimResponseStatus.ENTEREDINERROR;
throw new IllegalArgumentException("Unknown ClaimResponseStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ClaimResponseStatus code '"+codeString+"'");
} }
public Enumeration<ClaimResponseStatus> fromType(Base code) throws FHIRException { public Enumeration<ClaimResponseStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ClaimResponseStatus>(this); return new Enumeration<ClaimResponseStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("active".equals(codeString)) if ("active".equals(codeString))

View File

@ -135,12 +135,12 @@ public class ClinicalImpression extends DomainResource {
return ClinicalImpressionStatus.ENTEREDINERROR; return ClinicalImpressionStatus.ENTEREDINERROR;
throw new IllegalArgumentException("Unknown ClinicalImpressionStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ClinicalImpressionStatus code '"+codeString+"'");
} }
public Enumeration<ClinicalImpressionStatus> fromType(Base code) throws FHIRException { public Enumeration<ClinicalImpressionStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ClinicalImpressionStatus>(this); return new Enumeration<ClinicalImpressionStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("draft".equals(codeString)) if ("draft".equals(codeString))

View File

@ -150,12 +150,12 @@ public class CodeSystem extends MetadataResource {
return CodeSystemHierarchyMeaning.CLASSIFIEDWITH; return CodeSystemHierarchyMeaning.CLASSIFIEDWITH;
throw new IllegalArgumentException("Unknown CodeSystemHierarchyMeaning code '"+codeString+"'"); throw new IllegalArgumentException("Unknown CodeSystemHierarchyMeaning code '"+codeString+"'");
} }
public Enumeration<CodeSystemHierarchyMeaning> fromType(Base code) throws FHIRException { public Enumeration<CodeSystemHierarchyMeaning> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<CodeSystemHierarchyMeaning>(this); return new Enumeration<CodeSystemHierarchyMeaning>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("grouped-by".equals(codeString)) if ("grouped-by".equals(codeString))
@ -278,12 +278,12 @@ public class CodeSystem extends MetadataResource {
return CodeSystemContentMode.COMPLETE; return CodeSystemContentMode.COMPLETE;
throw new IllegalArgumentException("Unknown CodeSystemContentMode code '"+codeString+"'"); throw new IllegalArgumentException("Unknown CodeSystemContentMode code '"+codeString+"'");
} }
public Enumeration<CodeSystemContentMode> fromType(Base code) throws FHIRException { public Enumeration<CodeSystemContentMode> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<CodeSystemContentMode>(this); return new Enumeration<CodeSystemContentMode>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("not-present".equals(codeString)) if ("not-present".equals(codeString))
@ -466,12 +466,12 @@ public class CodeSystem extends MetadataResource {
return FilterOperator.EXISTS; return FilterOperator.EXISTS;
throw new IllegalArgumentException("Unknown FilterOperator code '"+codeString+"'"); throw new IllegalArgumentException("Unknown FilterOperator code '"+codeString+"'");
} }
public Enumeration<FilterOperator> fromType(Base code) throws FHIRException { public Enumeration<FilterOperator> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<FilterOperator>(this); return new Enumeration<FilterOperator>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("=".equals(codeString)) if ("=".equals(codeString))
@ -638,12 +638,12 @@ public class CodeSystem extends MetadataResource {
return PropertyType.DATETIME; return PropertyType.DATETIME;
throw new IllegalArgumentException("Unknown PropertyType code '"+codeString+"'"); throw new IllegalArgumentException("Unknown PropertyType code '"+codeString+"'");
} }
public Enumeration<PropertyType> fromType(Base code) throws FHIRException { public Enumeration<PropertyType> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<PropertyType>(this); return new Enumeration<PropertyType>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("code".equals(codeString)) if ("code".equals(codeString))

View File

@ -181,12 +181,12 @@ public class Communication extends DomainResource {
return CommunicationStatus.UNKNOWN; return CommunicationStatus.UNKNOWN;
throw new IllegalArgumentException("Unknown CommunicationStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown CommunicationStatus code '"+codeString+"'");
} }
public Enumeration<CommunicationStatus> fromType(Base code) throws FHIRException { public Enumeration<CommunicationStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<CommunicationStatus>(this); return new Enumeration<CommunicationStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("preparation".equals(codeString)) if ("preparation".equals(codeString))

View File

@ -181,12 +181,12 @@ public class CommunicationRequest extends DomainResource {
return CommunicationRequestStatus.UNKNOWN; return CommunicationRequestStatus.UNKNOWN;
throw new IllegalArgumentException("Unknown CommunicationRequestStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown CommunicationRequestStatus code '"+codeString+"'");
} }
public Enumeration<CommunicationRequestStatus> fromType(Base code) throws FHIRException { public Enumeration<CommunicationRequestStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<CommunicationRequestStatus>(this); return new Enumeration<CommunicationRequestStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("draft".equals(codeString)) if ("draft".equals(codeString))
@ -321,12 +321,12 @@ public class CommunicationRequest extends DomainResource {
return CommunicationPriority.STAT; return CommunicationPriority.STAT;
throw new IllegalArgumentException("Unknown CommunicationPriority code '"+codeString+"'"); throw new IllegalArgumentException("Unknown CommunicationPriority code '"+codeString+"'");
} }
public Enumeration<CommunicationPriority> fromType(Base code) throws FHIRException { public Enumeration<CommunicationPriority> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<CommunicationPriority>(this); return new Enumeration<CommunicationPriority>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("routine".equals(codeString)) if ("routine".equals(codeString))

View File

@ -161,12 +161,12 @@ public class CompartmentDefinition extends MetadataResource {
return CompartmentType.DEVICE; return CompartmentType.DEVICE;
throw new IllegalArgumentException("Unknown CompartmentType code '"+codeString+"'"); throw new IllegalArgumentException("Unknown CompartmentType code '"+codeString+"'");
} }
public Enumeration<CompartmentType> fromType(Base code) throws FHIRException { public Enumeration<CompartmentType> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<CompartmentType>(this); return new Enumeration<CompartmentType>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("Patient".equals(codeString)) if ("Patient".equals(codeString))

View File

@ -146,12 +146,12 @@ public class Composition extends DomainResource {
return CompositionStatus.ENTEREDINERROR; return CompositionStatus.ENTEREDINERROR;
throw new IllegalArgumentException("Unknown CompositionStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown CompositionStatus code '"+codeString+"'");
} }
public Enumeration<CompositionStatus> fromType(Base code) throws FHIRException { public Enumeration<CompositionStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<CompositionStatus>(this); return new Enumeration<CompositionStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("preliminary".equals(codeString)) if ("preliminary".equals(codeString))
@ -298,12 +298,12 @@ public class Composition extends DomainResource {
return DocumentConfidentiality.V; return DocumentConfidentiality.V;
throw new IllegalArgumentException("Unknown DocumentConfidentiality code '"+codeString+"'"); throw new IllegalArgumentException("Unknown DocumentConfidentiality code '"+codeString+"'");
} }
public Enumeration<DocumentConfidentiality> fromType(Base code) throws FHIRException { public Enumeration<DocumentConfidentiality> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<DocumentConfidentiality>(this); return new Enumeration<DocumentConfidentiality>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("U".equals(codeString)) if ("U".equals(codeString))
@ -434,12 +434,12 @@ public class Composition extends DomainResource {
return CompositionAttestationMode.OFFICIAL; return CompositionAttestationMode.OFFICIAL;
throw new IllegalArgumentException("Unknown CompositionAttestationMode code '"+codeString+"'"); throw new IllegalArgumentException("Unknown CompositionAttestationMode code '"+codeString+"'");
} }
public Enumeration<CompositionAttestationMode> fromType(Base code) throws FHIRException { public Enumeration<CompositionAttestationMode> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<CompositionAttestationMode>(this); return new Enumeration<CompositionAttestationMode>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("personal".equals(codeString)) if ("personal".equals(codeString))
@ -562,12 +562,12 @@ public class Composition extends DomainResource {
return DocumentRelationshipType.APPENDS; return DocumentRelationshipType.APPENDS;
throw new IllegalArgumentException("Unknown DocumentRelationshipType code '"+codeString+"'"); throw new IllegalArgumentException("Unknown DocumentRelationshipType code '"+codeString+"'");
} }
public Enumeration<DocumentRelationshipType> fromType(Base code) throws FHIRException { public Enumeration<DocumentRelationshipType> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<DocumentRelationshipType>(this); return new Enumeration<DocumentRelationshipType>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("replaces".equals(codeString)) if ("replaces".equals(codeString))
@ -678,12 +678,12 @@ public class Composition extends DomainResource {
return SectionMode.CHANGES; return SectionMode.CHANGES;
throw new IllegalArgumentException("Unknown SectionMode code '"+codeString+"'"); throw new IllegalArgumentException("Unknown SectionMode code '"+codeString+"'");
} }
public Enumeration<SectionMode> fromType(Base code) throws FHIRException { public Enumeration<SectionMode> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<SectionMode>(this); return new Enumeration<SectionMode>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("working".equals(codeString)) if ("working".equals(codeString))

View File

@ -141,12 +141,12 @@ public class ConceptMap extends MetadataResource {
return ConceptMapGroupUnmappedMode.OTHERMAP; return ConceptMapGroupUnmappedMode.OTHERMAP;
throw new IllegalArgumentException("Unknown ConceptMapGroupUnmappedMode code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ConceptMapGroupUnmappedMode code '"+codeString+"'");
} }
public Enumeration<ConceptMapGroupUnmappedMode> fromType(Base code) throws FHIRException { public Enumeration<ConceptMapGroupUnmappedMode> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ConceptMapGroupUnmappedMode>(this); return new Enumeration<ConceptMapGroupUnmappedMode>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("provided".equals(codeString)) if ("provided".equals(codeString))

View File

@ -157,12 +157,12 @@ public class Condition extends DomainResource {
return ConditionClinicalStatus.RESOLVED; return ConditionClinicalStatus.RESOLVED;
throw new IllegalArgumentException("Unknown ConditionClinicalStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ConditionClinicalStatus code '"+codeString+"'");
} }
public Enumeration<ConditionClinicalStatus> fromType(Base code) throws FHIRException { public Enumeration<ConditionClinicalStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ConditionClinicalStatus>(this); return new Enumeration<ConditionClinicalStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("active".equals(codeString)) if ("active".equals(codeString))
@ -313,12 +313,12 @@ public class Condition extends DomainResource {
return ConditionVerificationStatus.UNKNOWN; return ConditionVerificationStatus.UNKNOWN;
throw new IllegalArgumentException("Unknown ConditionVerificationStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ConditionVerificationStatus code '"+codeString+"'");
} }
public Enumeration<ConditionVerificationStatus> fromType(Base code) throws FHIRException { public Enumeration<ConditionVerificationStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ConditionVerificationStatus>(this); return new Enumeration<ConditionVerificationStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("provisional".equals(codeString)) if ("provisional".equals(codeString))

View File

@ -170,12 +170,12 @@ public class Consent extends DomainResource {
return ConsentState.ENTEREDINERROR; return ConsentState.ENTEREDINERROR;
throw new IllegalArgumentException("Unknown ConsentState code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ConsentState code '"+codeString+"'");
} }
public Enumeration<ConsentState> fromType(Base code) throws FHIRException { public Enumeration<ConsentState> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ConsentState>(this); return new Enumeration<ConsentState>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("draft".equals(codeString)) if ("draft".equals(codeString))
@ -306,12 +306,12 @@ public class Consent extends DomainResource {
return ConsentDataMeaning.AUTHOREDBY; return ConsentDataMeaning.AUTHOREDBY;
throw new IllegalArgumentException("Unknown ConsentDataMeaning code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ConsentDataMeaning code '"+codeString+"'");
} }
public Enumeration<ConsentDataMeaning> fromType(Base code) throws FHIRException { public Enumeration<ConsentDataMeaning> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ConsentDataMeaning>(this); return new Enumeration<ConsentDataMeaning>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("instance".equals(codeString)) if ("instance".equals(codeString))
@ -410,12 +410,12 @@ public class Consent extends DomainResource {
return ConsentExceptType.PERMIT; return ConsentExceptType.PERMIT;
throw new IllegalArgumentException("Unknown ConsentExceptType code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ConsentExceptType code '"+codeString+"'");
} }
public Enumeration<ConsentExceptType> fromType(Base code) throws FHIRException { public Enumeration<ConsentExceptType> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ConsentExceptType>(this); return new Enumeration<ConsentExceptType>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("deny".equals(codeString)) if ("deny".equals(codeString))

View File

@ -177,12 +177,12 @@ public class ContactPoint extends Type implements ICompositeType {
return ContactPointSystem.OTHER; return ContactPointSystem.OTHER;
throw new IllegalArgumentException("Unknown ContactPointSystem code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ContactPointSystem code '"+codeString+"'");
} }
public Enumeration<ContactPointSystem> fromType(Base code) throws FHIRException { public Enumeration<ContactPointSystem> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ContactPointSystem>(this); return new Enumeration<ContactPointSystem>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("phone".equals(codeString)) if ("phone".equals(codeString))
@ -329,12 +329,12 @@ public class ContactPoint extends Type implements ICompositeType {
return ContactPointUse.MOBILE; return ContactPointUse.MOBILE;
throw new IllegalArgumentException("Unknown ContactPointUse code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ContactPointUse code '"+codeString+"'");
} }
public Enumeration<ContactPointUse> fromType(Base code) throws FHIRException { public Enumeration<ContactPointUse> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ContactPointUse>(this); return new Enumeration<ContactPointUse>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("home".equals(codeString)) if ("home".equals(codeString))

View File

@ -281,12 +281,12 @@ public class Contract extends DomainResource {
return ContractStatus.TERMINATED; return ContractStatus.TERMINATED;
throw new IllegalArgumentException("Unknown ContractStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ContractStatus code '"+codeString+"'");
} }
public Enumeration<ContractStatus> fromType(Base code) throws FHIRException { public Enumeration<ContractStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ContractStatus>(this); return new Enumeration<ContractStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("amended".equals(codeString)) if ("amended".equals(codeString))

View File

@ -142,12 +142,12 @@ public class Contributor extends Type implements ICompositeType {
return ContributorType.ENDORSER; return ContributorType.ENDORSER;
throw new IllegalArgumentException("Unknown ContributorType code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ContributorType code '"+codeString+"'");
} }
public Enumeration<ContributorType> fromType(Base code) throws FHIRException { public Enumeration<ContributorType> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ContributorType>(this); return new Enumeration<ContributorType>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("author".equals(codeString)) if ("author".equals(codeString))

View File

@ -144,12 +144,12 @@ public class Coverage extends DomainResource {
return CoverageStatus.ENTEREDINERROR; return CoverageStatus.ENTEREDINERROR;
throw new IllegalArgumentException("Unknown CoverageStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown CoverageStatus code '"+codeString+"'");
} }
public Enumeration<CoverageStatus> fromType(Base code) throws FHIRException { public Enumeration<CoverageStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<CoverageStatus>(this); return new Enumeration<CoverageStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("active".equals(codeString)) if ("active".equals(codeString))

View File

@ -173,12 +173,12 @@ public class DataElement extends MetadataResource {
return DataElementStringency.FLEXIBLE; return DataElementStringency.FLEXIBLE;
throw new IllegalArgumentException("Unknown DataElementStringency code '"+codeString+"'"); throw new IllegalArgumentException("Unknown DataElementStringency code '"+codeString+"'");
} }
public Enumeration<DataElementStringency> fromType(Base code) throws FHIRException { public Enumeration<DataElementStringency> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<DataElementStringency>(this); return new Enumeration<DataElementStringency>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("comparable".equals(codeString)) if ("comparable".equals(codeString))

View File

@ -193,12 +193,12 @@ public class DetectedIssue extends DomainResource {
return DetectedIssueStatus.UNKNOWN; return DetectedIssueStatus.UNKNOWN;
throw new IllegalArgumentException("Unknown DetectedIssueStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown DetectedIssueStatus code '"+codeString+"'");
} }
public Enumeration<DetectedIssueStatus> fromType(Base code) throws FHIRException { public Enumeration<DetectedIssueStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<DetectedIssueStatus>(this); return new Enumeration<DetectedIssueStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("registered".equals(codeString)) if ("registered".equals(codeString))
@ -325,12 +325,12 @@ public class DetectedIssue extends DomainResource {
return DetectedIssueSeverity.LOW; return DetectedIssueSeverity.LOW;
throw new IllegalArgumentException("Unknown DetectedIssueSeverity code '"+codeString+"'"); throw new IllegalArgumentException("Unknown DetectedIssueSeverity code '"+codeString+"'");
} }
public Enumeration<DetectedIssueSeverity> fromType(Base code) throws FHIRException { public Enumeration<DetectedIssueSeverity> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<DetectedIssueSeverity>(this); return new Enumeration<DetectedIssueSeverity>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("high".equals(codeString)) if ("high".equals(codeString))

View File

@ -170,12 +170,12 @@ public class Device extends DomainResource {
return UDIEntryType.UNKNOWN; return UDIEntryType.UNKNOWN;
throw new IllegalArgumentException("Unknown UDIEntryType code '"+codeString+"'"); throw new IllegalArgumentException("Unknown UDIEntryType code '"+codeString+"'");
} }
public Enumeration<UDIEntryType> fromType(Base code) throws FHIRException { public Enumeration<UDIEntryType> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<UDIEntryType>(this); return new Enumeration<UDIEntryType>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("barcode".equals(codeString)) if ("barcode".equals(codeString))
@ -306,12 +306,12 @@ public class Device extends DomainResource {
return FHIRDeviceStatus.UNKNOWN; return FHIRDeviceStatus.UNKNOWN;
throw new IllegalArgumentException("Unknown FHIRDeviceStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown FHIRDeviceStatus code '"+codeString+"'");
} }
public Enumeration<FHIRDeviceStatus> fromType(Base code) throws FHIRException { public Enumeration<FHIRDeviceStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<FHIRDeviceStatus>(this); return new Enumeration<FHIRDeviceStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("active".equals(codeString)) if ("active".equals(codeString))

View File

@ -229,12 +229,12 @@ public class DeviceComponent extends DomainResource {
return MeasmntPrinciple.MANUAL; return MeasmntPrinciple.MANUAL;
throw new IllegalArgumentException("Unknown MeasmntPrinciple code '"+codeString+"'"); throw new IllegalArgumentException("Unknown MeasmntPrinciple code '"+codeString+"'");
} }
public Enumeration<MeasmntPrinciple> fromType(Base code) throws FHIRException { public Enumeration<MeasmntPrinciple> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<MeasmntPrinciple>(this); return new Enumeration<MeasmntPrinciple>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("other".equals(codeString)) if ("other".equals(codeString))

View File

@ -144,12 +144,12 @@ public class DeviceMetric extends DomainResource {
return DeviceMetricOperationalStatus.ENTEREDINERROR; return DeviceMetricOperationalStatus.ENTEREDINERROR;
throw new IllegalArgumentException("Unknown DeviceMetricOperationalStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown DeviceMetricOperationalStatus code '"+codeString+"'");
} }
public Enumeration<DeviceMetricOperationalStatus> fromType(Base code) throws FHIRException { public Enumeration<DeviceMetricOperationalStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<DeviceMetricOperationalStatus>(this); return new Enumeration<DeviceMetricOperationalStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("on".equals(codeString)) if ("on".equals(codeString))
@ -320,12 +320,12 @@ public class DeviceMetric extends DomainResource {
return DeviceMetricColor.WHITE; return DeviceMetricColor.WHITE;
throw new IllegalArgumentException("Unknown DeviceMetricColor code '"+codeString+"'"); throw new IllegalArgumentException("Unknown DeviceMetricColor code '"+codeString+"'");
} }
public Enumeration<DeviceMetricColor> fromType(Base code) throws FHIRException { public Enumeration<DeviceMetricColor> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<DeviceMetricColor>(this); return new Enumeration<DeviceMetricColor>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("black".equals(codeString)) if ("black".equals(codeString))
@ -464,12 +464,12 @@ public class DeviceMetric extends DomainResource {
return DeviceMetricCategory.UNSPECIFIED; return DeviceMetricCategory.UNSPECIFIED;
throw new IllegalArgumentException("Unknown DeviceMetricCategory code '"+codeString+"'"); throw new IllegalArgumentException("Unknown DeviceMetricCategory code '"+codeString+"'");
} }
public Enumeration<DeviceMetricCategory> fromType(Base code) throws FHIRException { public Enumeration<DeviceMetricCategory> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<DeviceMetricCategory>(this); return new Enumeration<DeviceMetricCategory>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("measurement".equals(codeString)) if ("measurement".equals(codeString))
@ -592,12 +592,12 @@ public class DeviceMetric extends DomainResource {
return DeviceMetricCalibrationType.TWOPOINT; return DeviceMetricCalibrationType.TWOPOINT;
throw new IllegalArgumentException("Unknown DeviceMetricCalibrationType code '"+codeString+"'"); throw new IllegalArgumentException("Unknown DeviceMetricCalibrationType code '"+codeString+"'");
} }
public Enumeration<DeviceMetricCalibrationType> fromType(Base code) throws FHIRException { public Enumeration<DeviceMetricCalibrationType> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<DeviceMetricCalibrationType>(this); return new Enumeration<DeviceMetricCalibrationType>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("unspecified".equals(codeString)) if ("unspecified".equals(codeString))
@ -720,12 +720,12 @@ public class DeviceMetric extends DomainResource {
return DeviceMetricCalibrationState.UNSPECIFIED; return DeviceMetricCalibrationState.UNSPECIFIED;
throw new IllegalArgumentException("Unknown DeviceMetricCalibrationState code '"+codeString+"'"); throw new IllegalArgumentException("Unknown DeviceMetricCalibrationState code '"+codeString+"'");
} }
public Enumeration<DeviceMetricCalibrationState> fromType(Base code) throws FHIRException { public Enumeration<DeviceMetricCalibrationState> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<DeviceMetricCalibrationState>(this); return new Enumeration<DeviceMetricCalibrationState>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("not-calibrated".equals(codeString)) if ("not-calibrated".equals(codeString))

View File

@ -181,12 +181,12 @@ public class DeviceRequest extends DomainResource {
return DeviceRequestStatus.UNKNOWN; return DeviceRequestStatus.UNKNOWN;
throw new IllegalArgumentException("Unknown DeviceRequestStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown DeviceRequestStatus code '"+codeString+"'");
} }
public Enumeration<DeviceRequestStatus> fromType(Base code) throws FHIRException { public Enumeration<DeviceRequestStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<DeviceRequestStatus>(this); return new Enumeration<DeviceRequestStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("draft".equals(codeString)) if ("draft".equals(codeString))
@ -321,12 +321,12 @@ public class DeviceRequest extends DomainResource {
return RequestPriority.STAT; return RequestPriority.STAT;
throw new IllegalArgumentException("Unknown RequestPriority code '"+codeString+"'"); throw new IllegalArgumentException("Unknown RequestPriority code '"+codeString+"'");
} }
public Enumeration<RequestPriority> fromType(Base code) throws FHIRException { public Enumeration<RequestPriority> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<RequestPriority>(this); return new Enumeration<RequestPriority>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("routine".equals(codeString)) if ("routine".equals(codeString))

View File

@ -167,12 +167,12 @@ public class DeviceUseStatement extends DomainResource {
return DeviceUseStatementStatus.ONHOLD; return DeviceUseStatementStatus.ONHOLD;
throw new IllegalArgumentException("Unknown DeviceUseStatementStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown DeviceUseStatementStatus code '"+codeString+"'");
} }
public Enumeration<DeviceUseStatementStatus> fromType(Base code) throws FHIRException { public Enumeration<DeviceUseStatementStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<DeviceUseStatementStatus>(this); return new Enumeration<DeviceUseStatementStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("active".equals(codeString)) if ("active".equals(codeString))

View File

@ -218,12 +218,12 @@ public class DiagnosticReport extends DomainResource {
return DiagnosticReportStatus.UNKNOWN; return DiagnosticReportStatus.UNKNOWN;
throw new IllegalArgumentException("Unknown DiagnosticReportStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown DiagnosticReportStatus code '"+codeString+"'");
} }
public Enumeration<DiagnosticReportStatus> fromType(Base code) throws FHIRException { public Enumeration<DiagnosticReportStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<DiagnosticReportStatus>(this); return new Enumeration<DiagnosticReportStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("registered".equals(codeString)) if ("registered".equals(codeString))

View File

@ -147,12 +147,12 @@ public class DocumentReference extends DomainResource {
return ReferredDocumentStatus.ENTEREDINERROR; return ReferredDocumentStatus.ENTEREDINERROR;
throw new IllegalArgumentException("Unknown ReferredDocumentStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ReferredDocumentStatus code '"+codeString+"'");
} }
public Enumeration<ReferredDocumentStatus> fromType(Base code) throws FHIRException { public Enumeration<ReferredDocumentStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ReferredDocumentStatus>(this); return new Enumeration<ReferredDocumentStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("preliminary".equals(codeString)) if ("preliminary".equals(codeString))
@ -275,12 +275,12 @@ public class DocumentReference extends DomainResource {
return DocumentRelationshipType.APPENDS; return DocumentRelationshipType.APPENDS;
throw new IllegalArgumentException("Unknown DocumentRelationshipType code '"+codeString+"'"); throw new IllegalArgumentException("Unknown DocumentRelationshipType code '"+codeString+"'");
} }
public Enumeration<DocumentRelationshipType> fromType(Base code) throws FHIRException { public Enumeration<DocumentRelationshipType> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<DocumentRelationshipType>(this); return new Enumeration<DocumentRelationshipType>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("replaces".equals(codeString)) if ("replaces".equals(codeString))

View File

@ -160,12 +160,12 @@ public class ElementDefinition extends Type implements ICompositeType {
return PropertyRepresentation.XHTML; return PropertyRepresentation.XHTML;
throw new IllegalArgumentException("Unknown PropertyRepresentation code '"+codeString+"'"); throw new IllegalArgumentException("Unknown PropertyRepresentation code '"+codeString+"'");
} }
public Enumeration<PropertyRepresentation> fromType(Base code) throws FHIRException { public Enumeration<PropertyRepresentation> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<PropertyRepresentation>(this); return new Enumeration<PropertyRepresentation>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("xmlAttr".equals(codeString)) if ("xmlAttr".equals(codeString))
@ -304,12 +304,12 @@ public class ElementDefinition extends Type implements ICompositeType {
return DiscriminatorType.PROFILE; return DiscriminatorType.PROFILE;
throw new IllegalArgumentException("Unknown DiscriminatorType code '"+codeString+"'"); throw new IllegalArgumentException("Unknown DiscriminatorType code '"+codeString+"'");
} }
public Enumeration<DiscriminatorType> fromType(Base code) throws FHIRException { public Enumeration<DiscriminatorType> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<DiscriminatorType>(this); return new Enumeration<DiscriminatorType>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("value".equals(codeString)) if ("value".equals(codeString))
@ -424,12 +424,12 @@ public class ElementDefinition extends Type implements ICompositeType {
return SlicingRules.OPENATEND; return SlicingRules.OPENATEND;
throw new IllegalArgumentException("Unknown SlicingRules code '"+codeString+"'"); throw new IllegalArgumentException("Unknown SlicingRules code '"+codeString+"'");
} }
public Enumeration<SlicingRules> fromType(Base code) throws FHIRException { public Enumeration<SlicingRules> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<SlicingRules>(this); return new Enumeration<SlicingRules>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("closed".equals(codeString)) if ("closed".equals(codeString))
@ -536,12 +536,12 @@ public class ElementDefinition extends Type implements ICompositeType {
return AggregationMode.BUNDLED; return AggregationMode.BUNDLED;
throw new IllegalArgumentException("Unknown AggregationMode code '"+codeString+"'"); throw new IllegalArgumentException("Unknown AggregationMode code '"+codeString+"'");
} }
public Enumeration<AggregationMode> fromType(Base code) throws FHIRException { public Enumeration<AggregationMode> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<AggregationMode>(this); return new Enumeration<AggregationMode>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("contained".equals(codeString)) if ("contained".equals(codeString))
@ -648,12 +648,12 @@ public class ElementDefinition extends Type implements ICompositeType {
return ReferenceVersionRules.SPECIFIC; return ReferenceVersionRules.SPECIFIC;
throw new IllegalArgumentException("Unknown ReferenceVersionRules code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ReferenceVersionRules code '"+codeString+"'");
} }
public Enumeration<ReferenceVersionRules> fromType(Base code) throws FHIRException { public Enumeration<ReferenceVersionRules> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ReferenceVersionRules>(this); return new Enumeration<ReferenceVersionRules>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("either".equals(codeString)) if ("either".equals(codeString))
@ -748,12 +748,12 @@ public class ElementDefinition extends Type implements ICompositeType {
return ConstraintSeverity.WARNING; return ConstraintSeverity.WARNING;
throw new IllegalArgumentException("Unknown ConstraintSeverity code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ConstraintSeverity code '"+codeString+"'");
} }
public Enumeration<ConstraintSeverity> fromType(Base code) throws FHIRException { public Enumeration<ConstraintSeverity> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ConstraintSeverity>(this); return new Enumeration<ConstraintSeverity>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("error".equals(codeString)) if ("error".equals(codeString))

View File

@ -144,12 +144,12 @@ public class EligibilityRequest extends DomainResource {
return EligibilityRequestStatus.ENTEREDINERROR; return EligibilityRequestStatus.ENTEREDINERROR;
throw new IllegalArgumentException("Unknown EligibilityRequestStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown EligibilityRequestStatus code '"+codeString+"'");
} }
public Enumeration<EligibilityRequestStatus> fromType(Base code) throws FHIRException { public Enumeration<EligibilityRequestStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<EligibilityRequestStatus>(this); return new Enumeration<EligibilityRequestStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("active".equals(codeString)) if ("active".equals(codeString))

View File

@ -146,12 +146,12 @@ public class EligibilityResponse extends DomainResource {
return EligibilityResponseStatus.ENTEREDINERROR; return EligibilityResponseStatus.ENTEREDINERROR;
throw new IllegalArgumentException("Unknown EligibilityResponseStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown EligibilityResponseStatus code '"+codeString+"'");
} }
public Enumeration<EligibilityResponseStatus> fromType(Base code) throws FHIRException { public Enumeration<EligibilityResponseStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<EligibilityResponseStatus>(this); return new Enumeration<EligibilityResponseStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("active".equals(codeString)) if ("active".equals(codeString))

View File

@ -203,12 +203,12 @@ public class Encounter extends DomainResource {
return EncounterStatus.UNKNOWN; return EncounterStatus.UNKNOWN;
throw new IllegalArgumentException("Unknown EncounterStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown EncounterStatus code '"+codeString+"'");
} }
public Enumeration<EncounterStatus> fromType(Base code) throws FHIRException { public Enumeration<EncounterStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<EncounterStatus>(this); return new Enumeration<EncounterStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("planned".equals(codeString)) if ("planned".equals(codeString))
@ -355,12 +355,12 @@ Not to be used when the patient is currently at the location
return EncounterLocationStatus.COMPLETED; return EncounterLocationStatus.COMPLETED;
throw new IllegalArgumentException("Unknown EncounterLocationStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown EncounterLocationStatus code '"+codeString+"'");
} }
public Enumeration<EncounterLocationStatus> fromType(Base code) throws FHIRException { public Enumeration<EncounterLocationStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<EncounterLocationStatus>(this); return new Enumeration<EncounterLocationStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("planned".equals(codeString)) if ("planned".equals(codeString))

View File

@ -166,12 +166,12 @@ public class Endpoint extends DomainResource {
return EndpointStatus.TEST; return EndpointStatus.TEST;
throw new IllegalArgumentException("Unknown EndpointStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown EndpointStatus code '"+codeString+"'");
} }
public Enumeration<EndpointStatus> fromType(Base code) throws FHIRException { public Enumeration<EndpointStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<EndpointStatus>(this); return new Enumeration<EndpointStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("active".equals(codeString)) if ("active".equals(codeString))

View File

@ -142,12 +142,12 @@ public class EnrollmentRequest extends DomainResource {
return EnrollmentRequestStatus.ENTEREDINERROR; return EnrollmentRequestStatus.ENTEREDINERROR;
throw new IllegalArgumentException("Unknown EnrollmentRequestStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown EnrollmentRequestStatus code '"+codeString+"'");
} }
public Enumeration<EnrollmentRequestStatus> fromType(Base code) throws FHIRException { public Enumeration<EnrollmentRequestStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<EnrollmentRequestStatus>(this); return new Enumeration<EnrollmentRequestStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("active".equals(codeString)) if ("active".equals(codeString))

View File

@ -143,12 +143,12 @@ public class EnrollmentResponse extends DomainResource {
return EnrollmentResponseStatus.ENTEREDINERROR; return EnrollmentResponseStatus.ENTEREDINERROR;
throw new IllegalArgumentException("Unknown EnrollmentResponseStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown EnrollmentResponseStatus code '"+codeString+"'");
} }
public Enumeration<EnrollmentResponseStatus> fromType(Base code) throws FHIRException { public Enumeration<EnrollmentResponseStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<EnrollmentResponseStatus>(this); return new Enumeration<EnrollmentResponseStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("active".equals(codeString)) if ("active".equals(codeString))

View File

@ -121,12 +121,12 @@ public class Enumerations {
return AbstractType.ANY; return AbstractType.ANY;
throw new IllegalArgumentException("Unknown AbstractType code '"+codeString+"'"); throw new IllegalArgumentException("Unknown AbstractType code '"+codeString+"'");
} }
public Enumeration<AbstractType> fromType(Base code) throws FHIRException { public Enumeration<AbstractType> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<AbstractType>(this); return new Enumeration<AbstractType>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("Type".equals(codeString)) if ("Type".equals(codeString))
@ -238,12 +238,12 @@ public class Enumerations {
return AdministrativeGender.UNKNOWN; return AdministrativeGender.UNKNOWN;
throw new IllegalArgumentException("Unknown AdministrativeGender code '"+codeString+"'"); throw new IllegalArgumentException("Unknown AdministrativeGender code '"+codeString+"'");
} }
public Enumeration<AdministrativeGender> fromType(Base code) throws FHIRException { public Enumeration<AdministrativeGender> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<AdministrativeGender>(this); return new Enumeration<AdministrativeGender>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("male".equals(codeString)) if ("male".equals(codeString))
@ -387,12 +387,12 @@ public class Enumerations {
return AgeUnits.A; return AgeUnits.A;
throw new IllegalArgumentException("Unknown AgeUnits code '"+codeString+"'"); throw new IllegalArgumentException("Unknown AgeUnits code '"+codeString+"'");
} }
public Enumeration<AgeUnits> fromType(Base code) throws FHIRException { public Enumeration<AgeUnits> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<AgeUnits>(this); return new Enumeration<AgeUnits>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("min".equals(codeString)) if ("min".equals(codeString))
@ -520,12 +520,12 @@ public class Enumerations {
return BindingStrength.EXAMPLE; return BindingStrength.EXAMPLE;
throw new IllegalArgumentException("Unknown BindingStrength code '"+codeString+"'"); throw new IllegalArgumentException("Unknown BindingStrength code '"+codeString+"'");
} }
public Enumeration<BindingStrength> fromType(Base code) throws FHIRException { public Enumeration<BindingStrength> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<BindingStrength>(this); return new Enumeration<BindingStrength>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("required".equals(codeString)) if ("required".equals(codeString))
@ -717,12 +717,12 @@ public class Enumerations {
return ConceptMapEquivalence.DISJOINT; return ConceptMapEquivalence.DISJOINT;
throw new IllegalArgumentException("Unknown ConceptMapEquivalence code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ConceptMapEquivalence code '"+codeString+"'");
} }
public Enumeration<ConceptMapEquivalence> fromType(Base code) throws FHIRException { public Enumeration<ConceptMapEquivalence> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ConceptMapEquivalence>(this); return new Enumeration<ConceptMapEquivalence>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("relatedto".equals(codeString)) if ("relatedto".equals(codeString))
@ -938,12 +938,12 @@ public class Enumerations {
return DataAbsentReason.NOTPERFORMED; return DataAbsentReason.NOTPERFORMED;
throw new IllegalArgumentException("Unknown DataAbsentReason code '"+codeString+"'"); throw new IllegalArgumentException("Unknown DataAbsentReason code '"+codeString+"'");
} }
public Enumeration<DataAbsentReason> fromType(Base code) throws FHIRException { public Enumeration<DataAbsentReason> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<DataAbsentReason>(this); return new Enumeration<DataAbsentReason>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("unknown".equals(codeString)) if ("unknown".equals(codeString))
@ -1687,12 +1687,12 @@ public class Enumerations {
return DataType.XHTML; return DataType.XHTML;
throw new IllegalArgumentException("Unknown DataType code '"+codeString+"'"); throw new IllegalArgumentException("Unknown DataType code '"+codeString+"'");
} }
public Enumeration<DataType> fromType(Base code) throws FHIRException { public Enumeration<DataType> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<DataType>(this); return new Enumeration<DataType>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("Address".equals(codeString)) if ("Address".equals(codeString))
@ -2000,12 +2000,12 @@ public class Enumerations {
return DocumentReferenceStatus.ENTEREDINERROR; return DocumentReferenceStatus.ENTEREDINERROR;
throw new IllegalArgumentException("Unknown DocumentReferenceStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown DocumentReferenceStatus code '"+codeString+"'");
} }
public Enumeration<DocumentReferenceStatus> fromType(Base code) throws FHIRException { public Enumeration<DocumentReferenceStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<DocumentReferenceStatus>(this); return new Enumeration<DocumentReferenceStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("current".equals(codeString)) if ("current".equals(codeString))
@ -4175,12 +4175,12 @@ The primary difference between a medication statement and a medication administr
return FHIRAllTypes.ANY; return FHIRAllTypes.ANY;
throw new IllegalArgumentException("Unknown FHIRAllTypes code '"+codeString+"'"); throw new IllegalArgumentException("Unknown FHIRAllTypes code '"+codeString+"'");
} }
public Enumeration<FHIRAllTypes> fromType(Base code) throws FHIRException { public Enumeration<FHIRAllTypes> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<FHIRAllTypes>(this); return new Enumeration<FHIRAllTypes>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("Address".equals(codeString)) if ("Address".equals(codeString))
@ -7014,12 +7014,12 @@ The primary difference between a medication statement and a medication administr
return FHIRDefinedType.VISIONPRESCRIPTION; return FHIRDefinedType.VISIONPRESCRIPTION;
throw new IllegalArgumentException("Unknown FHIRDefinedType code '"+codeString+"'"); throw new IllegalArgumentException("Unknown FHIRDefinedType code '"+codeString+"'");
} }
public Enumeration<FHIRDefinedType> fromType(Base code) throws FHIRException { public Enumeration<FHIRDefinedType> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<FHIRDefinedType>(this); return new Enumeration<FHIRDefinedType>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("Address".equals(codeString)) if ("Address".equals(codeString))
@ -7911,12 +7911,12 @@ The primary difference between a medication statement and a medication administr
return MessageEvent.VALUESETEXPAND; return MessageEvent.VALUESETEXPAND;
throw new IllegalArgumentException("Unknown MessageEvent code '"+codeString+"'"); throw new IllegalArgumentException("Unknown MessageEvent code '"+codeString+"'");
} }
public Enumeration<MessageEvent> fromType(Base code) throws FHIRException { public Enumeration<MessageEvent> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<MessageEvent>(this); return new Enumeration<MessageEvent>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("CodeSystem-expand".equals(codeString)) if ("CodeSystem-expand".equals(codeString))
@ -8056,12 +8056,12 @@ The primary difference between a medication statement and a medication administr
return NoteType.PRINTOPER; return NoteType.PRINTOPER;
throw new IllegalArgumentException("Unknown NoteType code '"+codeString+"'"); throw new IllegalArgumentException("Unknown NoteType code '"+codeString+"'");
} }
public Enumeration<NoteType> fromType(Base code) throws FHIRException { public Enumeration<NoteType> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<NoteType>(this); return new Enumeration<NoteType>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("display".equals(codeString)) if ("display".equals(codeString))
@ -8177,12 +8177,12 @@ The primary difference between a medication statement and a medication administr
return PublicationStatus.UNKNOWN; return PublicationStatus.UNKNOWN;
throw new IllegalArgumentException("Unknown PublicationStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown PublicationStatus code '"+codeString+"'");
} }
public Enumeration<PublicationStatus> fromType(Base code) throws FHIRException { public Enumeration<PublicationStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<PublicationStatus>(this); return new Enumeration<PublicationStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("draft".equals(codeString)) if ("draft".equals(codeString))
@ -8290,12 +8290,12 @@ The primary difference between a medication statement and a medication administr
return RemittanceOutcome.PARTIAL; return RemittanceOutcome.PARTIAL;
throw new IllegalArgumentException("Unknown RemittanceOutcome code '"+codeString+"'"); throw new IllegalArgumentException("Unknown RemittanceOutcome code '"+codeString+"'");
} }
public Enumeration<RemittanceOutcome> fromType(Base code) throws FHIRException { public Enumeration<RemittanceOutcome> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<RemittanceOutcome>(this); return new Enumeration<RemittanceOutcome>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("complete".equals(codeString)) if ("complete".equals(codeString))
@ -9793,12 +9793,12 @@ The primary difference between a medication statement and a medication administr
return ResourceType.VISIONPRESCRIPTION; return ResourceType.VISIONPRESCRIPTION;
throw new IllegalArgumentException("Unknown ResourceType code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ResourceType code '"+codeString+"'");
} }
public Enumeration<ResourceType> fromType(Base code) throws FHIRException { public Enumeration<ResourceType> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ResourceType>(this); return new Enumeration<ResourceType>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("Account".equals(codeString)) if ("Account".equals(codeString))
@ -10426,12 +10426,12 @@ The primary difference between a medication statement and a medication administr
return SearchParamType.URI; return SearchParamType.URI;
throw new IllegalArgumentException("Unknown SearchParamType code '"+codeString+"'"); throw new IllegalArgumentException("Unknown SearchParamType code '"+codeString+"'");
} }
public Enumeration<SearchParamType> fromType(Base code) throws FHIRException { public Enumeration<SearchParamType> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<SearchParamType>(this); return new Enumeration<SearchParamType>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("number".equals(codeString)) if ("number".equals(codeString))
@ -10591,12 +10591,12 @@ The primary difference between a medication statement and a medication administr
return SpecialValues.NILKNOWN; return SpecialValues.NILKNOWN;
throw new IllegalArgumentException("Unknown SpecialValues code '"+codeString+"'"); throw new IllegalArgumentException("Unknown SpecialValues code '"+codeString+"'");
} }
public Enumeration<SpecialValues> fromType(Base code) throws FHIRException { public Enumeration<SpecialValues> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<SpecialValues>(this); return new Enumeration<SpecialValues>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("true".equals(codeString)) if ("true".equals(codeString))

View File

@ -179,12 +179,12 @@ public class EpisodeOfCare extends DomainResource {
return EpisodeOfCareStatus.ENTEREDINERROR; return EpisodeOfCareStatus.ENTEREDINERROR;
throw new IllegalArgumentException("Unknown EpisodeOfCareStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown EpisodeOfCareStatus code '"+codeString+"'");
} }
public Enumeration<EpisodeOfCareStatus> fromType(Base code) throws FHIRException { public Enumeration<EpisodeOfCareStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<EpisodeOfCareStatus>(this); return new Enumeration<EpisodeOfCareStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("planned".equals(codeString)) if ("planned".equals(codeString))

View File

@ -137,12 +137,12 @@ public class ExpansionProfile extends MetadataResource {
return SystemVersionProcessingMode.OVERRIDE; return SystemVersionProcessingMode.OVERRIDE;
throw new IllegalArgumentException("Unknown SystemVersionProcessingMode code '"+codeString+"'"); throw new IllegalArgumentException("Unknown SystemVersionProcessingMode code '"+codeString+"'");
} }
public Enumeration<SystemVersionProcessingMode> fromType(Base code) throws FHIRException { public Enumeration<SystemVersionProcessingMode> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<SystemVersionProcessingMode>(this); return new Enumeration<SystemVersionProcessingMode>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("default".equals(codeString)) if ("default".equals(codeString))

View File

@ -148,12 +148,12 @@ public class ExplanationOfBenefit extends DomainResource {
return ExplanationOfBenefitStatus.ENTEREDINERROR; return ExplanationOfBenefitStatus.ENTEREDINERROR;
throw new IllegalArgumentException("Unknown ExplanationOfBenefitStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ExplanationOfBenefitStatus code '"+codeString+"'");
} }
public Enumeration<ExplanationOfBenefitStatus> fromType(Base code) throws FHIRException { public Enumeration<ExplanationOfBenefitStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ExplanationOfBenefitStatus>(this); return new Enumeration<ExplanationOfBenefitStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("active".equals(codeString)) if ("active".equals(codeString))

View File

@ -148,12 +148,12 @@ public class FamilyMemberHistory extends DomainResource {
return FamilyHistoryStatus.HEALTHUNKNOWN; return FamilyHistoryStatus.HEALTHUNKNOWN;
throw new IllegalArgumentException("Unknown FamilyHistoryStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown FamilyHistoryStatus code '"+codeString+"'");
} }
public Enumeration<FamilyHistoryStatus> fromType(Base code) throws FHIRException { public Enumeration<FamilyHistoryStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<FamilyHistoryStatus>(this); return new Enumeration<FamilyHistoryStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("partial".equals(codeString)) if ("partial".equals(codeString))

View File

@ -129,12 +129,12 @@ public class Flag extends DomainResource {
return FlagStatus.ENTEREDINERROR; return FlagStatus.ENTEREDINERROR;
throw new IllegalArgumentException("Unknown FlagStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown FlagStatus code '"+codeString+"'");
} }
public Enumeration<FlagStatus> fromType(Base code) throws FHIRException { public Enumeration<FlagStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<FlagStatus>(this); return new Enumeration<FlagStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("active".equals(codeString)) if ("active".equals(codeString))

View File

@ -254,12 +254,12 @@ public class Goal extends DomainResource {
return GoalStatus.REJECTED; return GoalStatus.REJECTED;
throw new IllegalArgumentException("Unknown GoalStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown GoalStatus code '"+codeString+"'");
} }
public Enumeration<GoalStatus> fromType(Base code) throws FHIRException { public Enumeration<GoalStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<GoalStatus>(this); return new Enumeration<GoalStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("proposed".equals(codeString)) if ("proposed".equals(codeString))

View File

@ -162,12 +162,12 @@ public class GraphDefinition extends MetadataResource {
return CompartmentCode.DEVICE; return CompartmentCode.DEVICE;
throw new IllegalArgumentException("Unknown CompartmentCode code '"+codeString+"'"); throw new IllegalArgumentException("Unknown CompartmentCode code '"+codeString+"'");
} }
public Enumeration<CompartmentCode> fromType(Base code) throws FHIRException { public Enumeration<CompartmentCode> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<CompartmentCode>(this); return new Enumeration<CompartmentCode>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("Patient".equals(codeString)) if ("Patient".equals(codeString))
@ -294,12 +294,12 @@ public class GraphDefinition extends MetadataResource {
return GraphCompartmentRule.CUSTOM; return GraphCompartmentRule.CUSTOM;
throw new IllegalArgumentException("Unknown GraphCompartmentRule code '"+codeString+"'"); throw new IllegalArgumentException("Unknown GraphCompartmentRule code '"+codeString+"'");
} }
public Enumeration<GraphCompartmentRule> fromType(Base code) throws FHIRException { public Enumeration<GraphCompartmentRule> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<GraphCompartmentRule>(this); return new Enumeration<GraphCompartmentRule>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("identical".equals(codeString)) if ("identical".equals(codeString))

View File

@ -169,12 +169,12 @@ public class Group extends DomainResource {
return GroupType.SUBSTANCE; return GroupType.SUBSTANCE;
throw new IllegalArgumentException("Unknown GroupType code '"+codeString+"'"); throw new IllegalArgumentException("Unknown GroupType code '"+codeString+"'");
} }
public Enumeration<GroupType> fromType(Base code) throws FHIRException { public Enumeration<GroupType> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<GroupType>(this); return new Enumeration<GroupType>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("person".equals(codeString)) if ("person".equals(codeString))

View File

@ -168,12 +168,12 @@ public class GuidanceResponse extends DomainResource {
return GuidanceResponseStatus.ENTEREDINERROR; return GuidanceResponseStatus.ENTEREDINERROR;
throw new IllegalArgumentException("Unknown GuidanceResponseStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown GuidanceResponseStatus code '"+codeString+"'");
} }
public Enumeration<GuidanceResponseStatus> fromType(Base code) throws FHIRException { public Enumeration<GuidanceResponseStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<GuidanceResponseStatus>(this); return new Enumeration<GuidanceResponseStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("success".equals(codeString)) if ("success".equals(codeString))

View File

@ -181,12 +181,12 @@ public class HealthcareService extends DomainResource {
return DaysOfWeek.SUN; return DaysOfWeek.SUN;
throw new IllegalArgumentException("Unknown DaysOfWeek code '"+codeString+"'"); throw new IllegalArgumentException("Unknown DaysOfWeek code '"+codeString+"'");
} }
public Enumeration<DaysOfWeek> fromType(Base code) throws FHIRException { public Enumeration<DaysOfWeek> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<DaysOfWeek>(this); return new Enumeration<DaysOfWeek>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("mon".equals(codeString)) if ("mon".equals(codeString))

View File

@ -180,12 +180,12 @@ public class HumanName extends Type implements ICompositeType {
return NameUse.MAIDEN; return NameUse.MAIDEN;
throw new IllegalArgumentException("Unknown NameUse code '"+codeString+"'"); throw new IllegalArgumentException("Unknown NameUse code '"+codeString+"'");
} }
public Enumeration<NameUse> fromType(Base code) throws FHIRException { public Enumeration<NameUse> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<NameUse>(this); return new Enumeration<NameUse>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("usual".equals(codeString)) if ("usual".equals(codeString))

View File

@ -129,7 +129,7 @@ public class Identifier extends Type implements ICompositeType {
public static class IdentifierUseEnumFactory implements EnumFactory<IdentifierUse> { public static class IdentifierUseEnumFactory implements EnumFactory<IdentifierUse> {
public IdentifierUse fromCode(String codeString) throws IllegalArgumentException { public IdentifierUse fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString) || "?".equals(codeString))
return null; return null;
if ("usual".equals(codeString)) if ("usual".equals(codeString))
return IdentifierUse.USUAL; return IdentifierUse.USUAL;
@ -141,12 +141,12 @@ public class Identifier extends Type implements ICompositeType {
return IdentifierUse.SECONDARY; return IdentifierUse.SECONDARY;
throw new IllegalArgumentException("Unknown IdentifierUse code '"+codeString+"'"); throw new IllegalArgumentException("Unknown IdentifierUse code '"+codeString+"'");
} }
public Enumeration<IdentifierUse> fromType(Base code) throws FHIRException { public Enumeration<IdentifierUse> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<IdentifierUse>(this); return new Enumeration<IdentifierUse>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("usual".equals(codeString)) if ("usual".equals(codeString))

View File

@ -145,12 +145,12 @@ public class ImagingStudy extends DomainResource {
return InstanceAvailability.UNAVAILABLE; return InstanceAvailability.UNAVAILABLE;
throw new IllegalArgumentException("Unknown InstanceAvailability code '"+codeString+"'"); throw new IllegalArgumentException("Unknown InstanceAvailability code '"+codeString+"'");
} }
public Enumeration<InstanceAvailability> fromType(Base code) throws FHIRException { public Enumeration<InstanceAvailability> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<InstanceAvailability>(this); return new Enumeration<InstanceAvailability>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("ONLINE".equals(codeString)) if ("ONLINE".equals(codeString))

View File

@ -121,12 +121,12 @@ public class Immunization extends DomainResource {
return ImmunizationStatus.ENTEREDINERROR; return ImmunizationStatus.ENTEREDINERROR;
throw new IllegalArgumentException("Unknown ImmunizationStatus code '"+codeString+"'"); throw new IllegalArgumentException("Unknown ImmunizationStatus code '"+codeString+"'");
} }
public Enumeration<ImmunizationStatus> fromType(Base code) throws FHIRException { public Enumeration<ImmunizationStatus> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<ImmunizationStatus>(this); return new Enumeration<ImmunizationStatus>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("completed".equals(codeString)) if ("completed".equals(codeString))

View File

@ -126,12 +126,12 @@ public class ImplementationGuide extends MetadataResource {
return GuideDependencyType.INCLUSION; return GuideDependencyType.INCLUSION;
throw new IllegalArgumentException("Unknown GuideDependencyType code '"+codeString+"'"); throw new IllegalArgumentException("Unknown GuideDependencyType code '"+codeString+"'");
} }
public Enumeration<GuideDependencyType> fromType(Base code) throws FHIRException { public Enumeration<GuideDependencyType> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<GuideDependencyType>(this); return new Enumeration<GuideDependencyType>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("reference".equals(codeString)) if ("reference".equals(codeString))
@ -294,12 +294,12 @@ public class ImplementationGuide extends MetadataResource {
return GuidePageKind.RESOURCE; return GuidePageKind.RESOURCE;
throw new IllegalArgumentException("Unknown GuidePageKind code '"+codeString+"'"); throw new IllegalArgumentException("Unknown GuidePageKind code '"+codeString+"'");
} }
public Enumeration<GuidePageKind> fromType(Base code) throws FHIRException { public Enumeration<GuidePageKind> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<GuidePageKind>(this); return new Enumeration<GuidePageKind>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("page".equals(codeString)) if ("page".equals(codeString))

View File

@ -132,12 +132,12 @@ public class Linkage extends DomainResource {
return LinkageType.HISTORICAL; return LinkageType.HISTORICAL;
throw new IllegalArgumentException("Unknown LinkageType code '"+codeString+"'"); throw new IllegalArgumentException("Unknown LinkageType code '"+codeString+"'");
} }
public Enumeration<LinkageType> fromType(Base code) throws FHIRException { public Enumeration<LinkageType> fromType(PrimitiveType<?> code) throws FHIRException {
if (code == null) if (code == null)
return null; return null;
if (code.isEmpty()) if (code.isEmpty())
return new Enumeration<LinkageType>(this); return new Enumeration<LinkageType>(this);
String codeString = ((PrimitiveType) code).asStringValue(); String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString)) if (codeString == null || "".equals(codeString))
return null; return null;
if ("source".equals(codeString)) if ("source".equals(codeString))

Some files were not shown because too many files have changed in this diff Show More