diff --git a/hapi-fhir-base/src/assembly/hapi-fhir-all.xml b/hapi-fhir-base/src/assembly/hapi-fhir-all.xml
index 55bdb67b3c5..f47dfeb810e 100644
--- a/hapi-fhir-base/src/assembly/hapi-fhir-all.xml
+++ b/hapi-fhir-base/src/assembly/hapi-fhir-all.xml
@@ -1,5 +1,5 @@
-
+all
diff --git a/hapi-fhir-base/src/changes/changes.xml b/hapi-fhir-base/src/changes/changes.xml
index 651c8735c9a..708f3727530 100644
--- a/hapi-fhir-base/src/changes/changes.xml
+++ b/hapi-fhir-base/src/changes/changes.xml
@@ -18,6 +18,14 @@
been added to this datatype which provide just the numeric portion. See the JavaDoc
for more information.
+
+ API CHANGE:]]>: Most elements in the HAPI FHIR model contain
+ a getId() and setId() method. This method is confusing because it is only actually used
+ for IDREF elements (which are rare) but its name makes it easy to confuse with more
+ important identifiers. For this reason, these methods have been deprocated and replaced with
+ get/setElementSpecificId() methods. The old methods will be removed at some point. Resource
+ types are unchanged and retain their get/setId methods.
+
Allow use of QuantityDt as a service parameter to support the "quantity" type. Previously
QuantityDt did not implement IQueryParameterType so it was not valid, and there was no way to
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeDeclaredChildDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeDeclaredChildDefinition.java
index 6bf5e0089fa..03ac3b7b629 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeDeclaredChildDefinition.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/BaseRuntimeDeclaredChildDefinition.java
@@ -20,7 +20,7 @@ package ca.uhn.fhir.context;
* #L%
*/
-import static org.apache.commons.lang3.StringUtils.isBlank;
+import static org.apache.commons.lang3.StringUtils.*;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java
index e55941992b1..c9524f141a5 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java
@@ -241,10 +241,6 @@ public class FhirContext {
myNarrativeGenerator = theNarrativeGenerator;
}
- public void setRestfulClientFactory(IRestfulClientFactory theRestfulClientFactory) {
- myRestfulClientFactory = theRestfulClientFactory;
- }
-
private RuntimeResourceDefinition scanResourceType(Class extends IResource> theResourceType) {
ArrayList> resourceTypes = new ArrayList>();
resourceTypes.add(theResourceType);
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java
index 3f14b9b40cd..6852d474686 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/ModelScanner.java
@@ -20,7 +20,7 @@ package ca.uhn.fhir.context;
* #L%
*/
-import static org.apache.commons.lang3.StringUtils.isBlank;
+import static org.apache.commons.lang3.StringUtils.*;
import java.io.IOException;
import java.io.InputStream;
@@ -49,6 +49,7 @@ import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.ICompositeElement;
import ca.uhn.fhir.model.api.IDatatype;
import ca.uhn.fhir.model.api.IElement;
+import ca.uhn.fhir.model.api.IExtension;
import ca.uhn.fhir.model.api.IPrimitiveDatatype;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.IResourceBlock;
@@ -91,7 +92,7 @@ class ModelScanner {
ModelScanner(Class extends IResource> theResourceTypes) throws ConfigurationException {
Set> singleton = new HashSet>();
singleton.add(theResourceTypes);
- init(null,singleton);
+ init(null, singleton);
}
ModelScanner(Collection> theResourceTypes) throws ConfigurationException {
@@ -153,10 +154,10 @@ class ModelScanner {
}
private void init(Map, BaseRuntimeElementDefinition>> theExistingDefinitions, Set> toScan) {
- if (theExistingDefinitions!=null) {
+ if (theExistingDefinitions != null) {
myClassToElementDefinitions.putAll(theExistingDefinitions);
}
-
+
int startSize = myClassToElementDefinitions.size();
long start = System.currentTimeMillis();
@@ -210,7 +211,7 @@ class ModelScanner {
} while (!toScan.isEmpty());
for (Entry, BaseRuntimeElementDefinition>> nextEntry : myClassToElementDefinitions.entrySet()) {
- if (theExistingDefinitions!=null&&theExistingDefinitions.containsKey(nextEntry.getKey())) {
+ if (theExistingDefinitions != null && theExistingDefinitions.containsKey(nextEntry.getKey())) {
continue;
}
BaseRuntimeElementDefinition> next = nextEntry.getValue();
@@ -221,7 +222,7 @@ class ModelScanner {
myRuntimeChildUndeclaredExtensionDefinition.sealAndInitialize(myClassToElementDefinitions);
long time = System.currentTimeMillis() - start;
- int size = myClassToElementDefinitions.size()- startSize;
+ int size = myClassToElementDefinitions.size() - startSize;
ourLog.info("Done scanning FHIR library, found {} model entries in {}ms", size, time);
}
@@ -298,6 +299,8 @@ class ModelScanner {
scanCompositeElementForChildren(theClass, resourceDef);
}
+
+
private String scanCodeTable(Class extends ICodeEnum> theCodeType, CodeTableDef theCodeTableDefinition) {
return null; // TODO: implement
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildAny.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildAny.java
index f3b2beea93a..7df3d093d7e 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildAny.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildAny.java
@@ -60,9 +60,11 @@ public class RuntimeChildAny extends RuntimeChildChoiceDefinition {
if (o1res && o2res) {
return theO1.getSimpleName().compareTo(theO2.getSimpleName());
} else if (o1res) {
- return 1;
- }else {
return -1;
+ } else if (o1res == false && o2res == false) {
+ return 0;
+ }else {
+ return 1;
}
}});
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildDeclaredExtensionDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildDeclaredExtensionDefinition.java
index b98cc3331f2..d458fbfd1de 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildDeclaredExtensionDefinition.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildDeclaredExtensionDefinition.java
@@ -20,7 +20,7 @@ package ca.uhn.fhir.context;
* #L%
*/
-import static org.apache.commons.lang3.StringUtils.isNotBlank;
+import static org.apache.commons.lang3.StringUtils.*;
import java.lang.reflect.Field;
import java.util.ArrayList;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeCompositeDatatypeDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeCompositeDatatypeDefinition.java
index 115e4f5963c..0fda309693d 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeCompositeDatatypeDefinition.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeCompositeDatatypeDefinition.java
@@ -20,7 +20,7 @@ package ca.uhn.fhir.context;
* #L%
*/
-import static org.apache.commons.lang3.StringUtils.isBlank;
+import static org.apache.commons.lang3.StringUtils.*;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimePrimitiveDatatypeDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimePrimitiveDatatypeDefinition.java
index f876e806470..c04e88dc258 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimePrimitiveDatatypeDefinition.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimePrimitiveDatatypeDefinition.java
@@ -20,7 +20,7 @@ package ca.uhn.fhir.context;
* #L%
*/
-import static org.apache.commons.lang3.StringUtils.isBlank;
+import static org.apache.commons.lang3.StringUtils.*;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeResourceDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeResourceDefinition.java
index e2be1b71498..9312456fc1a 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeResourceDefinition.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeResourceDefinition.java
@@ -20,8 +20,7 @@ package ca.uhn.fhir.context;
* #L%
*/
-import static org.apache.commons.lang3.StringUtils.isNotBlank;
-import static org.apache.commons.lang3.StringUtils.join;
+import static org.apache.commons.lang3.StringUtils.*;
import java.util.ArrayList;
import java.util.Collections;
@@ -48,6 +47,7 @@ import ca.uhn.fhir.model.dstu.resource.Profile.StructureElement;
import ca.uhn.fhir.model.dstu.resource.Profile.StructureElementDefinitionType;
import ca.uhn.fhir.model.dstu.valueset.DataTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.SlicingRulesEnum;
+import ca.uhn.fhir.model.primitive.IdDt;
public class RuntimeResourceDefinition extends BaseRuntimeElementCompositeDefinition {
@@ -319,7 +319,7 @@ public class RuntimeResourceDefinition extends BaseRuntimeElementCompositeDefini
RuntimeResourceDefinition def = this;
if (StringUtils.isNotBlank(myId)) {
- retVal.setId(myId);
+ retVal.setId(new IdDt(myId));
}else {
throw new ConfigurationException("Resource class " + getImplementingClass().getCanonicalName() + " has no ID specified");
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseBundle.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseBundle.java
index d127559db76..da5918b9f98 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseBundle.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseBundle.java
@@ -20,13 +20,15 @@ package ca.uhn.fhir.model.api;
* #L%
*/
+import ca.uhn.fhir.model.primitive.IdDt;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.util.ElementUtil;
-public class BaseBundle extends BaseElement implements IElement {
+public class BaseBundle extends BaseElement implements IElement {
private StringDt myAuthorName;
private StringDt myAuthorUri;
+ private IdDt myId;
public StringDt getAuthorName() {
if (myAuthorName == null) {
@@ -42,11 +44,20 @@ public class BaseBundle extends BaseElement implements IElement {
return myAuthorUri;
}
+ public IdDt getId() {
+ if (myId==null) {
+ myId=new IdDt();
+ }
+ return myId;
+ }
+
@Override
public boolean isEmpty() {
return ElementUtil.isEmpty(myAuthorName, myAuthorUri);
}
-
-
+
+ public void setId(IdDt theId) {
+ myId = theId;
+ }
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseElement.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseElement.java
index 2f7232df775..a822a81674c 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseElement.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseElement.java
@@ -26,11 +26,8 @@ import java.util.List;
import org.apache.commons.lang3.Validate;
-import ca.uhn.fhir.model.primitive.IdDt;
+public abstract class BaseElement implements IElement, ISupportsUndeclaredExtensions {
-public abstract class BaseElement implements IIdentifiableElement, ISupportsUndeclaredExtensions {
-
- private IdDt myId;
private List myUndeclaredExtensions;
private List myUndeclaredModifierExtensions;
@@ -52,7 +49,6 @@ public abstract class BaseElement implements IIdentifiableElement, ISupportsUnde
return retVal;
}
-
@Override
public void addUndeclaredExtension(ExtensionDt theExtension) {
Validate.notNull(theExtension, "Extension can not be null");
@@ -75,14 +71,6 @@ public abstract class BaseElement implements IIdentifiableElement, ISupportsUnde
return Collections.unmodifiableList(retVal);
}
- @Override
- public IdDt getId() {
- if (myId == null) {
- myId = new IdDt();
- }
- return myId;
- }
-
@Override
public List getUndeclaredExtensions() {
if (myUndeclaredExtensions == null) {
@@ -111,20 +99,9 @@ public abstract class BaseElement implements IIdentifiableElement, ISupportsUnde
return myUndeclaredModifierExtensions;
}
- @Override
- public void setId(IdDt theId) {
- myId = theId;
- }
-
- @Override
- public void setId(String theId) {
- myId = new IdDt(theId);
- }
-
/**
- * Intended to be called by extending classes {@link #isEmpty()}
- * implementations, returns true if all content in this
- * superclass instance is empty per the semantics of {@link #isEmpty()}.
+ * Intended to be called by extending classes {@link #isEmpty()} implementations, returns true if all
+ * content in this superclass instance is empty per the semantics of {@link #isEmpty()}.
*/
protected boolean isBaseEmpty() {
if (myUndeclaredExtensions != null) {
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseIdentifiableElement.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseIdentifiableElement.java
new file mode 100644
index 00000000000..9a9b1beac15
--- /dev/null
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseIdentifiableElement.java
@@ -0,0 +1,84 @@
+package ca.uhn.fhir.model.api;
+
+/*
+ * #%L
+ * HAPI FHIR Library
+ * %%
+ * Copyright (C) 2014 University Health Network
+ * %%
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * #L%
+ */
+
+import ca.uhn.fhir.model.primitive.IdDt;
+import ca.uhn.fhir.parser.DataFormatException;
+
+public abstract class BaseIdentifiableElement extends BaseElement implements IIdentifiableElement {
+
+ private String myElementSpecificId;
+
+ @Override
+ public String getElementSpecificId() {
+ return myElementSpecificId;
+ }
+
+ @Override
+ public IdDt getId() {
+ if (myElementSpecificId == null) {
+ return new LockedId();
+ } else {
+ return new LockedId(myElementSpecificId);
+ }
+ }
+
+ @Override
+ public void setElementSpecificId(String theElementSpecificId) {
+ myElementSpecificId = theElementSpecificId;
+ }
+
+ @Override
+ public void setId(IdDt theId) {
+ if (theId == null) {
+ myElementSpecificId = null;
+ } else {
+ myElementSpecificId = theId.getValue();
+ }
+ }
+
+ @Override
+ public void setId(String theId) {
+ myElementSpecificId = theId;
+ }
+
+ private static class LockedId extends IdDt {
+
+ public LockedId() {
+ }
+
+ public LockedId(String theElementSpecificId) {
+ super(theElementSpecificId);
+ }
+
+ @Override
+ public void setValue(String theValue) throws DataFormatException {
+ throw new UnsupportedOperationException("Use IElement#setElementSpecificId(String) to set the element ID for an element");
+ }
+
+ @Override
+ public void setValueAsString(String theValue) throws DataFormatException {
+ throw new UnsupportedOperationException("Use IElement#setElementSpecificId(String) to set the element ID for an element");
+ }
+
+ }
+
+}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BasePrimitive.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BasePrimitive.java
index df92ba4cb46..2d28b052c65 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BasePrimitive.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BasePrimitive.java
@@ -23,7 +23,7 @@ package ca.uhn.fhir.model.api;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
-public abstract class BasePrimitive extends BaseElement implements IPrimitiveDatatype {
+public abstract class BasePrimitive extends BaseIdentifiableElement implements IPrimitiveDatatype {
@Override
public boolean isEmpty() {
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseResource.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseResource.java
index 92bd2acd8ac..a4dcedda8e9 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseResource.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseResource.java
@@ -29,6 +29,7 @@ import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.dstu.composite.ContainedDt;
import ca.uhn.fhir.model.dstu.composite.NarrativeDt;
import ca.uhn.fhir.model.primitive.CodeDt;
+import ca.uhn.fhir.model.primitive.IdDt;
import ca.uhn.fhir.util.ElementUtil;
public abstract class BaseResource extends BaseElement implements IResource {
@@ -36,6 +37,8 @@ public abstract class BaseResource extends BaseElement implements IResource {
@Child(name = "contained", order = 2, min = 0, max = 1)
private ContainedDt myContained;
+ private IdDt myId;
+
@Child(name = "language", order = 0, min = 0, max = Child.MAX_UNLIMITED)
private CodeDt myLanguage;
@@ -52,6 +55,13 @@ public abstract class BaseResource extends BaseElement implements IResource {
return myContained;
}
+ public IdDt getId() {
+ if (myId == null) {
+ myId = new IdDt();
+ }
+ return myId;
+ }
+
public CodeDt getLanguage() {
return myLanguage;
}
@@ -76,6 +86,18 @@ public abstract class BaseResource extends BaseElement implements IResource {
myContained = theContained;
}
+ public void setId(IdDt theId) {
+ myId = theId;
+ }
+
+ public void setId(String theId) {
+ if (theId == null) {
+ myId = null;
+ } else {
+ myId = new IdDt(theId);
+ }
+ }
+
public void setLanguage(CodeDt theLanguage) {
myLanguage = theLanguage;
}
@@ -91,9 +113,8 @@ public abstract class BaseResource extends BaseElement implements IResource {
}
/**
- * Intended to be called by extending classes {@link #isEmpty()}
- * implementations, returns true if all content in this
- * superclass instance is empty per the semantics of {@link #isEmpty()}.
+ * Intended to be called by extending classes {@link #isEmpty()} implementations, returns true if all
+ * content in this superclass instance is empty per the semantics of {@link #isEmpty()}.
*/
@Override
protected boolean isBaseEmpty() {
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseResourceReference.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseResourceReference.java
index ebb8656cbd2..8d79745f3a6 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseResourceReference.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BaseResourceReference.java
@@ -34,7 +34,7 @@ import ca.uhn.fhir.parser.IParser;
import ca.uhn.fhir.rest.client.BaseClient;
import ca.uhn.fhir.rest.client.api.IRestfulClient;
-public abstract class BaseResourceReference extends BaseElement {
+public abstract class BaseResourceReference extends BaseIdentifiableElement {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(BaseResourceReference.class);
private IResource myResource;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Bundle.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Bundle.java
index ddda2ee9ff5..9d7678a3aec 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Bundle.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Bundle.java
@@ -20,14 +20,14 @@ package ca.uhn.fhir.model.api;
* #L%
*/
-import static org.apache.commons.lang3.StringUtils.isNotBlank;
+import static org.apache.commons.lang3.StringUtils.*;
import java.util.ArrayList;
import java.util.List;
+import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
-import org.apache.commons.lang3.StringUtils;
import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.context.RuntimeResourceDefinition;
@@ -221,7 +221,12 @@ public class Bundle extends BaseBundle /* implements IElement */{
RuntimeResourceDefinition def = theContext.getResourceDefinition(theResource);
if (theResource.getId() != null && StringUtils.isNotBlank(theResource.getId().getValue())) {
- entry.getTitle().setValue(def.getName() + " " + theResource.getId().getValue());
+ String title = ResourceMetadataKeyEnum.TITLE.get(theResource);
+ if (title != null) {
+ entry.getTitle().setValue(title);
+ } else {
+ entry.getTitle().setValue(def.getName() + " " + theResource.getId().getValue());
+ }
StringBuilder b = new StringBuilder();
b.append(theServerBase);
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BundleEntry.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BundleEntry.java
index cf1e838ffdc..85709ee0189 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BundleEntry.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BundleEntry.java
@@ -20,9 +20,9 @@ package ca.uhn.fhir.model.api;
* #L%
*/
+import org.apache.commons.lang3.Validate;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
-import org.apache.commons.lang3.Validate;
import ca.uhn.fhir.model.primitive.InstantDt;
import ca.uhn.fhir.model.primitive.StringDt;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ExtensionDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ExtensionDt.java
index 8bf29d2f0b7..a5c43553055 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ExtensionDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ExtensionDt.java
@@ -30,7 +30,7 @@ import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.primitive.StringDt;
@DatatypeDef(name="Extension")
-public class ExtensionDt extends BaseElement implements ICompositeDatatype {
+public class ExtensionDt extends BaseIdentifiableElement implements ICompositeDatatype {
private boolean myModifier;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ICompositeElement.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ICompositeElement.java
index 3debc644841..12745cc47c4 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ICompositeElement.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ICompositeElement.java
@@ -22,7 +22,7 @@ package ca.uhn.fhir.model.api;
import java.util.List;
-public interface ICompositeElement extends IIdentifiableElement {
+public interface ICompositeElement extends IElement {
/**
* Returns a list containing all child elements matching a given type
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IDatatype.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IDatatype.java
index 48765842b30..ffc9e52fa59 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IDatatype.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IDatatype.java
@@ -20,6 +20,6 @@ package ca.uhn.fhir.model.api;
* #L%
*/
-public interface IDatatype extends IIdentifiableElement {
+public interface IDatatype extends IElement {
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IIdentifiableElement.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IIdentifiableElement.java
index a5dadc647fc..4d5dbc7e61d 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IIdentifiableElement.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IIdentifiableElement.java
@@ -24,15 +24,33 @@ import ca.uhn.fhir.model.primitive.IdDt;
public interface IIdentifiableElement extends IElement {
- void setId(IdDt theId);
+ /**
+ * Used to retrieve an ID for this specific element within a resource. These are used for IDREF referenced between
+ * elements within a single resource, and do not have any other purpose.
+ */
+ String getElementSpecificId();
+ /**
+ * @deprecated Use {@link #getElementSpecificId()} instead. This method will be removed because it is easily
+ * confused with other ID methods (such as patient#getIdentifier)
+ */
IdDt getId();
/**
- * Convenience method for {@link #setId(IdDt)} which creates a new IdDt and provides the
- * given string as the ID.
- *
- * @param theId The ID string. Can be a complete URL, a partial URL or even a simple identifier.
+ * Used to set an ID for this specific element within a resource. These are used for IDREF referenced between
+ * elements within a single resource, and do not have any other purpose.
+ */
+ void setElementSpecificId(String theElementSpecificId);
+
+ /**
+ * @deprecated Use {@link #setElementSpecificId(String)} instead. This method will be removed because it is easily
+ * confused with other ID methods (such as patient#getIdentifier)
+ */
+ void setId(IdDt theId);
+
+ /**
+ * @deprecated Use {@link #setElementSpecificId(String)} instead. This method will be removed because it is easily
+ * confused with other ID methods (such as patient#getIdentifier)
*/
void setId(String theId);
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IResource.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IResource.java
index 00f108ba26c..d79fdc7d249 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IResource.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IResource.java
@@ -25,6 +25,7 @@ import java.util.Map;
import ca.uhn.fhir.model.dstu.composite.ContainedDt;
import ca.uhn.fhir.model.dstu.composite.NarrativeDt;
import ca.uhn.fhir.model.dstu.resource.Patient;
+import ca.uhn.fhir.model.primitive.IdDt;
public interface IResource extends ICompositeElement {
@@ -73,4 +74,20 @@ public interface IResource extends ICompositeElement {
*/
void setResourceMetadata(Map, Object> theMap);
+ /**
+ * Returns the ID of this resource. Note that this identifier is the URL (or a portion
+ * of the URL) used to access this resource, and is not the same thing as any business
+ * identifiers stored within the resource. For example, a Patient resource might
+ * have any number of medical record numbers but these are not stored here.
+ */
+ IdDt getId();
+
+ /**
+ * Sets the ID of this resource. Note that this identifier is the URL (or a portion
+ * of the URL) used to access this resource, and is not the same thing as any business
+ * identifiers stored within the resource. For example, a Patient resource might
+ * have any number of medical record numbers but these are not stored here.
+ */
+ void setId(IdDt theId);
+
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IResourceBlock.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IResourceBlock.java
index d4531158a42..128e3dccde3 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IResourceBlock.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IResourceBlock.java
@@ -20,6 +20,6 @@ package ca.uhn.fhir.model.api;
* #L%
*/
-public interface IResourceBlock extends ICompositeElement {
+public interface IResourceBlock extends ICompositeElement, IIdentifiableElement {
// nothing yet
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ResourceMetadataKeyEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ResourceMetadataKeyEnum.java
index b445058651c..14f164fcf92 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ResourceMetadataKeyEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ResourceMetadataKeyEnum.java
@@ -25,6 +25,8 @@ import static org.apache.commons.lang3.StringUtils.*;
import java.util.Date;
import java.util.Map;
+import org.apache.commons.lang3.StringUtils;
+
import ca.uhn.fhir.model.primitive.IdDt;
import ca.uhn.fhir.model.primitive.InstantDt;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
@@ -71,7 +73,7 @@ public abstract class ResourceMetadataKeyEnum {
theResource.getResourceMetadata().put(PREVIOUS_ID, theObject);
}
};
-
+
/**
* The value for this key is the bundle entry Published time. This is
* defined by FHIR as "Time resource copied into the feed", which is
@@ -128,6 +130,26 @@ public abstract class ResourceMetadataKeyEnum {
theResource.getResourceMetadata().put(TAG_LIST, theObject);
}
};
+
+ /**
+ * If present and populated with a string (as an instance of {@link String}),
+ * this value contains the title for this resource, as supplied in any bundles containing the
+ * resource.
+ *
+ * Values for this key are of type {@link String}
+ *
+ */
+ public static final ResourceMetadataKeyEnum TITLE = new ResourceMetadataKeyEnum("TITLE") {
+ @Override
+ public String get(IResource theResource) {
+ return getStringFromMetadataOrNullIfNone(theResource.getResourceMetadata(), TITLE);
+ }
+
+ @Override
+ public void put(IResource theResource, String theObject) {
+ theResource.getResourceMetadata().put(TITLE, theObject);
+ }
+ };
/**
@@ -182,7 +204,6 @@ public abstract class ResourceMetadataKeyEnum {
}
-
@Override
public boolean equals(Object obj) {
if (this == obj)
@@ -200,6 +221,8 @@ public abstract class ResourceMetadataKeyEnum {
return true;
}
+
+
public abstract T get(IResource theResource);
@Override
@@ -210,6 +233,10 @@ public abstract class ResourceMetadataKeyEnum {
return result;
}
+ private String name() {
+ return myValue;
+ }
+
public abstract void put(IResource theResource, T theObject);
@Override
@@ -217,32 +244,28 @@ public abstract class ResourceMetadataKeyEnum {
return myValue;
}
- private String name() {
- return myValue;
+ private static IdDt getIdFromMetadataOrNullIfNone(Map, Object> theResourceMetadata, ResourceMetadataKeyEnum> theKey) {
+ Object retValObj = theResourceMetadata.get(theKey);
+ if (retValObj == null) {
+ return null;
+ } else if (retValObj instanceof String) {
+ if (isNotBlank((String) retValObj)) {
+ return new IdDt((String) retValObj);
+ } else {
+ return null;
+ }
+ } else if (retValObj instanceof IdDt) {
+ if (((IdDt) retValObj).isEmpty()) {
+ return null;
+ } else {
+ return (IdDt) retValObj;
+ }
+ } else if (retValObj instanceof Number) {
+ return new IdDt(((Number)retValObj).toString());
+ }
+ throw new InternalErrorException("Found an object of type '" + retValObj.getClass().getCanonicalName() + "' in resource metadata for key " + theKey.name() + " - Expected " + IdDt.class.getCanonicalName());
}
- private static IdDt getIdFromMetadataOrNullIfNone(Map, Object> theResourceMetadata, ResourceMetadataKeyEnum> theKey) {
- Object retValObj = theResourceMetadata.get(theKey);
- if (retValObj == null) {
- return null;
- } else if (retValObj instanceof String) {
- if (isNotBlank((String) retValObj)) {
- return new IdDt((String) retValObj);
- } else {
- return null;
- }
- } else if (retValObj instanceof IdDt) {
- if (((IdDt) retValObj).isEmpty()) {
- return null;
- } else {
- return (IdDt) retValObj;
- }
- } else if (retValObj instanceof Number) {
- return new IdDt(((Number)retValObj).toString());
- }
- throw new InternalErrorException("Found an object of type '" + retValObj.getClass().getCanonicalName() + "' in resource metadata for key " + theKey.name() + " - Expected " + IdDt.class.getCanonicalName());
- }
-
private static InstantDt getInstantFromMetadataOrNullIfNone(Map, Object> theResourceMetadata, ResourceMetadataKeyEnum theKey) {
Object retValObj = theResourceMetadata.get(theKey);
if (retValObj == null) {
@@ -259,4 +282,18 @@ public abstract class ResourceMetadataKeyEnum {
throw new InternalErrorException("Found an object of type '" + retValObj.getClass().getCanonicalName() + "' in resource metadata for key " + theKey.name() + " - Expected " + InstantDt.class.getCanonicalName());
}
+ private static String getStringFromMetadataOrNullIfNone(Map, Object> theResourceMetadata, ResourceMetadataKeyEnum theKey) {
+ Object retValObj = theResourceMetadata.get(theKey);
+ if (retValObj == null) {
+ return null;
+ } else if (retValObj instanceof String) {
+ if (StringUtils.isBlank(((String) retValObj))) {
+ return null;
+ } else {
+ return (String) retValObj;
+ }
+ }
+ throw new InternalErrorException("Found an object of type '" + retValObj.getClass().getCanonicalName() + "' in resource metadata for key " + theKey.name() + " - Expected " + String.class.getCanonicalName());
+ }
+
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Tag.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Tag.java
index f8a5fe7f11b..015a9676ebb 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Tag.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Tag.java
@@ -20,7 +20,7 @@ package ca.uhn.fhir.model.api;
* #L%
*/
-import static org.apache.commons.lang3.StringUtils.isNotBlank;
+import static org.apache.commons.lang3.StringUtils.*;
import java.net.URI;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/AddressDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/AddressDt.java
index d90494e8981..2468090d307 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/AddressDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/AddressDt.java
@@ -16,29 +16,9 @@
package ca.uhn.fhir.model.dstu.composite;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.annotation.Child;
@@ -65,7 +45,7 @@ import ca.uhn.fhir.model.primitive.StringDt;
*/
@DatatypeDef(name="AddressDt")
public class AddressDt
- extends BaseElement implements ICompositeDatatype {
+ extends BaseIdentifiableElement implements ICompositeDatatype {
/**
* Constructor
@@ -517,5 +497,4 @@ public class AddressDt
-
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/AttachmentDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/AttachmentDt.java
index a09a9a558ff..7a74c3e0e42 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/AttachmentDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/AttachmentDt.java
@@ -16,29 +16,9 @@
package ca.uhn.fhir.model.dstu.composite;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.annotation.Child;
@@ -66,7 +46,7 @@ import ca.uhn.fhir.model.primitive.UriDt;
*/
@DatatypeDef(name="AttachmentDt")
public class AttachmentDt
- extends BaseElement implements ICompositeDatatype {
+ extends BaseIdentifiableElement implements ICompositeDatatype {
/**
* Constructor
@@ -446,5 +426,4 @@ public class AttachmentDt
-
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/CodeableConceptDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/CodeableConceptDt.java
index 9c25879f7fa..ee6d40cc41c 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/CodeableConceptDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/CodeableConceptDt.java
@@ -16,29 +16,9 @@
package ca.uhn.fhir.model.dstu.composite;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.annotation.Child;
@@ -62,7 +42,7 @@ import ca.uhn.fhir.model.primitive.StringDt;
*/
@DatatypeDef(name="CodeableConceptDt")
public class CodeableConceptDt
- extends BaseElement implements ICompositeDatatype {
+ extends BaseIdentifiableElement implements ICompositeDatatype {
/**
* Constructor
@@ -210,5 +190,4 @@ public class CodeableConceptDt
-
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/CodingDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/CodingDt.java
index c4947031186..229e0a78dc0 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/CodingDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/CodingDt.java
@@ -16,29 +16,9 @@
package ca.uhn.fhir.model.dstu.composite;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IQueryParameterType;
@@ -66,7 +46,7 @@ import ca.uhn.fhir.model.primitive.UriDt;
*/
@DatatypeDef(name="CodingDt")
public class CodingDt
- extends BaseElement implements ICompositeDatatype , IQueryParameterType {
+ extends BaseIdentifiableElement implements ICompositeDatatype , IQueryParameterType {
/**
* Constructor
@@ -417,20 +397,19 @@ public class CodingDt
* {@inheritDoc}
*/
@Override
- public void setValueAsQueryToken(String theQualifier, String theValue) {
- int barIndex = theValue.indexOf('|');
+ public void setValueAsQueryToken(String theQualifier, String theParameter) {
+ int barIndex = theParameter.indexOf('|');
if (barIndex != -1) {
- setSystem(new UriDt(theValue.substring(0, barIndex)));
- setCode(theValue.substring(barIndex + 1));
+ setSystem(new UriDt(theParameter.substring(0, barIndex)));
+ setCode(theParameter.substring(barIndex + 1));
} else {
- setCode(theValue);
+ setCode(theParameter);
}
- }
+ }
@Override
public String getQueryParameterQualifier() {
return null;
}
-
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ContactDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ContactDt.java
index 4fc199c1514..c4da44ab175 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ContactDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ContactDt.java
@@ -16,29 +16,9 @@
package ca.uhn.fhir.model.dstu.composite;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.annotation.Child;
@@ -67,7 +47,7 @@ import ca.uhn.fhir.model.primitive.StringDt;
*/
@DatatypeDef(name="ContactDt")
public class ContactDt
- extends BaseElement implements ICompositeDatatype {
+ extends BaseIdentifiableElement implements ICompositeDatatype {
/**
* Constructor
@@ -297,5 +277,4 @@ public class ContactDt
-
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ContainedDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ContainedDt.java
index a9e9c6c513b..f61033793b1 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ContainedDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ContainedDt.java
@@ -27,7 +27,6 @@ import ca.uhn.fhir.model.api.IDatatype;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
-import ca.uhn.fhir.model.primitive.IdDt;
@DatatypeDef(name = "duration")
public class ContainedDt implements IDatatype {
@@ -51,18 +50,4 @@ public class ContainedDt implements IDatatype {
return myContainedResources == null || myContainedResources.size() == 0;
}
- @Override
- public void setId(IdDt theId) {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public IdDt getId() {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public void setId(String theId) {
- throw new UnsupportedOperationException();
- }
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/HumanNameDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/HumanNameDt.java
index 273691a8411..4c8bf924665 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/HumanNameDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/HumanNameDt.java
@@ -16,29 +16,9 @@
package ca.uhn.fhir.model.dstu.composite;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.annotation.Child;
@@ -66,7 +46,7 @@ import ca.uhn.fhir.util.DatatypeUtil;
*/
@DatatypeDef(name="HumanNameDt")
public class HumanNameDt
- extends BaseElement implements ICompositeDatatype {
+ extends BaseIdentifiableElement implements ICompositeDatatype {
/**
* Constructor
@@ -604,5 +584,4 @@ public class HumanNameDt
return ca.uhn.fhir.util.DatatypeUtil.joinStringsSpaceSeparated(getSuffix());
}
-
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/IdentifierDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/IdentifierDt.java
index e4f0e90eb1d..62773a73610 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/IdentifierDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/IdentifierDt.java
@@ -16,29 +16,9 @@
package ca.uhn.fhir.model.dstu.composite;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IQueryParameterType;
@@ -68,7 +48,7 @@ import ca.uhn.fhir.model.primitive.UriDt;
*/
@DatatypeDef(name="IdentifierDt")
public class IdentifierDt
- extends BaseElement implements ICompositeDatatype , IQueryParameterType {
+ extends BaseIdentifiableElement implements ICompositeDatatype , IQueryParameterType {
/**
* Constructor
@@ -415,7 +395,7 @@ public class IdentifierDt
if (org.apache.commons.lang3.StringUtils.isNotBlank(getSystem().getValueAsString())) {
return getSystem().getValueAsString() + '|' + getValue().getValueAsString();
} else {
- return '|' + getValue().getValueAsString();
+ return getValue().getValueAsString();
}
}
@@ -423,20 +403,19 @@ public class IdentifierDt
* {@inheritDoc}
*/
@Override
- public void setValueAsQueryToken(String theQualifier, String theValue) {
- int barIndex = theValue.indexOf('|');
+ public void setValueAsQueryToken(String theQualifier, String theParameter) {
+ int barIndex = theParameter.indexOf('|');
if (barIndex != -1) {
- setSystem(new UriDt(theValue.substring(0, barIndex)));
- setValue(theValue.substring(barIndex + 1));
+ setSystem(new UriDt(theParameter.substring(0, barIndex)));
+ setValue(theParameter.substring(barIndex + 1));
} else {
- setValue(theValue);
+ setValue(theParameter);
}
}
-
@Override
public String getQueryParameterQualifier() {
return null;
}
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/NarrativeDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/NarrativeDt.java
index 59a16e9762b..14e1b7670b1 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/NarrativeDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/NarrativeDt.java
@@ -38,7 +38,7 @@ package ca.uhn.fhir.model.dstu.composite;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.annotation.Child;
@@ -63,7 +63,7 @@ import ca.uhn.fhir.model.primitive.XhtmlDt;
*
*/
@DatatypeDef(name="Narrative")
-public class NarrativeDt extends BaseElement implements ICompositeDatatype {
+public class NarrativeDt extends BaseIdentifiableElement implements ICompositeDatatype {
@Child(name="status", type=CodeDt.class, order=0, min=1, max=1)
private BoundCodeDt myStatus;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/PeriodDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/PeriodDt.java
index 66e8f240ede..884b3e4e68b 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/PeriodDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/PeriodDt.java
@@ -16,30 +16,10 @@
package ca.uhn.fhir.model.dstu.composite;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
@@ -64,7 +44,7 @@ import ca.uhn.fhir.model.primitive.DateTimeDt;
*/
@DatatypeDef(name="PeriodDt")
public class PeriodDt
- extends BaseElement implements ICompositeDatatype {
+ extends BaseIdentifiableElement implements ICompositeDatatype {
/**
* Constructor
@@ -137,8 +117,8 @@ public class PeriodDt
* The start of the period. The boundary is inclusive.
*
*/
- public PeriodDt setStart( Date theDate, TemporalPrecisionEnum thePrecision) {
- myStart = new DateTimeDt(theDate, thePrecision);
+ public PeriodDt setStartWithSecondsPrecision( Date theDate) {
+ myStart = new DateTimeDt(theDate);
return this;
}
@@ -150,8 +130,8 @@ public class PeriodDt
* The start of the period. The boundary is inclusive.
*
*/
- public PeriodDt setStartWithSecondsPrecision( Date theDate) {
- myStart = new DateTimeDt(theDate);
+ public PeriodDt setStart( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myStart = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -194,8 +174,8 @@ public class PeriodDt
* The end of the period. If the end of the period is missing, it means that the period is ongoing
*
*/
- public PeriodDt setEnd( Date theDate, TemporalPrecisionEnum thePrecision) {
- myEnd = new DateTimeDt(theDate, thePrecision);
+ public PeriodDt setEndWithSecondsPrecision( Date theDate) {
+ myEnd = new DateTimeDt(theDate);
return this;
}
@@ -207,13 +187,12 @@ public class PeriodDt
* The end of the period. If the end of the period is missing, it means that the period is ongoing
*
*/
- public PeriodDt setEndWithSecondsPrecision( Date theDate) {
- myEnd = new DateTimeDt(theDate);
+ public PeriodDt setEnd( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myEnd = new DateTimeDt(theDate, thePrecision);
return this;
}
-
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/QuantityDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/QuantityDt.java
index 3d452f3162c..37ed937113c 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/QuantityDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/QuantityDt.java
@@ -1,31 +1,27 @@
-package ca.uhn.fhir.model.dstu.composite;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+package ca.uhn.fhir.model.dstu.composite;
import java.math.BigDecimal;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IQueryParameterType;
@@ -41,20 +37,22 @@ import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.model.primitive.UriDt;
/**
- * HAPI/FHIR QuantityDt Datatype (A measured or measurable amount)
- *
+ * HAPI/FHIR QuantityDt Datatype
+ * (A measured or measurable amount)
+ *
*
- * Definition: A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving
- * arbitrary units and floating currencies
- *
- *
+ * Definition:
+ * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies
+ *
+ *
*
- * Requirements: Need to able to capture all sorts of measured values, even if the measured value are not precisely quantified. Values include exact measures such as 3.51g, customary units such
- * as 3 tablets, and currencies such as $100.32USD
- *
+ * Requirements:
+ * Need to able to capture all sorts of measured values, even if the measured value are not precisely quantified. Values include exact measures such as 3.51g, customary units such as 3 tablets, and currencies such as $100.32USD
+ *
*/
-@DatatypeDef(name = "QuantityDt")
-public class QuantityDt extends BaseElement implements ICompositeDatatype, IQueryParameterType {
+@DatatypeDef(name="QuantityDt")
+public class QuantityDt
+ extends BaseIdentifiableElement implements ICompositeDatatype , IQueryParameterType {
/**
* Constructor
@@ -67,7 +65,7 @@ public class QuantityDt extends BaseElement implements ICompositeDatatype, IQuer
* Constructor
*/
@SimpleSetter
- public QuantityDt(@SimpleSetter.Parameter(name = "theValue") double theValue) {
+ public QuantityDt(@SimpleSetter.Parameter(name="theValue") double theValue) {
setValue(theValue);
}
@@ -75,33 +73,9 @@ public class QuantityDt extends BaseElement implements ICompositeDatatype, IQuer
* Constructor
*/
@SimpleSetter
- public QuantityDt(@SimpleSetter.Parameter(name = "theValue") long theValue) {
+ public QuantityDt(@SimpleSetter.Parameter(name="theValue") long theValue) {
setValue(theValue);
}
-
- /**
- * Constructor
- */
- @SimpleSetter
- public QuantityDt(@SimpleSetter.Parameter(name = "theComparator") QuantityCompararatorEnum theComparator, @SimpleSetter.Parameter(name = "theValue") double theValue,
- @SimpleSetter.Parameter(name = "theSystem") String theSystem, @SimpleSetter.Parameter(name = "theUnits") String theUnits) {
- setValue(theValue);
- setComparator(theComparator);
- setSystem(theSystem);
- setUnits(theUnits);
- }
-
- /**
- * Constructor
- */
- @SimpleSetter
- public QuantityDt(@SimpleSetter.Parameter(name = "theComparator") QuantityCompararatorEnum theComparator, @SimpleSetter.Parameter(name = "theValue") long theValue,
- @SimpleSetter.Parameter(name = "theSystem") String theSystem, @SimpleSetter.Parameter(name = "theUnits") String theUnits) {
- setValue(theValue);
- setComparator(theComparator);
- setSystem(theSystem);
- setUnits(theUnits);
- }
/**
* Constructor
@@ -125,251 +99,26 @@ public class QuantityDt extends BaseElement implements ICompositeDatatype, IQuer
setUnits(theUnits);
}
- @Child(name = "value", type = DecimalDt.class, order = 0, min = 0, max = 1)
- @Description(shortDefinition = "Numerical value (with implicit precision)", formalDefinition = "The value of the measured amount. The value includes an implicit precision in the presentation of the value")
- private DecimalDt myValue;
-
- @Child(name = "comparator", type = CodeDt.class, order = 1, min = 0, max = 1)
- @Description(shortDefinition = "< | <= | >= | > - how to understand the value", formalDefinition = "How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is \"<\" , then the real value is < stated value")
- private BoundCodeDt myComparator;
-
- @Child(name = "units", type = StringDt.class, order = 2, min = 0, max = 1)
- @Description(shortDefinition = "Unit representation", formalDefinition = "A human-readable form of the units")
- private StringDt myUnits;
-
- @Child(name = "system", type = UriDt.class, order = 3, min = 0, max = 1)
- @Description(shortDefinition = "System that defines coded unit form", formalDefinition = "The identification of the system that provides the coded form of the unit")
- private UriDt mySystem;
-
- @Child(name = "code", type = CodeDt.class, order = 4, min = 0, max = 1)
- @Description(shortDefinition = "Coded form of the unit", formalDefinition = "A computer processable form of the units in some unit representation system")
- private CodeDt myCode;
-
- @Override
- public boolean isEmpty() {
- return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(myValue, myComparator, myUnits, mySystem, myCode);
- }
-
- @Override
- public List getAllPopulatedChildElementsOfType(Class theType) {
- return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myValue, myComparator, myUnits, mySystem, myCode);
+ /**
+ * Constructor
+ */
+ @SimpleSetter
+ public QuantityDt(@SimpleSetter.Parameter(name="theComparator") QuantityCompararatorEnum theComparator, @SimpleSetter.Parameter(name="theValue") double theValue, @SimpleSetter.Parameter(name="theSystem") String theSystem, @SimpleSetter.Parameter(name="theUnits") String theUnits) {
+ setValue(theValue);
+ setComparator(theComparator);
+ setSystem(theSystem);
+ setUnits(theUnits);
}
/**
- * Gets the value(s) for value (Numerical value (with implicit precision)). creating it if it does not exist. Will not return null.
- *
- *
- * Definition: The value of the measured amount. The value includes an implicit precision in the presentation of the value
- *
+ * Constructor
*/
- public DecimalDt getValue() {
- if (myValue == null) {
- myValue = new DecimalDt();
- }
- return myValue;
- }
-
- /**
- * Sets the value(s) for value (Numerical value (with implicit precision))
- *
- *
- * Definition: The value of the measured amount. The value includes an implicit precision in the presentation of the value
- *
- */
- public QuantityDt setValue(DecimalDt theValue) {
- myValue = theValue;
- return this;
- }
-
- /**
- * Sets the value for value (Numerical value (with implicit precision))
- *
- *
- * Definition: The value of the measured amount. The value includes an implicit precision in the presentation of the value
- *
- */
- public QuantityDt setValue(long theValue) {
- myValue = new DecimalDt(theValue);
- return this;
- }
-
- /**
- * Sets the value for value (Numerical value (with implicit precision))
- *
- *
- * Definition: The value of the measured amount. The value includes an implicit precision in the presentation of the value
- *
- */
- public QuantityDt setValue(double theValue) {
- myValue = new DecimalDt(theValue);
- return this;
- }
-
- /**
- * Sets the value for value (Numerical value (with implicit precision))
- *
- *
- * Definition: The value of the measured amount. The value includes an implicit precision in the presentation of the value
- *
- */
- public QuantityDt setValue(java.math.BigDecimal theValue) {
- myValue = new DecimalDt(theValue);
- return this;
- }
-
- /**
- * Gets the value(s) for comparator (< | <= | >= | > - how to understand the value). creating it if it does not exist. Will not return null.
- *
- *
- * Definition: How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is
- * \"<\" , then the real value is < stated value
- *
- */
- public BoundCodeDt getComparator() {
- if (myComparator == null) {
- myComparator = new BoundCodeDt(QuantityCompararatorEnum.VALUESET_BINDER);
- }
- return myComparator;
- }
-
- /**
- * Sets the value(s) for comparator (< | <= | >= | > - how to understand the value)
- *
- *
- * Definition: How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is
- * \"<\" , then the real value is < stated value
- *
- */
- public QuantityDt setComparator(BoundCodeDt theValue) {
- myComparator = theValue;
- return this;
- }
-
- /**
- * Sets the value(s) for comparator (< | <= | >= | > - how to understand the value)
- *
- *
- * Definition: How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is
- * \"<\" , then the real value is < stated value
- *
- */
- public QuantityDt setComparator(QuantityCompararatorEnum theValue) {
- getComparator().setValueAsEnum(theValue);
- return this;
- }
-
- /**
- * Gets the value(s) for units (Unit representation). creating it if it does not exist. Will not return null.
- *
- *
- * Definition: A human-readable form of the units
- *
- */
- public StringDt getUnits() {
- if (myUnits == null) {
- myUnits = new StringDt();
- }
- return myUnits;
- }
-
- /**
- * Sets the value(s) for units (Unit representation)
- *
- *
- * Definition: A human-readable form of the units
- *
- */
- public QuantityDt setUnits(StringDt theValue) {
- myUnits = theValue;
- return this;
- }
-
- /**
- * Sets the value for units (Unit representation)
- *
- *
- * Definition: A human-readable form of the units
- *
- */
- public QuantityDt setUnits(String theString) {
- myUnits = new StringDt(theString);
- return this;
- }
-
- /**
- * Gets the value(s) for system (System that defines coded unit form). creating it if it does not exist. Will not return null.
- *
- *
- * Definition: The identification of the system that provides the coded form of the unit
- *
- */
- public UriDt getSystem() {
- if (mySystem == null) {
- mySystem = new UriDt();
- }
- return mySystem;
- }
-
- /**
- * Sets the value(s) for system (System that defines coded unit form)
- *
- *
- * Definition: The identification of the system that provides the coded form of the unit
- *
- */
- public QuantityDt setSystem(UriDt theValue) {
- mySystem = theValue;
- return this;
- }
-
- /**
- * Sets the value for system (System that defines coded unit form)
- *
- *
- * Definition: The identification of the system that provides the coded form of the unit
- *
- */
- public QuantityDt setSystem(String theUri) {
- mySystem = new UriDt(theUri);
- return this;
- }
-
- /**
- * Gets the value(s) for code (Coded form of the unit). creating it if it does not exist. Will not return null.
- *
- *
- * Definition: A computer processable form of the units in some unit representation system
- *
- */
- public CodeDt getCode() {
- if (myCode == null) {
- myCode = new CodeDt();
- }
- return myCode;
- }
-
- /**
- * Sets the value(s) for code (Coded form of the unit)
- *
- *
- * Definition: A computer processable form of the units in some unit representation system
- *
- */
- public QuantityDt setCode(CodeDt theValue) {
- myCode = theValue;
- return this;
- }
-
- /**
- * Sets the value for code (Coded form of the unit)
- *
- *
- * Definition: A computer processable form of the units in some unit representation system
- *
- */
- public QuantityDt setCode(String theCode) {
- myCode = new CodeDt(theCode);
- return this;
+ @SimpleSetter
+ public QuantityDt(@SimpleSetter.Parameter(name="theComparator") QuantityCompararatorEnum theComparator, @SimpleSetter.Parameter(name="theValue") long theValue, @SimpleSetter.Parameter(name="theSystem") String theSystem, @SimpleSetter.Parameter(name="theUnits") String theUnits) {
+ setValue(theValue);
+ setComparator(theComparator);
+ setSystem(theSystem);
+ setUnits(theUnits);
}
@Override
@@ -437,4 +186,298 @@ public class QuantityDt extends BaseElement implements ICompositeDatatype, IQuer
return null;
}
-}
+ @Child(name="value", type=DecimalDt.class, order=0, min=0, max=1)
+ @Description(
+ shortDefinition="Numerical value (with implicit precision)",
+ formalDefinition="The value of the measured amount. The value includes an implicit precision in the presentation of the value"
+ )
+ private DecimalDt myValue;
+
+ @Child(name="comparator", type=CodeDt.class, order=1, min=0, max=1)
+ @Description(
+ shortDefinition="< | <= | >= | > - how to understand the value",
+ formalDefinition="How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is \"<\" , then the real value is < stated value"
+ )
+ private BoundCodeDt myComparator;
+
+ @Child(name="units", type=StringDt.class, order=2, min=0, max=1)
+ @Description(
+ shortDefinition="Unit representation",
+ formalDefinition="A human-readable form of the units"
+ )
+ private StringDt myUnits;
+
+ @Child(name="system", type=UriDt.class, order=3, min=0, max=1)
+ @Description(
+ shortDefinition="System that defines coded unit form",
+ formalDefinition="The identification of the system that provides the coded form of the unit"
+ )
+ private UriDt mySystem;
+
+ @Child(name="code", type=CodeDt.class, order=4, min=0, max=1)
+ @Description(
+ shortDefinition="Coded form of the unit",
+ formalDefinition="A computer processable form of the units in some unit representation system"
+ )
+ private CodeDt myCode;
+
+
+ @Override
+ public boolean isEmpty() {
+ return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myValue, myComparator, myUnits, mySystem, myCode);
+ }
+
+ @Override
+ public List getAllPopulatedChildElementsOfType(Class theType) {
+ return ca.uhn.fhir.util.ElementUtil.allPopulatedChildElements(theType, myValue, myComparator, myUnits, mySystem, myCode);
+ }
+
+ /**
+ * Gets the value(s) for value (Numerical value (with implicit precision)).
+ * creating it if it does
+ * not exist. Will not return null.
+ *
+ *
+ * Definition:
+ * The value of the measured amount. The value includes an implicit precision in the presentation of the value
+ *
+ */
+ public DecimalDt getValue() {
+ if (myValue == null) {
+ myValue = new DecimalDt();
+ }
+ return myValue;
+ }
+
+ /**
+ * Sets the value(s) for value (Numerical value (with implicit precision))
+ *
+ *
+ * Definition:
+ * The value of the measured amount. The value includes an implicit precision in the presentation of the value
+ *
+ */
+ public QuantityDt setValue(DecimalDt theValue) {
+ myValue = theValue;
+ return this;
+ }
+
+ /**
+ * Sets the value for value (Numerical value (with implicit precision))
+ *
+ *
+ * Definition:
+ * The value of the measured amount. The value includes an implicit precision in the presentation of the value
+ *
+ */
+ public QuantityDt setValue( long theValue) {
+ myValue = new DecimalDt(theValue);
+ return this;
+ }
+
+ /**
+ * Sets the value for value (Numerical value (with implicit precision))
+ *
+ *
+ * Definition:
+ * The value of the measured amount. The value includes an implicit precision in the presentation of the value
+ *
+ */
+ public QuantityDt setValue( double theValue) {
+ myValue = new DecimalDt(theValue);
+ return this;
+ }
+
+ /**
+ * Sets the value for value (Numerical value (with implicit precision))
+ *
+ *
+ * Definition:
+ * The value of the measured amount. The value includes an implicit precision in the presentation of the value
+ *
+ */
+ public QuantityDt setValue( java.math.BigDecimal theValue) {
+ myValue = new DecimalDt(theValue);
+ return this;
+ }
+
+
+ /**
+ * Gets the value(s) for comparator (< | <= | >= | > - how to understand the value).
+ * creating it if it does
+ * not exist. Will not return null.
+ *
+ *
+ * Definition:
+ * How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is \"<\" , then the real value is < stated value
+ *
+ */
+ public BoundCodeDt getComparator() {
+ if (myComparator == null) {
+ myComparator = new BoundCodeDt(QuantityCompararatorEnum.VALUESET_BINDER);
+ }
+ return myComparator;
+ }
+
+ /**
+ * Sets the value(s) for comparator (< | <= | >= | > - how to understand the value)
+ *
+ *
+ * Definition:
+ * How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is \"<\" , then the real value is < stated value
+ *
+ */
+ public QuantityDt setComparator(BoundCodeDt theValue) {
+ myComparator = theValue;
+ return this;
+ }
+
+ /**
+ * Sets the value(s) for comparator (< | <= | >= | > - how to understand the value)
+ *
+ *
+ * Definition:
+ * How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is \"<\" , then the real value is < stated value
+ *
+ */
+ public QuantityDt setComparator(QuantityCompararatorEnum theValue) {
+ getComparator().setValueAsEnum(theValue);
+ return this;
+ }
+
+
+ /**
+ * Gets the value(s) for units (Unit representation).
+ * creating it if it does
+ * not exist. Will not return null.
+ *
+ *
+ * Definition:
+ * A human-readable form of the units
+ *
+ */
+ public StringDt getUnits() {
+ if (myUnits == null) {
+ myUnits = new StringDt();
+ }
+ return myUnits;
+ }
+
+ /**
+ * Sets the value(s) for units (Unit representation)
+ *
+ *
+ * Definition:
+ * A human-readable form of the units
+ *
+ */
+ public QuantityDt setUnits(StringDt theValue) {
+ myUnits = theValue;
+ return this;
+ }
+
+ /**
+ * Sets the value for units (Unit representation)
+ *
+ *
+ * Definition:
+ * A human-readable form of the units
+ *
+ */
+ public QuantityDt setUnits( String theString) {
+ myUnits = new StringDt(theString);
+ return this;
+ }
+
+
+ /**
+ * Gets the value(s) for system (System that defines coded unit form).
+ * creating it if it does
+ * not exist. Will not return null.
+ *
+ *
+ * Definition:
+ * The identification of the system that provides the coded form of the unit
+ *
+ */
+ public UriDt getSystem() {
+ if (mySystem == null) {
+ mySystem = new UriDt();
+ }
+ return mySystem;
+ }
+
+ /**
+ * Sets the value(s) for system (System that defines coded unit form)
+ *
+ *
+ * Definition:
+ * The identification of the system that provides the coded form of the unit
+ *
+ */
+ public QuantityDt setSystem(UriDt theValue) {
+ mySystem = theValue;
+ return this;
+ }
+
+ /**
+ * Sets the value for system (System that defines coded unit form)
+ *
+ *
+ * Definition:
+ * The identification of the system that provides the coded form of the unit
+ *
+ */
+ public QuantityDt setSystem( String theUri) {
+ mySystem = new UriDt(theUri);
+ return this;
+ }
+
+
+ /**
+ * Gets the value(s) for code (Coded form of the unit).
+ * creating it if it does
+ * not exist. Will not return null.
+ *
+ *
+ * Definition:
+ * A computer processable form of the units in some unit representation system
+ *
+ */
+ public CodeDt getCode() {
+ if (myCode == null) {
+ myCode = new CodeDt();
+ }
+ return myCode;
+ }
+
+ /**
+ * Sets the value(s) for code (Coded form of the unit)
+ *
+ *
+ * Definition:
+ * A computer processable form of the units in some unit representation system
+ *
+ */
+ public QuantityDt setCode(CodeDt theValue) {
+ myCode = theValue;
+ return this;
+ }
+
+ /**
+ * Sets the value for code (Coded form of the unit)
+ *
+ *
+ * Definition:
+ * A computer processable form of the units in some unit representation system
+ *
+ */
+ public QuantityDt setCode( String theCode) {
+ myCode = new CodeDt(theCode);
+ return this;
+ }
+
+
+
+
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/RangeDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/RangeDt.java
index 958bc73f38a..f2aebec2d03 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/RangeDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/RangeDt.java
@@ -16,29 +16,9 @@
package ca.uhn.fhir.model.dstu.composite;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.annotation.Child;
@@ -62,7 +42,7 @@ import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum;
*/
@DatatypeDef(name="RangeDt")
public class RangeDt
- extends BaseElement implements ICompositeDatatype {
+ extends BaseIdentifiableElement implements ICompositeDatatype {
/**
* Constructor
@@ -135,8 +115,21 @@ public class RangeDt
* The low limit. The boundary is inclusive.
*
*/
- public RangeDt setLow( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
- myLow = new QuantityDt(theComparator, theValue, theUnits);
+ public RangeDt setLow( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) {
+ myLow = new QuantityDt(theComparator, theValue, theSystem, theUnits);
+ return this;
+ }
+
+ /**
+ * Sets the value for low (Low limit)
+ *
+ *
+ * Definition:
+ * The low limit. The boundary is inclusive.
+ *
+ */
+ public RangeDt setLow( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) {
+ myLow = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
@@ -161,8 +154,8 @@ public class RangeDt
* The low limit. The boundary is inclusive.
*
*/
- public RangeDt setLow( long theValue) {
- myLow = new QuantityDt(theValue);
+ public RangeDt setLow( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
+ myLow = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
@@ -179,6 +172,19 @@ public class RangeDt
return this;
}
+ /**
+ * Sets the value for low (Low limit)
+ *
+ *
+ * Definition:
+ * The low limit. The boundary is inclusive.
+ *
+ */
+ public RangeDt setLow( long theValue) {
+ myLow = new QuantityDt(theValue);
+ return this;
+ }
+
/**
* Gets the value(s) for high (High limit).
@@ -218,8 +224,21 @@ public class RangeDt
* The high limit. The boundary is inclusive.
*
*/
- public RangeDt setHigh( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
- myHigh = new QuantityDt(theComparator, theValue, theUnits);
+ public RangeDt setHigh( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) {
+ myHigh = new QuantityDt(theComparator, theValue, theSystem, theUnits);
+ return this;
+ }
+
+ /**
+ * Sets the value for high (High limit)
+ *
+ *
+ * Definition:
+ * The high limit. The boundary is inclusive.
+ *
+ */
+ public RangeDt setHigh( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) {
+ myHigh = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
@@ -244,8 +263,8 @@ public class RangeDt
* The high limit. The boundary is inclusive.
*
*/
- public RangeDt setHigh( long theValue) {
- myHigh = new QuantityDt(theValue);
+ public RangeDt setHigh( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
+ myHigh = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
@@ -262,8 +281,20 @@ public class RangeDt
return this;
}
+ /**
+ * Sets the value for high (High limit)
+ *
+ *
+ * Definition:
+ * The high limit. The boundary is inclusive.
+ *
+ */
+ public RangeDt setHigh( long theValue) {
+ myHigh = new QuantityDt(theValue);
+ return this;
+ }
+
-
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/RatioDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/RatioDt.java
index 00d0f4bcd60..e9c884c6b19 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/RatioDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/RatioDt.java
@@ -16,29 +16,9 @@
package ca.uhn.fhir.model.dstu.composite;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.annotation.Child;
@@ -62,7 +42,7 @@ import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum;
*/
@DatatypeDef(name="RatioDt")
public class RatioDt
- extends BaseElement implements ICompositeDatatype {
+ extends BaseIdentifiableElement implements ICompositeDatatype {
/**
* Constructor
@@ -135,8 +115,21 @@ public class RatioDt
* The value of the numerator
*
*/
- public RatioDt setNumerator( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
- myNumerator = new QuantityDt(theComparator, theValue, theUnits);
+ public RatioDt setNumerator( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) {
+ myNumerator = new QuantityDt(theComparator, theValue, theSystem, theUnits);
+ return this;
+ }
+
+ /**
+ * Sets the value for numerator (Numerator value)
+ *
+ *
+ * Definition:
+ * The value of the numerator
+ *
+ */
+ public RatioDt setNumerator( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) {
+ myNumerator = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
@@ -161,8 +154,8 @@ public class RatioDt
* The value of the numerator
*
*/
- public RatioDt setNumerator( long theValue) {
- myNumerator = new QuantityDt(theValue);
+ public RatioDt setNumerator( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
+ myNumerator = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
@@ -179,6 +172,19 @@ public class RatioDt
return this;
}
+ /**
+ * Sets the value for numerator (Numerator value)
+ *
+ *
+ * Definition:
+ * The value of the numerator
+ *
+ */
+ public RatioDt setNumerator( long theValue) {
+ myNumerator = new QuantityDt(theValue);
+ return this;
+ }
+
/**
* Gets the value(s) for denominator (Denominator value).
@@ -218,8 +224,21 @@ public class RatioDt
* The value of the denominator
*
*/
- public RatioDt setDenominator( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
- myDenominator = new QuantityDt(theComparator, theValue, theUnits);
+ public RatioDt setDenominator( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) {
+ myDenominator = new QuantityDt(theComparator, theValue, theSystem, theUnits);
+ return this;
+ }
+
+ /**
+ * Sets the value for denominator (Denominator value)
+ *
+ *
+ * Definition:
+ * The value of the denominator
+ *
+ */
+ public RatioDt setDenominator( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) {
+ myDenominator = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
@@ -244,8 +263,8 @@ public class RatioDt
* The value of the denominator
*
*/
- public RatioDt setDenominator( long theValue) {
- myDenominator = new QuantityDt(theValue);
+ public RatioDt setDenominator( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
+ myDenominator = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
@@ -262,8 +281,20 @@ public class RatioDt
return this;
}
+ /**
+ * Sets the value for denominator (Denominator value)
+ *
+ *
+ * Definition:
+ * The value of the denominator
+ *
+ */
+ public RatioDt setDenominator( long theValue) {
+ myDenominator = new QuantityDt(theValue);
+ return this;
+ }
+
-
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ResourceReferenceDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ResourceReferenceDt.java
index 037935fdd2a..b698f6bf9e4 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ResourceReferenceDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ResourceReferenceDt.java
@@ -69,14 +69,6 @@ public class ResourceReferenceDt
super(theResource);
}
- @Override
- public String toString() {
- org.apache.commons.lang3.builder.ToStringBuilder b = new org.apache.commons.lang3.builder.ToStringBuilder(this, org.apache.commons.lang3.builder.ToStringStyle.SHORT_PREFIX_STYLE);
- b.append("reference", getReference().getValueAsString());
- b.append("loaded", getResource()!=null);
- return b.toString();
- }
-
/**
* Constructor which accepts a reference directly (this can be an ID, a partial/relative URL or a complete/absolute
* URL)
@@ -213,5 +205,13 @@ public class ResourceReferenceDt
+ @Override
+ public String toString() {
+ org.apache.commons.lang3.builder.ToStringBuilder b = new org.apache.commons.lang3.builder.ToStringBuilder(this, org.apache.commons.lang3.builder.ToStringStyle.SHORT_PREFIX_STYLE);
+ b.append("reference", getReference().getValueAsString());
+ b.append("loaded", getResource()!=null);
+ return b.toString();
+ }
+
}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/SampledDataDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/SampledDataDt.java
index 73791059ab7..f352524c409 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/SampledDataDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/SampledDataDt.java
@@ -16,29 +16,9 @@
package ca.uhn.fhir.model.dstu.composite;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.annotation.Child;
@@ -65,7 +45,7 @@ import ca.uhn.fhir.model.primitive.StringDt;
*/
@DatatypeDef(name="SampledDataDt")
public class SampledDataDt
- extends BaseElement implements ICompositeDatatype {
+ extends BaseIdentifiableElement implements ICompositeDatatype {
/**
* Constructor
@@ -173,8 +153,21 @@ public class SampledDataDt
* The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series
*
*/
- public SampledDataDt setOrigin( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
- myOrigin = new QuantityDt(theComparator, theValue, theUnits);
+ public SampledDataDt setOrigin( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) {
+ myOrigin = new QuantityDt(theComparator, theValue, theSystem, theUnits);
+ return this;
+ }
+
+ /**
+ * Sets the value for origin (Zero value and units)
+ *
+ *
+ * Definition:
+ * The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series
+ *
+ */
+ public SampledDataDt setOrigin( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) {
+ myOrigin = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
@@ -199,8 +192,8 @@ public class SampledDataDt
* The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series
*
*/
- public SampledDataDt setOrigin( long theValue) {
- myOrigin = new QuantityDt(theValue);
+ public SampledDataDt setOrigin( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
+ myOrigin = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
@@ -217,6 +210,19 @@ public class SampledDataDt
return this;
}
+ /**
+ * Sets the value for origin (Zero value and units)
+ *
+ *
+ * Definition:
+ * The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series
+ *
+ */
+ public SampledDataDt setOrigin( long theValue) {
+ myOrigin = new QuantityDt(theValue);
+ return this;
+ }
+
/**
* Gets the value(s) for period (Number of milliseconds between samples).
@@ -588,5 +594,4 @@ public class SampledDataDt
-
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ScheduleDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ScheduleDt.java
index d91842e2b9c..a27db3995df 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ScheduleDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ScheduleDt.java
@@ -16,30 +16,10 @@
package ca.uhn.fhir.model.dstu.composite;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResourceBlock;
@@ -72,7 +52,7 @@ import ca.uhn.fhir.model.primitive.IntegerDt;
*/
@DatatypeDef(name="ScheduleDt")
public class ScheduleDt
- extends BaseElement implements ICompositeDatatype {
+ extends BaseIdentifiableElement implements ICompositeDatatype {
/**
* Constructor
@@ -207,7 +187,7 @@ public class ScheduleDt
*
*/
@Block()
- public static class Repeat extends BaseElement implements IResourceBlock {
+ public static class Repeat extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="frequency", type=IntegerDt.class, order=0, min=0, max=1)
@Description(
@@ -546,8 +526,8 @@ public class ScheduleDt
* When to stop repeating the schedule
*
*/
- public Repeat setEnd( Date theDate, TemporalPrecisionEnum thePrecision) {
- myEnd = new DateTimeDt(theDate, thePrecision);
+ public Repeat setEndWithSecondsPrecision( Date theDate) {
+ myEnd = new DateTimeDt(theDate);
return this;
}
@@ -559,8 +539,8 @@ public class ScheduleDt
* When to stop repeating the schedule
*
*/
- public Repeat setEndWithSecondsPrecision( Date theDate) {
- myEnd = new DateTimeDt(theDate);
+ public Repeat setEnd( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myEnd = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -571,5 +551,4 @@ public class ScheduleDt
-
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/AdverseReaction.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/AdverseReaction.java
index 62113091ec9..2feb106c421 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/AdverseReaction.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/AdverseReaction.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -384,8 +364,8 @@ public class AdverseReaction extends BaseResource implements IResource {
* The date (and possibly time) when the reaction began
*
*/
- public AdverseReaction setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myDate = new DateTimeDt(theDate, thePrecision);
+ public AdverseReaction setDateWithSecondsPrecision( Date theDate) {
+ myDate = new DateTimeDt(theDate);
return this;
}
@@ -397,8 +377,8 @@ public class AdverseReaction extends BaseResource implements IResource {
* The date (and possibly time) when the reaction began
*
*/
- public AdverseReaction setDateWithSecondsPrecision( Date theDate) {
- myDate = new DateTimeDt(theDate);
+ public AdverseReaction setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myDate = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -489,6 +469,9 @@ public class AdverseReaction extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getRecorder() {
+ if (myRecorder == null) {
+ myRecorder = new ResourceReferenceDt();
+ }
return myRecorder;
}
@@ -635,7 +618,7 @@ public class AdverseReaction extends BaseResource implements IResource {
*
*/
@Block()
- public static class Symptom extends BaseElement implements IResourceBlock {
+ public static class Symptom extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="code", type=CodeableConceptDt.class, order=0, min=1, max=1)
@Description(
@@ -750,7 +733,7 @@ public class AdverseReaction extends BaseResource implements IResource {
*
*/
@Block()
- public static class Exposure extends BaseElement implements IResourceBlock {
+ public static class Exposure extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="date", type=DateTimeDt.class, order=0, min=0, max=1)
@Description(
@@ -830,8 +813,8 @@ public class AdverseReaction extends BaseResource implements IResource {
* Identifies the initial date of the exposure that is suspected to be related to the reaction
*
*/
- public Exposure setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myDate = new DateTimeDt(theDate, thePrecision);
+ public Exposure setDateWithSecondsPrecision( Date theDate) {
+ myDate = new DateTimeDt(theDate);
return this;
}
@@ -843,8 +826,8 @@ public class AdverseReaction extends BaseResource implements IResource {
* Identifies the initial date of the exposure that is suspected to be related to the reaction
*
*/
- public Exposure setDateWithSecondsPrecision( Date theDate) {
- myDate = new DateTimeDt(theDate);
+ public Exposure setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myDate = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -974,4 +957,4 @@ public class AdverseReaction extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Alert.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Alert.java
index 3f37ea9ad2f..e4f05a0433e 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Alert.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Alert.java
@@ -16,26 +16,6 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.List;
@@ -377,6 +357,9 @@ public class Alert extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getAuthor() {
+ if (myAuthor == null) {
+ myAuthor = new ResourceReferenceDt();
+ }
return myAuthor;
}
@@ -440,4 +423,4 @@ public class Alert extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/AllergyIntolerance.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/AllergyIntolerance.java
index b9b57f87917..3810d2d711d 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/AllergyIntolerance.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/AllergyIntolerance.java
@@ -16,26 +16,6 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
@@ -539,8 +519,8 @@ public class AllergyIntolerance extends BaseResource implements IResource {
* Date when the sensitivity was recorded
*
*/
- public AllergyIntolerance setRecordedDate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myRecordedDate = new DateTimeDt(theDate, thePrecision);
+ public AllergyIntolerance setRecordedDateWithSecondsPrecision( Date theDate) {
+ myRecordedDate = new DateTimeDt(theDate);
return this;
}
@@ -552,8 +532,8 @@ public class AllergyIntolerance extends BaseResource implements IResource {
* Date when the sensitivity was recorded
*
*/
- public AllergyIntolerance setRecordedDateWithSecondsPrecision( Date theDate) {
- myRecordedDate = new DateTimeDt(theDate);
+ public AllergyIntolerance setRecordedDate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myRecordedDate = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -644,6 +624,9 @@ public class AllergyIntolerance extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getRecorder() {
+ if (myRecorder == null) {
+ myRecorder = new ResourceReferenceDt();
+ }
return myRecorder;
}
@@ -782,4 +765,4 @@ public class AllergyIntolerance extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Appointment.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Appointment.java
index f94a30e1bc0..079ab23bef7 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Appointment.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Appointment.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -65,7 +45,6 @@ import ca.uhn.fhir.model.primitive.InstantDt;
import ca.uhn.fhir.model.primitive.IntegerDt;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.rest.gclient.DateParam;
-import ca.uhn.fhir.rest.gclient.NumberParam;
import ca.uhn.fhir.rest.gclient.ReferenceParam;
import ca.uhn.fhir.rest.gclient.StringParam;
import ca.uhn.fhir.rest.gclient.TokenParam;
@@ -163,27 +142,6 @@ public class Appointment extends BaseResource implements IResource {
*/
public static final Include INCLUDE_PARTICIPANT_INDIVIDUAL = new Include("Appointment.participant.individual");
- /**
- * Search parameter constant for !duration
- *
- * Description: The number of minutes that the appointment is to go for
- * Type: number
- * Path: Appointment.minutesDuration
- *
- */
- @SearchParamDefinition(name="!duration", path="Appointment.minutesDuration", description="The number of minutes that the appointment is to go for", type="number")
- public static final String SP_DURATION = "!duration";
-
- /**
- * Fluent Client search parameter constant for !duration
- *
- * Description: The number of minutes that the appointment is to go for
- * Type: number
- * Path: Appointment.minutesDuration
- *
- */
- public static final NumberParam DURATION = new NumberParam(SP_DURATION);
-
/**
* Search parameter constant for partstatus
*
@@ -592,8 +550,8 @@ public class Appointment extends BaseResource implements IResource {
*
*
*/
- public Appointment setStartWithMillisPrecision( Date theDate) {
- myStart = new InstantDt(theDate);
+ public Appointment setStart( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myStart = new InstantDt(theDate, thePrecision);
return this;
}
@@ -605,8 +563,8 @@ public class Appointment extends BaseResource implements IResource {
*
*
*/
- public Appointment setStart( Date theDate, TemporalPrecisionEnum thePrecision) {
- myStart = new InstantDt(theDate, thePrecision);
+ public Appointment setStartWithMillisPrecision( Date theDate) {
+ myStart = new InstantDt(theDate);
return this;
}
@@ -649,8 +607,8 @@ public class Appointment extends BaseResource implements IResource {
*
*
*/
- public Appointment setEndWithMillisPrecision( Date theDate) {
- myEnd = new InstantDt(theDate);
+ public Appointment setEnd( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myEnd = new InstantDt(theDate, thePrecision);
return this;
}
@@ -662,8 +620,8 @@ public class Appointment extends BaseResource implements IResource {
*
*
*/
- public Appointment setEnd( Date theDate, TemporalPrecisionEnum thePrecision) {
- myEnd = new InstantDt(theDate, thePrecision);
+ public Appointment setEndWithMillisPrecision( Date theDate) {
+ myEnd = new InstantDt(theDate);
return this;
}
@@ -964,6 +922,9 @@ public class Appointment extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getRecorder() {
+ if (myRecorder == null) {
+ myRecorder = new ResourceReferenceDt();
+ }
return myRecorder;
}
@@ -1019,8 +980,8 @@ public class Appointment extends BaseResource implements IResource {
*
*
*/
- public Appointment setRecordedDate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myRecordedDate = new DateTimeDt(theDate, thePrecision);
+ public Appointment setRecordedDateWithSecondsPrecision( Date theDate) {
+ myRecordedDate = new DateTimeDt(theDate);
return this;
}
@@ -1032,8 +993,8 @@ public class Appointment extends BaseResource implements IResource {
*
*
*/
- public Appointment setRecordedDateWithSecondsPrecision( Date theDate) {
- myRecordedDate = new DateTimeDt(theDate);
+ public Appointment setRecordedDate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myRecordedDate = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -1047,7 +1008,7 @@ public class Appointment extends BaseResource implements IResource {
*
*/
@Block()
- public static class Participant extends BaseElement implements IResourceBlock {
+ public static class Participant extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="type", type=CodeableConceptDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
@@ -1127,6 +1088,23 @@ public class Appointment extends BaseResource implements IResource {
return this;
}
+ /**
+ * Add a value for type (Role of participant in the appointment) using an enumerated type. This
+ * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
+ * or contain the desirable codes. If you wish to use codes other than those which are built-in,
+ * you may also use the {@link #addType()} method.
+ *
+ *
+ * Definition:
+ *
+ *
+ */
+ public BoundCodeableConceptDt addType(ParticipantTypeEnum theValue) {
+ BoundCodeableConceptDt retVal = new BoundCodeableConceptDt(ParticipantTypeEnum.VALUESET_BINDER, theValue);
+ getType().add(retVal);
+ return retVal;
+ }
+
/**
* Add a value for type (Role of participant in the appointment)
*
@@ -1135,8 +1113,10 @@ public class Appointment extends BaseResource implements IResource {
*
*
*/
- public void addType(ParticipantTypeEnum theValue) {
- getType().add(new BoundCodeableConceptDt(ParticipantTypeEnum.VALUESET_BINDER, theValue));
+ public BoundCodeableConceptDt addType() {
+ BoundCodeableConceptDt retVal = new BoundCodeableConceptDt(ParticipantTypeEnum.VALUESET_BINDER);
+ getType().add(retVal);
+ return retVal;
}
/**
@@ -1165,6 +1145,9 @@ public class Appointment extends BaseResource implements IResource {
*
*/
public java.util.List getIndividual() {
+ if (myIndividual == null) {
+ myIndividual = new java.util.ArrayList();
+ }
return myIndividual;
}
@@ -1333,4 +1316,4 @@ public class Appointment extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/AppointmentResponse.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/AppointmentResponse.java
index 9bf7aaea81a..b426b159ade 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/AppointmentResponse.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/AppointmentResponse.java
@@ -16,26 +16,6 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
@@ -418,6 +398,23 @@ public class AppointmentResponse extends BaseResource implements IResource {
return this;
}
+ /**
+ * Add a value for participantType (Role of participant in the appointment) using an enumerated type. This
+ * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
+ * or contain the desirable codes. If you wish to use codes other than those which are built-in,
+ * you may also use the {@link #addType()} method.
+ *
+ *
+ * Definition:
+ *
+ *
+ */
+ public BoundCodeableConceptDt addParticipantType(ParticipantTypeEnum theValue) {
+ BoundCodeableConceptDt retVal = new BoundCodeableConceptDt(ParticipantTypeEnum.VALUESET_BINDER, theValue);
+ getParticipantType().add(retVal);
+ return retVal;
+ }
+
/**
* Add a value for participantType (Role of participant in the appointment)
*
@@ -426,8 +423,10 @@ public class AppointmentResponse extends BaseResource implements IResource {
*
*
*/
- public void addParticipantType(ParticipantTypeEnum theValue) {
- getParticipantType().add(new BoundCodeableConceptDt(ParticipantTypeEnum.VALUESET_BINDER, theValue));
+ public BoundCodeableConceptDt addParticipantType() {
+ BoundCodeableConceptDt retVal = new BoundCodeableConceptDt(ParticipantTypeEnum.VALUESET_BINDER);
+ getParticipantType().add(retVal);
+ return retVal;
}
/**
@@ -456,6 +455,9 @@ public class AppointmentResponse extends BaseResource implements IResource {
*
*/
public java.util.List getIndividual() {
+ if (myIndividual == null) {
+ myIndividual = new java.util.ArrayList();
+ }
return myIndividual;
}
@@ -612,8 +614,8 @@ public class AppointmentResponse extends BaseResource implements IResource {
*
*
*/
- public AppointmentResponse setStartWithMillisPrecision( Date theDate) {
- myStart = new InstantDt(theDate);
+ public AppointmentResponse setStart( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myStart = new InstantDt(theDate, thePrecision);
return this;
}
@@ -625,8 +627,8 @@ public class AppointmentResponse extends BaseResource implements IResource {
*
*
*/
- public AppointmentResponse setStart( Date theDate, TemporalPrecisionEnum thePrecision) {
- myStart = new InstantDt(theDate, thePrecision);
+ public AppointmentResponse setStartWithMillisPrecision( Date theDate) {
+ myStart = new InstantDt(theDate);
return this;
}
@@ -669,8 +671,8 @@ public class AppointmentResponse extends BaseResource implements IResource {
*
*
*/
- public AppointmentResponse setEndWithMillisPrecision( Date theDate) {
- myEnd = new InstantDt(theDate);
+ public AppointmentResponse setEnd( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myEnd = new InstantDt(theDate, thePrecision);
return this;
}
@@ -682,8 +684,8 @@ public class AppointmentResponse extends BaseResource implements IResource {
*
*
*/
- public AppointmentResponse setEnd( Date theDate, TemporalPrecisionEnum thePrecision) {
- myEnd = new InstantDt(theDate, thePrecision);
+ public AppointmentResponse setEndWithMillisPrecision( Date theDate) {
+ myEnd = new InstantDt(theDate);
return this;
}
@@ -774,6 +776,9 @@ public class AppointmentResponse extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getRecorder() {
+ if (myRecorder == null) {
+ myRecorder = new ResourceReferenceDt();
+ }
return myRecorder;
}
@@ -829,8 +834,8 @@ public class AppointmentResponse extends BaseResource implements IResource {
*
*
*/
- public AppointmentResponse setRecordedDate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myRecordedDate = new DateTimeDt(theDate, thePrecision);
+ public AppointmentResponse setRecordedDateWithSecondsPrecision( Date theDate) {
+ myRecordedDate = new DateTimeDt(theDate);
return this;
}
@@ -842,12 +847,12 @@ public class AppointmentResponse extends BaseResource implements IResource {
*
*
*/
- public AppointmentResponse setRecordedDateWithSecondsPrecision( Date theDate) {
- myRecordedDate = new DateTimeDt(theDate);
+ public AppointmentResponse setRecordedDate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myRecordedDate = new DateTimeDt(theDate, thePrecision);
return this;
}
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Availability.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Availability.java
index 57808779ccd..3261d76e0d5 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Availability.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Availability.java
@@ -16,26 +16,6 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
@@ -56,7 +36,6 @@ import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.primitive.DateTimeDt;
import ca.uhn.fhir.model.primitive.StringDt;
-import ca.uhn.fhir.rest.gclient.DateParam;
import ca.uhn.fhir.rest.gclient.ReferenceParam;
import ca.uhn.fhir.rest.gclient.TokenParam;
@@ -84,27 +63,6 @@ import ca.uhn.fhir.rest.gclient.TokenParam;
@ResourceDef(name="Availability", profile="http://hl7.org/fhir/profiles/Availability", id="availability")
public class Availability extends BaseResource implements IResource {
- /**
- * Search parameter constant for !period
- *
- */
- public static final DateParam PERIOD = new DateParam(SP_PERIOD);
-
/**
* Search parameter constant for individual
*
@@ -354,6 +312,9 @@ public class Availability extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getIndividual() {
+ if (myIndividual == null) {
+ myIndividual = new ResourceReferenceDt();
+ }
return myIndividual;
}
@@ -457,6 +418,9 @@ public class Availability extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getAuthor() {
+ if (myAuthor == null) {
+ myAuthor = new ResourceReferenceDt();
+ }
return myAuthor;
}
@@ -512,8 +476,8 @@ public class Availability extends BaseResource implements IResource {
*
*
*/
- public Availability setAuthorDate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myAuthorDate = new DateTimeDt(theDate, thePrecision);
+ public Availability setAuthorDateWithSecondsPrecision( Date theDate) {
+ myAuthorDate = new DateTimeDt(theDate);
return this;
}
@@ -525,12 +489,12 @@ public class Availability extends BaseResource implements IResource {
*
*
*/
- public Availability setAuthorDateWithSecondsPrecision( Date theDate) {
- myAuthorDate = new DateTimeDt(theDate);
+ public Availability setAuthorDate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myAuthorDate = new DateTimeDt(theDate, thePrecision);
return this;
}
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Binary.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Binary.java
index cc5eb54b3be..25d7a59ff2f 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Binary.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Binary.java
@@ -29,7 +29,6 @@ import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
-import ca.uhn.fhir.model.dstu.composite.NarrativeDt;
import ca.uhn.fhir.model.primitive.Base64BinaryDt;
@ResourceDef(name = "Binary", profile = "http://hl7.org/fhir/profiles/Binary", id = "binary")
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/CarePlan.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/CarePlan.java
index 0a9aef043c4..1dcb3023f25 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/CarePlan.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/CarePlan.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IDatatype;
import ca.uhn.fhir.model.api.IElement;
@@ -594,8 +574,8 @@ public class CarePlan extends BaseResource implements IResource {
* Identifies the most recent date on which the plan has been revised.
*
*/
- public CarePlan setModified( Date theDate, TemporalPrecisionEnum thePrecision) {
- myModified = new DateTimeDt(theDate, thePrecision);
+ public CarePlan setModifiedWithSecondsPrecision( Date theDate) {
+ myModified = new DateTimeDt(theDate);
return this;
}
@@ -607,8 +587,8 @@ public class CarePlan extends BaseResource implements IResource {
* Identifies the most recent date on which the plan has been revised.
*
*/
- public CarePlan setModifiedWithSecondsPrecision( Date theDate) {
- myModified = new DateTimeDt(theDate);
+ public CarePlan setModified( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myModified = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -890,7 +870,7 @@ public class CarePlan extends BaseResource implements IResource {
*
*/
@Block()
- public static class Participant extends BaseElement implements IResourceBlock {
+ public static class Participant extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="role", type=CodeableConceptDt.class, order=0, min=0, max=1)
@Description(
@@ -960,6 +940,9 @@ public class CarePlan extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getMember() {
+ if (myMember == null) {
+ myMember = new ResourceReferenceDt();
+ }
return myMember;
}
@@ -990,7 +973,7 @@ public class CarePlan extends BaseResource implements IResource {
*
*/
@Block()
- public static class Goal extends BaseElement implements IResourceBlock {
+ public static class Goal extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="description", type=StringDt.class, order=0, min=1, max=1)
@Description(
@@ -1221,7 +1204,7 @@ public class CarePlan extends BaseResource implements IResource {
*
*/
@Block()
- public static class Activity extends BaseElement implements IResourceBlock {
+ public static class Activity extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="goal", type=IdrefDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
@@ -1532,6 +1515,9 @@ public class CarePlan extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getDetail() {
+ if (myDetail == null) {
+ myDetail = new ResourceReferenceDt();
+ }
return myDetail;
}
@@ -1592,7 +1578,7 @@ public class CarePlan extends BaseResource implements IResource {
*
*/
@Block()
- public static class ActivitySimple extends BaseElement implements IResourceBlock {
+ public static class ActivitySimple extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="category", type=CodeDt.class, order=0, min=1, max=1)
@Description(
@@ -1817,6 +1803,9 @@ public class CarePlan extends BaseResource implements IResource {
*
*/
public java.util.List getPerformer() {
+ if (myPerformer == null) {
+ myPerformer = new java.util.ArrayList();
+ }
return myPerformer;
}
@@ -1858,6 +1847,9 @@ public class CarePlan extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getProduct() {
+ if (myProduct == null) {
+ myProduct = new ResourceReferenceDt();
+ }
return myProduct;
}
@@ -1913,8 +1905,21 @@ public class CarePlan extends BaseResource implements IResource {
* Identifies the quantity expected to be consumed in a given day.
*
*/
- public ActivitySimple setDailyAmount( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
- myDailyAmount = new QuantityDt(theComparator, theValue, theUnits);
+ public ActivitySimple setDailyAmount( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) {
+ myDailyAmount = new QuantityDt(theComparator, theValue, theSystem, theUnits);
+ return this;
+ }
+
+ /**
+ * Sets the value for dailyAmount (How much consumed/day?)
+ *
+ *
+ * Definition:
+ * Identifies the quantity expected to be consumed in a given day.
+ *
+ */
+ public ActivitySimple setDailyAmount( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) {
+ myDailyAmount = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
@@ -1939,8 +1944,8 @@ public class CarePlan extends BaseResource implements IResource {
* Identifies the quantity expected to be consumed in a given day.
*
*/
- public ActivitySimple setDailyAmount( long theValue) {
- myDailyAmount = new QuantityDt(theValue);
+ public ActivitySimple setDailyAmount( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
+ myDailyAmount = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
@@ -1957,6 +1962,19 @@ public class CarePlan extends BaseResource implements IResource {
return this;
}
+ /**
+ * Sets the value for dailyAmount (How much consumed/day?)
+ *
+ *
+ * Definition:
+ * Identifies the quantity expected to be consumed in a given day.
+ *
+ */
+ public ActivitySimple setDailyAmount( long theValue) {
+ myDailyAmount = new QuantityDt(theValue);
+ return this;
+ }
+
/**
* Gets the value(s) for quantity (How much is administered/supplied/consumed).
@@ -1996,8 +2014,21 @@ public class CarePlan extends BaseResource implements IResource {
* Identifies the quantity expected to be supplied.
*
*/
- public ActivitySimple setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
- myQuantity = new QuantityDt(theComparator, theValue, theUnits);
+ public ActivitySimple setQuantity( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) {
+ myQuantity = new QuantityDt(theComparator, theValue, theSystem, theUnits);
+ return this;
+ }
+
+ /**
+ * Sets the value for quantity (How much is administered/supplied/consumed)
+ *
+ *
+ * Definition:
+ * Identifies the quantity expected to be supplied.
+ *
+ */
+ public ActivitySimple setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) {
+ myQuantity = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
@@ -2022,8 +2053,8 @@ public class CarePlan extends BaseResource implements IResource {
* Identifies the quantity expected to be supplied.
*
*/
- public ActivitySimple setQuantity( long theValue) {
- myQuantity = new QuantityDt(theValue);
+ public ActivitySimple setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
+ myQuantity = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
@@ -2040,6 +2071,19 @@ public class CarePlan extends BaseResource implements IResource {
return this;
}
+ /**
+ * Sets the value for quantity (How much is administered/supplied/consumed)
+ *
+ *
+ * Definition:
+ * Identifies the quantity expected to be supplied.
+ *
+ */
+ public ActivitySimple setQuantity( long theValue) {
+ myQuantity = new QuantityDt(theValue);
+ return this;
+ }
+
/**
* Gets the value(s) for details (Extra info on activity occurrence).
@@ -2092,4 +2136,4 @@ public class CarePlan extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Claim.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Claim.java
index 3b5eaa4cb63..f54c9e742b3 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Claim.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Claim.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -304,8 +284,8 @@ public class Claim extends BaseResource implements IResource {
* The date when the enclosed suite of services were performed or completed
*
*/
- public Claim setServicedate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myServicedate = new DateDt(theDate, thePrecision);
+ public Claim setServicedateWithDayPrecision( Date theDate) {
+ myServicedate = new DateDt(theDate);
return this;
}
@@ -317,8 +297,8 @@ public class Claim extends BaseResource implements IResource {
* The date when the enclosed suite of services were performed or completed
*
*/
- public Claim setServicedateWithDayPrecision( Date theDate) {
- myServicedate = new DateDt(theDate);
+ public Claim setServicedate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myServicedate = new DateDt(theDate, thePrecision);
return this;
}
@@ -684,7 +664,7 @@ public class Claim extends BaseResource implements IResource {
*
*/
@Block()
- public static class Patient extends BaseElement implements IResourceBlock {
+ public static class Patient extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="name", type=HumanNameDt.class, order=0, min=0, max=1)
@Description(
@@ -825,8 +805,8 @@ public class Claim extends BaseResource implements IResource {
* The date of birth of the PolicyHolder
*
*/
- public Patient setBirthdate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myBirthdate = new DateDt(theDate, thePrecision);
+ public Patient setBirthdateWithDayPrecision( Date theDate) {
+ myBirthdate = new DateDt(theDate);
return this;
}
@@ -838,8 +818,8 @@ public class Claim extends BaseResource implements IResource {
* The date of birth of the PolicyHolder
*
*/
- public Patient setBirthdateWithDayPrecision( Date theDate) {
- myBirthdate = new DateDt(theDate);
+ public Patient setBirthdate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myBirthdate = new DateDt(theDate, thePrecision);
return this;
}
@@ -888,7 +868,7 @@ public class Claim extends BaseResource implements IResource {
*
*/
@Block()
- public static class Coverage extends BaseElement implements IResourceBlock {
+ public static class Coverage extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="issuer", order=0, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Organization.class })
@@ -1424,7 +1404,7 @@ public class Claim extends BaseResource implements IResource {
*
*/
@Block()
- public static class CoverageSubscriber extends BaseElement implements IResourceBlock {
+ public static class CoverageSubscriber extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="name", type=HumanNameDt.class, order=0, min=0, max=1)
@Description(
@@ -1558,8 +1538,8 @@ public class Claim extends BaseResource implements IResource {
* The date of birth of the PolicyHolder
*
*/
- public CoverageSubscriber setBirthdate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myBirthdate = new DateDt(theDate, thePrecision);
+ public CoverageSubscriber setBirthdateWithDayPrecision( Date theDate) {
+ myBirthdate = new DateDt(theDate);
return this;
}
@@ -1571,8 +1551,8 @@ public class Claim extends BaseResource implements IResource {
* The date of birth of the PolicyHolder
*
*/
- public CoverageSubscriber setBirthdateWithDayPrecision( Date theDate) {
- myBirthdate = new DateDt(theDate);
+ public CoverageSubscriber setBirthdate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myBirthdate = new DateDt(theDate, thePrecision);
return this;
}
@@ -1591,7 +1571,7 @@ public class Claim extends BaseResource implements IResource {
*
*/
@Block()
- public static class Service extends BaseElement implements IResourceBlock {
+ public static class Service extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="service", type=CodeableConceptDt.class, order=0, min=1, max=1)
@Description(
@@ -1896,7 +1876,7 @@ public class Claim extends BaseResource implements IResource {
*
*/
@Block()
- public static class ServiceLab extends BaseElement implements IResourceBlock {
+ public static class ServiceLab extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="service", type=CodeableConceptDt.class, order=0, min=1, max=1)
@Description(
@@ -2031,4 +2011,4 @@ public class Claim extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Composition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Composition.java
index e8161fcd816..5c89f0d681d 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Composition.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Composition.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -535,8 +515,8 @@ public class Composition extends BaseResource implements IResource {
* The composition editing time, when the composition was last logically changed by the author
*
*/
- public Composition setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myDate = new DateTimeDt(theDate, thePrecision);
+ public Composition setDateWithSecondsPrecision( Date theDate) {
+ myDate = new DateTimeDt(theDate);
return this;
}
@@ -548,8 +528,8 @@ public class Composition extends BaseResource implements IResource {
* The composition editing time, when the composition was last logically changed by the author
*
*/
- public Composition setDateWithSecondsPrecision( Date theDate) {
- myDate = new DateTimeDt(theDate);
+ public Composition setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myDate = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -746,6 +726,9 @@ public class Composition extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getSubject() {
+ if (mySubject == null) {
+ mySubject = new ResourceReferenceDt();
+ }
return mySubject;
}
@@ -774,6 +757,9 @@ public class Composition extends BaseResource implements IResource {
*
*/
public java.util.List getAuthor() {
+ if (myAuthor == null) {
+ myAuthor = new java.util.ArrayList();
+ }
return myAuthor;
}
@@ -1026,7 +1012,7 @@ public class Composition extends BaseResource implements IResource {
*
*/
@Block()
- public static class Attester extends BaseElement implements IResourceBlock {
+ public static class Attester extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="mode", type=CodeDt.class, order=0, min=1, max=Child.MAX_UNLIMITED)
@Description(
@@ -1091,6 +1077,23 @@ public class Composition extends BaseResource implements IResource {
return this;
}
+ /**
+ * Add a value for mode (personal | professional | legal | official) using an enumerated type. This
+ * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
+ * or contain the desirable codes. If you wish to use codes other than those which are built-in,
+ * you may also use the {@link #addType()} method.
+ *
+ *
+ * Definition:
+ * The type of attestation the authenticator offers
+ *
+ */
+ public BoundCodeDt addMode(CompositionAttestationModeEnum theValue) {
+ BoundCodeDt retVal = new BoundCodeDt(CompositionAttestationModeEnum.VALUESET_BINDER, theValue);
+ getMode().add(retVal);
+ return retVal;
+ }
+
/**
* Add a value for mode (personal | professional | legal | official)
*
@@ -1099,8 +1102,10 @@ public class Composition extends BaseResource implements IResource {
* The type of attestation the authenticator offers
*
*/
- public void addMode(CompositionAttestationModeEnum theValue) {
- getMode().add(new BoundCodeDt(CompositionAttestationModeEnum.VALUESET_BINDER, theValue));
+ public BoundCodeDt addMode() {
+ BoundCodeDt retVal = new BoundCodeDt(CompositionAttestationModeEnum.VALUESET_BINDER);
+ getMode().add(retVal);
+ return retVal;
}
/**
@@ -1156,8 +1161,8 @@ public class Composition extends BaseResource implements IResource {
* When composition was attested by the party
*
*/
- public Attester setTime( Date theDate, TemporalPrecisionEnum thePrecision) {
- myTime = new DateTimeDt(theDate, thePrecision);
+ public Attester setTimeWithSecondsPrecision( Date theDate) {
+ myTime = new DateTimeDt(theDate);
return this;
}
@@ -1169,8 +1174,8 @@ public class Composition extends BaseResource implements IResource {
* When composition was attested by the party
*
*/
- public Attester setTimeWithSecondsPrecision( Date theDate) {
- myTime = new DateTimeDt(theDate);
+ public Attester setTime( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myTime = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -1186,6 +1191,9 @@ public class Composition extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getParty() {
+ if (myParty == null) {
+ myParty = new ResourceReferenceDt();
+ }
return myParty;
}
@@ -1216,7 +1224,7 @@ public class Composition extends BaseResource implements IResource {
*
*/
@Block()
- public static class Event extends BaseElement implements IResourceBlock {
+ public static class Event extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="code", type=CodeableConceptDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
@@ -1399,7 +1407,7 @@ public class Composition extends BaseResource implements IResource {
*
*/
@Block()
- public static class Section extends BaseElement implements IResourceBlock {
+ public static class Section extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="title", type=StringDt.class, order=0, min=0, max=1)
@Description(
@@ -1535,6 +1543,9 @@ public class Composition extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getSubject() {
+ if (mySubject == null) {
+ mySubject = new ResourceReferenceDt();
+ }
return mySubject;
}
@@ -1649,4 +1660,4 @@ public class Composition extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/ConceptMap.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/ConceptMap.java
index 20e57e5eb60..a17d2b56263 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/ConceptMap.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/ConceptMap.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -55,6 +35,7 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.ContactDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.ConceptMapEquivalenceEnum;
+import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum;
import ca.uhn.fhir.model.dstu.valueset.ValueSetStatusEnum;
import ca.uhn.fhir.model.primitive.BooleanDt;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
@@ -695,7 +676,43 @@ public class ConceptMap extends BaseResource implements IResource {
}
return getTelecom().get(0);
}
-
+ /**
+ * Adds a new value for telecom (Contact information of the publisher)
+ *
+ *
+ * Definition:
+ * Contacts of the publisher to assist a user in finding and communicating with the publisher
+ *
+ *
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public ConceptMap addTelecom( ContactUseEnum theContactUse, String theValue) {
+ if (myTelecom == null) {
+ myTelecom = new java.util.ArrayList();
+ }
+ myTelecom.add(new ContactDt(theContactUse, theValue));
+ return this;
+ }
+
+ /**
+ * Adds a new value for telecom (Contact information of the publisher)
+ *
+ *
+ * Definition:
+ * Contacts of the publisher to assist a user in finding and communicating with the publisher
+ *
+ *
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public ConceptMap addTelecom( String theValue) {
+ if (myTelecom == null) {
+ myTelecom = new java.util.ArrayList();
+ }
+ myTelecom.add(new ContactDt(theValue));
+ return this;
+ }
+
+
/**
* Gets the value(s) for description (Human language description of the concept map).
* creating it if it does
@@ -910,8 +927,8 @@ public class ConceptMap extends BaseResource implements IResource {
* The date that the concept map status was last changed
*
*/
- public ConceptMap setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myDate = new DateTimeDt(theDate, thePrecision);
+ public ConceptMap setDateWithSecondsPrecision( Date theDate) {
+ myDate = new DateTimeDt(theDate);
return this;
}
@@ -923,8 +940,8 @@ public class ConceptMap extends BaseResource implements IResource {
* The date that the concept map status was last changed
*
*/
- public ConceptMap setDateWithSecondsPrecision( Date theDate) {
- myDate = new DateTimeDt(theDate);
+ public ConceptMap setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myDate = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -1060,7 +1077,7 @@ public class ConceptMap extends BaseResource implements IResource {
*
*/
@Block()
- public static class Concept extends BaseElement implements IResourceBlock {
+ public static class Concept extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="system", type=UriDt.class, order=0, min=1, max=1)
@Description(
@@ -1321,7 +1338,7 @@ public class ConceptMap extends BaseResource implements IResource {
*
*/
@Block()
- public static class ConceptDependsOn extends BaseElement implements IResourceBlock {
+ public static class ConceptDependsOn extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="concept", type=UriDt.class, order=0, min=1, max=1)
@Description(
@@ -1500,7 +1517,7 @@ public class ConceptMap extends BaseResource implements IResource {
*
*/
@Block()
- public static class ConceptMap2 extends BaseElement implements IResourceBlock {
+ public static class ConceptMap2 extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="system", type=UriDt.class, order=0, min=0, max=1)
@Description(
@@ -1791,4 +1808,4 @@ public class ConceptMap extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Condition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Condition.java
index 13a996b5fdc..63840eee0aa 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Condition.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Condition.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IDatatype;
import ca.uhn.fhir.model.api.IElement;
@@ -716,6 +696,9 @@ public class Condition extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getAsserter() {
+ if (myAsserter == null) {
+ myAsserter = new ResourceReferenceDt();
+ }
return myAsserter;
}
@@ -771,8 +754,8 @@ public class Condition extends BaseResource implements IResource {
* Estimated or actual date the condition/problem/diagnosis was first detected/suspected
*
*/
- public Condition setDateAsserted( Date theDate, TemporalPrecisionEnum thePrecision) {
- myDateAsserted = new DateDt(theDate, thePrecision);
+ public Condition setDateAssertedWithDayPrecision( Date theDate) {
+ myDateAsserted = new DateDt(theDate);
return this;
}
@@ -784,8 +767,8 @@ public class Condition extends BaseResource implements IResource {
* Estimated or actual date the condition/problem/diagnosis was first detected/suspected
*
*/
- public Condition setDateAssertedWithDayPrecision( Date theDate) {
- myDateAsserted = new DateDt(theDate);
+ public Condition setDateAsserted( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myDateAsserted = new DateDt(theDate, thePrecision);
return this;
}
@@ -1278,7 +1261,7 @@ public class Condition extends BaseResource implements IResource {
*
*/
@Block()
- public static class Stage extends BaseElement implements IResourceBlock {
+ public static class Stage extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="summary", type=CodeableConceptDt.class, order=0, min=0, max=1)
@Description(
@@ -1394,7 +1377,7 @@ public class Condition extends BaseResource implements IResource {
*
*/
@Block()
- public static class Evidence extends BaseElement implements IResourceBlock {
+ public static class Evidence extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="code", type=CodeableConceptDt.class, order=0, min=0, max=1)
@Description(
@@ -1510,7 +1493,7 @@ public class Condition extends BaseResource implements IResource {
*
*/
@Block()
- public static class Location extends BaseElement implements IResourceBlock {
+ public static class Location extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="code", type=CodeableConceptDt.class, order=0, min=0, max=1)
@Description(
@@ -1625,7 +1608,7 @@ public class Condition extends BaseResource implements IResource {
*
*/
@Block()
- public static class RelatedItem extends BaseElement implements IResourceBlock {
+ public static class RelatedItem extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="type", type=CodeDt.class, order=0, min=1, max=1)
@Description(
@@ -1746,6 +1729,9 @@ public class Condition extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getTarget() {
+ if (myTarget == null) {
+ myTarget = new ResourceReferenceDt();
+ }
return myTarget;
}
@@ -1769,4 +1755,4 @@ public class Condition extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Conformance.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Conformance.java
index 36b48852aa1..e4241afc4c4 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Conformance.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Conformance.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -58,6 +38,7 @@ import ca.uhn.fhir.model.dstu.composite.ContactDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.ConformanceEventModeEnum;
import ca.uhn.fhir.model.dstu.valueset.ConformanceStatementStatusEnum;
+import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum;
import ca.uhn.fhir.model.dstu.valueset.DocumentModeEnum;
import ca.uhn.fhir.model.dstu.valueset.MessageSignificanceCategoryEnum;
import ca.uhn.fhir.model.dstu.valueset.ResourceTypeEnum;
@@ -827,7 +808,43 @@ public class Conformance extends BaseResource implements IResource {
}
return getTelecom().get(0);
}
-
+ /**
+ * Adds a new value for telecom (Contacts for Organization)
+ *
+ *
+ * Definition:
+ * Contacts for Organization relevant to this conformance statement. The contacts may be a website, email, phone numbers, etc.
+ *
+ *
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public Conformance addTelecom( ContactUseEnum theContactUse, String theValue) {
+ if (myTelecom == null) {
+ myTelecom = new java.util.ArrayList();
+ }
+ myTelecom.add(new ContactDt(theContactUse, theValue));
+ return this;
+ }
+
+ /**
+ * Adds a new value for telecom (Contacts for Organization)
+ *
+ *
+ * Definition:
+ * Contacts for Organization relevant to this conformance statement. The contacts may be a website, email, phone numbers, etc.
+ *
+ *
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public Conformance addTelecom( String theValue) {
+ if (myTelecom == null) {
+ myTelecom = new java.util.ArrayList();
+ }
+ myTelecom.add(new ContactDt(theValue));
+ return this;
+ }
+
+
/**
* Gets the value(s) for description (Human description of the conformance statement).
* creating it if it does
@@ -998,8 +1015,8 @@ public class Conformance extends BaseResource implements IResource {
* The date when the conformance statement was published
*
*/
- public Conformance setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myDate = new DateTimeDt(theDate, thePrecision);
+ public Conformance setDateWithSecondsPrecision( Date theDate) {
+ myDate = new DateTimeDt(theDate);
return this;
}
@@ -1011,8 +1028,8 @@ public class Conformance extends BaseResource implements IResource {
* The date when the conformance statement was published
*
*/
- public Conformance setDateWithSecondsPrecision( Date theDate) {
- myDate = new DateTimeDt(theDate);
+ public Conformance setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myDate = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -1478,7 +1495,7 @@ public class Conformance extends BaseResource implements IResource {
*
*/
@Block()
- public static class Software extends BaseElement implements IResourceBlock {
+ public static class Software extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="name", type=StringDt.class, order=0, min=1, max=1)
@Description(
@@ -1638,8 +1655,8 @@ public class Conformance extends BaseResource implements IResource {
* Date this version of the software released
*
*/
- public Software setReleaseDate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myReleaseDate = new DateTimeDt(theDate, thePrecision);
+ public Software setReleaseDateWithSecondsPrecision( Date theDate) {
+ myReleaseDate = new DateTimeDt(theDate);
return this;
}
@@ -1651,8 +1668,8 @@ public class Conformance extends BaseResource implements IResource {
* Date this version of the software released
*
*/
- public Software setReleaseDateWithSecondsPrecision( Date theDate) {
- myReleaseDate = new DateTimeDt(theDate);
+ public Software setReleaseDate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myReleaseDate = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -1670,7 +1687,7 @@ public class Conformance extends BaseResource implements IResource {
*
*/
@Block()
- public static class Implementation extends BaseElement implements IResourceBlock {
+ public static class Implementation extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="description", type=StringDt.class, order=0, min=1, max=1)
@Description(
@@ -1798,7 +1815,7 @@ public class Conformance extends BaseResource implements IResource {
*
*/
@Block()
- public static class Rest extends BaseElement implements IResourceBlock {
+ public static class Rest extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="mode", type=CodeDt.class, order=0, min=1, max=1)
@Description(
@@ -2249,7 +2266,7 @@ public class Conformance extends BaseResource implements IResource {
*
*/
@Block()
- public static class RestSecurity extends BaseElement implements IResourceBlock {
+ public static class RestSecurity extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="cors", type=BooleanDt.class, order=0, min=0, max=1)
@Description(
@@ -2364,6 +2381,23 @@ public class Conformance extends BaseResource implements IResource {
return this;
}
+ /**
+ * Add a value for service (OAuth | OAuth2 | NTLM | Basic | Kerberos) using an enumerated type. This
+ * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
+ * or contain the desirable codes. If you wish to use codes other than those which are built-in,
+ * you may also use the {@link #addType()} method.
+ *
+ *
+ * Definition:
+ * Types of security services are supported/required by the system
+ *
+ */
+ public BoundCodeableConceptDt addService(RestfulSecurityServiceEnum theValue) {
+ BoundCodeableConceptDt retVal = new BoundCodeableConceptDt(RestfulSecurityServiceEnum.VALUESET_BINDER, theValue);
+ getService().add(retVal);
+ return retVal;
+ }
+
/**
* Add a value for service (OAuth | OAuth2 | NTLM | Basic | Kerberos)
*
@@ -2372,8 +2406,10 @@ public class Conformance extends BaseResource implements IResource {
* Types of security services are supported/required by the system
*
*/
- public void addService(RestfulSecurityServiceEnum theValue) {
- getService().add(new BoundCodeableConceptDt(RestfulSecurityServiceEnum.VALUESET_BINDER, theValue));
+ public BoundCodeableConceptDt addService() {
+ BoundCodeableConceptDt retVal = new BoundCodeableConceptDt(RestfulSecurityServiceEnum.VALUESET_BINDER);
+ getService().add(retVal);
+ return retVal;
}
/**
@@ -2507,7 +2543,7 @@ public class Conformance extends BaseResource implements IResource {
*
*/
@Block()
- public static class RestSecurityCertificate extends BaseElement implements IResourceBlock {
+ public static class RestSecurityCertificate extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="type", type=CodeDt.class, order=0, min=0, max=1)
@Description(
@@ -2636,7 +2672,7 @@ public class Conformance extends BaseResource implements IResource {
*
*/
@Block()
- public static class RestResource extends BaseElement implements IResourceBlock {
+ public static class RestResource extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="type", type=CodeDt.class, order=0, min=1, max=1)
@Description(
@@ -3072,7 +3108,7 @@ public class Conformance extends BaseResource implements IResource {
*
*/
@Block()
- public static class RestResourceOperation extends BaseElement implements IResourceBlock {
+ public static class RestResourceOperation extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="code", type=CodeDt.class, order=0, min=1, max=1)
@Description(
@@ -3200,7 +3236,7 @@ public class Conformance extends BaseResource implements IResource {
*
*/
@Block()
- public static class RestResourceSearchParam extends BaseElement implements IResourceBlock {
+ public static class RestResourceSearchParam extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="name", type=StringDt.class, order=0, min=1, max=1)
@Description(
@@ -3461,6 +3497,23 @@ public class Conformance extends BaseResource implements IResource {
return this;
}
+ /**
+ * Add a value for target (Types of resource (if a resource reference)) using an enumerated type. This
+ * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
+ * or contain the desirable codes. If you wish to use codes other than those which are built-in,
+ * you may also use the {@link #addType()} method.
+ *
+ *
+ * Definition:
+ * Types of resource (if a resource is referenced)
+ *
+ */
+ public BoundCodeDt addTarget(ResourceTypeEnum theValue) {
+ BoundCodeDt retVal = new BoundCodeDt(ResourceTypeEnum.VALUESET_BINDER, theValue);
+ getTarget().add(retVal);
+ return retVal;
+ }
+
/**
* Add a value for target (Types of resource (if a resource reference))
*
@@ -3469,8 +3522,10 @@ public class Conformance extends BaseResource implements IResource {
* Types of resource (if a resource is referenced)
*
*/
- public void addTarget(ResourceTypeEnum theValue) {
- getTarget().add(new BoundCodeDt(ResourceTypeEnum.VALUESET_BINDER, theValue));
+ public BoundCodeDt addTarget() {
+ BoundCodeDt retVal = new BoundCodeDt(ResourceTypeEnum.VALUESET_BINDER);
+ getTarget().add(retVal);
+ return retVal;
}
/**
@@ -3580,7 +3635,7 @@ public class Conformance extends BaseResource implements IResource {
*
*/
@Block()
- public static class RestOperation extends BaseElement implements IResourceBlock {
+ public static class RestOperation extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="code", type=CodeDt.class, order=0, min=1, max=1)
@Description(
@@ -3708,7 +3763,7 @@ public class Conformance extends BaseResource implements IResource {
*
*/
@Block()
- public static class RestQuery extends BaseElement implements IResourceBlock {
+ public static class RestQuery extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="name", type=StringDt.class, order=0, min=1, max=1)
@Description(
@@ -3955,7 +4010,7 @@ public class Conformance extends BaseResource implements IResource {
*
*/
@Block()
- public static class Messaging extends BaseElement implements IResourceBlock {
+ public static class Messaging extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="endpoint", type=UriDt.class, order=0, min=0, max=1)
@Description(
@@ -4200,7 +4255,7 @@ public class Conformance extends BaseResource implements IResource {
*
*/
@Block()
- public static class MessagingEvent extends BaseElement implements IResourceBlock {
+ public static class MessagingEvent extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="code", type=CodingDt.class, order=0, min=1, max=1)
@Description(
@@ -4614,7 +4669,7 @@ public class Conformance extends BaseResource implements IResource {
*
*/
@Block()
- public static class Document extends BaseElement implements IResourceBlock {
+ public static class Document extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="mode", type=CodeDt.class, order=0, min=1, max=1)
@Description(
@@ -4774,4 +4829,4 @@ public class Conformance extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Coverage.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Coverage.java
index 1f8709388b6..7cc93191410 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Coverage.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Coverage.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -815,7 +795,7 @@ public class Coverage extends BaseResource implements IResource {
*
*/
@Block()
- public static class Subscriber extends BaseElement implements IResourceBlock {
+ public static class Subscriber extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="name", type=HumanNameDt.class, order=0, min=0, max=1)
@Description(
@@ -949,8 +929,8 @@ public class Coverage extends BaseResource implements IResource {
* The date of birth of the PolicyHolder
*
*/
- public Subscriber setBirthdate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myBirthdate = new DateDt(theDate, thePrecision);
+ public Subscriber setBirthdateWithDayPrecision( Date theDate) {
+ myBirthdate = new DateDt(theDate);
return this;
}
@@ -962,8 +942,8 @@ public class Coverage extends BaseResource implements IResource {
* The date of birth of the PolicyHolder
*
*/
- public Subscriber setBirthdateWithDayPrecision( Date theDate) {
- myBirthdate = new DateDt(theDate);
+ public Subscriber setBirthdate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myBirthdate = new DateDt(theDate, thePrecision);
return this;
}
@@ -974,4 +954,4 @@ public class Coverage extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Device.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Device.java
index 74ee2ccfe24..63d765b8aa1 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Device.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Device.java
@@ -16,26 +16,6 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
@@ -53,6 +33,7 @@ import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.ContactDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
+import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.primitive.DateDt;
import ca.uhn.fhir.model.primitive.StringDt;
@@ -674,8 +655,8 @@ public class Device extends BaseResource implements IResource {
* Date of expiry of this device (if applicable)
*
*/
- public Device setExpiry( Date theDate, TemporalPrecisionEnum thePrecision) {
- myExpiry = new DateDt(theDate, thePrecision);
+ public Device setExpiryWithDayPrecision( Date theDate) {
+ myExpiry = new DateDt(theDate);
return this;
}
@@ -687,8 +668,8 @@ public class Device extends BaseResource implements IResource {
* Date of expiry of this device (if applicable)
*
*/
- public Device setExpiryWithDayPrecision( Date theDate) {
- myExpiry = new DateDt(theDate);
+ public Device setExpiry( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myExpiry = new DateDt(theDate, thePrecision);
return this;
}
@@ -933,7 +914,43 @@ public class Device extends BaseResource implements IResource {
}
return getContact().get(0);
}
-
+ /**
+ * Adds a new value for contact (Details for human/organization for support)
+ *
+ *
+ * Definition:
+ * Contact details for an organization or a particular human that is responsible for the device
+ *
+ *
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public Device addContact( ContactUseEnum theContactUse, String theValue) {
+ if (myContact == null) {
+ myContact = new java.util.ArrayList();
+ }
+ myContact.add(new ContactDt(theContactUse, theValue));
+ return this;
+ }
+
+ /**
+ * Adds a new value for contact (Details for human/organization for support)
+ *
+ *
+ * Definition:
+ * Contact details for an organization or a particular human that is responsible for the device
+ *
+ *
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public Device addContact( String theValue) {
+ if (myContact == null) {
+ myContact = new java.util.ArrayList();
+ }
+ myContact.add(new ContactDt(theValue));
+ return this;
+ }
+
+
/**
* Gets the value(s) for url (Network address to contact device).
* creating it if it does
@@ -980,4 +997,4 @@ public class Device extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/DeviceObservationReport.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/DeviceObservationReport.java
index 7bb2fad194e..52a55c02b4f 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/DeviceObservationReport.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/DeviceObservationReport.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -294,8 +274,8 @@ public class DeviceObservationReport extends BaseResource implements IResource {
* The point in time that the values are reported
*
*/
- public DeviceObservationReport setInstantWithMillisPrecision( Date theDate) {
- myInstant = new InstantDt(theDate);
+ public DeviceObservationReport setInstant( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myInstant = new InstantDt(theDate, thePrecision);
return this;
}
@@ -307,8 +287,8 @@ public class DeviceObservationReport extends BaseResource implements IResource {
* The point in time that the values are reported
*
*/
- public DeviceObservationReport setInstant( Date theDate, TemporalPrecisionEnum thePrecision) {
- myInstant = new InstantDt(theDate, thePrecision);
+ public DeviceObservationReport setInstantWithMillisPrecision( Date theDate) {
+ myInstant = new InstantDt(theDate);
return this;
}
@@ -412,6 +392,9 @@ public class DeviceObservationReport extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getSubject() {
+ if (mySubject == null) {
+ mySubject = new ResourceReferenceDt();
+ }
return mySubject;
}
@@ -498,7 +481,7 @@ public class DeviceObservationReport extends BaseResource implements IResource {
*
*/
@Block()
- public static class VirtualDevice extends BaseElement implements IResourceBlock {
+ public static class VirtualDevice extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="code", type=CodeableConceptDt.class, order=0, min=0, max=1)
@Description(
@@ -628,7 +611,7 @@ public class DeviceObservationReport extends BaseResource implements IResource {
*
*/
@Block()
- public static class VirtualDeviceChannel extends BaseElement implements IResourceBlock {
+ public static class VirtualDeviceChannel extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="code", type=CodeableConceptDt.class, order=0, min=0, max=1)
@Description(
@@ -758,7 +741,7 @@ public class DeviceObservationReport extends BaseResource implements IResource {
*
*/
@Block()
- public static class VirtualDeviceChannelMetric extends BaseElement implements IResourceBlock {
+ public static class VirtualDeviceChannelMetric extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="observation", order=0, min=1, max=1, type={
ca.uhn.fhir.model.dstu.resource.Observation.class })
@@ -818,4 +801,4 @@ public class DeviceObservationReport extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/DiagnosticOrder.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/DiagnosticOrder.java
index d18e50ca8d0..9eba30bec3f 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/DiagnosticOrder.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/DiagnosticOrder.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -566,6 +546,9 @@ public class DiagnosticOrder extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getSubject() {
+ if (mySubject == null) {
+ mySubject = new ResourceReferenceDt();
+ }
return mySubject;
}
@@ -1046,7 +1029,7 @@ public class DiagnosticOrder extends BaseResource implements IResource {
*
*/
@Block()
- public static class Event extends BaseElement implements IResourceBlock {
+ public static class Event extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="status", type=CodeDt.class, order=0, min=1, max=1)
@Description(
@@ -1201,8 +1184,8 @@ public class DiagnosticOrder extends BaseResource implements IResource {
* The date/time at which the event occurred
*
*/
- public Event setDateTime( Date theDate, TemporalPrecisionEnum thePrecision) {
- myDateTime = new DateTimeDt(theDate, thePrecision);
+ public Event setDateTimeWithSecondsPrecision( Date theDate) {
+ myDateTime = new DateTimeDt(theDate);
return this;
}
@@ -1214,8 +1197,8 @@ public class DiagnosticOrder extends BaseResource implements IResource {
* The date/time at which the event occurred
*
*/
- public Event setDateTimeWithSecondsPrecision( Date theDate) {
- myDateTime = new DateTimeDt(theDate);
+ public Event setDateTime( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myDateTime = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -1231,6 +1214,9 @@ public class DiagnosticOrder extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getActor() {
+ if (myActor == null) {
+ myActor = new ResourceReferenceDt();
+ }
return myActor;
}
@@ -1261,7 +1247,7 @@ public class DiagnosticOrder extends BaseResource implements IResource {
*
*/
@Block()
- public static class Item extends BaseElement implements IResourceBlock {
+ public static class Item extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="code", type=CodeableConceptDt.class, order=0, min=1, max=1)
@Description(
@@ -1526,4 +1512,4 @@ public class DiagnosticOrder extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/DiagnosticReport.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/DiagnosticReport.java
index cea73cdffbc..35f0eb61bae 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/DiagnosticReport.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/DiagnosticReport.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IDatatype;
import ca.uhn.fhir.model.api.IElement;
@@ -645,8 +625,8 @@ public class DiagnosticReport extends BaseResource implements IResource {
* The date and/or time that this version of the report was released from the source diagnostic service
*
*/
- public DiagnosticReport setIssued( Date theDate, TemporalPrecisionEnum thePrecision) {
- myIssued = new DateTimeDt(theDate, thePrecision);
+ public DiagnosticReport setIssuedWithSecondsPrecision( Date theDate) {
+ myIssued = new DateTimeDt(theDate);
return this;
}
@@ -658,8 +638,8 @@ public class DiagnosticReport extends BaseResource implements IResource {
* The date and/or time that this version of the report was released from the source diagnostic service
*
*/
- public DiagnosticReport setIssuedWithSecondsPrecision( Date theDate) {
- myIssued = new DateTimeDt(theDate);
+ public DiagnosticReport setIssued( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myIssued = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -675,6 +655,9 @@ public class DiagnosticReport extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getSubject() {
+ if (mySubject == null) {
+ mySubject = new ResourceReferenceDt();
+ }
return mySubject;
}
@@ -703,6 +686,9 @@ public class DiagnosticReport extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getPerformer() {
+ if (myPerformer == null) {
+ myPerformer = new ResourceReferenceDt();
+ }
return myPerformer;
}
@@ -1245,7 +1231,7 @@ public class DiagnosticReport extends BaseResource implements IResource {
*
*/
@Block()
- public static class Image extends BaseElement implements IResourceBlock {
+ public static class Image extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="comment", type=StringDt.class, order=0, min=0, max=1)
@Description(
@@ -1354,4 +1340,4 @@ public class DiagnosticReport extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/DocumentManifest.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/DocumentManifest.java
index 38a28820285..63fd0de892f 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/DocumentManifest.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/DocumentManifest.java
@@ -16,26 +16,6 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
@@ -621,6 +601,9 @@ public class DocumentManifest extends BaseResource implements IResource {
*
*/
public java.util.List getSubject() {
+ if (mySubject == null) {
+ mySubject = new java.util.ArrayList();
+ }
return mySubject;
}
@@ -662,6 +645,9 @@ public class DocumentManifest extends BaseResource implements IResource {
*
*/
public java.util.List getRecipient() {
+ if (myRecipient == null) {
+ myRecipient = new java.util.ArrayList();
+ }
return myRecipient;
}
@@ -734,6 +720,9 @@ public class DocumentManifest extends BaseResource implements IResource {
*
*/
public java.util.List getAuthor() {
+ if (myAuthor == null) {
+ myAuthor = new java.util.ArrayList();
+ }
return myAuthor;
}
@@ -802,8 +791,8 @@ public class DocumentManifest extends BaseResource implements IResource {
* When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated etc)
*
*/
- public DocumentManifest setCreated( Date theDate, TemporalPrecisionEnum thePrecision) {
- myCreated = new DateTimeDt(theDate, thePrecision);
+ public DocumentManifest setCreatedWithSecondsPrecision( Date theDate) {
+ myCreated = new DateTimeDt(theDate);
return this;
}
@@ -815,8 +804,8 @@ public class DocumentManifest extends BaseResource implements IResource {
* When the document manifest was created for submission to the server (not necessarily the same thing as the actual resource last modified time, since it may be modified, replicated etc)
*
*/
- public DocumentManifest setCreatedWithSecondsPrecision( Date theDate) {
- myCreated = new DateTimeDt(theDate);
+ public DocumentManifest setCreated( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myCreated = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -1026,6 +1015,9 @@ public class DocumentManifest extends BaseResource implements IResource {
*
*/
public java.util.List getContent() {
+ if (myContent == null) {
+ myContent = new java.util.ArrayList();
+ }
return myContent;
}
@@ -1058,4 +1050,4 @@ public class DocumentManifest extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/DocumentReference.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/DocumentReference.java
index 3996f868f27..87a9cdc60a8 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/DocumentReference.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/DocumentReference.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -937,6 +917,9 @@ public class DocumentReference extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getSubject() {
+ if (mySubject == null) {
+ mySubject = new ResourceReferenceDt();
+ }
return mySubject;
}
@@ -1027,6 +1010,9 @@ public class DocumentReference extends BaseResource implements IResource {
*
*/
public java.util.List getAuthor() {
+ if (myAuthor == null) {
+ myAuthor = new java.util.ArrayList();
+ }
return myAuthor;
}
@@ -1143,6 +1129,9 @@ public class DocumentReference extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getAuthenticator() {
+ if (myAuthenticator == null) {
+ myAuthenticator = new ResourceReferenceDt();
+ }
return myAuthenticator;
}
@@ -1198,8 +1187,8 @@ public class DocumentReference extends BaseResource implements IResource {
* When the document was created
*
*/
- public DocumentReference setCreated( Date theDate, TemporalPrecisionEnum thePrecision) {
- myCreated = new DateTimeDt(theDate, thePrecision);
+ public DocumentReference setCreatedWithSecondsPrecision( Date theDate) {
+ myCreated = new DateTimeDt(theDate);
return this;
}
@@ -1211,8 +1200,8 @@ public class DocumentReference extends BaseResource implements IResource {
* When the document was created
*
*/
- public DocumentReference setCreatedWithSecondsPrecision( Date theDate) {
- myCreated = new DateTimeDt(theDate);
+ public DocumentReference setCreated( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myCreated = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -1255,8 +1244,8 @@ public class DocumentReference extends BaseResource implements IResource {
* When the document reference was created
*
*/
- public DocumentReference setIndexedWithMillisPrecision( Date theDate) {
- myIndexed = new InstantDt(theDate);
+ public DocumentReference setIndexed( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myIndexed = new InstantDt(theDate, thePrecision);
return this;
}
@@ -1268,8 +1257,8 @@ public class DocumentReference extends BaseResource implements IResource {
* When the document reference was created
*
*/
- public DocumentReference setIndexed( Date theDate, TemporalPrecisionEnum thePrecision) {
- myIndexed = new InstantDt(theDate, thePrecision);
+ public DocumentReference setIndexedWithMillisPrecision( Date theDate) {
+ myIndexed = new InstantDt(theDate);
return this;
}
@@ -1882,7 +1871,7 @@ public class DocumentReference extends BaseResource implements IResource {
*
*/
@Block()
- public static class RelatesTo extends BaseElement implements IResourceBlock {
+ public static class RelatesTo extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="code", type=CodeDt.class, order=0, min=1, max=1)
@Description(
@@ -1998,7 +1987,7 @@ public class DocumentReference extends BaseResource implements IResource {
*
*/
@Block()
- public static class Service extends BaseElement implements IResourceBlock {
+ public static class Service extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="type", type=CodeableConceptDt.class, order=0, min=1, max=1)
@Description(
@@ -2179,7 +2168,7 @@ public class DocumentReference extends BaseResource implements IResource {
*
*/
@Block()
- public static class ServiceParameter extends BaseElement implements IResourceBlock {
+ public static class ServiceParameter extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="name", type=StringDt.class, order=0, min=1, max=1)
@Description(
@@ -2308,7 +2297,7 @@ public class DocumentReference extends BaseResource implements IResource {
*
*/
@Block()
- public static class Context extends BaseElement implements IResourceBlock {
+ public static class Context extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="event", type=CodeableConceptDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
@@ -2470,4 +2459,4 @@ public class DocumentReference extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Encounter.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Encounter.java
index 62bcfbfea42..974c5858c15 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Encounter.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Encounter.java
@@ -19,7 +19,7 @@ package ca.uhn.fhir.model.dstu.resource;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -451,11 +451,11 @@ public class Encounter extends BaseResource implements IResource {
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
- public Encounter addIdentifier( String theSystem, String theValue) {
+ public Encounter addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList();
}
- myIdentifier.add(new IdentifierDt(theSystem, theValue));
+ myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
return this;
}
@@ -469,11 +469,11 @@ public class Encounter extends BaseResource implements IResource {
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
- public Encounter addIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
+ public Encounter addIdentifier( String theSystem, String theValue) {
if (myIdentifier == null) {
myIdentifier = new java.util.ArrayList();
}
- myIdentifier.add(new IdentifierDt(theUse, theSystem, theValue, theLabel));
+ myIdentifier.add(new IdentifierDt(theSystem, theValue));
return this;
}
@@ -597,7 +597,10 @@ public class Encounter extends BaseResource implements IResource {
}
/**
- * Add a value for type (Specific type of encounter)
+ * Add a value for type (Specific type of encounter) using an enumerated type. This
+ * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
+ * or contain the desirable codes. If you wish to use codes other than those which are built-in,
+ * you may also use the {@link #addType()} method.
*
*
* Definition:
@@ -1060,7 +1063,7 @@ public class Encounter extends BaseResource implements IResource {
*
*/
@Block()
- public static class Participant extends BaseElement implements IResourceBlock {
+ public static class Participant extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="type", type=CodeableConceptDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
@@ -1119,7 +1122,10 @@ public class Encounter extends BaseResource implements IResource {
}
/**
- * Add a value for type (Role of participant in encounter)
+ * Add a value for type (Role of participant in encounter) using an enumerated type. This
+ * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
+ * or contain the desirable codes. If you wish to use codes other than those which are built-in,
+ * you may also use the {@link #addType()} method.
*
*
* Definition:
@@ -1205,7 +1211,7 @@ public class Encounter extends BaseResource implements IResource {
*
*/
@Block()
- public static class Hospitalization extends BaseElement implements IResourceBlock {
+ public static class Hospitalization extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="preAdmissionIdentifier", type=IdentifierDt.class, order=0, min=0, max=1)
@Description(
@@ -1343,8 +1349,8 @@ public class Encounter extends BaseResource implements IResource {
*
*
*/
- public Hospitalization setPreAdmissionIdentifier( String theSystem, String theValue) {
- myPreAdmissionIdentifier = new IdentifierDt(theSystem, theValue);
+ public Hospitalization setPreAdmissionIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
+ myPreAdmissionIdentifier = new IdentifierDt(theUse, theSystem, theValue, theLabel);
return this;
}
@@ -1356,8 +1362,8 @@ public class Encounter extends BaseResource implements IResource {
*
*
*/
- public Hospitalization setPreAdmissionIdentifier( IdentifierUseEnum theUse, String theSystem, String theValue, String theLabel) {
- myPreAdmissionIdentifier = new IdentifierDt(theUse, theSystem, theValue, theLabel);
+ public Hospitalization setPreAdmissionIdentifier( String theSystem, String theValue) {
+ myPreAdmissionIdentifier = new IdentifierDt(theSystem, theValue);
return this;
}
@@ -1828,7 +1834,7 @@ public class Encounter extends BaseResource implements IResource {
*
*/
@Block()
- public static class HospitalizationAccomodation extends BaseElement implements IResourceBlock {
+ public static class HospitalizationAccomodation extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="bed", order=0, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Location.class })
@@ -1932,7 +1938,7 @@ public class Encounter extends BaseResource implements IResource {
*
*/
@Block()
- public static class Location extends BaseElement implements IResourceBlock {
+ public static class Location extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="location", order=0, min=1, max=1, type={
ca.uhn.fhir.model.dstu.resource.Location.class })
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/FamilyHistory.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/FamilyHistory.java
index 4c2d18d7a47..191be398b3c 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/FamilyHistory.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/FamilyHistory.java
@@ -16,30 +16,10 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IDatatype;
import ca.uhn.fhir.model.api.IElement;
@@ -395,7 +375,7 @@ public class FamilyHistory extends BaseResource implements IResource {
*
*/
@Block()
- public static class Relation extends BaseElement implements IResourceBlock {
+ public static class Relation extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="name", type=StringDt.class, order=0, min=0, max=1)
@Description(
@@ -699,7 +679,7 @@ public class FamilyHistory extends BaseResource implements IResource {
*
*/
@Block()
- public static class RelationCondition extends BaseElement implements IResourceBlock {
+ public static class RelationCondition extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="type", type=CodeableConceptDt.class, order=0, min=1, max=1)
@Description(
@@ -882,4 +862,4 @@ public class FamilyHistory extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/GVFMeta.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/GVFMeta.java
index 4120e6f035f..916211b264c 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/GVFMeta.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/GVFMeta.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -519,8 +499,8 @@ public class GVFMeta extends BaseResource implements IResource {
* Date when the file is updated
*
*/
- public GVFMeta setFileDate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myFileDate = new DateDt(theDate, thePrecision);
+ public GVFMeta setFileDateWithDayPrecision( Date theDate) {
+ myFileDate = new DateDt(theDate);
return this;
}
@@ -532,8 +512,8 @@ public class GVFMeta extends BaseResource implements IResource {
* Date when the file is updated
*
*/
- public GVFMeta setFileDateWithDayPrecision( Date theDate) {
- myFileDate = new DateDt(theDate);
+ public GVFMeta setFileDate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myFileDate = new DateDt(theDate, thePrecision);
return this;
}
@@ -1008,7 +988,7 @@ public class GVFMeta extends BaseResource implements IResource {
*
*/
@Block()
- public static class Subject extends BaseElement implements IResourceBlock {
+ public static class Subject extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="patient", order=0, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Patient.class })
@@ -1124,7 +1104,7 @@ public class GVFMeta extends BaseResource implements IResource {
*
*/
@Block()
- public static class Platform extends BaseElement implements IResourceBlock {
+ public static class Platform extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="class", type=CodeDt.class, order=0, min=0, max=1)
@Description(
@@ -1551,4 +1531,4 @@ public class GVFMeta extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/GVFVariant.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/GVFVariant.java
index 39801299f9b..e681dcd1075 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/GVFVariant.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/GVFVariant.java
@@ -16,30 +16,10 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -1698,7 +1678,7 @@ public class GVFVariant extends BaseResource implements IResource {
*
*/
@Block()
- public static class Subject extends BaseElement implements IResourceBlock {
+ public static class Subject extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="patient", order=0, min=1, max=1, type={
ca.uhn.fhir.model.dstu.resource.Patient.class })
@@ -1814,7 +1794,7 @@ public class GVFVariant extends BaseResource implements IResource {
*
*/
@Block()
- public static class Dbxref extends BaseElement implements IResourceBlock {
+ public static class Dbxref extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="database", type=CodeDt.class, order=0, min=1, max=1)
@Description(
@@ -1942,7 +1922,7 @@ public class GVFVariant extends BaseResource implements IResource {
*
*/
@Block()
- public static class VariantEffect extends BaseElement implements IResourceBlock {
+ public static class VariantEffect extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="sequenceVariant", type=CodeDt.class, order=0, min=1, max=1)
@Description(
@@ -2206,7 +2186,7 @@ public class GVFVariant extends BaseResource implements IResource {
*
*/
@Block()
- public static class StartRange extends BaseElement implements IResourceBlock {
+ public static class StartRange extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="start", type=IntegerDt.class, order=0, min=1, max=1)
@Description(
@@ -2334,7 +2314,7 @@ public class GVFVariant extends BaseResource implements IResource {
*
*/
@Block()
- public static class EndRange extends BaseElement implements IResourceBlock {
+ public static class EndRange extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="start", type=IntegerDt.class, order=0, min=1, max=1)
@Description(
@@ -2462,7 +2442,7 @@ public class GVFVariant extends BaseResource implements IResource {
*
*/
@Block()
- public static class BreakpointDetail extends BaseElement implements IResourceBlock {
+ public static class BreakpointDetail extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="seqid", type=StringDt.class, order=0, min=1, max=1)
@Description(
@@ -2692,7 +2672,7 @@ public class GVFVariant extends BaseResource implements IResource {
*
*/
@Block()
- public static class SequenceContext extends BaseElement implements IResourceBlock {
+ public static class SequenceContext extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="fivePrime", type=StringDt.class, order=0, min=1, max=1)
@Description(
@@ -2820,7 +2800,7 @@ public class GVFVariant extends BaseResource implements IResource {
*
*/
@Block()
- public static class Sample extends BaseElement implements IResourceBlock {
+ public static class Sample extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="phased", type=StringDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
@@ -3196,4 +3176,4 @@ public class GVFVariant extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/GeneExpression.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/GeneExpression.java
index bbacea05191..85606a51572 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/GeneExpression.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/GeneExpression.java
@@ -16,30 +16,10 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -367,7 +347,7 @@ public class GeneExpression extends BaseResource implements IResource {
*
*/
@Block()
- public static class Gene extends BaseElement implements IResourceBlock {
+ public static class Gene extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="identifier", type=StringDt.class, order=0, min=0, max=1)
@Description(
@@ -481,7 +461,7 @@ public class GeneExpression extends BaseResource implements IResource {
*
*/
@Block()
- public static class GeneCoordinate extends BaseElement implements IResourceBlock {
+ public static class GeneCoordinate extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="chromosome", type=StringDt.class, order=0, min=1, max=1)
@Description(
@@ -661,7 +641,7 @@ public class GeneExpression extends BaseResource implements IResource {
*
*/
@Block()
- public static class RnaSeq extends BaseElement implements IResourceBlock {
+ public static class RnaSeq extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="inputLab", order=0, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.SequencingLab.class })
@@ -908,7 +888,7 @@ public class GeneExpression extends BaseResource implements IResource {
*
*/
@Block()
- public static class RnaSeqIsoform extends BaseElement implements IResourceBlock {
+ public static class RnaSeqIsoform extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="identity", type=StringDt.class, order=0, min=1, max=1)
@Description(
@@ -1056,4 +1036,4 @@ public class GeneExpression extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/GeneticAnalysis.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/GeneticAnalysis.java
index 8c4febba0d8..5cddd9c9434 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/GeneticAnalysis.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/GeneticAnalysis.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -315,8 +295,8 @@ public class GeneticAnalysis extends BaseResource implements IResource {
* Date when result of the analysis is updated
*
*/
- public GeneticAnalysis setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myDate = new DateDt(theDate, thePrecision);
+ public GeneticAnalysis setDateWithDayPrecision( Date theDate) {
+ myDate = new DateDt(theDate);
return this;
}
@@ -328,8 +308,8 @@ public class GeneticAnalysis extends BaseResource implements IResource {
* Date when result of the analysis is updated
*
*/
- public GeneticAnalysis setDateWithDayPrecision( Date theDate) {
- myDate = new DateDt(theDate);
+ public GeneticAnalysis setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myDate = new DateDt(theDate, thePrecision);
return this;
}
@@ -436,7 +416,7 @@ public class GeneticAnalysis extends BaseResource implements IResource {
*
*/
@Block()
- public static class GeneticAnalysisSummary extends BaseElement implements IResourceBlock {
+ public static class GeneticAnalysisSummary extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="geneticDiseaseAssessed", type=CodingDt.class, order=0, min=0, max=1)
@Description(
@@ -792,7 +772,7 @@ public class GeneticAnalysis extends BaseResource implements IResource {
*
*/
@Block()
- public static class DnaRegionAnalysisTestCoverage extends BaseElement implements IResourceBlock {
+ public static class DnaRegionAnalysisTestCoverage extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="dnaRegionOfInterest", order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
@@ -884,7 +864,7 @@ public class GeneticAnalysis extends BaseResource implements IResource {
*
*/
@Block()
- public static class DnaRegionAnalysisTestCoverageDnaRegionOfInterest extends BaseElement implements IResourceBlock {
+ public static class DnaRegionAnalysisTestCoverageDnaRegionOfInterest extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="genomicReferenceSequenceIdentifier", type=StringDt.class, order=0, min=0, max=1)
@Description(
@@ -1319,7 +1299,7 @@ public class GeneticAnalysis extends BaseResource implements IResource {
*
*/
@Block()
- public static class GeneticAnalysisDiscreteResult extends BaseElement implements IResourceBlock {
+ public static class GeneticAnalysisDiscreteResult extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="dnaAnalysisDiscreteSequenceVariation", type=StringDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
@@ -1423,4 +1403,4 @@ public class GeneticAnalysis extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Group.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Group.java
index 6a68604071d..79383b358dd 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Group.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Group.java
@@ -16,30 +16,10 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IDatatype;
import ca.uhn.fhir.model.api.IElement;
@@ -690,6 +670,9 @@ public class Group extends BaseResource implements IResource {
*
*/
public java.util.List getMember() {
+ if (myMember == null) {
+ myMember = new java.util.ArrayList();
+ }
return myMember;
}
@@ -729,7 +712,7 @@ public class Group extends BaseResource implements IResource {
*
*/
@Block()
- public static class Characteristic extends BaseElement implements IResourceBlock {
+ public static class Characteristic extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="code", type=CodeableConceptDt.class, order=0, min=1, max=1)
@Description(
@@ -873,4 +856,4 @@ public class Group extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/ImagingStudy.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/ImagingStudy.java
index 465ded6cd10..28f6125cc65 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/ImagingStudy.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/ImagingStudy.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -484,8 +464,8 @@ public class ImagingStudy extends BaseResource implements IResource {
* Date and Time the study took place
*
*/
- public ImagingStudy setDateTime( Date theDate, TemporalPrecisionEnum thePrecision) {
- myDateTime = new DateTimeDt(theDate, thePrecision);
+ public ImagingStudy setDateTimeWithSecondsPrecision( Date theDate) {
+ myDateTime = new DateTimeDt(theDate);
return this;
}
@@ -497,8 +477,8 @@ public class ImagingStudy extends BaseResource implements IResource {
* Date and Time the study took place
*
*/
- public ImagingStudy setDateTimeWithSecondsPrecision( Date theDate) {
- myDateTime = new DateTimeDt(theDate);
+ public ImagingStudy setDateTime( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myDateTime = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -792,6 +772,23 @@ public class ImagingStudy extends BaseResource implements IResource {
return this;
}
+ /**
+ * Add a value for modality (All series.modality if actual acquisition modalities) using an enumerated type. This
+ * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
+ * or contain the desirable codes. If you wish to use codes other than those which are built-in,
+ * you may also use the {@link #addType()} method.
+ *
+ *
+ * Definition:
+ * A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19)
+ *
+ */
+ public BoundCodeDt addModality(ImagingModalityEnum theValue) {
+ BoundCodeDt retVal = new BoundCodeDt(ImagingModalityEnum.VALUESET_BINDER, theValue);
+ getModality().add(retVal);
+ return retVal;
+ }
+
/**
* Add a value for modality (All series.modality if actual acquisition modalities)
*
@@ -800,8 +797,10 @@ public class ImagingStudy extends BaseResource implements IResource {
* A list of all the Series.ImageModality values that are actual acquisition modalities, i.e. those in the DICOM Context Group 29 (value set OID 1.2.840.10008.6.1.19)
*
*/
- public void addModality(ImagingModalityEnum theValue) {
- getModality().add(new BoundCodeDt(ImagingModalityEnum.VALUESET_BINDER, theValue));
+ public BoundCodeDt addModality() {
+ BoundCodeDt retVal = new BoundCodeDt(ImagingModalityEnum.VALUESET_BINDER);
+ getModality().add(retVal);
+ return retVal;
}
/**
@@ -1274,7 +1273,7 @@ public class ImagingStudy extends BaseResource implements IResource {
*
*/
@Block()
- public static class Series extends BaseElement implements IResourceBlock {
+ public static class Series extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="number", type=IntegerDt.class, order=0, min=0, max=1)
@Description(
@@ -1721,8 +1720,8 @@ public class ImagingStudy extends BaseResource implements IResource {
*
*
*/
- public Series setDateTime( Date theDate, TemporalPrecisionEnum thePrecision) {
- myDateTime = new DateTimeDt(theDate, thePrecision);
+ public Series setDateTimeWithSecondsPrecision( Date theDate) {
+ myDateTime = new DateTimeDt(theDate);
return this;
}
@@ -1734,8 +1733,8 @@ public class ImagingStudy extends BaseResource implements IResource {
*
*
*/
- public Series setDateTimeWithSecondsPrecision( Date theDate) {
- myDateTime = new DateTimeDt(theDate);
+ public Series setDateTime( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myDateTime = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -1812,7 +1811,7 @@ public class ImagingStudy extends BaseResource implements IResource {
*
*/
@Block()
- public static class SeriesInstance extends BaseElement implements IResourceBlock {
+ public static class SeriesInstance extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="number", type=IntegerDt.class, order=0, min=0, max=1)
@Description(
@@ -2151,4 +2150,4 @@ public class ImagingStudy extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Immunization.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Immunization.java
index 4c0eb47a0b6..a5409bff644 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Immunization.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Immunization.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -724,8 +704,8 @@ public class Immunization extends BaseResource implements IResource {
* Date vaccine administered or was to be administered
*
*/
- public Immunization setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myDate = new DateTimeDt(theDate, thePrecision);
+ public Immunization setDateWithSecondsPrecision( Date theDate) {
+ myDate = new DateTimeDt(theDate);
return this;
}
@@ -737,8 +717,8 @@ public class Immunization extends BaseResource implements IResource {
* Date vaccine administered or was to be administered
*
*/
- public Immunization setDateWithSecondsPrecision( Date theDate) {
- myDate = new DateTimeDt(theDate);
+ public Immunization setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myDate = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -1099,8 +1079,8 @@ public class Immunization extends BaseResource implements IResource {
* Date vaccine batch expires
*
*/
- public Immunization setExpirationDate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myExpirationDate = new DateDt(theDate, thePrecision);
+ public Immunization setExpirationDateWithDayPrecision( Date theDate) {
+ myExpirationDate = new DateDt(theDate);
return this;
}
@@ -1112,8 +1092,8 @@ public class Immunization extends BaseResource implements IResource {
* Date vaccine batch expires
*
*/
- public Immunization setExpirationDateWithDayPrecision( Date theDate) {
- myExpirationDate = new DateDt(theDate);
+ public Immunization setExpirationDate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myExpirationDate = new DateDt(theDate, thePrecision);
return this;
}
@@ -1231,8 +1211,21 @@ public class Immunization extends BaseResource implements IResource {
* The quantity of vaccine product that was administered
*
*/
- public Immunization setDoseQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
- myDoseQuantity = new QuantityDt(theComparator, theValue, theUnits);
+ public Immunization setDoseQuantity( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) {
+ myDoseQuantity = new QuantityDt(theComparator, theValue, theSystem, theUnits);
+ return this;
+ }
+
+ /**
+ * Sets the value for doseQuantity (Amount of vaccine administered)
+ *
+ *
+ * Definition:
+ * The quantity of vaccine product that was administered
+ *
+ */
+ public Immunization setDoseQuantity( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) {
+ myDoseQuantity = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
@@ -1257,8 +1250,8 @@ public class Immunization extends BaseResource implements IResource {
* The quantity of vaccine product that was administered
*
*/
- public Immunization setDoseQuantity( long theValue) {
- myDoseQuantity = new QuantityDt(theValue);
+ public Immunization setDoseQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
+ myDoseQuantity = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
@@ -1275,6 +1268,19 @@ public class Immunization extends BaseResource implements IResource {
return this;
}
+ /**
+ * Sets the value for doseQuantity (Amount of vaccine administered)
+ *
+ *
+ * Definition:
+ * The quantity of vaccine product that was administered
+ *
+ */
+ public Immunization setDoseQuantity( long theValue) {
+ myDoseQuantity = new QuantityDt(theValue);
+ return this;
+ }
+
/**
* Gets the value(s) for explanation (Administration / refusal reasons).
@@ -1436,7 +1442,7 @@ public class Immunization extends BaseResource implements IResource {
*
*/
@Block()
- public static class Explanation extends BaseElement implements IResourceBlock {
+ public static class Explanation extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="reason", type=CodeableConceptDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
@@ -1493,6 +1499,23 @@ public class Immunization extends BaseResource implements IResource {
return this;
}
+ /**
+ * Add a value for reason (Why immunization occurred) using an enumerated type. This
+ * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
+ * or contain the desirable codes. If you wish to use codes other than those which are built-in,
+ * you may also use the {@link #addType()} method.
+ *
+ *
+ * Definition:
+ * Reasons why a vaccine was administered
+ *
+ */
+ public BoundCodeableConceptDt addReason(ImmunizationReasonCodesEnum theValue) {
+ BoundCodeableConceptDt retVal = new BoundCodeableConceptDt(ImmunizationReasonCodesEnum.VALUESET_BINDER, theValue);
+ getReason().add(retVal);
+ return retVal;
+ }
+
/**
* Add a value for reason (Why immunization occurred)
*
@@ -1501,8 +1524,10 @@ public class Immunization extends BaseResource implements IResource {
* Reasons why a vaccine was administered
*
*/
- public void addReason(ImmunizationReasonCodesEnum theValue) {
- getReason().add(new BoundCodeableConceptDt(ImmunizationReasonCodesEnum.VALUESET_BINDER, theValue));
+ public BoundCodeableConceptDt addReason() {
+ BoundCodeableConceptDt retVal = new BoundCodeableConceptDt(ImmunizationReasonCodesEnum.VALUESET_BINDER);
+ getReason().add(retVal);
+ return retVal;
}
/**
@@ -1593,7 +1618,7 @@ public class Immunization extends BaseResource implements IResource {
*
*/
@Block()
- public static class Reaction extends BaseElement implements IResourceBlock {
+ public static class Reaction extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="date", type=DateTimeDt.class, order=0, min=0, max=1)
@Description(
@@ -1666,8 +1691,8 @@ public class Immunization extends BaseResource implements IResource {
* Date of reaction to the immunization
*
*/
- public Reaction setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myDate = new DateTimeDt(theDate, thePrecision);
+ public Reaction setDateWithSecondsPrecision( Date theDate) {
+ myDate = new DateTimeDt(theDate);
return this;
}
@@ -1679,8 +1704,8 @@ public class Immunization extends BaseResource implements IResource {
* Date of reaction to the immunization
*
*/
- public Reaction setDateWithSecondsPrecision( Date theDate) {
- myDate = new DateTimeDt(theDate);
+ public Reaction setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myDate = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -1696,6 +1721,9 @@ public class Immunization extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getDetail() {
+ if (myDetail == null) {
+ myDetail = new ResourceReferenceDt();
+ }
return myDetail;
}
@@ -1770,7 +1798,7 @@ public class Immunization extends BaseResource implements IResource {
*
*/
@Block()
- public static class VaccinationProtocol extends BaseElement implements IResourceBlock {
+ public static class VaccinationProtocol extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="doseSequence", type=IntegerDt.class, order=0, min=1, max=1)
@Description(
@@ -2146,4 +2174,4 @@ public class Immunization extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/ImmunizationRecommendation.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/ImmunizationRecommendation.java
index 6dd8738c2ec..de35cdd3b55 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/ImmunizationRecommendation.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/ImmunizationRecommendation.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -528,7 +508,7 @@ public class ImmunizationRecommendation extends BaseResource implements IResourc
*
*/
@Block()
- public static class Recommendation extends BaseElement implements IResourceBlock {
+ public static class Recommendation extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="date", type=DateTimeDt.class, order=0, min=1, max=1)
@Description(
@@ -637,8 +617,8 @@ public class ImmunizationRecommendation extends BaseResource implements IResourc
* The date the immunization recommendation was created.
*
*/
- public Recommendation setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myDate = new DateTimeDt(theDate, thePrecision);
+ public Recommendation setDateWithSecondsPrecision( Date theDate) {
+ myDate = new DateTimeDt(theDate);
return this;
}
@@ -650,8 +630,8 @@ public class ImmunizationRecommendation extends BaseResource implements IResourc
* The date the immunization recommendation was created.
*
*/
- public Recommendation setDateWithSecondsPrecision( Date theDate) {
- myDate = new DateTimeDt(theDate);
+ public Recommendation setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myDate = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -921,6 +901,9 @@ public class ImmunizationRecommendation extends BaseResource implements IResourc
*
*/
public java.util.List getSupportingPatientInformation() {
+ if (mySupportingPatientInformation == null) {
+ mySupportingPatientInformation = new java.util.ArrayList();
+ }
return mySupportingPatientInformation;
}
@@ -963,7 +946,7 @@ public class ImmunizationRecommendation extends BaseResource implements IResourc
*
*/
@Block()
- public static class RecommendationDateCriterion extends BaseElement implements IResourceBlock {
+ public static class RecommendationDateCriterion extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="code", type=CodeableConceptDt.class, order=0, min=1, max=1)
@Description(
@@ -1072,8 +1055,8 @@ public class ImmunizationRecommendation extends BaseResource implements IResourc
* Date recommendation
*
*/
- public RecommendationDateCriterion setValue( Date theDate, TemporalPrecisionEnum thePrecision) {
- myValue = new DateTimeDt(theDate, thePrecision);
+ public RecommendationDateCriterion setValueWithSecondsPrecision( Date theDate) {
+ myValue = new DateTimeDt(theDate);
return this;
}
@@ -1085,8 +1068,8 @@ public class ImmunizationRecommendation extends BaseResource implements IResourc
* Date recommendation
*
*/
- public RecommendationDateCriterion setValueWithSecondsPrecision( Date theDate) {
- myValue = new DateTimeDt(theDate);
+ public RecommendationDateCriterion setValue( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myValue = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -1104,7 +1087,7 @@ public class ImmunizationRecommendation extends BaseResource implements IResourc
*
*/
@Block()
- public static class RecommendationProtocol extends BaseElement implements IResourceBlock {
+ public static class RecommendationProtocol extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="doseSequence", type=IntegerDt.class, order=0, min=0, max=1)
@Description(
@@ -1316,4 +1299,4 @@ public class ImmunizationRecommendation extends BaseResource implements IResourc
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/ListResource.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/ListResource.java
index ed674b06fa6..425a5a8c1f1 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/ListResource.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/ListResource.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -67,7 +47,7 @@ import ca.uhn.fhir.rest.gclient.TokenParam;
/**
- * HAPI/FHIR ListResource Resource
+ * HAPI/FHIR List Resource
* (Information summarized from a list of other resources)
*
*
*
*/
-@ResourceDef(name="ListResource", profile="http://hl7.org/fhir/profiles/List", id="list")
+@ResourceDef(name="List", profile="http://hl7.org/fhir/profiles/List", id="list")
public class ListResource extends BaseResource implements IResource {
/**
@@ -448,6 +428,9 @@ public class ListResource extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getSubject() {
+ if (mySubject == null) {
+ mySubject = new ResourceReferenceDt();
+ }
return mySubject;
}
@@ -476,6 +459,9 @@ public class ListResource extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getSource() {
+ if (mySource == null) {
+ mySource = new ResourceReferenceDt();
+ }
return mySource;
}
@@ -531,8 +517,8 @@ public class ListResource extends BaseResource implements IResource {
* The date that the list was prepared
*
*/
- public ListResource setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myDate = new DateTimeDt(theDate, thePrecision);
+ public ListResource setDateWithSecondsPrecision( Date theDate) {
+ myDate = new DateTimeDt(theDate);
return this;
}
@@ -544,8 +530,8 @@ public class ListResource extends BaseResource implements IResource {
* The date that the list was prepared
*
*/
- public ListResource setDateWithSecondsPrecision( Date theDate) {
- myDate = new DateTimeDt(theDate);
+ public ListResource setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myDate = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -738,7 +724,7 @@ public class ListResource extends BaseResource implements IResource {
*
*/
@Block()
- public static class Entry extends BaseElement implements IResourceBlock {
+ public static class Entry extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="flag", type=CodeableConceptDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
@@ -922,8 +908,8 @@ public class ListResource extends BaseResource implements IResource {
* When this item was added to the list
*
*/
- public Entry setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myDate = new DateTimeDt(theDate, thePrecision);
+ public Entry setDateWithSecondsPrecision( Date theDate) {
+ myDate = new DateTimeDt(theDate);
return this;
}
@@ -935,8 +921,8 @@ public class ListResource extends BaseResource implements IResource {
* When this item was added to the list
*
*/
- public Entry setDateWithSecondsPrecision( Date theDate) {
- myDate = new DateTimeDt(theDate);
+ public Entry setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myDate = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -978,4 +964,4 @@ public class ListResource extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Location.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Location.java
index dd63af89fe5..9c20ed19f29 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Location.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Location.java
@@ -16,30 +16,10 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -55,6 +35,7 @@ import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.ContactDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
+import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.LocationModeEnum;
import ca.uhn.fhir.model.dstu.valueset.LocationStatusEnum;
@@ -612,7 +593,43 @@ public class Location extends BaseResource implements IResource {
}
return getTelecom().get(0);
}
-
+ /**
+ * Adds a new value for telecom (Contact details of the location)
+ *
+ *
+ * Definition:
+ * The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites
+ *
+ *
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public Location addTelecom( ContactUseEnum theContactUse, String theValue) {
+ if (myTelecom == null) {
+ myTelecom = new java.util.ArrayList();
+ }
+ myTelecom.add(new ContactDt(theContactUse, theValue));
+ return this;
+ }
+
+ /**
+ * Adds a new value for telecom (Contact details of the location)
+ *
+ *
+ * Definition:
+ * The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites
+ *
+ *
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public Location addTelecom( String theValue) {
+ if (myTelecom == null) {
+ myTelecom = new java.util.ArrayList();
+ }
+ myTelecom.add(new ContactDt(theValue));
+ return this;
+ }
+
+
/**
* Gets the value(s) for address (Physical location).
* creating it if it does
@@ -865,7 +882,7 @@ public class Location extends BaseResource implements IResource {
*
*/
@Block()
- public static class Position extends BaseElement implements IResourceBlock {
+ public static class Position extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="longitude", type=DecimalDt.class, order=0, min=1, max=1)
@Description(
@@ -1115,4 +1132,4 @@ public class Location extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Media.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Media.java
index 21a2f7b1ca6..c87dcd98cde 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Media.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Media.java
@@ -16,26 +16,6 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
@@ -561,8 +541,8 @@ public class Media extends BaseResource implements IResource {
* When the media was originally recorded. For video and audio, if the length of the recording is not insignificant, this is the end of the recording
*
*/
- public Media setDateTime( Date theDate, TemporalPrecisionEnum thePrecision) {
- myDateTime = new DateTimeDt(theDate, thePrecision);
+ public Media setDateTimeWithSecondsPrecision( Date theDate) {
+ myDateTime = new DateTimeDt(theDate);
return this;
}
@@ -574,8 +554,8 @@ public class Media extends BaseResource implements IResource {
* When the media was originally recorded. For video and audio, if the length of the recording is not insignificant, this is the end of the recording
*
*/
- public Media setDateTimeWithSecondsPrecision( Date theDate) {
- myDateTime = new DateTimeDt(theDate);
+ public Media setDateTime( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myDateTime = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -591,6 +571,9 @@ public class Media extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getSubject() {
+ if (mySubject == null) {
+ mySubject = new ResourceReferenceDt();
+ }
return mySubject;
}
@@ -923,4 +906,4 @@ public class Media extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Medication.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Medication.java
index 3e409e18c83..3ef4f8c4487 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Medication.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Medication.java
@@ -16,30 +16,10 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -591,7 +571,7 @@ public class Medication extends BaseResource implements IResource {
*
*/
@Block()
- public static class Product extends BaseElement implements IResourceBlock {
+ public static class Product extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="form", type=CodeableConceptDt.class, order=0, min=0, max=1)
@Description(
@@ -721,7 +701,7 @@ public class Medication extends BaseResource implements IResource {
*
*/
@Block()
- public static class ProductIngredient extends BaseElement implements IResourceBlock {
+ public static class ProductIngredient extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="item", order=0, min=1, max=1, type={
ca.uhn.fhir.model.dstu.resource.Substance.class, ca.uhn.fhir.model.dstu.resource.Medication.class })
@@ -760,6 +740,9 @@ public class Medication extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getItem() {
+ if (myItem == null) {
+ myItem = new ResourceReferenceDt();
+ }
return myItem;
}
@@ -815,4 +798,4 @@ public class Medication extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/MedicationAdministration.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/MedicationAdministration.java
index 5e08d67cb8d..17fc2f682c3 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/MedicationAdministration.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/MedicationAdministration.java
@@ -16,30 +16,10 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IDatatype;
import ca.uhn.fhir.model.api.IElement;
@@ -956,7 +936,7 @@ public class MedicationAdministration extends BaseResource implements IResource
*
*/
@Block()
- public static class Dosage extends BaseElement implements IResourceBlock {
+ public static class Dosage extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="timing", order=0, min=0, max=1, type={
DateTimeDt.class, PeriodDt.class })
@@ -1214,8 +1194,21 @@ public class MedicationAdministration extends BaseResource implements IResource
* The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.
*
*/
- public Dosage setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
- myQuantity = new QuantityDt(theComparator, theValue, theUnits);
+ public Dosage setQuantity( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) {
+ myQuantity = new QuantityDt(theComparator, theValue, theSystem, theUnits);
+ return this;
+ }
+
+ /**
+ * Sets the value for quantity (Amount administered in one dose)
+ *
+ *
+ * Definition:
+ * The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.
+ *
+ */
+ public Dosage setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) {
+ myQuantity = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
@@ -1240,8 +1233,8 @@ public class MedicationAdministration extends BaseResource implements IResource
* The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.
*
*/
- public Dosage setQuantity( long theValue) {
- myQuantity = new QuantityDt(theValue);
+ public Dosage setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
+ myQuantity = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
@@ -1258,6 +1251,19 @@ public class MedicationAdministration extends BaseResource implements IResource
return this;
}
+ /**
+ * Sets the value for quantity (Amount administered in one dose)
+ *
+ *
+ * Definition:
+ * The amount of the medication given at one administration event. Use this value when the administration is essentially an instantaneous event such as a swallowing a tablet or giving an injection.
+ *
+ */
+ public Dosage setQuantity( long theValue) {
+ myQuantity = new QuantityDt(theValue);
+ return this;
+ }
+
/**
* Gets the value(s) for rate (Dose quantity per unit of time).
@@ -1327,4 +1333,4 @@ public class MedicationAdministration extends BaseResource implements IResource
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/MedicationDispense.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/MedicationDispense.java
index e06d16c4ac0..e0787db1333 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/MedicationDispense.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/MedicationDispense.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IDatatype;
import ca.uhn.fhir.model.api.IElement;
@@ -733,7 +713,7 @@ public class MedicationDispense extends BaseResource implements IResource {
*
*/
@Block()
- public static class Dispense extends BaseElement implements IResourceBlock {
+ public static class Dispense extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=1)
@Description(
@@ -989,8 +969,21 @@ public class MedicationDispense extends BaseResource implements IResource {
* The amount of medication that has been dispensed. Includes unit of measure.
*
*/
- public Dispense setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
- myQuantity = new QuantityDt(theComparator, theValue, theUnits);
+ public Dispense setQuantity( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) {
+ myQuantity = new QuantityDt(theComparator, theValue, theSystem, theUnits);
+ return this;
+ }
+
+ /**
+ * Sets the value for quantity (Amount dispensed)
+ *
+ *
+ * Definition:
+ * The amount of medication that has been dispensed. Includes unit of measure.
+ *
+ */
+ public Dispense setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) {
+ myQuantity = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
@@ -1015,8 +1008,8 @@ public class MedicationDispense extends BaseResource implements IResource {
* The amount of medication that has been dispensed. Includes unit of measure.
*
*/
- public Dispense setQuantity( long theValue) {
- myQuantity = new QuantityDt(theValue);
+ public Dispense setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
+ myQuantity = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
@@ -1033,6 +1026,19 @@ public class MedicationDispense extends BaseResource implements IResource {
return this;
}
+ /**
+ * Sets the value for quantity (Amount dispensed)
+ *
+ *
+ * Definition:
+ * The amount of medication that has been dispensed. Includes unit of measure.
+ *
+ */
+ public Dispense setQuantity( long theValue) {
+ myQuantity = new QuantityDt(theValue);
+ return this;
+ }
+
/**
* Gets the value(s) for medication (What medication was supplied).
@@ -1103,8 +1109,8 @@ public class MedicationDispense extends BaseResource implements IResource {
* The time when the dispensed product was packaged and reviewed.
*
*/
- public Dispense setWhenPrepared( Date theDate, TemporalPrecisionEnum thePrecision) {
- myWhenPrepared = new DateTimeDt(theDate, thePrecision);
+ public Dispense setWhenPreparedWithSecondsPrecision( Date theDate) {
+ myWhenPrepared = new DateTimeDt(theDate);
return this;
}
@@ -1116,8 +1122,8 @@ public class MedicationDispense extends BaseResource implements IResource {
* The time when the dispensed product was packaged and reviewed.
*
*/
- public Dispense setWhenPreparedWithSecondsPrecision( Date theDate) {
- myWhenPrepared = new DateTimeDt(theDate);
+ public Dispense setWhenPrepared( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myWhenPrepared = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -1160,8 +1166,8 @@ public class MedicationDispense extends BaseResource implements IResource {
* The time the dispensed product was provided to the patient or their representative.
*
*/
- public Dispense setWhenHandedOver( Date theDate, TemporalPrecisionEnum thePrecision) {
- myWhenHandedOver = new DateTimeDt(theDate, thePrecision);
+ public Dispense setWhenHandedOverWithSecondsPrecision( Date theDate) {
+ myWhenHandedOver = new DateTimeDt(theDate);
return this;
}
@@ -1173,8 +1179,8 @@ public class MedicationDispense extends BaseResource implements IResource {
* The time the dispensed product was provided to the patient or their representative.
*
*/
- public Dispense setWhenHandedOverWithSecondsPrecision( Date theDate) {
- myWhenHandedOver = new DateTimeDt(theDate);
+ public Dispense setWhenHandedOver( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myWhenHandedOver = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -1221,6 +1227,9 @@ public class MedicationDispense extends BaseResource implements IResource {
*
*/
public java.util.List getReceiver() {
+ if (myReceiver == null) {
+ myReceiver = new java.util.ArrayList();
+ }
return myReceiver;
}
@@ -1323,7 +1332,7 @@ public class MedicationDispense extends BaseResource implements IResource {
*
*/
@Block()
- public static class DispenseDosage extends BaseElement implements IResourceBlock {
+ public static class DispenseDosage extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="additionalInstructions", type=CodeableConceptDt.class, order=0, min=0, max=1)
@Description(
@@ -1619,8 +1628,21 @@ public class MedicationDispense extends BaseResource implements IResource {
* The amount of therapeutic or other substance given at one administration event.
*
*/
- public DispenseDosage setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
- myQuantity = new QuantityDt(theComparator, theValue, theUnits);
+ public DispenseDosage setQuantity( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) {
+ myQuantity = new QuantityDt(theComparator, theValue, theSystem, theUnits);
+ return this;
+ }
+
+ /**
+ * Sets the value for quantity (Amount of medication per dose)
+ *
+ *
+ * Definition:
+ * The amount of therapeutic or other substance given at one administration event.
+ *
+ */
+ public DispenseDosage setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) {
+ myQuantity = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
@@ -1645,8 +1667,8 @@ public class MedicationDispense extends BaseResource implements IResource {
* The amount of therapeutic or other substance given at one administration event.
*
*/
- public DispenseDosage setQuantity( long theValue) {
- myQuantity = new QuantityDt(theValue);
+ public DispenseDosage setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
+ myQuantity = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
@@ -1663,6 +1685,19 @@ public class MedicationDispense extends BaseResource implements IResource {
return this;
}
+ /**
+ * Sets the value for quantity (Amount of medication per dose)
+ *
+ *
+ * Definition:
+ * The amount of therapeutic or other substance given at one administration event.
+ *
+ */
+ public DispenseDosage setQuantity( long theValue) {
+ myQuantity = new QuantityDt(theValue);
+ return this;
+ }
+
/**
* Gets the value(s) for rate (Amount of medication per unit of time).
@@ -1740,7 +1775,7 @@ public class MedicationDispense extends BaseResource implements IResource {
*
*/
@Block()
- public static class Substitution extends BaseElement implements IResourceBlock {
+ public static class Substitution extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="type", type=CodeableConceptDt.class, order=0, min=1, max=1)
@Description(
@@ -1916,4 +1951,4 @@ public class MedicationDispense extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/MedicationPrescription.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/MedicationPrescription.java
index 51f4ecb72ab..a656c1a3995 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/MedicationPrescription.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/MedicationPrescription.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IDatatype;
import ca.uhn.fhir.model.api.IElement;
@@ -470,8 +450,8 @@ public class MedicationPrescription extends BaseResource implements IResource {
* The date (and perhaps time) when the prescription was written
*
*/
- public MedicationPrescription setDateWritten( Date theDate, TemporalPrecisionEnum thePrecision) {
- myDateWritten = new DateTimeDt(theDate, thePrecision);
+ public MedicationPrescription setDateWrittenWithSecondsPrecision( Date theDate) {
+ myDateWritten = new DateTimeDt(theDate);
return this;
}
@@ -483,8 +463,8 @@ public class MedicationPrescription extends BaseResource implements IResource {
* The date (and perhaps time) when the prescription was written
*
*/
- public MedicationPrescription setDateWrittenWithSecondsPrecision( Date theDate) {
- myDateWritten = new DateTimeDt(theDate);
+ public MedicationPrescription setDateWritten( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myDateWritten = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -816,7 +796,7 @@ public class MedicationPrescription extends BaseResource implements IResource {
*
*/
@Block()
- public static class DosageInstruction extends BaseElement implements IResourceBlock {
+ public static class DosageInstruction extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="text", type=StringDt.class, order=0, min=0, max=1)
@Description(
@@ -1163,8 +1143,21 @@ public class MedicationPrescription extends BaseResource implements IResource {
* The amount of therapeutic or other substance given at one administration event.
*
*/
- public DosageInstruction setDoseQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
- myDoseQuantity = new QuantityDt(theComparator, theValue, theUnits);
+ public DosageInstruction setDoseQuantity( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) {
+ myDoseQuantity = new QuantityDt(theComparator, theValue, theSystem, theUnits);
+ return this;
+ }
+
+ /**
+ * Sets the value for doseQuantity (Amount of medication per dose)
+ *
+ *
+ * Definition:
+ * The amount of therapeutic or other substance given at one administration event.
+ *
+ */
+ public DosageInstruction setDoseQuantity( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) {
+ myDoseQuantity = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
@@ -1189,8 +1182,8 @@ public class MedicationPrescription extends BaseResource implements IResource {
* The amount of therapeutic or other substance given at one administration event.
*
*/
- public DosageInstruction setDoseQuantity( long theValue) {
- myDoseQuantity = new QuantityDt(theValue);
+ public DosageInstruction setDoseQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
+ myDoseQuantity = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
@@ -1207,6 +1200,19 @@ public class MedicationPrescription extends BaseResource implements IResource {
return this;
}
+ /**
+ * Sets the value for doseQuantity (Amount of medication per dose)
+ *
+ *
+ * Definition:
+ * The amount of therapeutic or other substance given at one administration event.
+ *
+ */
+ public DosageInstruction setDoseQuantity( long theValue) {
+ myDoseQuantity = new QuantityDt(theValue);
+ return this;
+ }
+
/**
* Gets the value(s) for rate (Amount of medication per unit of time).
@@ -1283,7 +1289,7 @@ public class MedicationPrescription extends BaseResource implements IResource {
*
*/
@Block()
- public static class Dispense extends BaseElement implements IResourceBlock {
+ public static class Dispense extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="medication", order=0, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Medication.class })
@@ -1476,8 +1482,21 @@ public class MedicationPrescription extends BaseResource implements IResource {
* The amount that is to be dispensed.
*
*/
- public Dispense setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
- myQuantity = new QuantityDt(theComparator, theValue, theUnits);
+ public Dispense setQuantity( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) {
+ myQuantity = new QuantityDt(theComparator, theValue, theSystem, theUnits);
+ return this;
+ }
+
+ /**
+ * Sets the value for quantity (Amount of medication to supply per dispense)
+ *
+ *
+ * Definition:
+ * The amount that is to be dispensed.
+ *
+ */
+ public Dispense setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) {
+ myQuantity = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
@@ -1502,8 +1521,8 @@ public class MedicationPrescription extends BaseResource implements IResource {
* The amount that is to be dispensed.
*
*/
- public Dispense setQuantity( long theValue) {
- myQuantity = new QuantityDt(theValue);
+ public Dispense setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
+ myQuantity = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
@@ -1520,6 +1539,19 @@ public class MedicationPrescription extends BaseResource implements IResource {
return this;
}
+ /**
+ * Sets the value for quantity (Amount of medication to supply per dispense)
+ *
+ *
+ * Definition:
+ * The amount that is to be dispensed.
+ *
+ */
+ public Dispense setQuantity( long theValue) {
+ myQuantity = new QuantityDt(theValue);
+ return this;
+ }
+
/**
* Gets the value(s) for expectedSupplyDuration (Days supply per dispense).
@@ -1565,7 +1597,7 @@ public class MedicationPrescription extends BaseResource implements IResource {
*
*/
@Block()
- public static class Substitution extends BaseElement implements IResourceBlock {
+ public static class Substitution extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="type", type=CodeableConceptDt.class, order=0, min=1, max=1)
@Description(
@@ -1660,4 +1692,4 @@ public class MedicationPrescription extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/MedicationStatement.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/MedicationStatement.java
index d481efc9fd7..f6474370660 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/MedicationStatement.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/MedicationStatement.java
@@ -16,30 +16,10 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IDatatype;
import ca.uhn.fhir.model.api.IElement;
@@ -689,7 +669,7 @@ public class MedicationStatement extends BaseResource implements IResource {
*
*/
@Block()
- public static class Dosage extends BaseElement implements IResourceBlock {
+ public static class Dosage extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="timing", type=ScheduleDt.class, order=0, min=0, max=1)
@Description(
@@ -949,8 +929,21 @@ public class MedicationStatement extends BaseResource implements IResource {
* The amount of therapeutic or other substance given at one administration event.
*
*/
- public Dosage setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
- myQuantity = new QuantityDt(theComparator, theValue, theUnits);
+ public Dosage setQuantity( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) {
+ myQuantity = new QuantityDt(theComparator, theValue, theSystem, theUnits);
+ return this;
+ }
+
+ /**
+ * Sets the value for quantity (Amount administered in one dose)
+ *
+ *
+ * Definition:
+ * The amount of therapeutic or other substance given at one administration event.
+ *
+ */
+ public Dosage setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) {
+ myQuantity = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
@@ -975,8 +968,8 @@ public class MedicationStatement extends BaseResource implements IResource {
* The amount of therapeutic or other substance given at one administration event.
*
*/
- public Dosage setQuantity( long theValue) {
- myQuantity = new QuantityDt(theValue);
+ public Dosage setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
+ myQuantity = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
@@ -993,6 +986,19 @@ public class MedicationStatement extends BaseResource implements IResource {
return this;
}
+ /**
+ * Sets the value for quantity (Amount administered in one dose)
+ *
+ *
+ * Definition:
+ * The amount of therapeutic or other substance given at one administration event.
+ *
+ */
+ public Dosage setQuantity( long theValue) {
+ myQuantity = new QuantityDt(theValue);
+ return this;
+ }
+
/**
* Gets the value(s) for rate (Dose quantity per unit of time).
@@ -1062,4 +1068,4 @@ public class MedicationStatement extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/MessageHeader.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/MessageHeader.java
index 676c5869313..0ef44ebe8f2 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/MessageHeader.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/MessageHeader.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -54,6 +34,7 @@ import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.CodingDt;
import ca.uhn.fhir.model.dstu.composite.ContactDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
+import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum;
import ca.uhn.fhir.model.dstu.valueset.ResponseTypeEnum;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.CodeDt;
@@ -269,8 +250,8 @@ public class MessageHeader extends BaseResource implements IResource {
* The time that the message was sent
*
*/
- public MessageHeader setTimestampWithMillisPrecision( Date theDate) {
- myTimestamp = new InstantDt(theDate);
+ public MessageHeader setTimestamp( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myTimestamp = new InstantDt(theDate, thePrecision);
return this;
}
@@ -282,8 +263,8 @@ public class MessageHeader extends BaseResource implements IResource {
* The time that the message was sent
*
*/
- public MessageHeader setTimestamp( Date theDate, TemporalPrecisionEnum thePrecision) {
- myTimestamp = new InstantDt(theDate, thePrecision);
+ public MessageHeader setTimestampWithMillisPrecision( Date theDate) {
+ myTimestamp = new InstantDt(theDate);
return this;
}
@@ -514,6 +495,9 @@ public class MessageHeader extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getReceiver() {
+ if (myReceiver == null) {
+ myReceiver = new ResourceReferenceDt();
+ }
return myReceiver;
}
@@ -542,6 +526,9 @@ public class MessageHeader extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getResponsible() {
+ if (myResponsible == null) {
+ myResponsible = new ResourceReferenceDt();
+ }
return myResponsible;
}
@@ -643,7 +630,7 @@ public class MessageHeader extends BaseResource implements IResource {
*
*/
@Block()
- public static class Response extends BaseElement implements IResourceBlock {
+ public static class Response extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="identifier", type=IdDt.class, order=0, min=1, max=1)
@Description(
@@ -810,7 +797,7 @@ public class MessageHeader extends BaseResource implements IResource {
*
*/
@Block()
- public static class Source extends BaseElement implements IResourceBlock {
+ public static class Source extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="name", type=StringDt.class, order=0, min=0, max=1)
@Description(
@@ -1020,7 +1007,33 @@ public class MessageHeader extends BaseResource implements IResource {
return this;
}
-
+ /**
+ * Sets the value for contact (Human contact for problems)
+ *
+ *
+ * Definition:
+ * An e-mail, phone, website or other contact point to use to resolve issues with message communications.
+ *
+ */
+ public Source setContact( ContactUseEnum theContactUse, String theValue) {
+ myContact = new ContactDt(theContactUse, theValue);
+ return this;
+ }
+
+ /**
+ * Sets the value for contact (Human contact for problems)
+ *
+ *
+ * Definition:
+ * An e-mail, phone, website or other contact point to use to resolve issues with message communications.
+ *
+ */
+ public Source setContact( String theValue) {
+ myContact = new ContactDt(theValue);
+ return this;
+ }
+
+
/**
* Gets the value(s) for endpoint (Actual message source address or id).
* creating it if it does
@@ -1078,7 +1091,7 @@ public class MessageHeader extends BaseResource implements IResource {
*
*/
@Block()
- public static class Destination extends BaseElement implements IResourceBlock {
+ public static class Destination extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="name", type=StringDt.class, order=0, min=0, max=1)
@Description(
@@ -1238,4 +1251,4 @@ public class MessageHeader extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Microarray.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Microarray.java
index f88b4dde793..4ff91df0a10 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Microarray.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Microarray.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -332,8 +312,8 @@ public class Microarray extends BaseResource implements IResource {
* Date when result of the microarray is updated
*
*/
- public Microarray setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myDate = new DateDt(theDate, thePrecision);
+ public Microarray setDateWithDayPrecision( Date theDate) {
+ myDate = new DateDt(theDate);
return this;
}
@@ -345,8 +325,8 @@ public class Microarray extends BaseResource implements IResource {
* Date when result of the microarray is updated
*
*/
- public Microarray setDateWithDayPrecision( Date theDate) {
- myDate = new DateDt(theDate);
+ public Microarray setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myDate = new DateDt(theDate, thePrecision);
return this;
}
@@ -451,7 +431,7 @@ public class Microarray extends BaseResource implements IResource {
*
*/
@Block()
- public static class Subject extends BaseElement implements IResourceBlock {
+ public static class Subject extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="patient", order=0, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Patient.class })
@@ -601,7 +581,7 @@ public class Microarray extends BaseResource implements IResource {
*
*/
@Block()
- public static class Scanner extends BaseElement implements IResourceBlock {
+ public static class Scanner extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="manufacturer", order=0, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Organization.class })
@@ -768,7 +748,7 @@ public class Microarray extends BaseResource implements IResource {
*
*/
@Block()
- public static class Sample extends BaseElement implements IResourceBlock {
+ public static class Sample extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="identity", type=StringDt.class, order=0, min=1, max=1)
@Description(
@@ -1086,7 +1066,7 @@ public class Microarray extends BaseResource implements IResource {
*
*/
@Block()
- public static class SampleSpecimen extends BaseElement implements IResourceBlock {
+ public static class SampleSpecimen extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="type", type=StringDt.class, order=0, min=1, max=1)
@Description(
@@ -1201,7 +1181,7 @@ public class Microarray extends BaseResource implements IResource {
*
*/
@Block()
- public static class SampleGene extends BaseElement implements IResourceBlock {
+ public static class SampleGene extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="identity", type=StringDt.class, order=0, min=0, max=1)
@Description(
@@ -1315,7 +1295,7 @@ public class Microarray extends BaseResource implements IResource {
*
*/
@Block()
- public static class SampleGeneCoordinate extends BaseElement implements IResourceBlock {
+ public static class SampleGeneCoordinate extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="chromosome", type=StringDt.class, order=0, min=1, max=1)
@Description(
@@ -1489,4 +1469,4 @@ public class Microarray extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Observation.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Observation.java
index a9abd0c7bfb..70b4ef2b388 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Observation.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Observation.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IDatatype;
import ca.uhn.fhir.model.api.IElement;
@@ -786,8 +766,8 @@ public class Observation extends BaseResource implements IResource {
*
*
*/
- public Observation setIssuedWithMillisPrecision( Date theDate) {
- myIssued = new InstantDt(theDate);
+ public Observation setIssued( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myIssued = new InstantDt(theDate, thePrecision);
return this;
}
@@ -799,8 +779,8 @@ public class Observation extends BaseResource implements IResource {
*
*
*/
- public Observation setIssued( Date theDate, TemporalPrecisionEnum thePrecision) {
- myIssued = new InstantDt(theDate, thePrecision);
+ public Observation setIssuedWithMillisPrecision( Date theDate) {
+ myIssued = new InstantDt(theDate);
return this;
}
@@ -1023,6 +1003,9 @@ public class Observation extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getSubject() {
+ if (mySubject == null) {
+ mySubject = new ResourceReferenceDt();
+ }
return mySubject;
}
@@ -1244,7 +1227,7 @@ public class Observation extends BaseResource implements IResource {
*
*/
@Block()
- public static class ReferenceRange extends BaseElement implements IResourceBlock {
+ public static class ReferenceRange extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="low", type=QuantityDt.class, order=0, min=0, max=1)
@Description(
@@ -1323,8 +1306,21 @@ public class Observation extends BaseResource implements IResource {
* The value of the low bound of the reference range. If this is omitted, the low bound of the reference range is assumed to be meaningless. E.g. <2.3
*
*/
- public ReferenceRange setLow( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
- myLow = new QuantityDt(theComparator, theValue, theUnits);
+ public ReferenceRange setLow( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) {
+ myLow = new QuantityDt(theComparator, theValue, theSystem, theUnits);
+ return this;
+ }
+
+ /**
+ * Sets the value for low (Low Range, if relevant)
+ *
+ *
+ * Definition:
+ * The value of the low bound of the reference range. If this is omitted, the low bound of the reference range is assumed to be meaningless. E.g. <2.3
+ *
+ */
+ public ReferenceRange setLow( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) {
+ myLow = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
@@ -1349,8 +1345,8 @@ public class Observation extends BaseResource implements IResource {
* The value of the low bound of the reference range. If this is omitted, the low bound of the reference range is assumed to be meaningless. E.g. <2.3
*
*/
- public ReferenceRange setLow( long theValue) {
- myLow = new QuantityDt(theValue);
+ public ReferenceRange setLow( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
+ myLow = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
@@ -1367,6 +1363,19 @@ public class Observation extends BaseResource implements IResource {
return this;
}
+ /**
+ * Sets the value for low (Low Range, if relevant)
+ *
+ *
+ * Definition:
+ * The value of the low bound of the reference range. If this is omitted, the low bound of the reference range is assumed to be meaningless. E.g. <2.3
+ *
+ */
+ public ReferenceRange setLow( long theValue) {
+ myLow = new QuantityDt(theValue);
+ return this;
+ }
+
/**
* Gets the value(s) for high (High Range, if relevant).
@@ -1406,8 +1415,21 @@ public class Observation extends BaseResource implements IResource {
* The value of the high bound of the reference range. If this is omitted, the high bound of the reference range is assumed to be meaningless. E.g. >5
*
*/
- public ReferenceRange setHigh( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
- myHigh = new QuantityDt(theComparator, theValue, theUnits);
+ public ReferenceRange setHigh( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) {
+ myHigh = new QuantityDt(theComparator, theValue, theSystem, theUnits);
+ return this;
+ }
+
+ /**
+ * Sets the value for high (High Range, if relevant)
+ *
+ *
+ * Definition:
+ * The value of the high bound of the reference range. If this is omitted, the high bound of the reference range is assumed to be meaningless. E.g. >5
+ *
+ */
+ public ReferenceRange setHigh( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) {
+ myHigh = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
@@ -1432,8 +1454,8 @@ public class Observation extends BaseResource implements IResource {
* The value of the high bound of the reference range. If this is omitted, the high bound of the reference range is assumed to be meaningless. E.g. >5
*
*/
- public ReferenceRange setHigh( long theValue) {
- myHigh = new QuantityDt(theValue);
+ public ReferenceRange setHigh( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
+ myHigh = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
@@ -1450,6 +1472,19 @@ public class Observation extends BaseResource implements IResource {
return this;
}
+ /**
+ * Sets the value for high (High Range, if relevant)
+ *
+ *
+ * Definition:
+ * The value of the high bound of the reference range. If this is omitted, the high bound of the reference range is assumed to be meaningless. E.g. >5
+ *
+ */
+ public ReferenceRange setHigh( long theValue) {
+ myHigh = new QuantityDt(theValue);
+ return this;
+ }
+
/**
* Gets the value(s) for meaning (Indicates the meaning/use of this range of this range).
@@ -1526,7 +1561,7 @@ public class Observation extends BaseResource implements IResource {
*
*/
@Block()
- public static class Related extends BaseElement implements IResourceBlock {
+ public static class Related extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="type", type=CodeDt.class, order=0, min=0, max=1)
@Description(
@@ -1635,4 +1670,4 @@ public class Observation extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/OperationOutcome.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/OperationOutcome.java
index 0902c7e450b..9c4fbe516df 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/OperationOutcome.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/OperationOutcome.java
@@ -16,30 +16,10 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -166,7 +146,7 @@ public class OperationOutcome extends BaseResource implements IResource {
*
*/
@Block()
- public static class Issue extends BaseElement implements IResourceBlock {
+ public static class Issue extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="severity", type=CodeDt.class, order=0, min=1, max=1)
@Description(
@@ -410,4 +390,4 @@ public class OperationOutcome extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Order.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Order.java
index c65ed75c123..04e74eb6e7a 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Order.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Order.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IDatatype;
import ca.uhn.fhir.model.api.IElement;
@@ -500,8 +480,8 @@ public class Order extends BaseResource implements IResource {
*
*
*/
- public Order setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myDate = new DateTimeDt(theDate, thePrecision);
+ public Order setDateWithSecondsPrecision( Date theDate) {
+ myDate = new DateTimeDt(theDate);
return this;
}
@@ -513,8 +493,8 @@ public class Order extends BaseResource implements IResource {
*
*
*/
- public Order setDateWithSecondsPrecision( Date theDate) {
- myDate = new DateTimeDt(theDate);
+ public Order setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myDate = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -592,6 +572,9 @@ public class Order extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getTarget() {
+ if (myTarget == null) {
+ myTarget = new ResourceReferenceDt();
+ }
return myTarget;
}
@@ -752,7 +735,7 @@ public class Order extends BaseResource implements IResource {
*
*/
@Block()
- public static class When extends BaseElement implements IResourceBlock {
+ public static class When extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="code", type=CodeableConceptDt.class, order=0, min=0, max=1)
@Description(
@@ -847,4 +830,4 @@ public class Order extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/OrderResponse.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/OrderResponse.java
index 4ee70e6eada..35f9ea8c0b3 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/OrderResponse.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/OrderResponse.java
@@ -16,26 +16,6 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
@@ -447,8 +427,8 @@ public class OrderResponse extends BaseResource implements IResource {
* The date and time at which this order response was made (created/posted)
*
*/
- public OrderResponse setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myDate = new DateTimeDt(theDate, thePrecision);
+ public OrderResponse setDateWithSecondsPrecision( Date theDate) {
+ myDate = new DateTimeDt(theDate);
return this;
}
@@ -460,8 +440,8 @@ public class OrderResponse extends BaseResource implements IResource {
* The date and time at which this order response was made (created/posted)
*
*/
- public OrderResponse setDateWithSecondsPrecision( Date theDate) {
- myDate = new DateTimeDt(theDate);
+ public OrderResponse setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myDate = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -477,6 +457,9 @@ public class OrderResponse extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getWho() {
+ if (myWho == null) {
+ myWho = new ResourceReferenceDt();
+ }
return myWho;
}
@@ -656,4 +639,4 @@ public class OrderResponse extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Organization.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Organization.java
index a006c505d45..851847d8437 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Organization.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Organization.java
@@ -16,30 +16,10 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -57,6 +37,7 @@ import ca.uhn.fhir.model.dstu.composite.HumanNameDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum;
+import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.OrganizationTypeEnum;
import ca.uhn.fhir.model.primitive.BooleanDt;
@@ -542,7 +523,43 @@ public class Organization extends BaseResource implements IResource {
}
return getTelecom().get(0);
}
-
+ /**
+ * Adds a new value for telecom (A contact detail for the organization)
+ *
+ *
+ * Definition:
+ * A contact detail for the organization
+ *
+ *
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public Organization addTelecom( ContactUseEnum theContactUse, String theValue) {
+ if (myTelecom == null) {
+ myTelecom = new java.util.ArrayList();
+ }
+ myTelecom.add(new ContactDt(theContactUse, theValue));
+ return this;
+ }
+
+ /**
+ * Adds a new value for telecom (A contact detail for the organization)
+ *
+ *
+ * Definition:
+ * A contact detail for the organization
+ *
+ *
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public Organization addTelecom( String theValue) {
+ if (myTelecom == null) {
+ myTelecom = new java.util.ArrayList();
+ }
+ myTelecom.add(new ContactDt(theValue));
+ return this;
+ }
+
+
/**
* Gets the value(s) for address (An address for the organization).
* creating it if it does
@@ -791,7 +808,7 @@ public class Organization extends BaseResource implements IResource {
*
*/
@Block()
- public static class Contact extends BaseElement implements IResourceBlock {
+ public static class Contact extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="purpose", type=CodeableConceptDt.class, order=0, min=0, max=1)
@Description(
@@ -960,7 +977,43 @@ public class Organization extends BaseResource implements IResource {
}
return getTelecom().get(0);
}
-
+ /**
+ * Adds a new value for telecom (Contact details (telephone, email, etc) for a contact)
+ *
+ *
+ * Definition:
+ * A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.
+ *
+ *
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public Contact addTelecom( ContactUseEnum theContactUse, String theValue) {
+ if (myTelecom == null) {
+ myTelecom = new java.util.ArrayList();
+ }
+ myTelecom.add(new ContactDt(theContactUse, theValue));
+ return this;
+ }
+
+ /**
+ * Adds a new value for telecom (Contact details (telephone, email, etc) for a contact)
+ *
+ *
+ * Definition:
+ * A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.
+ *
+ *
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public Contact addTelecom( String theValue) {
+ if (myTelecom == null) {
+ myTelecom = new java.util.ArrayList();
+ }
+ myTelecom.add(new ContactDt(theValue));
+ return this;
+ }
+
+
/**
* Gets the value(s) for address (Visiting or postal addresses for the contact).
* creating it if it does
@@ -1042,4 +1095,4 @@ public class Organization extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Other.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Other.java
index 728f707f20d..909cf435704 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Other.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Other.java
@@ -16,26 +16,6 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
@@ -369,6 +349,9 @@ public class Other extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getAuthor() {
+ if (myAuthor == null) {
+ myAuthor = new ResourceReferenceDt();
+ }
return myAuthor;
}
@@ -424,8 +407,8 @@ public class Other extends BaseResource implements IResource {
* Identifies when the resource was first created
*
*/
- public Other setCreated( Date theDate, TemporalPrecisionEnum thePrecision) {
- myCreated = new DateDt(theDate, thePrecision);
+ public Other setCreatedWithDayPrecision( Date theDate) {
+ myCreated = new DateDt(theDate);
return this;
}
@@ -437,12 +420,12 @@ public class Other extends BaseResource implements IResource {
* Identifies when the resource was first created
*
*/
- public Other setCreatedWithDayPrecision( Date theDate) {
- myCreated = new DateDt(theDate);
+ public Other setCreated( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myCreated = new DateDt(theDate, thePrecision);
return this;
}
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Patient.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Patient.java
index 636aa574079..8bb64f0dcf2 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Patient.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Patient.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IDatatype;
import ca.uhn.fhir.model.api.IElement;
@@ -62,6 +42,7 @@ import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum;
import ca.uhn.fhir.model.dstu.valueset.AnimalSpeciesEnum;
+import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.LinkTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.MaritalStatusCodesEnum;
@@ -777,7 +758,43 @@ public class Patient extends BaseResource implements IResource {
}
return getTelecom().get(0);
}
-
+ /**
+ * Adds a new value for telecom (A contact detail for the individual)
+ *
+ *
+ * Definition:
+ * A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.
+ *
+ *
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public Patient addTelecom( ContactUseEnum theContactUse, String theValue) {
+ if (myTelecom == null) {
+ myTelecom = new java.util.ArrayList();
+ }
+ myTelecom.add(new ContactDt(theContactUse, theValue));
+ return this;
+ }
+
+ /**
+ * Adds a new value for telecom (A contact detail for the individual)
+ *
+ *
+ * Definition:
+ * A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.
+ *
+ *
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public Patient addTelecom( String theValue) {
+ if (myTelecom == null) {
+ myTelecom = new java.util.ArrayList();
+ }
+ myTelecom.add(new ContactDt(theValue));
+ return this;
+ }
+
+
/**
* Gets the value(s) for gender (Gender for administrative purposes).
* creating it if it does
@@ -860,8 +877,8 @@ public class Patient extends BaseResource implements IResource {
* The date and time of birth for the individual
*
*/
- public Patient setBirthDate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myBirthDate = new DateTimeDt(theDate, thePrecision);
+ public Patient setBirthDateWithSecondsPrecision( Date theDate) {
+ myBirthDate = new DateTimeDt(theDate);
return this;
}
@@ -873,8 +890,8 @@ public class Patient extends BaseResource implements IResource {
* The date and time of birth for the individual
*
*/
- public Patient setBirthDateWithSecondsPrecision( Date theDate) {
- myBirthDate = new DateTimeDt(theDate);
+ public Patient setBirthDate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myBirthDate = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -1261,6 +1278,9 @@ public class Patient extends BaseResource implements IResource {
*
*/
public java.util.List getCareProvider() {
+ if (myCareProvider == null) {
+ myCareProvider = new java.util.ArrayList();
+ }
return myCareProvider;
}
@@ -1435,7 +1455,7 @@ public class Patient extends BaseResource implements IResource {
*
*/
@Block()
- public static class Contact extends BaseElement implements IResourceBlock {
+ public static class Contact extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="relationship", type=CodeableConceptDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
@@ -1641,7 +1661,43 @@ public class Patient extends BaseResource implements IResource {
}
return getTelecom().get(0);
}
-
+ /**
+ * Adds a new value for telecom (A contact detail for the person)
+ *
+ *
+ * Definition:
+ * A contact detail for the person, e.g. a telephone number or an email address.
+ *
+ *
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public Contact addTelecom( ContactUseEnum theContactUse, String theValue) {
+ if (myTelecom == null) {
+ myTelecom = new java.util.ArrayList();
+ }
+ myTelecom.add(new ContactDt(theContactUse, theValue));
+ return this;
+ }
+
+ /**
+ * Adds a new value for telecom (A contact detail for the person)
+ *
+ *
+ * Definition:
+ * A contact detail for the person, e.g. a telephone number or an email address.
+ *
+ *
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public Contact addTelecom( String theValue) {
+ if (myTelecom == null) {
+ myTelecom = new java.util.ArrayList();
+ }
+ myTelecom.add(new ContactDt(theValue));
+ return this;
+ }
+
+
/**
* Gets the value(s) for address (Address for the contact person).
* creating it if it does
@@ -1761,7 +1817,7 @@ public class Patient extends BaseResource implements IResource {
*
*/
@Block()
- public static class Animal extends BaseElement implements IResourceBlock {
+ public static class Animal extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="species", type=CodeableConceptDt.class, order=0, min=1, max=1)
@Description(
@@ -1914,7 +1970,7 @@ public class Patient extends BaseResource implements IResource {
*
*/
@Block()
- public static class Link extends BaseElement implements IResourceBlock {
+ public static class Link extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="other", order=0, min=1, max=1, type={
ca.uhn.fhir.model.dstu.resource.Patient.class })
@@ -2023,4 +2079,4 @@ public class Patient extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Practitioner.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Practitioner.java
index b0aff8139db..802fa2c63d5 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Practitioner.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Practitioner.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -61,6 +41,7 @@ import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.PeriodDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum;
+import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.PractitionerRoleEnum;
import ca.uhn.fhir.model.dstu.valueset.PractitionerSpecialtyEnum;
@@ -587,7 +568,43 @@ public class Practitioner extends BaseResource implements IResource {
}
return getTelecom().get(0);
}
-
+ /**
+ * Adds a new value for telecom (A contact detail for the practitioner)
+ *
+ *
+ * Definition:
+ * A contact detail for the practitioner, e.g. a telephone number or an email address.
+ *
+ *
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public Practitioner addTelecom( ContactUseEnum theContactUse, String theValue) {
+ if (myTelecom == null) {
+ myTelecom = new java.util.ArrayList();
+ }
+ myTelecom.add(new ContactDt(theContactUse, theValue));
+ return this;
+ }
+
+ /**
+ * Adds a new value for telecom (A contact detail for the practitioner)
+ *
+ *
+ * Definition:
+ * A contact detail for the practitioner, e.g. a telephone number or an email address.
+ *
+ *
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public Practitioner addTelecom( String theValue) {
+ if (myTelecom == null) {
+ myTelecom = new java.util.ArrayList();
+ }
+ myTelecom.add(new ContactDt(theValue));
+ return this;
+ }
+
+
/**
* Gets the value(s) for address (Where practitioner can be found/visited).
* creating it if it does
@@ -701,8 +718,8 @@ public class Practitioner extends BaseResource implements IResource {
* The date and time of birth for the practitioner
*
*/
- public Practitioner setBirthDate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myBirthDate = new DateTimeDt(theDate, thePrecision);
+ public Practitioner setBirthDateWithSecondsPrecision( Date theDate) {
+ myBirthDate = new DateTimeDt(theDate);
return this;
}
@@ -714,8 +731,8 @@ public class Practitioner extends BaseResource implements IResource {
* The date and time of birth for the practitioner
*
*/
- public Practitioner setBirthDateWithSecondsPrecision( Date theDate) {
- myBirthDate = new DateTimeDt(theDate);
+ public Practitioner setBirthDate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myBirthDate = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -841,6 +858,23 @@ public class Practitioner extends BaseResource implements IResource {
return this;
}
+ /**
+ * Add a value for role (Roles which this practitioner may perform) using an enumerated type. This
+ * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
+ * or contain the desirable codes. If you wish to use codes other than those which are built-in,
+ * you may also use the {@link #addType()} method.
+ *
+ *
+ * Definition:
+ * Roles which this practitioner is authorized to perform for the organization
+ *
+ */
+ public BoundCodeableConceptDt addRole(PractitionerRoleEnum theValue) {
+ BoundCodeableConceptDt retVal = new BoundCodeableConceptDt(PractitionerRoleEnum.VALUESET_BINDER, theValue);
+ getRole().add(retVal);
+ return retVal;
+ }
+
/**
* Add a value for role (Roles which this practitioner may perform)
*
@@ -849,8 +883,10 @@ public class Practitioner extends BaseResource implements IResource {
* Roles which this practitioner is authorized to perform for the organization
*
*/
- public void addRole(PractitionerRoleEnum theValue) {
- getRole().add(new BoundCodeableConceptDt(PractitionerRoleEnum.VALUESET_BINDER, theValue));
+ public BoundCodeableConceptDt addRole() {
+ BoundCodeableConceptDt retVal = new BoundCodeableConceptDt(PractitionerRoleEnum.VALUESET_BINDER);
+ getRole().add(retVal);
+ return retVal;
}
/**
@@ -898,6 +934,23 @@ public class Practitioner extends BaseResource implements IResource {
return this;
}
+ /**
+ * Add a value for specialty (Specific specialty of the practitioner) using an enumerated type. This
+ * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
+ * or contain the desirable codes. If you wish to use codes other than those which are built-in,
+ * you may also use the {@link #addType()} method.
+ *
+ *
+ * Definition:
+ * Specific specialty of the practitioner
+ *
+ */
+ public BoundCodeableConceptDt addSpecialty(PractitionerSpecialtyEnum theValue) {
+ BoundCodeableConceptDt retVal = new BoundCodeableConceptDt(PractitionerSpecialtyEnum.VALUESET_BINDER, theValue);
+ getSpecialty().add(retVal);
+ return retVal;
+ }
+
/**
* Add a value for specialty (Specific specialty of the practitioner)
*
@@ -906,8 +959,10 @@ public class Practitioner extends BaseResource implements IResource {
* Specific specialty of the practitioner
*
*/
- public void addSpecialty(PractitionerSpecialtyEnum theValue) {
- getSpecialty().add(new BoundCodeableConceptDt(PractitionerSpecialtyEnum.VALUESET_BINDER, theValue));
+ public BoundCodeableConceptDt addSpecialty() {
+ BoundCodeableConceptDt retVal = new BoundCodeableConceptDt(PractitionerSpecialtyEnum.VALUESET_BINDER);
+ getSpecialty().add(retVal);
+ return retVal;
}
/**
@@ -1129,7 +1184,7 @@ public class Practitioner extends BaseResource implements IResource {
*
*/
@Block()
- public static class Qualification extends BaseElement implements IResourceBlock {
+ public static class Qualification extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="code", type=CodeableConceptDt.class, order=0, min=1, max=1)
@Description(
@@ -1263,4 +1318,4 @@ public class Practitioner extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Procedure.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Procedure.java
index c6aadfcf234..eb7b8b5638c 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Procedure.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Procedure.java
@@ -16,30 +16,10 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -974,7 +954,7 @@ public class Procedure extends BaseResource implements IResource {
*
*/
@Block()
- public static class Performer extends BaseElement implements IResourceBlock {
+ public static class Performer extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="person", order=0, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Practitioner.class })
@@ -1077,7 +1057,7 @@ public class Procedure extends BaseResource implements IResource {
*
*/
@Block()
- public static class RelatedItem extends BaseElement implements IResourceBlock {
+ public static class RelatedItem extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="type", type=CodeDt.class, order=0, min=0, max=1)
@Description(
@@ -1160,6 +1140,9 @@ public class Procedure extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getTarget() {
+ if (myTarget == null) {
+ myTarget = new ResourceReferenceDt();
+ }
return myTarget;
}
@@ -1183,4 +1166,4 @@ public class Procedure extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Profile.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Profile.java
index 67fb9d42e26..cd20a2cffd9 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Profile.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Profile.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IDatatype;
import ca.uhn.fhir.model.api.IElement;
@@ -58,6 +38,7 @@ import ca.uhn.fhir.model.dstu.composite.ContactDt;
import ca.uhn.fhir.model.dstu.valueset.AggregationModeEnum;
import ca.uhn.fhir.model.dstu.valueset.BindingConformanceEnum;
import ca.uhn.fhir.model.dstu.valueset.ConstraintSeverityEnum;
+import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum;
import ca.uhn.fhir.model.dstu.valueset.DataTypeEnum;
import ca.uhn.fhir.model.dstu.valueset.ExtensionContextEnum;
import ca.uhn.fhir.model.dstu.valueset.FHIRDefinedTypeEnum;
@@ -699,7 +680,43 @@ public class Profile extends BaseResource implements IResource {
}
return getTelecom().get(0);
}
-
+ /**
+ * Adds a new value for telecom (Contact information of the publisher)
+ *
+ *
+ * Definition:
+ * Contact details to assist a user in finding and communicating with the publisher
+ *
+ *
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public Profile addTelecom( ContactUseEnum theContactUse, String theValue) {
+ if (myTelecom == null) {
+ myTelecom = new java.util.ArrayList();
+ }
+ myTelecom.add(new ContactDt(theContactUse, theValue));
+ return this;
+ }
+
+ /**
+ * Adds a new value for telecom (Contact information of the publisher)
+ *
+ *
+ * Definition:
+ * Contact details to assist a user in finding and communicating with the publisher
+ *
+ *
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public Profile addTelecom( String theValue) {
+ if (myTelecom == null) {
+ myTelecom = new java.util.ArrayList();
+ }
+ myTelecom.add(new ContactDt(theValue));
+ return this;
+ }
+
+
/**
* Gets the value(s) for description (Natural language description of the profile).
* creating it if it does
@@ -930,8 +947,8 @@ public class Profile extends BaseResource implements IResource {
* The date that this version of the profile was published
*
*/
- public Profile setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myDate = new DateTimeDt(theDate, thePrecision);
+ public Profile setDateWithSecondsPrecision( Date theDate) {
+ myDate = new DateTimeDt(theDate);
return this;
}
@@ -943,8 +960,8 @@ public class Profile extends BaseResource implements IResource {
* The date that this version of the profile was published
*
*/
- public Profile setDateWithSecondsPrecision( Date theDate) {
- myDate = new DateTimeDt(theDate);
+ public Profile setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myDate = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -1286,7 +1303,7 @@ public class Profile extends BaseResource implements IResource {
*
*/
@Block()
- public static class Mapping extends BaseElement implements IResourceBlock {
+ public static class Mapping extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="identity", type=IdDt.class, order=0, min=1, max=1)
@Description(
@@ -1516,7 +1533,7 @@ public class Profile extends BaseResource implements IResource {
*
*/
@Block()
- public static class Structure extends BaseElement implements IResourceBlock {
+ public static class Structure extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="type", type=CodeDt.class, order=0, min=1, max=1)
@Description(
@@ -1879,7 +1896,7 @@ public class Profile extends BaseResource implements IResource {
*
*/
@Block()
- public static class StructureElement extends BaseElement implements IResourceBlock {
+ public static class StructureElement extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="path", type=StringDt.class, order=0, min=1, max=1)
@Description(
@@ -2001,6 +2018,23 @@ public class Profile extends BaseResource implements IResource {
return this;
}
+ /**
+ * Add a value for representation (How this element is represented in instances) using an enumerated type. This
+ * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
+ * or contain the desirable codes. If you wish to use codes other than those which are built-in,
+ * you may also use the {@link #addType()} method.
+ *
+ *
+ * Definition:
+ * Codes that define how this element is represented in instances, when the deviation varies from the normal case
+ *
+ */
+ public BoundCodeDt addRepresentation(PropertyRepresentationEnum theValue) {
+ BoundCodeDt retVal = new BoundCodeDt(PropertyRepresentationEnum.VALUESET_BINDER, theValue);
+ getRepresentation().add(retVal);
+ return retVal;
+ }
+
/**
* Add a value for representation (How this element is represented in instances)
*
@@ -2009,8 +2043,10 @@ public class Profile extends BaseResource implements IResource {
* Codes that define how this element is represented in instances, when the deviation varies from the normal case
*
*/
- public void addRepresentation(PropertyRepresentationEnum theValue) {
- getRepresentation().add(new BoundCodeDt(PropertyRepresentationEnum.VALUESET_BINDER, theValue));
+ public BoundCodeDt addRepresentation() {
+ BoundCodeDt retVal = new BoundCodeDt(PropertyRepresentationEnum.VALUESET_BINDER);
+ getRepresentation().add(retVal);
+ return retVal;
}
/**
@@ -2146,7 +2182,7 @@ public class Profile extends BaseResource implements IResource {
*
*/
@Block()
- public static class StructureElementSlicing extends BaseElement implements IResourceBlock {
+ public static class StructureElementSlicing extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="discriminator", type=IdDt.class, order=0, min=1, max=1)
@Description(
@@ -2325,7 +2361,7 @@ public class Profile extends BaseResource implements IResource {
*
*/
@Block()
- public static class StructureElementDefinition extends BaseElement implements IResourceBlock {
+ public static class StructureElementDefinition extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="short", type=StringDt.class, order=0, min=1, max=1)
@Description(
@@ -3339,7 +3375,7 @@ public class Profile extends BaseResource implements IResource {
*
*/
@Block()
- public static class StructureElementDefinitionType extends BaseElement implements IResourceBlock {
+ public static class StructureElementDefinitionType extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="code", type=CodeDt.class, order=0, min=1, max=1)
@Description(
@@ -3491,6 +3527,23 @@ public class Profile extends BaseResource implements IResource {
return this;
}
+ /**
+ * Add a value for aggregation (contained | referenced | bundled - how aggregated) using an enumerated type. This
+ * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
+ * or contain the desirable codes. If you wish to use codes other than those which are built-in,
+ * you may also use the {@link #addType()} method.
+ *
+ *
+ * Definition:
+ * If the type is a reference to another resource, how the resource is or can be aggreated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle
+ *
+ */
+ public BoundCodeDt addAggregation(AggregationModeEnum theValue) {
+ BoundCodeDt retVal = new BoundCodeDt(AggregationModeEnum.VALUESET_BINDER, theValue);
+ getAggregation().add(retVal);
+ return retVal;
+ }
+
/**
* Add a value for aggregation (contained | referenced | bundled - how aggregated)
*
@@ -3499,8 +3552,10 @@ public class Profile extends BaseResource implements IResource {
* If the type is a reference to another resource, how the resource is or can be aggreated - is it a contained resource, or a reference, and if the context is a bundle, is it included in the bundle
*
*/
- public void addAggregation(AggregationModeEnum theValue) {
- getAggregation().add(new BoundCodeDt(AggregationModeEnum.VALUESET_BINDER, theValue));
+ public BoundCodeDt addAggregation() {
+ BoundCodeDt retVal = new BoundCodeDt(AggregationModeEnum.VALUESET_BINDER);
+ getAggregation().add(retVal);
+ return retVal;
}
/**
@@ -3531,7 +3586,7 @@ public class Profile extends BaseResource implements IResource {
*
*/
@Block()
- public static class StructureElementDefinitionConstraint extends BaseElement implements IResourceBlock {
+ public static class StructureElementDefinitionConstraint extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="key", type=IdDt.class, order=0, min=1, max=1)
@Description(
@@ -3812,7 +3867,7 @@ public class Profile extends BaseResource implements IResource {
*
*/
@Block()
- public static class StructureElementDefinitionBinding extends BaseElement implements IResourceBlock {
+ public static class StructureElementDefinitionBinding extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="name", type=StringDt.class, order=0, min=1, max=1)
@Description(
@@ -4078,7 +4133,7 @@ public class Profile extends BaseResource implements IResource {
*
*/
@Block()
- public static class StructureElementDefinitionMapping extends BaseElement implements IResourceBlock {
+ public static class StructureElementDefinitionMapping extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="identity", type=IdDt.class, order=0, min=1, max=1)
@Description(
@@ -4208,7 +4263,7 @@ public class Profile extends BaseResource implements IResource {
*
*/
@Block()
- public static class StructureSearchParam extends BaseElement implements IResourceBlock {
+ public static class StructureSearchParam extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="name", type=StringDt.class, order=0, min=1, max=1)
@Description(
@@ -4462,6 +4517,23 @@ public class Profile extends BaseResource implements IResource {
return this;
}
+ /**
+ * Add a value for target (Types of resource (if a resource reference)) using an enumerated type. This
+ * is intended as a convenience method for situations where the FHIR defined ValueSets are mandatory
+ * or contain the desirable codes. If you wish to use codes other than those which are built-in,
+ * you may also use the {@link #addType()} method.
+ *
+ *
+ * Definition:
+ * Types of resource (if a resource is referenced)
+ *
+ */
+ public BoundCodeDt addTarget(ResourceTypeEnum theValue) {
+ BoundCodeDt retVal = new BoundCodeDt(ResourceTypeEnum.VALUESET_BINDER, theValue);
+ getTarget().add(retVal);
+ return retVal;
+ }
+
/**
* Add a value for target (Types of resource (if a resource reference))
*
@@ -4470,8 +4542,10 @@ public class Profile extends BaseResource implements IResource {
* Types of resource (if a resource is referenced)
*
*/
- public void addTarget(ResourceTypeEnum theValue) {
- getTarget().add(new BoundCodeDt(ResourceTypeEnum.VALUESET_BINDER, theValue));
+ public BoundCodeDt addTarget() {
+ BoundCodeDt retVal = new BoundCodeDt(ResourceTypeEnum.VALUESET_BINDER);
+ getTarget().add(retVal);
+ return retVal;
}
/**
@@ -4503,7 +4577,7 @@ public class Profile extends BaseResource implements IResource {
*
*/
@Block()
- public static class ExtensionDefn extends BaseElement implements IResourceBlock {
+ public static class ExtensionDefn extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="code", type=CodeDt.class, order=0, min=1, max=1)
@Description(
@@ -4805,7 +4879,7 @@ public class Profile extends BaseResource implements IResource {
*
*/
@Block()
- public static class Query extends BaseElement implements IResourceBlock {
+ public static class Query extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="name", type=StringDt.class, order=0, min=1, max=1)
@Description(
@@ -4993,4 +5067,4 @@ public class Profile extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Provenance.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Provenance.java
index 9d9c9516654..ceebc4e4416 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Provenance.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Provenance.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -418,8 +398,8 @@ public class Provenance extends BaseResource implements IResource {
* The instant of time at which the activity was recorded
*
*/
- public Provenance setRecordedWithMillisPrecision( Date theDate) {
- myRecorded = new InstantDt(theDate);
+ public Provenance setRecorded( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myRecorded = new InstantDt(theDate, thePrecision);
return this;
}
@@ -431,8 +411,8 @@ public class Provenance extends BaseResource implements IResource {
* The instant of time at which the activity was recorded
*
*/
- public Provenance setRecorded( Date theDate, TemporalPrecisionEnum thePrecision) {
- myRecorded = new InstantDt(theDate, thePrecision);
+ public Provenance setRecordedWithMillisPrecision( Date theDate) {
+ myRecorded = new InstantDt(theDate);
return this;
}
@@ -750,7 +730,7 @@ public class Provenance extends BaseResource implements IResource {
*
*/
@Block()
- public static class Agent extends BaseElement implements IResourceBlock {
+ public static class Agent extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="role", type=CodingDt.class, order=0, min=1, max=1)
@Description(
@@ -954,7 +934,7 @@ public class Provenance extends BaseResource implements IResource {
*
*/
@Block()
- public static class Entity extends BaseElement implements IResourceBlock {
+ public static class Entity extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="role", type=CodeDt.class, order=0, min=1, max=1)
@Description(
@@ -1202,4 +1182,4 @@ public class Provenance extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Query.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Query.java
index 27d0c745ea2..5bc931c5e85 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Query.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Query.java
@@ -16,30 +16,10 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.ExtensionDt;
import ca.uhn.fhir.model.api.IElement;
@@ -301,7 +281,7 @@ public class Query extends BaseResource implements IResource {
*
*/
@Block()
- public static class Response extends BaseElement implements IResourceBlock {
+ public static class Response extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="identifier", type=UriDt.class, order=0, min=1, max=1)
@Description(
@@ -860,4 +840,4 @@ public class Query extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Questionnaire.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Questionnaire.java
index 57b19ab0939..1671cc4626d 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Questionnaire.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Questionnaire.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IDatatype;
import ca.uhn.fhir.model.api.IElement;
@@ -425,8 +405,8 @@ public class Questionnaire extends BaseResource implements IResource {
* The date and/or time that this version of the questionnaire was authored
*
*/
- public Questionnaire setAuthored( Date theDate, TemporalPrecisionEnum thePrecision) {
- myAuthored = new DateTimeDt(theDate, thePrecision);
+ public Questionnaire setAuthoredWithSecondsPrecision( Date theDate) {
+ myAuthored = new DateTimeDt(theDate);
return this;
}
@@ -438,8 +418,8 @@ public class Questionnaire extends BaseResource implements IResource {
* The date and/or time that this version of the questionnaire was authored
*
*/
- public Questionnaire setAuthoredWithSecondsPrecision( Date theDate) {
- myAuthored = new DateTimeDt(theDate);
+ public Questionnaire setAuthored( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myAuthored = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -454,8 +434,8 @@ public class Questionnaire extends BaseResource implements IResource {
* The subject of the questionnaires: this is the patient that the answers apply to, but this person is not necessarily the source of information
*
*/
- public ResourceReferenceDt getSubject() {
- if (mySubject==null) {
+ public ResourceReferenceDt getSubject() {
+ if (mySubject == null) {
mySubject = new ResourceReferenceDt();
}
return mySubject;
@@ -486,6 +466,9 @@ public class Questionnaire extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getAuthor() {
+ if (myAuthor == null) {
+ myAuthor = new ResourceReferenceDt();
+ }
return myAuthor;
}
@@ -514,6 +497,9 @@ public class Questionnaire extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getSource() {
+ if (mySource == null) {
+ mySource = new ResourceReferenceDt();
+ }
return mySource;
}
@@ -742,7 +728,7 @@ public class Questionnaire extends BaseResource implements IResource {
*
*/
@Block()
- public static class Group extends BaseElement implements IResourceBlock {
+ public static class Group extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="name", type=CodeableConceptDt.class, order=0, min=0, max=1)
@Description(
@@ -1093,7 +1079,7 @@ public class Questionnaire extends BaseResource implements IResource {
*
*/
@Block()
- public static class GroupQuestion extends BaseElement implements IResourceBlock {
+ public static class GroupQuestion extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="name", type=CodeableConceptDt.class, order=0, min=0, max=1)
@Description(
@@ -1497,4 +1483,4 @@ public class Questionnaire extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/RelatedPerson.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/RelatedPerson.java
index 003fce2a593..59ae0f22fab 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/RelatedPerson.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/RelatedPerson.java
@@ -16,26 +16,6 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.List;
@@ -55,6 +35,7 @@ import ca.uhn.fhir.model.dstu.composite.HumanNameDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.AdministrativeGenderCodesEnum;
+import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.PatientRelationshipTypeEnum;
import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt;
@@ -569,7 +550,43 @@ public class RelatedPerson extends BaseResource implements IResource {
}
return getTelecom().get(0);
}
-
+ /**
+ * Adds a new value for telecom (A contact detail for the person)
+ *
+ *
+ * Definition:
+ * A contact detail for the person, e.g. a telephone number or an email address.
+ *
+ *
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public RelatedPerson addTelecom( ContactUseEnum theContactUse, String theValue) {
+ if (myTelecom == null) {
+ myTelecom = new java.util.ArrayList();
+ }
+ myTelecom.add(new ContactDt(theContactUse, theValue));
+ return this;
+ }
+
+ /**
+ * Adds a new value for telecom (A contact detail for the person)
+ *
+ *
+ * Definition:
+ * A contact detail for the person, e.g. a telephone number or an email address.
+ *
+ *
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public RelatedPerson addTelecom( String theValue) {
+ if (myTelecom == null) {
+ myTelecom = new java.util.ArrayList();
+ }
+ myTelecom.add(new ContactDt(theValue));
+ return this;
+ }
+
+
/**
* Gets the value(s) for gender (Gender for administrative purposes).
* creating it if it does
@@ -707,4 +724,4 @@ public class RelatedPerson extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Remittance.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Remittance.java
index a4928fe2029..59df65c5985 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Remittance.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Remittance.java
@@ -16,30 +16,10 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -274,7 +254,7 @@ public class Remittance extends BaseResource implements IResource {
*
*/
@Block()
- public static class Service extends BaseElement implements IResourceBlock {
+ public static class Service extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="instance", type=IntegerDt.class, order=0, min=1, max=1)
@Description(
@@ -536,4 +516,4 @@ public class Remittance extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/SecurityEvent.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/SecurityEvent.java
index 8d6b9706f64..6888b190bae 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/SecurityEvent.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/SecurityEvent.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -652,7 +632,7 @@ public class SecurityEvent extends BaseResource implements IResource {
*
*/
@Block()
- public static class Event extends BaseElement implements IResourceBlock {
+ public static class Event extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="type", type=CodeableConceptDt.class, order=0, min=1, max=1)
@Description(
@@ -880,8 +860,8 @@ public class SecurityEvent extends BaseResource implements IResource {
* The time when the event occurred on the source
*
*/
- public Event setDateTimeWithMillisPrecision( Date theDate) {
- myDateTime = new InstantDt(theDate);
+ public Event setDateTime( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myDateTime = new InstantDt(theDate, thePrecision);
return this;
}
@@ -893,8 +873,8 @@ public class SecurityEvent extends BaseResource implements IResource {
* The time when the event occurred on the source
*
*/
- public Event setDateTime( Date theDate, TemporalPrecisionEnum thePrecision) {
- myDateTime = new InstantDt(theDate, thePrecision);
+ public Event setDateTimeWithMillisPrecision( Date theDate) {
+ myDateTime = new InstantDt(theDate);
return this;
}
@@ -1000,7 +980,7 @@ public class SecurityEvent extends BaseResource implements IResource {
*
*/
@Block()
- public static class Participant extends BaseElement implements IResourceBlock {
+ public static class Participant extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="role", type=CodeableConceptDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
@@ -1141,6 +1121,9 @@ public class SecurityEvent extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getReference() {
+ if (myReference == null) {
+ myReference = new ResourceReferenceDt();
+ }
return myReference;
}
@@ -1408,7 +1391,7 @@ public class SecurityEvent extends BaseResource implements IResource {
*
*/
@Block()
- public static class ParticipantNetwork extends BaseElement implements IResourceBlock {
+ public static class ParticipantNetwork extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="identifier", type=StringDt.class, order=0, min=0, max=1)
@Description(
@@ -1537,7 +1520,7 @@ public class SecurityEvent extends BaseResource implements IResource {
*
*/
@Block()
- public static class Source extends BaseElement implements IResourceBlock {
+ public static class Source extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="site", type=StringDt.class, order=0, min=0, max=1)
@Description(
@@ -1732,7 +1715,7 @@ public class SecurityEvent extends BaseResource implements IResource {
*
*/
@Block()
- public static class Object extends BaseElement implements IResourceBlock {
+ public static class Object extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=1)
@Description(
@@ -2284,7 +2267,7 @@ public class SecurityEvent extends BaseResource implements IResource {
*
*/
@Block()
- public static class ObjectDetail extends BaseElement implements IResourceBlock {
+ public static class ObjectDetail extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="type", type=StringDt.class, order=0, min=1, max=1)
@Description(
@@ -2406,4 +2389,4 @@ public class SecurityEvent extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/SequencingAnalysis.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/SequencingAnalysis.java
index ed05ca99a03..855797a5e6d 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/SequencingAnalysis.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/SequencingAnalysis.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -287,8 +267,8 @@ public class SequencingAnalysis extends BaseResource implements IResource {
* Date when result of the analysis is updated
*
*/
- public SequencingAnalysis setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myDate = new DateDt(theDate, thePrecision);
+ public SequencingAnalysis setDateWithDayPrecision( Date theDate) {
+ myDate = new DateDt(theDate);
return this;
}
@@ -300,8 +280,8 @@ public class SequencingAnalysis extends BaseResource implements IResource {
* Date when result of the analysis is updated
*
*/
- public SequencingAnalysis setDateWithDayPrecision( Date theDate) {
- myDate = new DateDt(theDate);
+ public SequencingAnalysis setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myDate = new DateDt(theDate, thePrecision);
return this;
}
@@ -538,7 +518,7 @@ public class SequencingAnalysis extends BaseResource implements IResource {
*
*/
@Block()
- public static class Genome extends BaseElement implements IResourceBlock {
+ public static class Genome extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="name", type=CodeDt.class, order=0, min=1, max=1)
@Description(
@@ -659,4 +639,4 @@ public class SequencingAnalysis extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/SequencingLab.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/SequencingLab.java
index 8ed09e6b137..27a020d7d39 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/SequencingLab.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/SequencingLab.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -444,8 +424,8 @@ public class SequencingLab extends BaseResource implements IResource {
* Date when the result of the lab is uploaded
*
*/
- public SequencingLab setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myDate = new DateDt(theDate, thePrecision);
+ public SequencingLab setDateWithDayPrecision( Date theDate) {
+ myDate = new DateDt(theDate);
return this;
}
@@ -457,8 +437,8 @@ public class SequencingLab extends BaseResource implements IResource {
* Date when the result of the lab is uploaded
*
*/
- public SequencingLab setDateWithDayPrecision( Date theDate) {
- myDate = new DateDt(theDate);
+ public SequencingLab setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myDate = new DateDt(theDate, thePrecision);
return this;
}
@@ -638,7 +618,7 @@ public class SequencingLab extends BaseResource implements IResource {
*
*/
@Block()
- public static class System extends BaseElement implements IResourceBlock {
+ public static class System extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="class", type=CodeDt.class, order=0, min=0, max=1)
@Description(
@@ -868,7 +848,7 @@ public class SequencingLab extends BaseResource implements IResource {
*
*/
@Block()
- public static class Specimen extends BaseElement implements IResourceBlock {
+ public static class Specimen extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="type", type=CodeDt.class, order=0, min=1, max=1)
@Description(
@@ -976,4 +956,4 @@ public class SequencingLab extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Slot.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Slot.java
index 2a121cba16f..064ef4e9798 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Slot.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Slot.java
@@ -16,26 +16,6 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
@@ -492,8 +472,8 @@ public class Slot extends BaseResource implements IResource {
*
*
*/
- public Slot setStartWithMillisPrecision( Date theDate) {
- myStart = new InstantDt(theDate);
+ public Slot setStart( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myStart = new InstantDt(theDate, thePrecision);
return this;
}
@@ -505,8 +485,8 @@ public class Slot extends BaseResource implements IResource {
*
*
*/
- public Slot setStart( Date theDate, TemporalPrecisionEnum thePrecision) {
- myStart = new InstantDt(theDate, thePrecision);
+ public Slot setStartWithMillisPrecision( Date theDate) {
+ myStart = new InstantDt(theDate);
return this;
}
@@ -549,8 +529,8 @@ public class Slot extends BaseResource implements IResource {
*
*
*/
- public Slot setEndWithMillisPrecision( Date theDate) {
- myEnd = new InstantDt(theDate);
+ public Slot setEnd( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myEnd = new InstantDt(theDate, thePrecision);
return this;
}
@@ -562,8 +542,8 @@ public class Slot extends BaseResource implements IResource {
*
*
*/
- public Slot setEnd( Date theDate, TemporalPrecisionEnum thePrecision) {
- myEnd = new InstantDt(theDate, thePrecision);
+ public Slot setEndWithMillisPrecision( Date theDate) {
+ myEnd = new InstantDt(theDate);
return this;
}
@@ -623,6 +603,9 @@ public class Slot extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getAuthor() {
+ if (myAuthor == null) {
+ myAuthor = new ResourceReferenceDt();
+ }
return myAuthor;
}
@@ -678,8 +661,8 @@ public class Slot extends BaseResource implements IResource {
*
*
*/
- public Slot setAuthorDate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myAuthorDate = new DateTimeDt(theDate, thePrecision);
+ public Slot setAuthorDateWithSecondsPrecision( Date theDate) {
+ myAuthorDate = new DateTimeDt(theDate);
return this;
}
@@ -691,12 +674,12 @@ public class Slot extends BaseResource implements IResource {
*
*
*/
- public Slot setAuthorDateWithSecondsPrecision( Date theDate) {
- myAuthorDate = new DateTimeDt(theDate);
+ public Slot setAuthorDate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myAuthorDate = new DateTimeDt(theDate, thePrecision);
return this;
}
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Specimen.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Specimen.java
index 730dd4144ee..630106766f9 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Specimen.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Specimen.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IDatatype;
import ca.uhn.fhir.model.api.IElement;
@@ -395,6 +375,9 @@ public class Specimen extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getSubject() {
+ if (mySubject == null) {
+ mySubject = new ResourceReferenceDt();
+ }
return mySubject;
}
@@ -507,8 +490,8 @@ public class Specimen extends BaseResource implements IResource {
* Time when specimen was received for processing or testing
*
*/
- public Specimen setReceivedTime( Date theDate, TemporalPrecisionEnum thePrecision) {
- myReceivedTime = new DateTimeDt(theDate, thePrecision);
+ public Specimen setReceivedTimeWithSecondsPrecision( Date theDate) {
+ myReceivedTime = new DateTimeDt(theDate);
return this;
}
@@ -520,8 +503,8 @@ public class Specimen extends BaseResource implements IResource {
* Time when specimen was received for processing or testing
*
*/
- public Specimen setReceivedTimeWithSecondsPrecision( Date theDate) {
- myReceivedTime = new DateTimeDt(theDate);
+ public Specimen setReceivedTime( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myReceivedTime = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -686,7 +669,7 @@ public class Specimen extends BaseResource implements IResource {
*
*/
@Block()
- public static class Source extends BaseElement implements IResourceBlock {
+ public static class Source extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="relationship", type=CodeDt.class, order=0, min=1, max=1)
@Description(
@@ -815,7 +798,7 @@ public class Specimen extends BaseResource implements IResource {
*
*/
@Block()
- public static class Collection extends BaseElement implements IResourceBlock {
+ public static class Collection extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="collector", order=0, min=0, max=1, type={
ca.uhn.fhir.model.dstu.resource.Practitioner.class })
@@ -1047,8 +1030,21 @@ public class Specimen extends BaseResource implements IResource {
* The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample
*
*/
- public Collection setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
- myQuantity = new QuantityDt(theComparator, theValue, theUnits);
+ public Collection setQuantity( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) {
+ myQuantity = new QuantityDt(theComparator, theValue, theSystem, theUnits);
+ return this;
+ }
+
+ /**
+ * Sets the value for quantity (The quantity of specimen collected)
+ *
+ *
+ * Definition:
+ * The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample
+ *
+ */
+ public Collection setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) {
+ myQuantity = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
@@ -1073,8 +1069,8 @@ public class Specimen extends BaseResource implements IResource {
* The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample
*
*/
- public Collection setQuantity( long theValue) {
- myQuantity = new QuantityDt(theValue);
+ public Collection setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
+ myQuantity = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
@@ -1091,6 +1087,19 @@ public class Specimen extends BaseResource implements IResource {
return this;
}
+ /**
+ * Sets the value for quantity (The quantity of specimen collected)
+ *
+ *
+ * Definition:
+ * The quantity of specimen collected; for instance the volume of a blood sample, or the physical measurement of an anatomic pathology sample
+ *
+ */
+ public Collection setQuantity( long theValue) {
+ myQuantity = new QuantityDt(theValue);
+ return this;
+ }
+
/**
* Gets the value(s) for method (Technique used to perform collection).
@@ -1180,7 +1189,7 @@ public class Specimen extends BaseResource implements IResource {
*
*/
@Block()
- public static class Treatment extends BaseElement implements IResourceBlock {
+ public static class Treatment extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="description", type=StringDt.class, order=0, min=0, max=1)
@Description(
@@ -1360,7 +1369,7 @@ public class Specimen extends BaseResource implements IResource {
*
*/
@Block()
- public static class Container extends BaseElement implements IResourceBlock {
+ public static class Container extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
@@ -1625,8 +1634,21 @@ public class Specimen extends BaseResource implements IResource {
* The capacity (volume or other measure) the container may contain.
*
*/
- public Container setCapacity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
- myCapacity = new QuantityDt(theComparator, theValue, theUnits);
+ public Container setCapacity( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) {
+ myCapacity = new QuantityDt(theComparator, theValue, theSystem, theUnits);
+ return this;
+ }
+
+ /**
+ * Sets the value for capacity (Container volume or size)
+ *
+ *
+ * Definition:
+ * The capacity (volume or other measure) the container may contain.
+ *
+ */
+ public Container setCapacity( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) {
+ myCapacity = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
@@ -1651,8 +1673,8 @@ public class Specimen extends BaseResource implements IResource {
* The capacity (volume or other measure) the container may contain.
*
*/
- public Container setCapacity( long theValue) {
- myCapacity = new QuantityDt(theValue);
+ public Container setCapacity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
+ myCapacity = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
@@ -1669,6 +1691,19 @@ public class Specimen extends BaseResource implements IResource {
return this;
}
+ /**
+ * Sets the value for capacity (Container volume or size)
+ *
+ *
+ * Definition:
+ * The capacity (volume or other measure) the container may contain.
+ *
+ */
+ public Container setCapacity( long theValue) {
+ myCapacity = new QuantityDt(theValue);
+ return this;
+ }
+
/**
* Gets the value(s) for specimenQuantity (Quantity of specimen within container).
@@ -1708,8 +1743,21 @@ public class Specimen extends BaseResource implements IResource {
* The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type
*
*/
- public Container setSpecimenQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
- mySpecimenQuantity = new QuantityDt(theComparator, theValue, theUnits);
+ public Container setSpecimenQuantity( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) {
+ mySpecimenQuantity = new QuantityDt(theComparator, theValue, theSystem, theUnits);
+ return this;
+ }
+
+ /**
+ * Sets the value for specimenQuantity (Quantity of specimen within container)
+ *
+ *
+ * Definition:
+ * The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type
+ *
+ */
+ public Container setSpecimenQuantity( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) {
+ mySpecimenQuantity = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
@@ -1734,8 +1782,8 @@ public class Specimen extends BaseResource implements IResource {
* The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type
*
*/
- public Container setSpecimenQuantity( long theValue) {
- mySpecimenQuantity = new QuantityDt(theValue);
+ public Container setSpecimenQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
+ mySpecimenQuantity = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
@@ -1752,6 +1800,19 @@ public class Specimen extends BaseResource implements IResource {
return this;
}
+ /**
+ * Sets the value for specimenQuantity (Quantity of specimen within container)
+ *
+ *
+ * Definition:
+ * The quantity of specimen in the container; may be volume, dimensions, or other appropriate measurements, depending on the specimen type
+ *
+ */
+ public Container setSpecimenQuantity( long theValue) {
+ mySpecimenQuantity = new QuantityDt(theValue);
+ return this;
+ }
+
/**
* Gets the value(s) for additive (Additive associated with container).
@@ -1790,4 +1851,4 @@ public class Specimen extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Substance.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Substance.java
index 3fd57d39361..3c9a2cd57cc 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Substance.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Substance.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -431,7 +411,7 @@ public class Substance extends BaseResource implements IResource {
*
*/
@Block()
- public static class Instance extends BaseElement implements IResourceBlock {
+ public static class Instance extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=1)
@Description(
@@ -560,8 +540,8 @@ public class Substance extends BaseResource implements IResource {
* When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.
*
*/
- public Instance setExpiry( Date theDate, TemporalPrecisionEnum thePrecision) {
- myExpiry = new DateTimeDt(theDate, thePrecision);
+ public Instance setExpiryWithSecondsPrecision( Date theDate) {
+ myExpiry = new DateTimeDt(theDate);
return this;
}
@@ -573,8 +553,8 @@ public class Substance extends BaseResource implements IResource {
* When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.
*
*/
- public Instance setExpiryWithSecondsPrecision( Date theDate) {
- myExpiry = new DateTimeDt(theDate);
+ public Instance setExpiry( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myExpiry = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -617,8 +597,21 @@ public class Substance extends BaseResource implements IResource {
* The amount of the substance
*
*/
- public Instance setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
- myQuantity = new QuantityDt(theComparator, theValue, theUnits);
+ public Instance setQuantity( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) {
+ myQuantity = new QuantityDt(theComparator, theValue, theSystem, theUnits);
+ return this;
+ }
+
+ /**
+ * Sets the value for quantity (Amount of substance in the package)
+ *
+ *
+ * Definition:
+ * The amount of the substance
+ *
+ */
+ public Instance setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) {
+ myQuantity = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
@@ -643,8 +636,8 @@ public class Substance extends BaseResource implements IResource {
* The amount of the substance
*
*/
- public Instance setQuantity( long theValue) {
- myQuantity = new QuantityDt(theValue);
+ public Instance setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
+ myQuantity = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
@@ -661,6 +654,19 @@ public class Substance extends BaseResource implements IResource {
return this;
}
+ /**
+ * Sets the value for quantity (Amount of substance in the package)
+ *
+ *
+ * Definition:
+ * The amount of the substance
+ *
+ */
+ public Instance setQuantity( long theValue) {
+ myQuantity = new QuantityDt(theValue);
+ return this;
+ }
+
}
@@ -675,7 +681,7 @@ public class Substance extends BaseResource implements IResource {
*
*/
@Block()
- public static class Ingredient extends BaseElement implements IResourceBlock {
+ public static class Ingredient extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="quantity", type=RatioDt.class, order=0, min=0, max=1)
@Description(
@@ -771,4 +777,4 @@ public class Substance extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Supply.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Supply.java
index 4cb922ba27c..6dad0b966cc 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Supply.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Supply.java
@@ -16,30 +16,10 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -462,6 +442,9 @@ public class Supply extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getOrderedItem() {
+ if (myOrderedItem == null) {
+ myOrderedItem = new ResourceReferenceDt();
+ }
return myOrderedItem;
}
@@ -579,7 +562,7 @@ public class Supply extends BaseResource implements IResource {
*
*/
@Block()
- public static class Dispense extends BaseElement implements IResourceBlock {
+ public static class Dispense extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=1)
@Description(
@@ -849,8 +832,21 @@ public class Supply extends BaseResource implements IResource {
* The amount of supply that has been dispensed. Includes unit of measure.
*
*/
- public Dispense setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
- myQuantity = new QuantityDt(theComparator, theValue, theUnits);
+ public Dispense setQuantity( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) {
+ myQuantity = new QuantityDt(theComparator, theValue, theSystem, theUnits);
+ return this;
+ }
+
+ /**
+ * Sets the value for quantity (Amount dispensed)
+ *
+ *
+ * Definition:
+ * The amount of supply that has been dispensed. Includes unit of measure.
+ *
+ */
+ public Dispense setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) {
+ myQuantity = new QuantityDt(theComparator, theValue, theSystem, theUnits);
return this;
}
@@ -875,8 +871,8 @@ public class Supply extends BaseResource implements IResource {
* The amount of supply that has been dispensed. Includes unit of measure.
*
*/
- public Dispense setQuantity( long theValue) {
- myQuantity = new QuantityDt(theValue);
+ public Dispense setQuantity( QuantityCompararatorEnum theComparator, long theValue, String theUnits) {
+ myQuantity = new QuantityDt(theComparator, theValue, theUnits);
return this;
}
@@ -893,6 +889,19 @@ public class Supply extends BaseResource implements IResource {
return this;
}
+ /**
+ * Sets the value for quantity (Amount dispensed)
+ *
+ *
+ * Definition:
+ * The amount of supply that has been dispensed. Includes unit of measure.
+ *
+ */
+ public Dispense setQuantity( long theValue) {
+ myQuantity = new QuantityDt(theValue);
+ return this;
+ }
+
/**
* Gets the value(s) for suppliedItem (Medication, Substance, or Device supplied).
@@ -905,6 +914,9 @@ public class Supply extends BaseResource implements IResource {
*
*/
public ResourceReferenceDt getSuppliedItem() {
+ if (mySuppliedItem == null) {
+ mySuppliedItem = new ResourceReferenceDt();
+ }
return mySuppliedItem;
}
@@ -1096,4 +1108,4 @@ public class Supply extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Test.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Test.java
index 81aef6e32d3..2261b43f93e 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Test.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Test.java
@@ -16,26 +16,6 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
@@ -1118,11 +1098,11 @@ public class Test extends BaseResource implements IResource {
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
- public Test addInstantErr( Date theDate) {
+ public Test addInstantErr( Date theDate, TemporalPrecisionEnum thePrecision) {
if (myInstantErr == null) {
myInstantErr = new java.util.ArrayList();
}
- myInstantErr.add(new InstantDt(theDate));
+ myInstantErr.add(new InstantDt(theDate, thePrecision));
return this;
}
@@ -1136,11 +1116,11 @@ public class Test extends BaseResource implements IResource {
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
- public Test addInstantErr( Date theDate, TemporalPrecisionEnum thePrecision) {
+ public Test addInstantErr( Date theDate) {
if (myInstantErr == null) {
myInstantErr = new java.util.ArrayList();
}
- myInstantErr.add(new InstantDt(theDate, thePrecision));
+ myInstantErr.add(new InstantDt(theDate));
return this;
}
@@ -1214,11 +1194,11 @@ public class Test extends BaseResource implements IResource {
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
- public Test addInstantCorr( Date theDate) {
+ public Test addInstantCorr( Date theDate, TemporalPrecisionEnum thePrecision) {
if (myInstantCorr == null) {
myInstantCorr = new java.util.ArrayList();
}
- myInstantCorr.add(new InstantDt(theDate));
+ myInstantCorr.add(new InstantDt(theDate, thePrecision));
return this;
}
@@ -1232,11 +1212,11 @@ public class Test extends BaseResource implements IResource {
*
* @return Returns a reference to this object, to allow for simple chaining.
*/
- public Test addInstantCorr( Date theDate, TemporalPrecisionEnum thePrecision) {
+ public Test addInstantCorr( Date theDate) {
if (myInstantCorr == null) {
myInstantCorr = new java.util.ArrayList();
}
- myInstantCorr.add(new InstantDt(theDate, thePrecision));
+ myInstantCorr.add(new InstantDt(theDate));
return this;
}
@@ -1430,4 +1410,4 @@ public class Test extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/User.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/User.java
index 20681afc179..73332d12d8d 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/User.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/User.java
@@ -16,26 +16,6 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.List;
@@ -50,6 +30,7 @@ import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.ContactDt;
import ca.uhn.fhir.model.dstu.composite.HumanNameDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
+import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum;
import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.IntegerDt;
import ca.uhn.fhir.model.primitive.StringDt;
@@ -572,7 +553,43 @@ public class User extends BaseResource implements IResource {
}
return getContact().get(0);
}
-
+ /**
+ * Adds a new value for contact (Contact details for the user)
+ *
+ *
+ * Definition:
+ *
+ *
+ *
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public User addContact( ContactUseEnum theContactUse, String theValue) {
+ if (myContact == null) {
+ myContact = new java.util.ArrayList();
+ }
+ myContact.add(new ContactDt(theContactUse, theValue));
+ return this;
+ }
+
+ /**
+ * Adds a new value for contact (Contact details for the user)
+ *
+ *
+ * Definition:
+ *
+ *
+ *
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public User addContact( String theValue) {
+ if (myContact == null) {
+ myContact = new java.util.ArrayList();
+ }
+ myContact.add(new ContactDt(theValue));
+ return this;
+ }
+
+
/**
* Gets the value(s) for patient (Patient compartments the user has access to (if level is patient/family)).
* creating it if it does
@@ -619,4 +636,4 @@ public class User extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/ValueSet.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/ValueSet.java
index 89474fc3f41..59ab3d390f4 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/ValueSet.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/ValueSet.java
@@ -16,31 +16,11 @@
package ca.uhn.fhir.model.dstu.resource;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.Date;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
@@ -53,6 +33,7 @@ import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.ContactDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
+import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum;
import ca.uhn.fhir.model.dstu.valueset.FilterOperatorEnum;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
import ca.uhn.fhir.model.dstu.valueset.ValueSetStatusEnum;
@@ -301,27 +282,6 @@ public class ValueSet extends BaseResource implements IResource {
*/
public static final TokenParam REFERENCE = new TokenParam(SP_REFERENCE);
- /**
- * Search parameter constant for !restricts
- *
- * Description: A value set listed in the restricts list
- * Type: token
- * Path: ValueSet.compose.restricts
- *
- */
- @SearchParamDefinition(name="!restricts", path="ValueSet.compose.restricts", description="A value set listed in the restricts list", type="token")
- public static final String SP_RESTRICTS = "!restricts";
-
- /**
- * Fluent Client search parameter constant for !restricts
- *
- * Description: A value set listed in the restricts list
- * Type: token
- * Path: ValueSet.compose.restricts
- *
- */
- public static final TokenParam RESTRICTS = new TokenParam(SP_RESTRICTS);
-
@Child(name="identifier", type=StringDt.class, order=0, min=0, max=1)
@Description(
@@ -667,7 +627,43 @@ public class ValueSet extends BaseResource implements IResource {
}
return getTelecom().get(0);
}
-
+ /**
+ * Adds a new value for telecom (Contact information of the publisher)
+ *
+ *
+ * Definition:
+ * Contacts of the publisher to assist a user in finding and communicating with the publisher
+ *
+ *
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public ValueSet addTelecom( ContactUseEnum theContactUse, String theValue) {
+ if (myTelecom == null) {
+ myTelecom = new java.util.ArrayList();
+ }
+ myTelecom.add(new ContactDt(theContactUse, theValue));
+ return this;
+ }
+
+ /**
+ * Adds a new value for telecom (Contact information of the publisher)
+ *
+ *
+ * Definition:
+ * Contacts of the publisher to assist a user in finding and communicating with the publisher
+ *
+ *
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public ValueSet addTelecom( String theValue) {
+ if (myTelecom == null) {
+ myTelecom = new java.util.ArrayList();
+ }
+ myTelecom.add(new ContactDt(theValue));
+ return this;
+ }
+
+
/**
* Gets the value(s) for description (Human language description of the value set).
* creating it if it does
@@ -926,8 +922,8 @@ public class ValueSet extends BaseResource implements IResource {
* The date that the value set status was last changed
*
*/
- public ValueSet setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
- myDate = new DateTimeDt(theDate, thePrecision);
+ public ValueSet setDateWithSecondsPrecision( Date theDate) {
+ myDate = new DateTimeDt(theDate);
return this;
}
@@ -939,8 +935,8 @@ public class ValueSet extends BaseResource implements IResource {
* The date that the value set status was last changed
*
*/
- public ValueSet setDateWithSecondsPrecision( Date theDate) {
- myDate = new DateTimeDt(theDate);
+ public ValueSet setDate( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myDate = new DateTimeDt(theDate, thePrecision);
return this;
}
@@ -1047,7 +1043,7 @@ public class ValueSet extends BaseResource implements IResource {
*
*/
@Block()
- public static class Define extends BaseElement implements IResourceBlock {
+ public static class Define extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="system", type=UriDt.class, order=0, min=1, max=1)
@Description(
@@ -1292,7 +1288,7 @@ public class ValueSet extends BaseResource implements IResource {
*
*/
@Block()
- public static class DefineConcept extends BaseElement implements IResourceBlock {
+ public static class DefineConcept extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="code", type=CodeDt.class, order=0, min=1, max=1)
@Description(
@@ -1590,7 +1586,7 @@ public class ValueSet extends BaseResource implements IResource {
*
*/
@Block()
- public static class Compose extends BaseElement implements IResourceBlock {
+ public static class Compose extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="import", type=UriDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@Description(
@@ -1834,7 +1830,7 @@ public class ValueSet extends BaseResource implements IResource {
*
*/
@Block()
- public static class ComposeInclude extends BaseElement implements IResourceBlock {
+ public static class ComposeInclude extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="system", type=UriDt.class, order=0, min=1, max=1)
@Description(
@@ -2113,7 +2109,7 @@ public class ValueSet extends BaseResource implements IResource {
*
*/
@Block()
- public static class ComposeIncludeFilter extends BaseElement implements IResourceBlock {
+ public static class ComposeIncludeFilter extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="property", type=CodeDt.class, order=0, min=1, max=1)
@Description(
@@ -2294,7 +2290,7 @@ public class ValueSet extends BaseResource implements IResource {
*
*/
@Block()
- public static class Expansion extends BaseElement implements IResourceBlock {
+ public static class Expansion extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=1)
@Description(
@@ -2423,8 +2419,8 @@ public class ValueSet extends BaseResource implements IResource {
*
*
*/
- public Expansion setTimestampWithMillisPrecision( Date theDate) {
- myTimestamp = new InstantDt(theDate);
+ public Expansion setTimestamp( Date theDate, TemporalPrecisionEnum thePrecision) {
+ myTimestamp = new InstantDt(theDate, thePrecision);
return this;
}
@@ -2436,8 +2432,8 @@ public class ValueSet extends BaseResource implements IResource {
*
*
*/
- public Expansion setTimestamp( Date theDate, TemporalPrecisionEnum thePrecision) {
- myTimestamp = new InstantDt(theDate, thePrecision);
+ public Expansion setTimestampWithMillisPrecision( Date theDate) {
+ myTimestamp = new InstantDt(theDate);
return this;
}
@@ -2514,7 +2510,7 @@ public class ValueSet extends BaseResource implements IResource {
*
*/
@Block()
- public static class ExpansionContains extends BaseElement implements IResourceBlock {
+ public static class ExpansionContains extends BaseIdentifiableElement implements IResourceBlock {
@Child(name="system", type=UriDt.class, order=0, min=0, max=1)
@Description(
@@ -2754,4 +2750,4 @@ public class ValueSet extends BaseResource implements IResource {
-}
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AddressUseEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AddressUseEnum.java
index eb0a8775022..0834efea35f 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AddressUseEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AddressUseEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AdministrativeGenderCodesEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AdministrativeGenderCodesEnum.java
index ce7db0858ac..fc3bef06312 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AdministrativeGenderCodesEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AdministrativeGenderCodesEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AdmitSourceEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AdmitSourceEnum.java
index 7eb4bff739c..86f29801d5f 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AdmitSourceEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AdmitSourceEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AggregationModeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AggregationModeEnum.java
index 6b464a51daa..64b208d74db 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AggregationModeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AggregationModeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AlertStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AlertStatusEnum.java
index ac1795816cb..39142fef91f 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AlertStatusEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AlertStatusEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AnimalSpeciesEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AnimalSpeciesEnum.java
index eb816710160..0740810ba43 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AnimalSpeciesEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/AnimalSpeciesEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/BindingConformanceEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/BindingConformanceEnum.java
index 5e17327ede4..9128cb487b3 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/BindingConformanceEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/BindingConformanceEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CarePlanActivityCategoryEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CarePlanActivityCategoryEnum.java
index ffae949f91c..6158a6c8cea 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CarePlanActivityCategoryEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CarePlanActivityCategoryEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CarePlanActivityStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CarePlanActivityStatusEnum.java
index e5dd6cf6f8e..ed7865cbb95 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CarePlanActivityStatusEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CarePlanActivityStatusEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CarePlanGoalStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CarePlanGoalStatusEnum.java
index c1d5e0ba66d..68f48f4e78a 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CarePlanGoalStatusEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CarePlanGoalStatusEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CarePlanStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CarePlanStatusEnum.java
index 15121efbbf0..b1617cb66d3 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CarePlanStatusEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CarePlanStatusEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CausalityExpectationEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CausalityExpectationEnum.java
index 0a52d4748cf..fa4dfc9ebac 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CausalityExpectationEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CausalityExpectationEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CompositionAttestationModeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CompositionAttestationModeEnum.java
index 2b43024cea9..72928c91f81 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CompositionAttestationModeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CompositionAttestationModeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CompositionStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CompositionStatusEnum.java
index 6cd11b0dcc3..ba20dade43f 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CompositionStatusEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CompositionStatusEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConceptMapEquivalenceEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConceptMapEquivalenceEnum.java
index a42188c712d..27c4b0640a5 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConceptMapEquivalenceEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConceptMapEquivalenceEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConditionRelationshipTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConditionRelationshipTypeEnum.java
index 3c4d687ad40..10322c355a9 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConditionRelationshipTypeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConditionRelationshipTypeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConditionStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConditionStatusEnum.java
index 8f7958a9b75..00bd34f44b3 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConditionStatusEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConditionStatusEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConformanceEventModeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConformanceEventModeEnum.java
index 9f6a17984d1..6ead45fbbf4 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConformanceEventModeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConformanceEventModeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConformanceStatementStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConformanceStatementStatusEnum.java
index 06675c5914d..5fdddf75797 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConformanceStatementStatusEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConformanceStatementStatusEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConstraintSeverityEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConstraintSeverityEnum.java
index 623cd11516e..077dd54c2df 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConstraintSeverityEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ConstraintSeverityEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ContactSystemEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ContactSystemEnum.java
index ed0eb90e076..0bedabfba0a 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ContactSystemEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ContactSystemEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ContactUseEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ContactUseEnum.java
index 5e6971199bb..f59a28e331f 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ContactUseEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ContactUseEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CriticalityEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CriticalityEnum.java
index 77837ba7851..130bdae837a 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CriticalityEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/CriticalityEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DataTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DataTypeEnum.java
index 0c16d51833e..4ef67d9de00 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DataTypeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DataTypeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DiagnosticOrderPriorityEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DiagnosticOrderPriorityEnum.java
index 799c69677cd..d53c7028f5a 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DiagnosticOrderPriorityEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DiagnosticOrderPriorityEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DiagnosticOrderStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DiagnosticOrderStatusEnum.java
index 4dcebdd9be9..a3dbc077753 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DiagnosticOrderStatusEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DiagnosticOrderStatusEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DiagnosticReportStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DiagnosticReportStatusEnum.java
index bb16d319542..4bb7463eec2 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DiagnosticReportStatusEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DiagnosticReportStatusEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DocumentModeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DocumentModeEnum.java
index b68f37964fa..fb5fd1b334d 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DocumentModeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DocumentModeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DocumentReferenceStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DocumentReferenceStatusEnum.java
index 8f2efa5b228..1c293951c45 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DocumentReferenceStatusEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DocumentReferenceStatusEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DocumentRelationshipTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DocumentRelationshipTypeEnum.java
index 39daa49e4cc..d944269ab08 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DocumentRelationshipTypeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/DocumentRelationshipTypeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterClassEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterClassEnum.java
index af460ebfb0a..4e52815649b 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterClassEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterClassEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterReasonCodesEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterReasonCodesEnum.java
index 773dc1337d4..8ab5bc911cc 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterReasonCodesEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterReasonCodesEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterStateEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterStateEnum.java
index 943e8022fd0..fe6f0a1a450 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterStateEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterStateEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterTypeEnum.java
index 2a649cb8eb9..eb70fb3d125 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterTypeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EncounterTypeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EventTimingEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EventTimingEnum.java
index bea5c916ca4..95fbd017cf4 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EventTimingEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/EventTimingEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ExposureTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ExposureTypeEnum.java
index 61fd9ad74b9..6d927d418d8 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ExposureTypeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ExposureTypeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ExtensionContextEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ExtensionContextEnum.java
index a2ad8485f4a..7dfd5430776 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ExtensionContextEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ExtensionContextEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/FHIRDefinedTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/FHIRDefinedTypeEnum.java
index a4a4f339f9a..af1537a7835 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/FHIRDefinedTypeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/FHIRDefinedTypeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/FilterOperatorEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/FilterOperatorEnum.java
index 96a8cf26f36..415fdf9fca3 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/FilterOperatorEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/FilterOperatorEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/GroupTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/GroupTypeEnum.java
index 4b691f8d6bb..4865bb27967 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/GroupTypeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/GroupTypeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/HierarchicalRelationshipTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/HierarchicalRelationshipTypeEnum.java
index dee0701083f..7a54c31f335 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/HierarchicalRelationshipTypeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/HierarchicalRelationshipTypeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/IdentifierUseEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/IdentifierUseEnum.java
index 1e274ae70aa..cb730f54b38 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/IdentifierUseEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/IdentifierUseEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ImagingModalityEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ImagingModalityEnum.java
index a01782a2f79..fb2368b86a2 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ImagingModalityEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ImagingModalityEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ImmunizationReasonCodesEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ImmunizationReasonCodesEnum.java
index 56fe019a8cd..2bb1b7df72e 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ImmunizationReasonCodesEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ImmunizationReasonCodesEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ImmunizationRecommendationDateCriterionCodesEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ImmunizationRecommendationDateCriterionCodesEnum.java
index 439a61b5ae1..6cc0e28ccfc 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ImmunizationRecommendationDateCriterionCodesEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ImmunizationRecommendationDateCriterionCodesEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ImmunizationRecommendationStatusCodesEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ImmunizationRecommendationStatusCodesEnum.java
index fd617dd5046..7c041c668ba 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ImmunizationRecommendationStatusCodesEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ImmunizationRecommendationStatusCodesEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ImmunizationRouteCodesEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ImmunizationRouteCodesEnum.java
index f5ca77ca271..1fdc3f327aa 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ImmunizationRouteCodesEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ImmunizationRouteCodesEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/InstanceAvailabilityEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/InstanceAvailabilityEnum.java
index 33e82d51883..5b8579c9ded 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/InstanceAvailabilityEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/InstanceAvailabilityEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/IssueSeverityEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/IssueSeverityEnum.java
index 21283988565..7a1c8916145 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/IssueSeverityEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/IssueSeverityEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/IssueTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/IssueTypeEnum.java
index 56c1f251ab2..dc93781ae31 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/IssueTypeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/IssueTypeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LinkTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LinkTypeEnum.java
index a86627fcf15..58b5f80b3b3 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LinkTypeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LinkTypeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ListModeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ListModeEnum.java
index aa5fd2b0649..412b52e17f8 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ListModeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ListModeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LocationModeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LocationModeEnum.java
index b1433f3415a..fe6e00442bd 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LocationModeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LocationModeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LocationStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LocationStatusEnum.java
index 4ceee0ec54c..36392e12c30 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LocationStatusEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LocationStatusEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LocationTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LocationTypeEnum.java
index b89b085680f..32e1a356b38 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LocationTypeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/LocationTypeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MaritalStatusCodesEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MaritalStatusCodesEnum.java
index 7909a48bbe4..7a503e89fb2 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MaritalStatusCodesEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MaritalStatusCodesEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MediaTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MediaTypeEnum.java
index 4d5202cf8d6..bb045f98431 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MediaTypeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MediaTypeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MedicationAdministrationStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MedicationAdministrationStatusEnum.java
index 8dd95ce7fcd..33bf1d76b6a 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MedicationAdministrationStatusEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MedicationAdministrationStatusEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MedicationDispenseStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MedicationDispenseStatusEnum.java
index 856cee12185..f9e28f68a43 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MedicationDispenseStatusEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MedicationDispenseStatusEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MedicationKindEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MedicationKindEnum.java
index ca3ca35df4a..a3595d62ab3 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MedicationKindEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MedicationKindEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MedicationPrescriptionStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MedicationPrescriptionStatusEnum.java
index 4872952ad90..f11fcfe787d 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MedicationPrescriptionStatusEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MedicationPrescriptionStatusEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MessageEventEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MessageEventEnum.java
index 00cf1d14955..8f77d5c7373 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MessageEventEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MessageEventEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MessageSignificanceCategoryEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MessageSignificanceCategoryEnum.java
index 3d2bbe024fc..e257e23d8ab 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MessageSignificanceCategoryEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MessageSignificanceCategoryEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MessageTransportEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MessageTransportEnum.java
index 795b2def9ed..1fcee4235ee 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MessageTransportEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/MessageTransportEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ModalityEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ModalityEnum.java
index 6ebdca4e888..5b0d4adff18 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ModalityEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ModalityEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/NameUseEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/NameUseEnum.java
index cec8ddfe2b1..1cbd699f1db 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/NameUseEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/NameUseEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationInterpretationCodesEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationInterpretationCodesEnum.java
index ea41361c92d..756f6ff8111 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationInterpretationCodesEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationInterpretationCodesEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationRelationshipTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationRelationshipTypeEnum.java
index 30dc1defa06..43e8fc0f10f 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationRelationshipTypeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationRelationshipTypeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationReliabilityEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationReliabilityEnum.java
index bcbd69cdcac..914a7057416 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationReliabilityEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationReliabilityEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationStatusEnum.java
index 8f85a96f35e..1ef8c76a570 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationStatusEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ObservationStatusEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/OrderOutcomeStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/OrderOutcomeStatusEnum.java
index 7a308d5d74f..9a68a8ab81e 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/OrderOutcomeStatusEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/OrderOutcomeStatusEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/OrganizationTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/OrganizationTypeEnum.java
index 38b248fbd6c..0b9bb93d0d4 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/OrganizationTypeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/OrganizationTypeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ParticipantTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ParticipantTypeEnum.java
index c08dc507350..6847e614d9f 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ParticipantTypeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ParticipantTypeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PatientRelationshipTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PatientRelationshipTypeEnum.java
index a20feeac13a..7eb44b5e137 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PatientRelationshipTypeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PatientRelationshipTypeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PractitionerRoleEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PractitionerRoleEnum.java
index 1522518c642..55cd0aad5e7 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PractitionerRoleEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PractitionerRoleEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PractitionerSpecialtyEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PractitionerSpecialtyEnum.java
index bcad96efeb8..91baf569041 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PractitionerSpecialtyEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PractitionerSpecialtyEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ProcedureRelationshipTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ProcedureRelationshipTypeEnum.java
index 07f34698be0..3f60d214341 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ProcedureRelationshipTypeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ProcedureRelationshipTypeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PropertyRepresentationEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PropertyRepresentationEnum.java
index 9c55c99c25c..45ee8117ea3 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PropertyRepresentationEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/PropertyRepresentationEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ProvenanceEntityRoleEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ProvenanceEntityRoleEnum.java
index c6c73063e0a..03e076b95ca 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ProvenanceEntityRoleEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ProvenanceEntityRoleEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/QuantityCompararatorEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/QuantityCompararatorEnum.java
index cfebc897892..cfa2ee82347 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/QuantityCompararatorEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/QuantityCompararatorEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/QueryOutcomeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/QueryOutcomeEnum.java
index fda03b013f1..c5bc615b3c4 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/QueryOutcomeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/QueryOutcomeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/QuestionnaireGroupNameEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/QuestionnaireGroupNameEnum.java
index ce7c1a16f1f..72a7183efb0 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/QuestionnaireGroupNameEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/QuestionnaireGroupNameEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/QuestionnaireNameEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/QuestionnaireNameEnum.java
index 38b594f42b1..6dcc14e2b62 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/QuestionnaireNameEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/QuestionnaireNameEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/QuestionnaireStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/QuestionnaireStatusEnum.java
index 790d50df9b6..e52f949ae6d 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/QuestionnaireStatusEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/QuestionnaireStatusEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ReactionSeverityEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ReactionSeverityEnum.java
index a0356d628bb..3868cddd9c9 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ReactionSeverityEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ReactionSeverityEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ResourceProfileStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ResourceProfileStatusEnum.java
index b4a2139c019..b4f91cd6f79 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ResourceProfileStatusEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ResourceProfileStatusEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ResourceTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ResourceTypeEnum.java
index 2e1a5403cbe..4f0d6f841e6 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ResourceTypeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ResourceTypeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ResponseTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ResponseTypeEnum.java
index 11263ab204a..60282e71064 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ResponseTypeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ResponseTypeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulConformanceModeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulConformanceModeEnum.java
index a3c52ccdb5e..cb523a892a3 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulConformanceModeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulConformanceModeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulOperationSystemEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulOperationSystemEnum.java
index 76e5d06b982..cca87aff1c7 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulOperationSystemEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulOperationSystemEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulOperationTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulOperationTypeEnum.java
index 94c4e8e0a4f..965a78ae9f7 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulOperationTypeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulOperationTypeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulSecurityServiceEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulSecurityServiceEnum.java
index 81540c2f6f6..97eb12f8ad7 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulSecurityServiceEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/RestfulSecurityServiceEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SearchParamTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SearchParamTypeEnum.java
index bc8e2d1a08f..84b3b44ca98 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SearchParamTypeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SearchParamTypeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventActionEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventActionEnum.java
index 6d9392f1699..d26acfc6eaf 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventActionEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventActionEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventObjectLifecycleEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventObjectLifecycleEnum.java
index 32ebffac4e0..8361416a5b8 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventObjectLifecycleEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventObjectLifecycleEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventObjectRoleEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventObjectRoleEnum.java
index 89758578a0a..18a6a1b494a 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventObjectRoleEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventObjectRoleEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventObjectSensitivityEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventObjectSensitivityEnum.java
index 6ec9d5d4d64..ae3be032cbe 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventObjectSensitivityEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventObjectSensitivityEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventObjectTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventObjectTypeEnum.java
index cddd6315036..834a434d6b9 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventObjectTypeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventObjectTypeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventOutcomeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventOutcomeEnum.java
index 4507e458236..dc7aba6eef1 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventOutcomeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventOutcomeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventParticipantNetworkTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventParticipantNetworkTypeEnum.java
index 73b022a95e2..5f8dfbf8c87 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventParticipantNetworkTypeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventParticipantNetworkTypeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventSourceTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventSourceTypeEnum.java
index e2dff6be5fc..cb3679f606b 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventSourceTypeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SecurityEventSourceTypeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SensitivityStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SensitivityStatusEnum.java
index 319fc5ff063..952c433209b 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SensitivityStatusEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SensitivityStatusEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SensitivityTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SensitivityTypeEnum.java
index 1c01eebcb26..4a1e6f54add 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SensitivityTypeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SensitivityTypeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SlicingRulesEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SlicingRulesEnum.java
index 52a7ff05956..2c5c28e73c1 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SlicingRulesEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SlicingRulesEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SpecimenCollectionMethodEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SpecimenCollectionMethodEnum.java
index cecab041fb6..abc18b1e836 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SpecimenCollectionMethodEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SpecimenCollectionMethodEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SpecimenTreatmentProcedureEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SpecimenTreatmentProcedureEnum.java
index 9eb6a4ddf90..453cf400f8a 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SpecimenTreatmentProcedureEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SpecimenTreatmentProcedureEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SubstanceTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SubstanceTypeEnum.java
index 63091e8d55e..5389284dd28 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SubstanceTypeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SubstanceTypeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SupplyDispenseStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SupplyDispenseStatusEnum.java
index 9bea063f15b..992ff65696e 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SupplyDispenseStatusEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SupplyDispenseStatusEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SupplyItemTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SupplyItemTypeEnum.java
index 2e8de00fb12..ea27b443fad 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SupplyItemTypeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SupplyItemTypeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SupplyStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SupplyStatusEnum.java
index 728b695d0c3..26923402441 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SupplyStatusEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SupplyStatusEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SupplyTypeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SupplyTypeEnum.java
index 6a4d34b4847..3c5e03e4a90 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SupplyTypeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/SupplyTypeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/UnitsOfTimeEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/UnitsOfTimeEnum.java
index eb44bae9368..8bde3e0a832 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/UnitsOfTimeEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/UnitsOfTimeEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ValueSetStatusEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ValueSetStatusEnum.java
index d7958b30497..4a8c5ba1b62 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ValueSetStatusEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/valueset/ValueSetStatusEnum.java
@@ -1,26 +1,6 @@
package ca.uhn.fhir.model.dstu.valueset;
-/*
- * #%L
- * HAPI FHIR Library
- * %%
- * Copyright (C) 2014 University Health Network
- * %%
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * #L%
- */
-
import java.util.HashMap;
import java.util.Map;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/BaseDateTimeDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/BaseDateTimeDt.java
index 0e10c87d8b8..4c30e06747f 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/BaseDateTimeDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/BaseDateTimeDt.java
@@ -20,11 +20,7 @@ package ca.uhn.fhir.model.primitive;
* #L%
*/
-import static ca.uhn.fhir.model.api.TemporalPrecisionEnum.DAY;
-import static ca.uhn.fhir.model.api.TemporalPrecisionEnum.MILLI;
-import static ca.uhn.fhir.model.api.TemporalPrecisionEnum.MONTH;
-import static ca.uhn.fhir.model.api.TemporalPrecisionEnum.SECOND;
-import static ca.uhn.fhir.model.api.TemporalPrecisionEnum.YEAR;
+import static ca.uhn.fhir.model.api.TemporalPrecisionEnum.*;
import java.text.ParseException;
import java.util.Calendar;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/BoundCodeableConceptDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/BoundCodeableConceptDt.java
index fa2490d7c81..cb96480a476 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/BoundCodeableConceptDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/BoundCodeableConceptDt.java
@@ -20,7 +20,7 @@ package ca.uhn.fhir.model.primitive;
* #L%
*/
-import static org.apache.commons.lang3.StringUtils.defaultString;
+import static org.apache.commons.lang3.StringUtils.*;
import java.util.Collection;
import java.util.HashSet;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/CodeDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/CodeDt.java
index fb46327a0e7..916497bb92e 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/CodeDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/CodeDt.java
@@ -20,7 +20,7 @@ package ca.uhn.fhir.model.primitive;
* #L%
*/
-import static org.apache.commons.lang3.StringUtils.defaultString;
+import static org.apache.commons.lang3.StringUtils.*;
import ca.uhn.fhir.model.api.BasePrimitive;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.SimpleSetter;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/StringDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/StringDt.java
index 1b32b654a46..6ddf09e3809 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/StringDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/StringDt.java
@@ -126,7 +126,7 @@ public class StringDt extends BasePrimitive implements IQueryParameterTy
*/
@Override
public boolean isEmpty() {
- return super.isEmpty() && StringUtils.isBlank(getValue());
+ return super.isBaseEmpty() && StringUtils.isBlank(getValue());
}
@Override
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/BaseThymeleafNarrativeGenerator.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/BaseThymeleafNarrativeGenerator.java
index 2b3de6fdac6..bb3659f89e1 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/BaseThymeleafNarrativeGenerator.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/BaseThymeleafNarrativeGenerator.java
@@ -20,7 +20,7 @@ package ca.uhn.fhir.narrative;
* #L%
*/
-import static org.apache.commons.lang3.StringUtils.isBlank;
+import static org.apache.commons.lang3.StringUtils.*;
import java.io.File;
import java.io.FileInputStream;
@@ -69,17 +69,100 @@ public abstract class BaseThymeleafNarrativeGenerator implements INarrativeGener
private boolean myIgnoreMissingTemplates = true;
private TemplateEngine myProfileTemplateEngine;
- private HashMap myProfileToNarrativeName;
- private HashMap, String> myClassToNarrativeName;
+ private TemplateEngine myTitleTemplateEngine;
+ private HashMap myProfileToName;
+ private HashMap, String> myClassToName;
private HashMap myNameToNarrativeTemplate;
- private boolean myApplyDefaultDatatypeTemplates=true;
+ private boolean myApplyDefaultDatatypeTemplates = true;
private volatile boolean myInitialized;
+ private HashMap myNameToTitleTemplate;
+
@Override
public NarrativeDt generateNarrative(IResource theResource) {
return generateNarrative(null, theResource);
}
+ @Override
+ public String generateTitle(IResource theResource) {
+ return generateTitle(null, theResource);
+ }
+
+ @Override
+ public String generateTitle(String theProfile, IResource theResource) {
+ if (!myInitialized) {
+ initialize();
+ }
+
+ String name = null;
+ if (StringUtils.isNotBlank(theProfile)) {
+ name = myProfileToName.get(theProfile);
+ }
+ if (name == null) {
+ name = myClassToName.get(theResource.getClass());
+ }
+
+ if (name == null) {
+ if (myIgnoreMissingTemplates) {
+ ourLog.debug("No title template available for profile: {}", theProfile);
+ return null;
+ } else {
+ throw new DataFormatException("No title template for class " + theResource.getClass().getCanonicalName());
+ }
+ }
+
+ try {
+ Context context = new Context();
+ context.setVariable("resource", theResource);
+
+ String result = myTitleTemplateEngine.process(name, context);
+ StringBuilder b = new StringBuilder();
+ boolean inTag = false;
+ for (int i = 0; i < result.length(); i++) {
+ char nextChar = result.charAt(i);
+ char prevChar = i > 0 ? result.charAt(i - 1) : '\n';
+ if (nextChar == '<') {
+ inTag = true;
+ continue;
+ } else if (inTag) {
+ if (nextChar == '>') {
+ inTag = false;
+ }
+ continue;
+ } else if (nextChar <= ' ') {
+ if (prevChar <= ' ' || prevChar == '>') {
+ continue;
+ } else {
+ b.append(' ');
+ }
+ } else {
+ b.append(nextChar);
+ }
+ }
+
+ while (b.length() > 0 && b.charAt(b.length()-1) == ' ') {
+ b.setLength(b.length() - 1);
+ }
+
+ result = b.toString();
+ if (result.startsWith("<") && result.contains(">")) {
+ result = result.substring(result.indexOf('>') + 1);
+ }
+ if (result.endsWith(">") && result.contains("<")) {
+ result = result.substring(0, result.lastIndexOf('<'));
+ }
+
+ return result;
+ } catch (Exception e) {
+ if (myIgnoreFailures) {
+ ourLog.error("Failed to generate narrative", e);
+ return "No title available - Error: " + e.getMessage();
+ } else {
+ throw new DataFormatException(e);
+ }
+ }
+ }
+
@Override
public NarrativeDt generateNarrative(String theProfile, IResource theResource) {
if (!myInitialized) {
@@ -88,10 +171,10 @@ public abstract class BaseThymeleafNarrativeGenerator implements INarrativeGener
String name = null;
if (StringUtils.isNotBlank(theProfile)) {
- name = myProfileToNarrativeName.get(theProfile);
+ name = myProfileToName.get(theProfile);
}
if (name == null) {
- name = myClassToNarrativeName.get(theResource.getClass());
+ name = myClassToName.get(theResource.getClass());
}
if (name == null) {
@@ -106,7 +189,7 @@ public abstract class BaseThymeleafNarrativeGenerator implements INarrativeGener
try {
Context context = new Context();
context.setVariable("resource", theResource);
-
+
String result = myProfileTemplateEngine.process(name, context);
if (myCleanWhitespace) {
@@ -131,9 +214,10 @@ public abstract class BaseThymeleafNarrativeGenerator implements INarrativeGener
if (myInitialized) {
return;
}
- myProfileToNarrativeName = new HashMap();
- myClassToNarrativeName = new HashMap, String>();
+ myProfileToName = new HashMap();
+ myClassToName = new HashMap, String>();
myNameToNarrativeTemplate = new HashMap();
+ myNameToTitleTemplate = new HashMap();
List propFileName = getPropertyFile();
@@ -160,6 +244,15 @@ public abstract class BaseThymeleafNarrativeGenerator implements INarrativeGener
myProfileTemplateEngine.setDialect(dialect);
myProfileTemplateEngine.initialize();
}
+ {
+ myTitleTemplateEngine = new TemplateEngine();
+ TemplateResolver resolver = new TemplateResolver();
+ resolver.setResourceResolver(new TitleResourceResolver());
+ myTitleTemplateEngine.setTemplateResolver(resolver);
+ StandardDialect dialect = new StandardDialect();
+ myTitleTemplateEngine.setDialect(dialect);
+ myTitleTemplateEngine.initialize();
+ }
myInitialized = true;
}
@@ -167,12 +260,9 @@ public abstract class BaseThymeleafNarrativeGenerator implements INarrativeGener
protected abstract List getPropertyFile();
/**
- * If set to true (which is the default), most whitespace will
- * be trimmed from the generated narrative before it is returned.
+ * If set to true (which is the default), most whitespace will be trimmed from the generated narrative before it is returned.
*
- * Note that in order to preserve formatting, not all whitespace is trimmed.
- * Repeated whitespace characters (e.g. "\n \n ") will be
- * trimmed to a single space.
+ * Note that in order to preserve formatting, not all whitespace is trimmed. Repeated whitespace characters (e.g. "\n \n ") will be trimmed to a single space.
*
*/
public boolean isCleanWhitespace() {
@@ -180,30 +270,24 @@ public abstract class BaseThymeleafNarrativeGenerator implements INarrativeGener
}
/**
- * If set to true, which is the default, if any failure occurs
- * during narrative generation the generator will suppress any generated
- * exceptions, and simply return a default narrative indicating that no
- * narrative is available.
+ * If set to true, which is the default, if any failure occurs during narrative generation the generator will suppress any generated exceptions, and simply return a default narrative
+ * indicating that no narrative is available.
*/
public boolean isIgnoreFailures() {
return myIgnoreFailures;
}
/**
- * If set to true, will return an empty narrative block for any profiles
- * where no template is available
+ * If set to true, will return an empty narrative block for any profiles where no template is available
*/
public boolean isIgnoreMissingTemplates() {
return myIgnoreMissingTemplates;
}
/**
- * If set to true (which is the default), most whitespace will
- * be trimmed from the generated narrative before it is returned.
+ * If set to true (which is the default), most whitespace will be trimmed from the generated narrative before it is returned.
*
- * Note that in order to preserve formatting, not all whitespace is trimmed.
- * Repeated whitespace characters (e.g. "\n \n ") will be
- * trimmed to a single space.
+ * Note that in order to preserve formatting, not all whitespace is trimmed. Repeated whitespace characters (e.g. "\n \n ") will be trimmed to a single space.
*
*/
public void setCleanWhitespace(boolean theCleanWhitespace) {
@@ -211,18 +295,15 @@ public abstract class BaseThymeleafNarrativeGenerator implements INarrativeGener
}
/**
- * If set to true, which is the default, if any failure occurs
- * during narrative generation the generator will suppress any generated
- * exceptions, and simply return a default narrative indicating that no
- * narrative is available.
+ * If set to true, which is the default, if any failure occurs during narrative generation the generator will suppress any generated exceptions, and simply return a default narrative
+ * indicating that no narrative is available.
*/
public void setIgnoreFailures(boolean theIgnoreFailures) {
myIgnoreFailures = theIgnoreFailures;
}
/**
- * If set to true, will return an empty narrative block for any profiles
- * where no template is available
+ * If set to true, will return an empty narrative block for any profiles where no template is available
*/
public void setIgnoreMissingTemplates(boolean theIgnoreMissingTemplates) {
myIgnoreMissingTemplates = theIgnoreMissingTemplates;
@@ -230,7 +311,7 @@ public abstract class BaseThymeleafNarrativeGenerator implements INarrativeGener
private void loadProperties(String propFileName) throws IOException {
ourLog.debug("Loading narrative properties file: {}", propFileName);
-
+
Properties file = new Properties();
InputStream resource = loadResource(propFileName);
@@ -245,13 +326,22 @@ public abstract class BaseThymeleafNarrativeGenerator implements INarrativeGener
String narrativePropName = name + ".narrative";
String narrativeName = file.getProperty(narrativePropName);
- if (isBlank(narrativeName)) {
- throw new ConfigurationException("Found property '" + nextKey + "' but no corresponding property '" + narrativePropName + "' in file " + propFileName);
+ String titlePropName = name + ".title";
+ String titleName = file.getProperty(titlePropName);
+ if (isBlank(narrativeName) && isBlank(titleName)) {
+ throw new ConfigurationException("Found property '" + nextKey + "' but no corresponding property '" + narrativePropName + "' or '" + titlePropName + "' in file " + propFileName);
}
- String narrative = IOUtils.toString(loadResource(narrativeName));
- myProfileToNarrativeName.put(file.getProperty(nextKey), name);
- myNameToNarrativeTemplate.put(name, narrative);
+ myProfileToName.put(file.getProperty(nextKey), name);
+
+ if (StringUtils.isNotBlank(narrativeName)) {
+ String narrative = IOUtils.toString(loadResource(narrativeName));
+ myNameToNarrativeTemplate.put(name, narrative);
+ }
+ if (StringUtils.isNotBlank(titleName)) {
+ String title = IOUtils.toString(loadResource(titleName));
+ myNameToTitleTemplate.put(name, title);
+ }
} else if (nextKey.endsWith(".class")) {
@@ -262,9 +352,9 @@ public abstract class BaseThymeleafNarrativeGenerator implements INarrativeGener
String className = file.getProperty(nextKey);
- Class> dtClass;
+ Class> clazz;
try {
- dtClass = Class.forName(className);
+ clazz = Class.forName(className);
} catch (ClassNotFoundException e) {
ourLog.warn("Unknown datatype class '{}' identified in narrative file {}", name, propFileName);
continue;
@@ -272,16 +362,27 @@ public abstract class BaseThymeleafNarrativeGenerator implements INarrativeGener
String narrativePropName = name + ".narrative";
String narrativeName = file.getProperty(narrativePropName);
- if (isBlank(narrativeName)) {
- throw new ConfigurationException("Found property '" + nextKey + "' but no corresponding property '" + narrativePropName + "' in file " + propFileName);
+ String titlePropName = name + ".title";
+ String titleName = file.getProperty(titlePropName);
+ if (isBlank(narrativeName) && isBlank(titleName)) {
+ throw new ConfigurationException("Found property '" + nextKey + "' but no corresponding property '" + narrativePropName + "' or '" + titlePropName + "' in file " + propFileName);
}
- String narrative = IOUtils.toString(loadResource(narrativeName));
- myClassToNarrativeName.put(dtClass, name);
- myNameToNarrativeTemplate.put(name, narrative);
+ myClassToName.put(clazz, name);
+
+ if (StringUtils.isNotBlank(narrativeName)) {
+ String narrative = IOUtils.toString(loadResource(narrativeName));
+ myNameToNarrativeTemplate.put(name, narrative);
+ }
+ if (StringUtils.isNotBlank(titleName)) {
+ String title = IOUtils.toString(loadResource(titleName));
+ myNameToTitleTemplate.put(name, title);
+ }
} else if (nextKey.endsWith(".narrative")) {
continue;
+ } else if (nextKey.endsWith(".title")) {
+ continue;
} else {
throw new ConfigurationException("Invalid property name: " + nextKey);
}
@@ -379,14 +480,13 @@ public abstract class BaseThymeleafNarrativeGenerator implements INarrativeGener
final IStandardExpression expression = expressionParser.parseExpression(configuration, theArguments, attributeValue);
final Object value = expression.execute(configuration, theArguments);
-
theElement.removeAttribute(theAttributeName);
theElement.clearChildren();
Context context = new Context();
context.setVariable("resource", value);
-
- String name = myClassToNarrativeName.get(value.getClass());
+
+ String name = myClassToName.get(value.getClass());
if (name == null) {
if (myIgnoreMissingTemplates) {
ourLog.debug("No narrative template available for type: {}", value.getClass());
@@ -438,4 +538,21 @@ public abstract class BaseThymeleafNarrativeGenerator implements INarrativeGener
return new ReaderInputStream(new StringReader(template));
}
}
+
+ private final class TitleResourceResolver implements IResourceResolver {
+ @Override
+ public String getName() {
+ return getClass().getCanonicalName();
+ }
+
+ @Override
+ public InputStream getResourceAsStream(TemplateProcessingParameters theTemplateProcessingParameters, String theName) {
+ String template = myNameToTitleTemplate.get(theName);
+ if (template == null) {
+ ourLog.info("No narative template for resource profile: {}", theName);
+ return new ReaderInputStream(new StringReader(""));
+ }
+ return new ReaderInputStream(new StringReader(template));
+ }
+ }
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/DefaultThymeleafNarrativeGenerator.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/DefaultThymeleafNarrativeGenerator.java
index 28ce4355fac..75faf958d1f 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/DefaultThymeleafNarrativeGenerator.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/DefaultThymeleafNarrativeGenerator.java
@@ -64,4 +64,6 @@ public class DefaultThymeleafNarrativeGenerator extends BaseThymeleafNarrativeGe
return myUseHapiServerConformanceNarrative;
}
+
+
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/INarrativeGenerator.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/INarrativeGenerator.java
index 80060c1042d..8ac9ec3d64a 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/INarrativeGenerator.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/narrative/INarrativeGenerator.java
@@ -30,4 +30,8 @@ public interface INarrativeGenerator {
NarrativeDt generateNarrative(IResource theResource);
+ String generateTitle(IResource theResource);
+
+ String generateTitle(String theProfile, IResource theResource);
+
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/BaseParser.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/BaseParser.java
index aa9f8242c41..8551a73c57b 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/BaseParser.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/BaseParser.java
@@ -28,7 +28,6 @@ import java.io.Writer;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
-import java.util.UUID;
import ca.uhn.fhir.context.BaseRuntimeChildDefinition;
import ca.uhn.fhir.context.BaseRuntimeDeclaredChildDefinition;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java
index 8e98094a7a6..04f2c940c94 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/JsonParser.java
@@ -20,9 +20,7 @@ package ca.uhn.fhir.parser;
* #L%
*/
-import static org.apache.commons.lang3.StringUtils.defaultString;
-import static org.apache.commons.lang3.StringUtils.isBlank;
-import static org.apache.commons.lang3.StringUtils.isNotBlank;
+import static org.apache.commons.lang3.StringUtils.*;
import java.io.IOException;
import java.io.Reader;
@@ -222,7 +220,7 @@ public class JsonParser extends BaseParser implements IParser {
eventWriter.writeEnd(); // entry array
eventWriter.writeEnd();
- eventWriter.close();
+ eventWriter.flush();
}
private void encodeChildElementToStreamWriter(RuntimeResourceDefinition theResDef, IResource theResource, JsonGenerator theWriter, IElement theValue, BaseRuntimeElementDefinition> theChildDef, String theChildName) throws IOException {
@@ -709,6 +707,8 @@ public class JsonParser extends BaseParser implements IParser {
IElement object = (IElement) theState.getObject();
if (object instanceof IIdentifiableElement) {
((IIdentifiableElement) object).setId(new IdDt(elementId));
+ } else if (object instanceof IResource) {
+ ((IResource) object).setId(new IdDt(elementId));
}
}
}
@@ -968,9 +968,10 @@ public class JsonParser extends BaseParser implements IParser {
theEventWriter.writeStartObject();
theEventWriter.write("url", ext.getUrl().getValue());
- if (value == null && ext.getAllUndeclaredExtensions().isEmpty()) {
+ boolean noValue = value == null || value.isEmpty();
+ if (noValue && ext.getAllUndeclaredExtensions().isEmpty()) {
ourLog.debug("Extension with URL[{}] has no value", ext.getUrl().getValue());
- } else if (value == null) {
+ } else if (noValue) {
theEventWriter.writeStartArray("extension");
for (ExtensionDt next : ext.getUndeclaredExtensions()) {
writeUndeclaredExt(theResDef, theResource, theEventWriter, next);
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java
index 6d25614122d..408e5cd5f59 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/ParserState.java
@@ -20,8 +20,7 @@ package ca.uhn.fhir.parser;
* #L%
*/
-import static org.apache.commons.lang3.StringUtils.defaultIfBlank;
-import static org.apache.commons.lang3.StringUtils.isNotBlank;
+import static org.apache.commons.lang3.StringUtils.*;
import java.util.ArrayList;
import java.util.HashMap;
@@ -52,6 +51,7 @@ import ca.uhn.fhir.model.api.ExtensionDt;
import ca.uhn.fhir.model.api.ICompositeDatatype;
import ca.uhn.fhir.model.api.ICompositeElement;
import ca.uhn.fhir.model.api.IElement;
+import ca.uhn.fhir.model.api.IIdentifiableElement;
import ca.uhn.fhir.model.api.IPrimitiveDatatype;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.IResourceBlock;
@@ -219,7 +219,7 @@ class ParserState {
private static final int STATE_NONE = 0;
private static final int STATE_SCHEME = 3;
private static final int STATE_TERM = 1;
-
+
private int myCatState = STATE_NONE;
private Tag myInstance;
@@ -417,6 +417,9 @@ class ParserState {
if (myEntry.getUpdated().isEmpty() == false) {
ResourceMetadataKeyEnum.UPDATED.put(myEntry.getResource(), myEntry.getUpdated());
}
+
+ ResourceMetadataKeyEnum.TITLE.put(myEntry.getResource(), myEntry.getTitle().getValue());
+
if (myEntry.getCategories().isEmpty() == false) {
TagList tagList = new TagList();
for (Tag next : myEntry.getCategories()) {
@@ -608,7 +611,6 @@ class ParserState {
myPreResourceState = thePreResourceState;
}
- @SuppressWarnings("unused")
public void attributeValue(String theName, String theValue) throws DataFormatException {
// ignore by default
}
@@ -617,7 +619,6 @@ class ParserState {
// ignore by default
}
- @SuppressWarnings("unused")
public void enteringNewElement(String theNamespaceURI, String theLocalPart) throws DataFormatException {
// ignore by default
}
@@ -625,7 +626,7 @@ class ParserState {
/**
* Default implementation just handles undeclared extensions
*/
- public void enteringNewElementExtension(@SuppressWarnings("unused") StartElement theElement, String theUrlAttr, boolean theIsModifier) {
+ public void enteringNewElementExtension(StartElement theElement, String theUrlAttr, boolean theIsModifier) {
if (myPreResourceState != null && getCurrentElement() instanceof ISupportsUndeclaredExtensions) {
ExtensionDt newExtension = new ExtensionDt(theIsModifier, theUrlAttr);
ISupportsUndeclaredExtensions elem = (ISupportsUndeclaredExtensions) getCurrentElement();
@@ -657,7 +658,7 @@ class ParserState {
myStack = theState;
}
- public void string(@SuppressWarnings("unused") String theData) {
+ public void string(String theData) {
// ignore by default
}
@@ -665,7 +666,7 @@ class ParserState {
// allow an implementor to override
}
- public void xmlEvent(@SuppressWarnings("unused") XMLEvent theNextEvent) {
+ public void xmlEvent(XMLEvent theNextEvent) {
// ignore
}
@@ -698,16 +699,16 @@ class ParserState {
if (mySubState == SUBSTATE_CT) {
myInstance.setContentType(myData);
mySubState = 0;
- myData=null;
+ myData = null;
return;
} else if (mySubState == SUBSTATE_CONTENT) {
myInstance.setContentAsBase64(myData);
mySubState = 0;
- myData=null;
+ myData = null;
return;
} else {
if (!myJsonMode) {
- myInstance.setContentAsBase64(myData);
+ myInstance.setContentAsBase64(myData);
}
pop();
}
@@ -863,9 +864,13 @@ class ParserState {
@Override
public void attributeValue(String theName, String theValue) throws DataFormatException {
if ("id".equals(theName)) {
- myInstance.setId(new IdDt(theValue));
+ if (myInstance instanceof IIdentifiableElement) {
+ ((IIdentifiableElement) myInstance).setId(new IdDt(theValue));
+ } else if (myInstance instanceof IResource) {
+ ((IResource) myInstance).setId(new IdDt(theValue));
+ }
} else if ("url".equals(theName) && myInstance instanceof ExtensionDt) {
- ((ExtensionDt)myInstance).setUrl(theValue);
+ ((ExtensionDt) myInstance).setUrl(theValue);
}
}
@@ -954,8 +959,8 @@ class ParserState {
return;
}
case UNDECL_EXT:
- case RESOURCE:
- case EXTENSION_DECLARED:{
+ case RESOURCE:
+ case EXTENSION_DECLARED: {
// Throw an exception because this shouldn't happen here
break;
}
@@ -1117,7 +1122,7 @@ class ParserState {
public void endingElement() throws DataFormatException {
pop();
}
-
+
@Override
public void enteringNewElement(String theNamespaceURI, String theLocalPart) throws DataFormatException {
BaseRuntimeElementDefinition> definition;
@@ -1165,7 +1170,7 @@ class ParserState {
private PreResourceState getRootPreResourceState() {
if (getPreResourceState() != null) {
return getPreResourceState();
- }else {
+ } else {
return this;
}
}
@@ -1254,7 +1259,11 @@ class ParserState {
if ("value".equals(theName)) {
myInstance.setValueAsString(theValue);
} else if ("id".equals(theName)) {
- myInstance.setId(new IdDt(theValue));
+ if (myInstance instanceof IIdentifiableElement) {
+ ((IIdentifiableElement) myInstance).setElementSpecificId(theValue);
+ } else if (myInstance instanceof IResource) {
+ ((IResource) myInstance).setId(new IdDt(theValue));
+ }
}
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java
index cd98809d817..7d4283bba32 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/parser/XmlParser.java
@@ -20,9 +20,7 @@ package ca.uhn.fhir.parser;
* #L%
*/
-import static org.apache.commons.lang3.StringUtils.defaultString;
-import static org.apache.commons.lang3.StringUtils.isBlank;
-import static org.apache.commons.lang3.StringUtils.isNotBlank;
+import static org.apache.commons.lang3.StringUtils.*;
import java.io.IOException;
import java.io.Reader;
@@ -656,7 +654,7 @@ public class XmlParser extends BaseParser implements IParser {
} else {
if (StringUtils.isBlank(se.getName().getPrefix())) {
theEventWriter.writeStartElement(se.getName().getLocalPart());
- theEventWriter.writeDefaultNamespace(se.getName().getNamespaceURI());
+// theEventWriter.writeDefaultNamespace(se.getName().getNamespaceURI());
} else {
theEventWriter.writeStartElement(se.getName().getNamespaceURI(), se.getName().getLocalPart());
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/GenericClient.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/GenericClient.java
index ac11679c3a9..8f729c12754 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/GenericClient.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/GenericClient.java
@@ -57,6 +57,8 @@ import ca.uhn.fhir.rest.gclient.IGetTags;
import ca.uhn.fhir.rest.gclient.IParam;
import ca.uhn.fhir.rest.gclient.IQuery;
import ca.uhn.fhir.rest.gclient.ISort;
+import ca.uhn.fhir.rest.gclient.ITransaction;
+import ca.uhn.fhir.rest.gclient.ITransactionTyped;
import ca.uhn.fhir.rest.gclient.IUntypedQuery;
import ca.uhn.fhir.rest.method.BaseOutcomeReturningMethodBinding;
import ca.uhn.fhir.rest.method.ConformanceMethodBinding;
@@ -148,6 +150,11 @@ public class GenericClient extends BaseClient implements IGenericClient {
return new GetTagsInternal();
}
+ @Override
+ public ITransaction transaction() {
+ return new TransactionInternal();
+ }
+
@Override
public Bundle history(final Class theType, IdDt theIdDt, DateTimeDt theSince, Integer theLimit) {
String resourceName = theType != null ? toResourceName(theType) : null;
@@ -374,6 +381,20 @@ public class GenericClient extends BaseClient implements IGenericClient {
return parser.parseBundle(myType, theResponseReader);
}
}
+
+ private final class ResourceListResponseHandler implements IClientResponseHandler> {
+
+ private Class extends IResource> myType;
+
+ public ResourceListResponseHandler(Class extends IResource> theType) {
+ myType = theType;
+ }
+
+ @Override
+ public List invokeClient(String theResponseMimeType, Reader theResponseReader, int theResponseStatusCode, Map> theHeaders) throws IOException, BaseServerResponseException {
+ return new BundleResponseHandler(myType).invokeClient(theResponseMimeType, theResponseReader, theResponseStatusCode, theHeaders).toListOfResources();
+ }
+ }
private class ForInternal extends BaseClientExecutable implements IQuery {
@@ -391,7 +412,8 @@ public class GenericClient extends BaseClient implements IGenericClient {
public ForInternal(Class extends IResource> theResourceType) {
myResourceType = theResourceType;
- myResourceName = myContext.getResourceDefinition(theResourceType).getName();
+ RuntimeResourceDefinition definition = myContext.getResourceDefinition(theResourceType);
+ myResourceName = definition.getName();
}
public ForInternal(String theResourceName) {
@@ -660,6 +682,53 @@ public class GenericClient extends BaseClient implements IGenericClient {
}
+ private final class TransactionInternal implements ITransaction {
+
+ @Override
+ public ITransactionTyped> withResources(List theResources) {
+ return new TransactionExecutable>(theResources);
+ }
+
+ @Override
+ public ITransactionTyped withBundle(Bundle theResources) {
+ return new TransactionExecutable(theResources);
+ }
+
+
+ }
+
+
+ private final class TransactionExecutable extends BaseClientExecutable, T> implements ITransactionTyped{
+
+ private List myResources;
+ private Bundle myBundle;
+
+ public TransactionExecutable(List theResources) {
+ myResources=theResources;
+ }
+
+ public TransactionExecutable(Bundle theResources) {
+ myBundle=theResources;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public T execute() {
+ if (myResources!=null) {
+ ResourceListResponseHandler binding = new ResourceListResponseHandler(null);
+ BaseHttpClientInvocation invocation = TransactionMethodBinding.createTransactionInvocation(myResources, myContext);
+ Map> params = null;
+ return (T) invoke(params, binding, invocation);
+ }else {
+ BundleResponseHandler binding = new BundleResponseHandler(null);
+ BaseHttpClientInvocation invocation = TransactionMethodBinding.createTransactionInvocation(myBundle, myContext);
+ Map> params = null;
+ return (T) invoke(params, binding, invocation);
+ }
+ }
+
+ }
+
private class GetPageInternal extends BaseClientExecutable implements IGetPageTyped {
private String myUrl;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/IGenericClient.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/IGenericClient.java
index 9bbe59f2e80..ec73de11f1b 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/IGenericClient.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/IGenericClient.java
@@ -31,8 +31,8 @@ import ca.uhn.fhir.model.primitive.DateTimeDt;
import ca.uhn.fhir.model.primitive.IdDt;
import ca.uhn.fhir.rest.api.MethodOutcome;
import ca.uhn.fhir.rest.gclient.IGetPage;
-import ca.uhn.fhir.rest.gclient.IGetPageTyped;
import ca.uhn.fhir.rest.gclient.IGetTags;
+import ca.uhn.fhir.rest.gclient.ITransaction;
import ca.uhn.fhir.rest.gclient.IUntypedQuery;
public interface IGenericClient {
@@ -58,6 +58,8 @@ public interface IGenericClient {
* The resources to create/update in a single transaction
* @return A list of resource stubs (these will not be fully populated) containing IDs and other
* {@link IResource#getResourceMetadata() metadata}
+ * @deprecated Use {@link #transaction()}
+ *
*/
List transaction(List theResources);
@@ -236,4 +238,9 @@ public interface IGenericClient {
*/
IGetPage loadPage();
+ /**
+ * Send a transaction (collection of resources) to the server to be executed as a single unit
+ */
+ ITransaction transaction();
+
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/IRestfulClientFactory.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/IRestfulClientFactory.java
index 80dfdc92716..7b970aed7d6 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/IRestfulClientFactory.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/IRestfulClientFactory.java
@@ -66,4 +66,13 @@ public interface IRestfulClientFactory {
*/
IGenericClient newGenericClient(String theServerBase);
+
+ void setSocketTimeout(int theSocketTimeout);
+
+
+ void setConnectTimeout(int theConnectTimeout);
+
+
+ void setConnectionRequestTimeout(int theConnectionRequestTimeout);
+
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/RestfulClientFactory.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/RestfulClientFactory.java
index 4002d79d4ea..2c10195c8c1 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/RestfulClientFactory.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/RestfulClientFactory.java
@@ -155,11 +155,13 @@ public class RestfulClientFactory implements IRestfulClientFactory {
return new GenericClient(myContext, getHttpClient(), theServerBase);
}
+ @Override
public synchronized void setConnectionRequestTimeout(int theConnectionRequestTimeout) {
myConnectionRequestTimeout = theConnectionRequestTimeout;
myHttpClient=null;
}
+ @Override
public synchronized void setConnectTimeout(int theConnectTimeout) {
myConnectTimeout = theConnectTimeout;
myHttpClient=null;
@@ -177,6 +179,7 @@ public class RestfulClientFactory implements IRestfulClientFactory {
myHttpClient = theHttpClient;
}
+ @Override
public synchronized void setSocketTimeout(int theSocketTimeout) {
mySocketTimeout = theSocketTimeout;
myHttpClient=null;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/NonFhirResponseException.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/NonFhirResponseException.java
index 4472e8d9ec3..59360c7acd6 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/NonFhirResponseException.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/exceptions/NonFhirResponseException.java
@@ -20,7 +20,7 @@ package ca.uhn.fhir.rest.client.exceptions;
* #L%
*/
-import static org.apache.commons.lang3.StringUtils.isBlank;
+import static org.apache.commons.lang3.StringUtils.*;
import java.io.IOException;
import java.io.Reader;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ITransaction.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ITransaction.java
new file mode 100644
index 00000000000..3b397c84777
--- /dev/null
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ITransaction.java
@@ -0,0 +1,14 @@
+package ca.uhn.fhir.rest.gclient;
+
+import java.util.List;
+
+import ca.uhn.fhir.model.api.Bundle;
+import ca.uhn.fhir.model.api.IResource;
+
+public interface ITransaction {
+
+ ITransactionTyped> withResources(List theResources);
+
+ ITransactionTyped withBundle(Bundle theResources);
+
+}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ITransactionTyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ITransactionTyped.java
new file mode 100644
index 00000000000..67c3ba0fa84
--- /dev/null
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ITransactionTyped.java
@@ -0,0 +1,8 @@
+package ca.uhn.fhir.rest.gclient;
+
+
+public interface ITransactionTyped extends IClientExecutable, T> {
+
+ // nothing for now
+
+}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/QuantityParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/QuantityParam.java
index 535eee396b8..863a319863b 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/QuantityParam.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/QuantityParam.java
@@ -20,7 +20,7 @@ package ca.uhn.fhir.rest.gclient;
* #L%
*/
-import static org.apache.commons.lang3.StringUtils.defaultString;
+import static org.apache.commons.lang3.StringUtils.*;
import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum;
import ca.uhn.fhir.rest.gclient.NumberParam.IMatches;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseHttpClientInvocationWithContents.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseHttpClientInvocationWithContents.java
index 6189ae15e8c..fa84a7ff0c8 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseHttpClientInvocationWithContents.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseHttpClientInvocationWithContents.java
@@ -49,6 +49,7 @@ public abstract class BaseHttpClientInvocationWithContents extends BaseHttpClien
private final String myUrlExtension;
private final TagList myTagList;
private final List myResources;
+ private final Bundle myBundle;
public BaseHttpClientInvocationWithContents(FhirContext theContext, IResource theResource, String theUrlExtension) {
super();
@@ -57,6 +58,7 @@ public abstract class BaseHttpClientInvocationWithContents extends BaseHttpClien
myUrlExtension = theUrlExtension;
myTagList = null;
myResources = null;
+ myBundle = null;
}
public BaseHttpClientInvocationWithContents(FhirContext theContext, TagList theTagList, String... theUrlExtension) {
@@ -69,6 +71,7 @@ public abstract class BaseHttpClientInvocationWithContents extends BaseHttpClien
myContext = theContext;
myTagList = theTagList;
myResources = null;
+ myBundle = null;
myUrlExtension = StringUtils.join(theUrlExtension, '/');
}
@@ -79,6 +82,16 @@ public abstract class BaseHttpClientInvocationWithContents extends BaseHttpClien
myTagList = null;
myUrlExtension = null;
myResources = theResources;
+ myBundle = null;
+ }
+
+ public BaseHttpClientInvocationWithContents(FhirContext theContext, Bundle theBundle) {
+ myContext = theContext;
+ myResource = null;
+ myTagList = null;
+ myUrlExtension = null;
+ myResources = null;
+ myBundle = theBundle;
}
@Override
@@ -113,6 +126,8 @@ public abstract class BaseHttpClientInvocationWithContents extends BaseHttpClien
String contents;
if (myTagList != null) {
contents = parser.encodeTagListToString(myTagList);
+ } else if (myBundle != null) {
+ contents = parser.encodeBundleToString(myBundle);
} else if (myResources != null) {
Bundle bundle = RestfulServer.createBundleFromResourceList(myContext, "", myResources, "", "", myResources.size());
contents = parser.encodeBundleToString(bundle);
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseMethodBinding.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseMethodBinding.java
index ea0f4e4b456..ce5e9454247 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseMethodBinding.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseMethodBinding.java
@@ -64,7 +64,6 @@ import ca.uhn.fhir.rest.client.exceptions.NonFhirResponseException;
import ca.uhn.fhir.rest.param.IParameter;
import ca.uhn.fhir.rest.param.IncludeParameter;
import ca.uhn.fhir.rest.param.ParameterUtil;
-import ca.uhn.fhir.rest.param.SearchParameter;
import ca.uhn.fhir.rest.server.BundleProviders;
import ca.uhn.fhir.rest.server.Constants;
import ca.uhn.fhir.rest.server.EncodingEnum;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseOutcomeReturningMethodBinding.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseOutcomeReturningMethodBinding.java
index 7270843d6d6..43e048e817b 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseOutcomeReturningMethodBinding.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseOutcomeReturningMethodBinding.java
@@ -20,7 +20,7 @@ package ca.uhn.fhir.rest.method;
* #L%
*/
-import static org.apache.commons.lang3.StringUtils.isBlank;
+import static org.apache.commons.lang3.StringUtils.*;
import java.io.IOException;
import java.io.PushbackReader;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseResourceReturningMethodBinding.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseResourceReturningMethodBinding.java
index 90ece9f949d..9fc2823597c 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseResourceReturningMethodBinding.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseResourceReturningMethodBinding.java
@@ -20,10 +20,7 @@ package ca.uhn.fhir.rest.method;
* #L%
*/
-import static org.apache.commons.lang3.StringUtils.*;
-
import java.io.IOException;
-import java.io.PrintWriter;
import java.io.Reader;
import java.lang.reflect.Method;
import java.util.Collection;
@@ -34,7 +31,6 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
-import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.StringUtils;
@@ -45,10 +41,7 @@ import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.model.api.Bundle;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.ResourceMetadataKeyEnum;
-import ca.uhn.fhir.model.api.Tag;
-import ca.uhn.fhir.model.api.TagList;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
-import ca.uhn.fhir.model.dstu.resource.Binary;
import ca.uhn.fhir.model.primitive.InstantDt;
import ca.uhn.fhir.parser.IParser;
import ca.uhn.fhir.rest.client.exceptions.InvalidResponseException;
@@ -243,7 +236,7 @@ abstract class BaseResourceReturningMethodBinding extends BaseMethodBinding resources, FhirContext theContext) {
- return new HttpPostClientInvocation(theContext, resources);
+ public static BaseHttpClientInvocation createTransactionInvocation(List theResources, FhirContext theContext) {
+ return new HttpPostClientInvocation(theContext, theResources);
+ }
+
+ public static BaseHttpClientInvocation createTransactionInvocation(Bundle theBundle, FhirContext theContext) {
+ return new HttpPostClientInvocation(theContext, theBundle);
}
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/UpdateMethodBinding.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/UpdateMethodBinding.java
index 2457cd7eec1..4eaf9e2b4af 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/UpdateMethodBinding.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/UpdateMethodBinding.java
@@ -20,7 +20,7 @@ package ca.uhn.fhir.rest.method;
* #L%
*/
-import static org.apache.commons.lang3.StringUtils.isNotBlank;
+import static org.apache.commons.lang3.StringUtils.*;
import java.lang.reflect.Method;
import java.util.Collections;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/IdentifierListParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/IdentifierListParam.java
index 46103f4d90e..e0d8c047481 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/IdentifierListParam.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/IdentifierListParam.java
@@ -31,7 +31,7 @@ import ca.uhn.fhir.rest.method.QualifiedParamList;
public class IdentifierListParam implements IQueryParameterOr {
private List myIdentifiers = new ArrayList();
-
+
/**
* Returns all identifiers associated with this list
*/
@@ -64,4 +64,10 @@ public class IdentifierListParam implements IQueryParameterOr {
}
}
+ public void addIdentifier(IdentifierDt theIdentifierDt) {
+ if (theIdentifierDt != null && theIdentifierDt.isEmpty() == false) {
+ getIdentifiers().add(theIdentifierDt);
+ }
+ }
+
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ParameterUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ParameterUtil.java
index 0d8053faec1..540b26f5888 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ParameterUtil.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ParameterUtil.java
@@ -20,7 +20,7 @@ package ca.uhn.fhir.rest.param;
* #L%
*/
-import static org.apache.commons.lang3.StringUtils.isNotBlank;
+import static org.apache.commons.lang3.StringUtils.*;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/SearchParameter.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/SearchParameter.java
index 2546a9af512..ca12a833c98 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/SearchParameter.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/SearchParameter.java
@@ -160,6 +160,8 @@ public class SearchParameter extends BaseQueryParameter {
myParamType = SearchParamTypeEnum.QUANTITY;
} else if (ReferenceParam.class.isAssignableFrom(type)) {
myParamType = SearchParamTypeEnum.REFERENCE;
+ } else if (IdentifierListParam.class.isAssignableFrom(type)) {
+ myParamType = SearchParamTypeEnum.TOKEN;
} else {
throw new ConfigurationException("Unknown search parameter type: " + type);
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/RestfulServer.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/RestfulServer.java
index c117e479ce5..b10bc68879c 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/RestfulServer.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/RestfulServer.java
@@ -24,7 +24,6 @@ import static org.apache.commons.lang3.StringUtils.*;
import java.io.IOException;
import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.io.Writer;
import java.lang.reflect.Method;
@@ -46,8 +45,8 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.apache.commons.lang3.Validate;
import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.Validate;
import org.apache.commons.lang3.exception.ExceptionUtils;
import ca.uhn.fhir.context.FhirContext;
@@ -121,7 +120,7 @@ public class RestfulServer extends HttpServlet {
*
*/
public void addHeadersToResponse(HttpServletResponse theHttpResponse) {
- theHttpResponse.addHeader("X-PoweredBy", "HAPI FHIR " + VersionUtil.getVersion() + " RESTful Server");
+ theHttpResponse.addHeader("X-Powered-By", "HAPI FHIR " + VersionUtil.getVersion() + " RESTful Server");
}
private void assertProviderIsValid(Object theNext) throws ConfigurationException {
@@ -542,22 +541,26 @@ public class RestfulServer extends HttpServlet {
theResponse.setContentType("text/plain");
theResponse.setCharacterEncoding("UTF-8");
theResponse.getWriter().write(e.getMessage());
+
} catch (Throwable e) {
- int statusCode = 500;
- if (e instanceof InternalErrorException) {
- ourLog.error("Failure during REST processing", e);
- } else if (e instanceof BaseServerResponseException) {
- ourLog.warn("Failure during REST processing: {}", e.toString());
- statusCode=((BaseServerResponseException) e).getStatusCode();
- } else {
- ourLog.warn("Failure during REST processing: {}", e.toString());
- }
-
OperationOutcome oo = new OperationOutcome();
Issue issue = oo.addIssue();
issue.getSeverity().setValueAsEnum(IssueSeverityEnum.ERROR);
- issue.getDetails().setValue(e.toString() + "\n\n" + ExceptionUtils.getStackTrace(e));
+
+ int statusCode = 500;
+ if (e instanceof InternalErrorException) {
+ ourLog.error("Failure during REST processing", e);
+ issue.getDetails().setValue(e.toString() + "\n\n" + ExceptionUtils.getStackTrace(e));
+ } else if (e instanceof BaseServerResponseException) {
+ ourLog.warn("Failure during REST processing: {}", e.toString());
+ statusCode=((BaseServerResponseException) e).getStatusCode();
+ issue.getDetails().setValue(e.getMessage());
+ } else {
+ ourLog.error("Failure during REST processing", e);
+ issue.getDetails().setValue(e.toString() + "\n\n" + ExceptionUtils.getStackTrace(e));
+ }
+
streamResponseAsResource(this, theResponse, oo, determineResponseEncoding(theRequest), true, false, NarrativeModeEnum.NORMAL, statusCode,false);
@@ -776,6 +779,14 @@ public class RestfulServer extends HttpServlet {
bundle.getLinkSelf().setValue(theCompleteUrl);
for (IResource next : theResult) {
+
+ if (theContext.getNarrativeGenerator() != null) {
+ String title = theContext.getNarrativeGenerator().generateTitle(next);
+ if (StringUtils.isNotBlank(title)) {
+ ResourceMetadataKeyEnum.TITLE.put(next, title);
+ }
+ }
+
bundle.addResource(next, theContext, theServerBase);
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ReflectionUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ReflectionUtil.java
index e8c624d724d..5c9e1c1dce0 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ReflectionUtil.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ReflectionUtil.java
@@ -58,7 +58,7 @@ public class ReflectionUtil {
return type;
}
- @SuppressWarnings({ "unused", "rawtypes" })
+ @SuppressWarnings({ "rawtypes" })
public static Class> getGenericCollectionTypeOfMethodReturnType(Method theMethod) {
Class> type;
Type genericReturnType = theMethod.getGenericReturnType();
diff --git a/hapi-fhir-base/src/main/resources/ca/uhn/fhir/narrative/narratives.properties b/hapi-fhir-base/src/main/resources/ca/uhn/fhir/narrative/narratives.properties
index c28153ec1ea..0062367beb8 100644
--- a/hapi-fhir-base/src/main/resources/ca/uhn/fhir/narrative/narratives.properties
+++ b/hapi-fhir-base/src/main/resources/ca/uhn/fhir/narrative/narratives.properties
@@ -32,6 +32,9 @@ quantity.narrative=classpath:ca/uhn/fhir/narrative/QuantityDt.html
patient.class=ca.uhn.fhir.model.dstu.resource.Patient
patient.narrative=classpath:ca/uhn/fhir/narrative/Patient.html
+patient.title=classpath:ca/uhn/fhir/narrative/title/Patient.html
+
diagnosticreport.class=ca.uhn.fhir.model.dstu.resource.DiagnosticReport
-diagnosticreport.narrative=classpath:ca/uhn/fhir/narrative/DiagnosticReport.html
\ No newline at end of file
+diagnosticreport.narrative=classpath:ca/uhn/fhir/narrative/DiagnosticReport.html
+diagnosticreport.title=classpath:ca/uhn/fhir/narrative/title/DiagnosticReport.html
diff --git a/hapi-fhir-base/src/main/resources/ca/uhn/fhir/narrative/title/DiagnosticReport.html b/hapi-fhir-base/src/main/resources/ca/uhn/fhir/narrative/title/DiagnosticReport.html
new file mode 100644
index 00000000000..733c936c5a7
--- /dev/null
+++ b/hapi-fhir-base/src/main/resources/ca/uhn/fhir/narrative/title/DiagnosticReport.html
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/resources/ca/uhn/fhir/narrative/title/Patient.html b/hapi-fhir-base/src/main/resources/ca/uhn/fhir/narrative/title/Patient.html
new file mode 100644
index 00000000000..6b94c7e9760
--- /dev/null
+++ b/hapi-fhir-base/src/main/resources/ca/uhn/fhir/narrative/title/Patient.html
@@ -0,0 +1,9 @@
+
+ Dr
+ John
+ SMITH
+ Jr
+
+ (8708660)
+
+
diff --git a/hapi-fhir-base/src/site/site.xml b/hapi-fhir-base/src/site/site.xml
index d2a51a81dd4..50a9795740a 100644
--- a/hapi-fhir-base/src/site/site.xml
+++ b/hapi-fhir-base/src/site/site.xml
@@ -1,6 +1,6 @@
-
-
+
+
HAPIimages/hapi_fhir_banner.png
@@ -21,6 +21,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -57,24 +74,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -91,3 +90,4 @@
+
diff --git a/hapi-fhir-base/src/site/xdoc/index.xml b/hapi-fhir-base/src/site/xdoc/index.xml
index 51643ff9f22..1f6d7b8adc0 100644
--- a/hapi-fhir-base/src/site/xdoc/index.xml
+++ b/hapi-fhir-base/src/site/xdoc/index.xml
@@ -33,7 +33,7 @@
to the Maven repos and the Sourceforge download system. This release corrects a large number of
bugs and includes fixes which were implemented in the recent FHIR Connectathon.
- &emdash; James Agnew
+ James Agnew
diff --git a/hapi-fhir-base/src/test/java/ca/uhn/fhir/context/FhirContextTest.java b/hapi-fhir-base/src/test/java/ca/uhn/fhir/context/FhirContextTest.java
index 00383fee197..2df0eefba6a 100644
--- a/hapi-fhir-base/src/test/java/ca/uhn/fhir/context/FhirContextTest.java
+++ b/hapi-fhir-base/src/test/java/ca/uhn/fhir/context/FhirContextTest.java
@@ -1,8 +1,5 @@
package ca.uhn.fhir.context;
-import static org.hamcrest.Matchers.*;
-import static org.junit.Assert.*;
-
import org.junit.Test;
import ca.uhn.fhir.model.dstu.resource.Patient;
diff --git a/hapi-fhir-base/src/test/java/ca/uhn/fhir/context/ModelScannerTest.java b/hapi-fhir-base/src/test/java/ca/uhn/fhir/context/ModelScannerTest.java
index bb39c7b976e..f14e4b775d7 100644
--- a/hapi-fhir-base/src/test/java/ca/uhn/fhir/context/ModelScannerTest.java
+++ b/hapi-fhir-base/src/test/java/ca/uhn/fhir/context/ModelScannerTest.java
@@ -10,7 +10,6 @@ import ca.uhn.fhir.parser.DataFormatException;
public class ModelScannerTest {
/** This failed at one point */
- @SuppressWarnings("unused")
@Test
public void testCarePlan() throws DataFormatException {
new ModelScanner(CarePlan.class);
diff --git a/hapi-fhir-base/src/test/java/ca/uhn/fhir/context/ResourceWithExtensionsA.java b/hapi-fhir-base/src/test/java/ca/uhn/fhir/context/ResourceWithExtensionsA.java
index 9bf7f483627..998733ff8e5 100644
--- a/hapi-fhir-base/src/test/java/ca/uhn/fhir/context/ResourceWithExtensionsA.java
+++ b/hapi-fhir-base/src/test/java/ca/uhn/fhir/context/ResourceWithExtensionsA.java
@@ -2,7 +2,7 @@ package ca.uhn.fhir.context;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IExtension;
@@ -83,7 +83,7 @@ public class ResourceWithExtensionsA extends BaseResource {
}
@Block(name = "Bar1")
- public static class Bar1 extends BaseElement implements IExtension {
+ public static class Bar1 extends BaseIdentifiableElement implements IExtension {
public Bar1() {
super();
@@ -141,7 +141,7 @@ public class ResourceWithExtensionsA extends BaseResource {
}
@Block(name = "Bar2")
- public static class Bar2 implements IExtension {
+ public static class Bar2 extends BaseIdentifiableElement implements IExtension {
@Child(name = "bar121", type = DateDt.class, order = 0, min = 0, max = Child.MAX_UNLIMITED)
@Extension(url = "http://bar/#b1/2/1", definedLocally=true, isModifier=false)
@@ -151,8 +151,6 @@ public class ResourceWithExtensionsA extends BaseResource {
@Extension(url = "http://bar/#b1/2/2", definedLocally=true, isModifier=false)
private List myBar122;
- private IdDt myId;
-
@Override
public boolean isEmpty() {
return false; // not implemented
@@ -180,20 +178,6 @@ public class ResourceWithExtensionsA extends BaseResource {
myBar122 = theBar122;
}
- @Override
- public void setId(IdDt theId) {
- myId=theId;
- }
-
- @Override
- public IdDt getId() {
- return myId;
- }
-
- @Override
- public void setId(String theId) {
- myId=new IdDt(theId);
- }
}
diff --git a/hapi-fhir-base/src/test/java/ca/uhn/fhir/model/primitive/CodingDtTest.java b/hapi-fhir-base/src/test/java/ca/uhn/fhir/model/primitive/CodingDtTest.java
new file mode 100644
index 00000000000..6b3f910355c
--- /dev/null
+++ b/hapi-fhir-base/src/test/java/ca/uhn/fhir/model/primitive/CodingDtTest.java
@@ -0,0 +1,43 @@
+package ca.uhn.fhir.model.primitive;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+import ca.uhn.fhir.model.dstu.composite.CodingDt;
+
+public class CodingDtTest {
+
+ @Test
+ public void testTokenWithPipeInValue() {
+ CodingDt dt = new CodingDt();
+ dt.setValueAsQueryToken(null, "a|b|c");
+
+ assertEquals("a", dt.getSystem().getValueAsString());
+ assertEquals("b|c", dt.getCode().getValue());
+ assertEquals("a|b|c", dt.getValueAsQueryToken());
+ }
+
+ @Test
+ public void testTokenWithPipeInValueAndNoSystem() {
+ CodingDt dt = new CodingDt();
+ dt.setValueAsQueryToken(null, "|b|c");
+
+ assertEquals("", dt.getSystem().getValueAsString());
+ assertEquals("b|c", dt.getCode().getValue());
+
+ // TODO: this should be escaped or something?
+ assertEquals("b|c", dt.getValueAsQueryToken());
+ }
+
+ @Test
+ public void testTokenNoSystem() {
+ CodingDt dt = new CodingDt();
+ dt.setValueAsQueryToken(null, "c");
+
+ assertEquals(null, dt.getSystem().getValueAsString());
+ assertEquals("c", dt.getCode().getValue());
+ assertEquals("c", dt.getValueAsQueryToken());
+ }
+
+}
diff --git a/hapi-fhir-base/src/test/java/ca/uhn/fhir/model/primitive/IdDtTest.java b/hapi-fhir-base/src/test/java/ca/uhn/fhir/model/primitive/IdDtTest.java
index 434c0488cff..f45dc14034b 100644
--- a/hapi-fhir-base/src/test/java/ca/uhn/fhir/model/primitive/IdDtTest.java
+++ b/hapi-fhir-base/src/test/java/ca/uhn/fhir/model/primitive/IdDtTest.java
@@ -1,6 +1,6 @@
package ca.uhn.fhir.model.primitive;
-import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.*;
import java.math.BigDecimal;
diff --git a/hapi-fhir-base/src/test/java/ca/uhn/fhir/model/primitive/IdentifierDtTest.java b/hapi-fhir-base/src/test/java/ca/uhn/fhir/model/primitive/IdentifierDtTest.java
index b2465f5f1e5..5c343a15165 100644
--- a/hapi-fhir-base/src/test/java/ca/uhn/fhir/model/primitive/IdentifierDtTest.java
+++ b/hapi-fhir-base/src/test/java/ca/uhn/fhir/model/primitive/IdentifierDtTest.java
@@ -25,7 +25,19 @@ public class IdentifierDtTest {
assertEquals("", dt.getSystem().getValueAsString());
assertEquals("b|c", dt.getValue().getValue());
- assertEquals("|b|c", dt.getValueAsQueryToken());
+
+ // TODO: this should probably be an error or escaped or something, since it will be interpreted as system=b, code=c
+ assertEquals("b|c", dt.getValueAsQueryToken());
+ }
+
+ @Test
+ public void testTokenNoSystem() {
+ IdentifierDt dt = new IdentifierDt();
+ dt.setValueAsQueryToken(null, "c");
+
+ assertEquals(null, dt.getSystem().getValueAsString());
+ assertEquals("c", dt.getValue().getValue());
+ assertEquals("c", dt.getValueAsQueryToken());
}
}
diff --git a/hapi-fhir-base/src/test/java/ca/uhn/fhir/model/primitive/StringDtTest.java b/hapi-fhir-base/src/test/java/ca/uhn/fhir/model/primitive/StringDtTest.java
new file mode 100644
index 00000000000..d07ec7da750
--- /dev/null
+++ b/hapi-fhir-base/src/test/java/ca/uhn/fhir/model/primitive/StringDtTest.java
@@ -0,0 +1,16 @@
+package ca.uhn.fhir.model.primitive;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+
+public class StringDtTest {
+
+ @Test
+ public void testBlank() {
+
+ assertTrue(new StringDt("").isEmpty());
+
+ }
+
+}
diff --git a/hapi-fhir-base/src/test/java/ca/uhn/fhir/narrative/DefaultThymeleafNarrativeGeneratorTest.java b/hapi-fhir-base/src/test/java/ca/uhn/fhir/narrative/DefaultThymeleafNarrativeGeneratorTest.java
index 0e03ceea7d8..e2e0ef0bb6a 100644
--- a/hapi-fhir-base/src/test/java/ca/uhn/fhir/narrative/DefaultThymeleafNarrativeGeneratorTest.java
+++ b/hapi-fhir-base/src/test/java/ca/uhn/fhir/narrative/DefaultThymeleafNarrativeGeneratorTest.java
@@ -46,9 +46,12 @@ public class DefaultThymeleafNarrativeGeneratorTest {
value.setBirthDate(new Date(), TemporalPrecisionEnum.DAY);
- String output = gen.generateNarrative("http://hl7.org/fhir/profiles/Patient", value).getDiv().getValueAsString();
-
- ourLog.info(output);
+ String output = gen.generateNarrative(value).getDiv().getValueAsString();
+ assertThat(output, StringContains.containsString("
joe john BLOW
"));
+
+ String title = gen.generateTitle(value);
+ assertEquals("joe john BLOW (123456)", title);
+ ourLog.info(title);
}
@Test
@@ -105,6 +108,11 @@ public class DefaultThymeleafNarrativeGeneratorTest {
ourLog.info(output);
assertThat(output, StringContains.containsString("
Some Diagnostic Report
"));
+ String title = gen.generateTitle(value);
+ ourLog.info(title);
+ assertEquals("Some Diagnostic Report - final - 2 observations", title);
+
+
// Now try it with the parser
FhirContext context = new FhirContext();
diff --git a/hapi-fhir-base/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java b/hapi-fhir-base/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java
index 1ab3d23df72..01e42a2d46a 100644
--- a/hapi-fhir-base/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java
+++ b/hapi-fhir-base/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java
@@ -2,9 +2,8 @@ package ca.uhn.fhir.parser;
import static org.hamcrest.Matchers.*;
import static org.junit.Assert.*;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
+import static org.mockito.Matchers.*;
+import static org.mockito.Mockito.*;
import java.io.IOException;
import java.io.OutputStreamWriter;
@@ -23,7 +22,6 @@ import org.hamcrest.core.StringContains;
import org.hamcrest.text.StringContainsInOrder;
import org.junit.BeforeClass;
import org.junit.Test;
-import org.mockito.internal.matchers.Not;
import ca.uhn.fhir.context.ConfigurationException;
import ca.uhn.fhir.context.FhirContext;
@@ -40,9 +38,9 @@ import ca.uhn.fhir.model.dstu.composite.AddressDt;
import ca.uhn.fhir.model.dstu.composite.HumanNameDt;
import ca.uhn.fhir.model.dstu.composite.NarrativeDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
+import ca.uhn.fhir.model.dstu.resource.Binary;
import ca.uhn.fhir.model.dstu.resource.Conformance;
import ca.uhn.fhir.model.dstu.resource.Conformance.RestResource;
-import ca.uhn.fhir.model.dstu.resource.Binary;
import ca.uhn.fhir.model.dstu.resource.DiagnosticReport;
import ca.uhn.fhir.model.dstu.resource.Observation;
import ca.uhn.fhir.model.dstu.resource.Organization;
@@ -68,12 +66,24 @@ public class JsonParserTest {
@Test
public void testEncodingNullExtension() {
Patient p = new Patient();
- p.addUndeclaredExtension(new ExtensionDt(false, "http://foo#bar"));
- String str = new FhirContext().newJsonParser().encodeResourceToString(p);
+ ExtensionDt extension = new ExtensionDt(false, "http://foo#bar");
+ p.addUndeclaredExtension(extension);
+ String str = ourCtx.newJsonParser().encodeResourceToString(p);
assertEquals("{\"resourceType\":\"Patient\",\"extension\":[{\"url\":\"http://foo#bar\"}]}", str);
+
+ extension.setValue(new StringDt());
+
+ str = ourCtx.newJsonParser().encodeResourceToString(p);
+ assertEquals("{\"resourceType\":\"Patient\",\"extension\":[{\"url\":\"http://foo#bar\"}]}", str);
+
+ extension.setValue(new StringDt(""));
+
+ str = ourCtx.newJsonParser().encodeResourceToString(p);
+ assertEquals("{\"resourceType\":\"Patient\",\"extension\":[{\"url\":\"http://foo#bar\"}]}", str);
}
+
@Test
public void testEncodeBinaryResource() {
diff --git a/hapi-fhir-base/src/test/java/ca/uhn/fhir/parser/MyObservationWithExtensions.java b/hapi-fhir-base/src/test/java/ca/uhn/fhir/parser/MyObservationWithExtensions.java
index 8da271f659e..91afdc45093 100644
--- a/hapi-fhir-base/src/test/java/ca/uhn/fhir/parser/MyObservationWithExtensions.java
+++ b/hapi-fhir-base/src/test/java/ca/uhn/fhir/parser/MyObservationWithExtensions.java
@@ -3,7 +3,7 @@ package ca.uhn.fhir.parser;
import java.util.Collections;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BaseIdentifiableElement;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResourceBlock;
import ca.uhn.fhir.model.api.annotation.Block;
@@ -68,7 +68,7 @@ public class MyObservationWithExtensions extends Patient {
*
*/
@Block(name = "Observation.someExtensions")
- public static class MoreExt extends BaseElement implements IResourceBlock {
+ public static class MoreExt extends BaseIdentifiableElement implements IResourceBlock {
@Extension(url = "urn:patientext:moreext:1", definedLocally = false, isModifier = false)
@Child(name = "str1", order = 0)
diff --git a/hapi-fhir-base/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java b/hapi-fhir-base/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java
index 54fd21ebbdb..a67f82e72ce 100644
--- a/hapi-fhir-base/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java
+++ b/hapi-fhir-base/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java
@@ -74,7 +74,7 @@ public class XmlParserTest {
patient.getGender().setValueAsEnum(AdministrativeGenderCodesEnum.M);
- String val = new FhirContext().newXmlParser().encodeResourceToString(patient);
+ String val = ourCtx.newXmlParser().encodeResourceToString(patient);
ourLog.info(val);
}
@@ -149,7 +149,7 @@ public class XmlParserTest {
parameter.setUrl("http://foo").setValue(new StringDt("bar"));
- String val = new FhirContext().newXmlParser().encodeResourceToString(q);
+ String val = ourCtx.newXmlParser().encodeResourceToString(q);
ourLog.info(val);
assertEquals("", val);
@@ -214,7 +214,7 @@ public class XmlParserTest {
"";
//@formatter:on
- String encoded = new FhirContext().newXmlParser().encodeTagListToString(tagList);
+ String encoded = ourCtx.newXmlParser().encodeTagListToString(tagList);
assertEquals(expected,encoded);
}
@@ -235,13 +235,13 @@ public class XmlParserTest {
"";
//@formatter:off
- Bundle bundleR = new FhirContext().newXmlParser().parseBundle(bundle);
+ Bundle bundleR = ourCtx.newXmlParser().parseBundle(bundle);
assertEquals(15, bundleR.getTotalResults().getValue().intValue());
}
@Test
public void testEncodeExtensionWithResourceContent() {
- IParser parser = new FhirContext().newXmlParser();
+ IParser parser = ourCtx.newXmlParser();
Patient patient = new Patient();
patient.addAddress().setUse(AddressUseEnum.HOME);
@@ -262,7 +262,7 @@ public class XmlParserTest {
@Test
public void testEncodeDeclaredExtensionWithResourceContent() {
- IParser parser = new FhirContext().newXmlParser();
+ IParser parser = ourCtx.newXmlParser();
MyPatientWithOneDeclaredExtension patient = new MyPatientWithOneDeclaredExtension();
patient.addAddress().setUse(AddressUseEnum.HOME);
@@ -281,7 +281,7 @@ public class XmlParserTest {
@Test
public void testEncodeDeclaredExtensionWithAddressContent() {
- IParser parser = new FhirContext().newXmlParser();
+ IParser parser = ourCtx.newXmlParser();
MyPatientWithOneDeclaredAddressExtension patient = new MyPatientWithOneDeclaredAddressExtension();
patient.addAddress().setUse(AddressUseEnum.HOME);
@@ -300,7 +300,7 @@ public class XmlParserTest {
@Test
public void testEncodeUndeclaredExtensionWithAddressContent() {
- IParser parser = new FhirContext().newXmlParser();
+ IParser parser = ourCtx.newXmlParser();
Patient patient = new Patient();
patient.addAddress().setUse(AddressUseEnum.HOME);
@@ -323,7 +323,7 @@ public class XmlParserTest {
Bundle b = new Bundle();
b.getTotalResults().setValue(123);
- String val = new FhirContext().newXmlParser().setPrettyPrint(true).encodeBundleToString(b);
+ String val = ourCtx.newXmlParser().setPrettyPrint(true).encodeBundleToString(b);
ourLog.info(val);
assertThat(val, StringContains.containsString("123"));
@@ -338,12 +338,12 @@ public class XmlParserTest {
e.setResource(new Patient());
e.addCategory().setLabel("label").setTerm("term").setScheme("scheme");
- String val = new FhirContext().newXmlParser().setPrettyPrint(true).encodeBundleToString(b);
+ String val = ourCtx.newXmlParser().setPrettyPrint(true).encodeBundleToString(b);
ourLog.info(val);
assertThat(val, StringContains.containsString(""));
- b = new FhirContext().newXmlParser().parseBundle(val);
+ b = ourCtx.newXmlParser().parseBundle(val);
assertEquals(1, b.getEntries().size());
assertEquals(1, b.getEntries().get(0).getCategories().size());
assertEquals("term", b.getEntries().get(0).getCategories().get(0).getTerm());
@@ -398,7 +398,7 @@ public class XmlParserTest {
spm.getText().setDiv("AAA");
rpt.addSpecimen().setResource(spm);
- IParser p = new FhirContext(DiagnosticReport.class).newXmlParser().setPrettyPrint(true);
+ IParser p = ourCtx.newXmlParser().setPrettyPrint(true);
String str = p.encodeResourceToString(rpt);
ourLog.info(str);
@@ -418,7 +418,7 @@ public class XmlParserTest {
Observation obs = new Observation();
obs.setValue(new DecimalDt(112.22));
- IParser p = new FhirContext(Observation.class).newJsonParser();
+ IParser p = ourCtx.newJsonParser();
try {
p.encodeResourceToString(obs);
@@ -435,7 +435,7 @@ public class XmlParserTest {
patient.addName().addFamily("Family").addGiven("Given");
//@formatter:off
- String encoded = new FhirContext().newXmlParser().setPrettyPrint(false).encodeResourceToString(patient);
+ String encoded = ourCtx.newXmlParser().setPrettyPrint(false).encodeResourceToString(patient);
ourLog.info(encoded);
/*
* Note at least one space is placed where any whitespace was, as
@@ -447,7 +447,7 @@ public class XmlParserTest {
+ " ";
assertEquals(expected, encoded);
- encoded = new FhirContext().newXmlParser().setPrettyPrint(true).encodeResourceToString(patient);
+ encoded = ourCtx.newXmlParser().setPrettyPrint(true).encodeResourceToString(patient);
ourLog.info(encoded);
expected = "\n"
+ " \n"
@@ -476,7 +476,7 @@ public class XmlParserTest {
Patient patient = new Patient();
patient.setManagingOrganization(new ResourceReferenceDt());
- IParser p = new FhirContext().newXmlParser();
+ IParser p = ourCtx.newXmlParser();
String str = p.encodeResourceToString(patient);
assertThat(str, IsNot.not(StringContains.containsString("managingOrganization")));
@@ -502,7 +502,7 @@ public class XmlParserTest {
patient.addName().addFamily("Smith");
- IParser p = new FhirContext().newXmlParser();
+ IParser p = ourCtx.newXmlParser();
String str = p.encodeResourceToString(patient);
ourLog.info(str);
@@ -745,7 +745,7 @@ public class XmlParserTest {
NarrativeDt nar = new NarrativeDt(xhtmlDt, NarrativeStatusEnum.GENERATED);
when(gen.generateNarrative(eq("http://hl7.org/fhir/profiles/Patient"), eq(patient))).thenReturn(nar);
- FhirContext context = new FhirContext();
+ FhirContext context = ourCtx;
context.setNarrativeGenerator(gen);
IParser p = context.newXmlParser();
String str = p.encodeResourceToString(patient);
@@ -946,6 +946,26 @@ public class XmlParserTest {
assertEquals("_id", res.getSearchParam().get(1).getName().getValue());
}
+ @Test
+ public void testParseEncodeNarrative() {
+
+ String input = "