diff --git a/hapi-fhir-base/pom.xml b/hapi-fhir-base/pom.xml
index 182418e0abb..ef047846f98 100644
--- a/hapi-fhir-base/pom.xml
+++ b/hapi-fhir-base/pom.xml
@@ -131,6 +131,26 @@
9.1.1.v20140108test
+
+ org.eclipse.jetty
+ jetty-server
+ 9.1.1.v20140108
+ test
+
+
+ org.eclipse.jetty
+ jetty-servlet
+ 9.1.1.v20140108
+ test
+
+
+ org.eclipse.jetty
+ jetty-util
+ 9.1.1.v20140108
+ test
+
+
+
org.mockitomockito-all
@@ -152,24 +172,6 @@
test
-
- org.eclipse.jetty
- jetty-server
- 9.1.1.v20140108
- test
-
-
- org.eclipse.jetty
- jetty-servlet
- 9.1.1.v20140108
- test
-
-
- org.eclipse.jetty
- jetty-util
- 9.1.1.v20140108
- test
- commons-httpclient
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 180c260dc69..027a75dc1d1 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
@@ -41,6 +41,7 @@ import ca.uhn.fhir.rest.client.IRestfulClientFactory;
import ca.uhn.fhir.rest.client.RestfulClientFactory;
import ca.uhn.fhir.rest.client.api.IBasicClient;
import ca.uhn.fhir.rest.client.api.IRestfulClient;
+import ca.uhn.fhir.util.FhirTerser;
/**
* The FHIR context is the central starting point for the use of the HAPI FHIR API. It should be created once, and then used as a factory for various other types of objects (parsers, clients, etc.).
@@ -89,6 +90,10 @@ public class FhirContext {
public BaseRuntimeElementDefinition> getElementDefinition(Class extends IElement> theElementType) {
return myClassToElementDefinition.get(theElementType);
}
+
+ public FhirTerser newTerser() {
+ return new FhirTerser(this);
+ }
public INarrativeGenerator getNarrativeGenerator() {
return myNarrativeGenerator;
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 eb670869152..1287ad5ceb5 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
@@ -55,9 +55,11 @@ import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.Extension;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.AttachmentDt;
import ca.uhn.fhir.model.dstu.composite.ContainedDt;
import ca.uhn.fhir.model.dstu.composite.NarrativeDt;
+import ca.uhn.fhir.model.dstu.composite.QuantityDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
import ca.uhn.fhir.model.primitive.BoundCodeableConceptDt;
@@ -150,6 +152,8 @@ class ModelScanner {
toScan.add(CodeDt.class);
toScan.add(DecimalDt.class);
toScan.add(AttachmentDt.class);
+ toScan.add(ResourceReferenceDt.class);
+ toScan.add(QuantityDt.class); // TODO: why is this required
do {
for (Class extends IElement> nextClass : toScan) {
@@ -530,9 +534,25 @@ class ModelScanner {
scanCompositeElementForChildren(theClass, resourceDef);
myIdToResourceDefinition.put(resourceId, resourceDef);
+
+ scanResourceForSearchParams(theClass, resourceDef);
+
+
return resourceName;
}
+ private void scanResourceForSearchParams(Class extends IResource> theClass, RuntimeResourceDefinition theResourceDef) {
+
+ for (Field nextField : theClass.getFields()) {
+ SearchParamDefinition searchParam = nextField.getAnnotation(SearchParamDefinition.class);
+ if (searchParam != null) {
+ RuntimeSearchParam param = new RuntimeSearchParam(searchParam.name(), searchParam.description(), searchParam.path());
+ theResourceDef.addSearchParam(param);
+ }
+ }
+
+ }
+
public Map getIdToResourceDefinition() {
return myIdToResourceDefinition;
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildUndeclaredExtensionDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildUndeclaredExtensionDefinition.java
index 9d76a9958f3..56a3af55ac0 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildUndeclaredExtensionDefinition.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeChildUndeclaredExtensionDefinition.java
@@ -74,6 +74,10 @@ public class RuntimeChildUndeclaredExtensionDefinition extends BaseRuntimeChildD
for (BaseRuntimeElementDefinition> next : theClassToElementDefinitions.values()) {
if (next instanceof IRuntimeDatatypeDefinition) {
+// if (next.getName().equals("CodeableConcept")) {
+// System.out.println();
+// }
+
if (!((IRuntimeDatatypeDefinition) next).isSpecialization()) {
String attrName = "value" + WordUtils.capitalize(next.getName());
datatypeAttributeNameToDefinition.put(attrName, next);
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 aac7735e7e7..54c20424eff 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
@@ -27,6 +27,7 @@ import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@@ -34,6 +35,7 @@ import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.text.WordUtils;
+import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IPrimitiveDatatype;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.annotation.Child;
@@ -48,21 +50,39 @@ import ca.uhn.fhir.model.dstu.valueset.SlicingRulesEnum;
public class RuntimeResourceDefinition extends BaseRuntimeElementCompositeDefinition {
- private String myResourceProfile;
+ private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(RuntimeResourceDefinition.class);
+ private Map myExtensionDefToCode = new HashMap();
+ private Map myNameToSearchParam = new LinkedHashMap();
private Profile myProfileDef;
+ private String myResourceProfile;
public RuntimeResourceDefinition(Class extends IResource> theClass, ResourceDef theResourceAnnotation) {
super(theResourceAnnotation.name(), theClass);
myResourceProfile = theResourceAnnotation.profile();
}
+ public RuntimeSearchParam getSearchParam(String theName) {
+ return myNameToSearchParam.get(theName);
+ }
+
+ public void addSearchParam(RuntimeSearchParam theParam) {
+ myNameToSearchParam.put(theParam.getName(), theParam);
+ }
+
+ @Override
+ public ca.uhn.fhir.context.BaseRuntimeElementDefinition.ChildTypeEnum getChildType() {
+ return ChildTypeEnum.RESOURCE;
+ }
+
public String getResourceProfile() {
return myResourceProfile;
}
@Override
- public ca.uhn.fhir.context.BaseRuntimeElementDefinition.ChildTypeEnum getChildType() {
- return ChildTypeEnum.RESOURCE;
+ public void sealAndInitialize(Map, BaseRuntimeElementDefinition>> theClassToElementDefinitions) {
+ super.sealAndInitialize(theClassToElementDefinitions);
+
+ myNameToSearchParam = Collections.unmodifiableMap(myNameToSearchParam);
}
public synchronized Profile toProfile() {
@@ -100,57 +120,99 @@ public class RuntimeResourceDefinition extends BaseRuntimeElementCompositeDefini
return retVal;
}
- private Map myExtensionDefToCode = new HashMap();
+ private void fillBasics(StructureElement theElement, BaseRuntimeElementDefinition> def, LinkedList path, BaseRuntimeDeclaredChildDefinition theChild) {
+ if (path.isEmpty()) {
+ path.add(def.getName());
+ theElement.setName(def.getName());
+ } else {
+ path.add(WordUtils.uncapitalize(theChild.getElementName()));
+ theElement.setName(theChild.getElementName());
+ }
+ theElement.setPath(StringUtils.join(path, '.'));
+ }
- private void scanForExtensions(Profile theProfile, BaseRuntimeElementDefinition> def) {
- BaseRuntimeElementCompositeDefinition> cdef = ((BaseRuntimeElementCompositeDefinition>) def);
+ private void fillExtensions(Structure theStruct, LinkedList path, List extList, String elementName, boolean theIsModifier) {
+ if (extList.size() > 0) {
+ StructureElement extSlice = theStruct.addElement();
+ extSlice.setName(elementName);
+ extSlice.setPath(join(path, '.') + '.' + elementName);
+ extSlice.getSlicing().getDiscriminator().setValue("url");
+ extSlice.getSlicing().setOrdered(false);
+ extSlice.getSlicing().setRules(SlicingRulesEnum.OPEN);
+ extSlice.getDefinition().addType().setCode(DataTypeEnum.EXTENSION);
- for (RuntimeChildDeclaredExtensionDefinition nextChild : cdef.getExtensions()) {
- if (myExtensionDefToCode.containsKey(nextChild)) {
- continue;
- }
-
- if (nextChild.isDefinedLocally() == false) {
- continue;
- }
-
- ExtensionDefn defn = theProfile.addExtensionDefn();
- String code = null;
- if (nextChild.getExtensionUrl().contains("#") && !nextChild.getExtensionUrl().endsWith("#")) {
- code = nextChild.getExtensionUrl().substring(nextChild.getExtensionUrl().indexOf('#') + 1);
- } else {
- throw new ConfigurationException("Locally defined extension has no '#[code]' part in extension URL: " + nextChild.getExtensionUrl());
- }
-
- defn.setCode(code);
- if (myExtensionDefToCode.values().contains(code)) {
- throw new IllegalStateException("Duplicate extension code: " + code);
- }
- myExtensionDefToCode.put(nextChild, code);
-
- if (nextChild.getChildType() != null && IPrimitiveDatatype.class.isAssignableFrom(nextChild.getChildType())) {
- RuntimePrimitiveDatatypeDefinition pdef = (RuntimePrimitiveDatatypeDefinition) nextChild.getSingleChildOrThrow();
- defn.getDefinition().addType().setCode(DataTypeEnum.VALUESET_BINDER.fromCodeString(pdef.getName()));
- } else {
- RuntimeResourceBlockDefinition pdef = (RuntimeResourceBlockDefinition) nextChild.getSingleChildOrThrow();
- scanForExtensions(theProfile, pdef);
-
- for (RuntimeChildDeclaredExtensionDefinition nextChildExt : pdef.getExtensions()) {
- StructureElementDefinitionType type = defn.getDefinition().addType();
- type.setCode(DataTypeEnum.EXTENSION);
- type.setProfile("#" + myExtensionDefToCode.get(nextChildExt));
+ for (RuntimeChildDeclaredExtensionDefinition nextExt : extList) {
+ StructureElement nextProfileExt = theStruct.addElement();
+ nextProfileExt.getDefinition().setIsModifier(theIsModifier);
+ nextProfileExt.setName(extSlice.getName());
+ nextProfileExt.setPath(extSlice.getPath());
+ fillMinAndMaxAndDefinitions(nextExt, nextProfileExt);
+ StructureElementDefinitionType type = nextProfileExt.getDefinition().addType();
+ type.setCode(DataTypeEnum.EXTENSION);
+ if (nextExt.isDefinedLocally()) {
+ type.setProfile(nextExt.getExtensionUrl().substring(nextExt.getExtensionUrl().indexOf('#')));
+ } else {
+ type.setProfile(nextExt.getExtensionUrl());
}
-
}
+ } else {
+ StructureElement extSlice = theStruct.addElement();
+ extSlice.setName(elementName);
+ extSlice.setPath(join(path, '.') + '.' + elementName);
+ extSlice.getDefinition().setIsModifier(theIsModifier);
+ extSlice.getDefinition().addType().setCode(DataTypeEnum.EXTENSION);
+ extSlice.getDefinition().setMin(0);
+ extSlice.getDefinition().setMax("*");
}
}
-private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(RuntimeResourceDefinition.class);
+
+ private void fillMinAndMaxAndDefinitions(BaseRuntimeDeclaredChildDefinition child, StructureElement elem) {
+ elem.getDefinition().setMin(child.getMin());
+ if (child.getMax() == Child.MAX_UNLIMITED) {
+ elem.getDefinition().setMax("*");
+ } else {
+ elem.getDefinition().setMax(Integer.toString(child.getMax()));
+ }
+
+ if (isNotBlank(child.getShortDefinition())) {
+ elem.getDefinition().getShort().setValue(child.getShortDefinition());
+ }
+ if (isNotBlank(child.getFormalDefinition())) {
+ elem.getDefinition().getFormal().setValue(child.getFormalDefinition());
+ }
+ }
+
+ private void fillName(StructureElement elem, BaseRuntimeElementDefinition> nextDef) {
+ if (nextDef instanceof RuntimeResourceReferenceDefinition) {
+ RuntimeResourceReferenceDefinition rr = (RuntimeResourceReferenceDefinition) nextDef;
+ for (Class extends IResource> next : rr.getResourceTypes()) {
+ StructureElementDefinitionType type = elem.getDefinition().addType();
+ type.getCode().setValue("ResourceReference");
+
+ if (next != IResource.class) {
+ RuntimeResourceDefinition resDef = rr.getDefinitionForResourceType(next);
+ type.getProfile().setValueAsString(resDef.getResourceProfile());
+ }
+ }
+
+ return;
+ }
+
+ StructureElementDefinitionType type = elem.getDefinition().addType();
+ String name = nextDef.getName();
+ DataTypeEnum fromCodeString = DataTypeEnum.VALUESET_BINDER.fromCodeString(name);
+ if (fromCodeString == null) {
+ throw new ConfigurationException("Unknown type: " + name);
+ }
+ type.setCode(fromCodeString);
+ }
+
private void fillProfile(Structure theStruct, StructureElement theElement, BaseRuntimeElementDefinition> def, LinkedList path, BaseRuntimeDeclaredChildDefinition theChild) {
fillBasics(theElement, def, path, theChild);
String expectedPath = StringUtils.join(path, '.');
-
+
ourLog.info("Filling profile for: {} - Path: {}", expectedPath);
String name = def.getName();
if (!expectedPath.equals(name)) {
@@ -159,7 +221,6 @@ private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger
return;
}
-
fillExtensions(theStruct, path, def.getExtensionsNonModifier(), "extension", false);
fillExtensions(theStruct, path, def.getExtensionsModifier(), "modifierExtension", true);
@@ -222,91 +283,47 @@ private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger
path.pollLast();
}
- private void fillExtensions(Structure theStruct, LinkedList path, List extList, String elementName, boolean theIsModifier) {
- if (extList.size() > 0) {
- StructureElement extSlice = theStruct.addElement();
- extSlice.setName(elementName);
- extSlice.setPath(join(path, '.') + '.' + elementName);
- extSlice.getSlicing().getDiscriminator().setValue("url");
- extSlice.getSlicing().setOrdered(false);
- extSlice.getSlicing().setRules(SlicingRulesEnum.OPEN);
- extSlice.getDefinition().addType().setCode(DataTypeEnum.EXTENSION);
+ private void scanForExtensions(Profile theProfile, BaseRuntimeElementDefinition> def) {
+ BaseRuntimeElementCompositeDefinition> cdef = ((BaseRuntimeElementCompositeDefinition>) def);
- for (RuntimeChildDeclaredExtensionDefinition nextExt : extList) {
- StructureElement nextProfileExt = theStruct.addElement();
- nextProfileExt.getDefinition().setIsModifier(theIsModifier);
- nextProfileExt.setName(extSlice.getName());
- nextProfileExt.setPath(extSlice.getPath());
- fillMinAndMaxAndDefinitions(nextExt, nextProfileExt);
- StructureElementDefinitionType type = nextProfileExt.getDefinition().addType();
- type.setCode(DataTypeEnum.EXTENSION);
- if (nextExt.isDefinedLocally()) {
- type.setProfile(nextExt.getExtensionUrl().substring(nextExt.getExtensionUrl().indexOf('#')));
- } else {
- type.setProfile(nextExt.getExtensionUrl());
- }
- }
- } else {
- StructureElement extSlice = theStruct.addElement();
- extSlice.setName(elementName);
- extSlice.setPath(join(path, '.') + '.' + elementName);
- extSlice.getDefinition().setIsModifier(theIsModifier);
- extSlice.getDefinition().addType().setCode(DataTypeEnum.EXTENSION);
- extSlice.getDefinition().setMin(0);
- extSlice.getDefinition().setMax("*");
- }
- }
-
- private void fillName(StructureElement elem, BaseRuntimeElementDefinition> nextDef) {
- if (nextDef instanceof RuntimeResourceReferenceDefinition) {
- RuntimeResourceReferenceDefinition rr = (RuntimeResourceReferenceDefinition) nextDef;
- for (Class extends IResource> next : rr.getResourceTypes()) {
- StructureElementDefinitionType type = elem.getDefinition().addType();
- type.getCode().setValue("ResourceReference");
-
- if (next != IResource.class) {
- RuntimeResourceDefinition resDef = rr.getDefinitionForResourceType(next);
- type.getProfile().setValueAsString(resDef.getResourceProfile());
- }
+ for (RuntimeChildDeclaredExtensionDefinition nextChild : cdef.getExtensions()) {
+ if (myExtensionDefToCode.containsKey(nextChild)) {
+ continue;
}
- return;
- }
+ if (nextChild.isDefinedLocally() == false) {
+ continue;
+ }
- StructureElementDefinitionType type = elem.getDefinition().addType();
- String name = nextDef.getName();
- DataTypeEnum fromCodeString = DataTypeEnum.VALUESET_BINDER.fromCodeString(name);
- if (fromCodeString == null) {
- throw new ConfigurationException("Unknown type: " + name);
- }
- type.setCode(fromCodeString);
- }
+ ExtensionDefn defn = theProfile.addExtensionDefn();
+ String code = null;
+ if (nextChild.getExtensionUrl().contains("#") && !nextChild.getExtensionUrl().endsWith("#")) {
+ code = nextChild.getExtensionUrl().substring(nextChild.getExtensionUrl().indexOf('#') + 1);
+ } else {
+ throw new ConfigurationException("Locally defined extension has no '#[code]' part in extension URL: " + nextChild.getExtensionUrl());
+ }
- private void fillMinAndMaxAndDefinitions(BaseRuntimeDeclaredChildDefinition child, StructureElement elem) {
- elem.getDefinition().setMin(child.getMin());
- if (child.getMax() == Child.MAX_UNLIMITED) {
- elem.getDefinition().setMax("*");
- } else {
- elem.getDefinition().setMax(Integer.toString(child.getMax()));
- }
+ defn.setCode(code);
+ if (myExtensionDefToCode.values().contains(code)) {
+ throw new IllegalStateException("Duplicate extension code: " + code);
+ }
+ myExtensionDefToCode.put(nextChild, code);
- if (isNotBlank(child.getShortDefinition())) {
- elem.getDefinition().getShort().setValue(child.getShortDefinition());
- }
- if (isNotBlank(child.getFormalDefinition())) {
- elem.getDefinition().getFormal().setValue(child.getFormalDefinition());
- }
- }
+ if (nextChild.getChildType() != null && IPrimitiveDatatype.class.isAssignableFrom(nextChild.getChildType())) {
+ RuntimePrimitiveDatatypeDefinition pdef = (RuntimePrimitiveDatatypeDefinition) nextChild.getSingleChildOrThrow();
+ defn.getDefinition().addType().setCode(DataTypeEnum.VALUESET_BINDER.fromCodeString(pdef.getName()));
+ } else {
+ RuntimeResourceBlockDefinition pdef = (RuntimeResourceBlockDefinition) nextChild.getSingleChildOrThrow();
+ scanForExtensions(theProfile, pdef);
- private void fillBasics(StructureElement theElement, BaseRuntimeElementDefinition> def, LinkedList path, BaseRuntimeDeclaredChildDefinition theChild) {
- if (path.isEmpty()) {
- path.add(def.getName());
- theElement.setName(def.getName());
- } else {
- path.add(WordUtils.uncapitalize(theChild.getElementName()));
- theElement.setName(theChild.getElementName());
+ for (RuntimeChildDeclaredExtensionDefinition nextChildExt : pdef.getExtensions()) {
+ StructureElementDefinitionType type = defn.getDefinition().addType();
+ type.setCode(DataTypeEnum.EXTENSION);
+ type.setProfile("#" + myExtensionDefToCode.get(nextChildExt));
+ }
+
+ }
}
- theElement.setPath(StringUtils.join(path, '.'));
}
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeSearchParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeSearchParam.java
new file mode 100644
index 00000000000..bff2651579b
--- /dev/null
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/RuntimeSearchParam.java
@@ -0,0 +1,54 @@
+package ca.uhn.fhir.context;
+
+/*
+ * #%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.Arrays;
+import java.util.List;
+
+public class RuntimeSearchParam {
+
+ private String myDescription;
+ private String myName;
+ private String myPath;
+// private List myPathParts;
+
+ public RuntimeSearchParam(String theName, String theDescription, String thePath) {
+ super();
+ myName = theName;
+ myDescription = theDescription;
+ myPath=thePath;
+// myPathParts = Arrays.asList(thePath.split("\\."));
+ }
+
+ public String getPath() {
+ return myPath;
+ }
+
+ public String getDescription() {
+ return myDescription;
+ }
+
+ public String getName() {
+ return myName;
+ }
+
+
+}
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 5325d4fbc53..deb4296b8fd 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
@@ -35,12 +35,24 @@ public abstract class BaseElement implements IIdentifiableElement, ISupportsUnde
private List myUndeclaredModifierExtensions;
@Override
- public void addUndeclaredExtension(boolean theIsModifier, String theUrl, IDatatype theValue) {
+ public ExtensionDt addUndeclaredExtension(boolean theIsModifier, String theUrl, IDatatype theValue) {
Validate.notEmpty(theUrl, "URL must be populated");
Validate.notNull(theValue, "Value must not be null");
- getUndeclaredExtensions().add(new ExtensionDt(theIsModifier, theUrl, theValue));
+ ExtensionDt retVal = new ExtensionDt(theIsModifier, theUrl, theValue);
+ getUndeclaredExtensions().add(retVal);
+ return retVal;
}
+ @Override
+ public ExtensionDt addUndeclaredExtension(boolean theIsModifier, String theUrl) {
+ Validate.notEmpty(theUrl, "URL must be populated");
+
+ ExtensionDt retVal = new ExtensionDt(theIsModifier, theUrl);
+ getUndeclaredExtensions().add(retVal);
+ return retVal;
+ }
+
+
@Override
public void addUndeclaredExtension(ExtensionDt theExtension) {
Validate.notNull(theExtension, "Extension can not be null");
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BundleCategory.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BundleCategory.java
index 27413873515..bf4038662a3 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BundleCategory.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BundleCategory.java
@@ -40,16 +40,19 @@ public class BundleCategory extends BaseElement implements IElement {
return myTerm;
}
- public void setLabel(String theLabel) {
+ public BundleCategory setLabel(String theLabel) {
myLabel = theLabel;
+ return this;
}
- public void setScheme(String theScheme) {
+ public BundleCategory setScheme(String theScheme) {
myScheme = theScheme;
+ return this;
}
- public void setTerm(String theTerm) {
+ public BundleCategory setTerm(String theTerm) {
myTerm = theTerm;
+ return this;
}
@Override
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 6f1226a6d16..2c966b1c814 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
@@ -99,7 +99,7 @@ public class ExtensionDt extends BaseElement {
@Override
public boolean isEmpty() {
- return super.isBaseEmpty() && myValue == null || myValue.isEmpty();
+ return super.isBaseEmpty() && (myValue == null || myValue.isEmpty());
}
public boolean isModifier() {
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ISupportsUndeclaredExtensions.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ISupportsUndeclaredExtensions.java
index c2f5e198e34..3a3cb5c1e02 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ISupportsUndeclaredExtensions.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/ISupportsUndeclaredExtensions.java
@@ -64,6 +64,13 @@ public interface ISupportsUndeclaredExtensions extends IElement {
/**
* Adds an extension to this object
*/
- void addUndeclaredExtension(boolean theIsModifier, String theUrl, IDatatype theValue);
-
+ ExtensionDt addUndeclaredExtension(boolean theIsModifier, String theUrl, IDatatype theValue);
+
+ /**
+ * Adds an extension to this object. This method is intended for use when
+ * an extension is being added which will contain child extensions, as opposed to
+ * a datatype.
+ */
+ ExtensionDt addUndeclaredExtension(boolean theIsModifier, String theUrl);
+
}
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 a4db876768f..b8f9573a10a 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,41 +25,51 @@ import ca.uhn.fhir.model.primitive.InstantDt;
public enum ResourceMetadataKeyEnum {
/**
- * The value for this key is the version ID of the resource object.
- *
- * Values for this key are of type {@link IdDt}
- *
- */
- VERSION_ID,
-
- /**
- * 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 generally
- * best left to the current time.
+ * 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
+ * generally best left to the current time.
*
* Values for this key are of type {@link InstantDt}
*
*
* Server Note: In servers, it is generally advisable to leave this
- * value null, in which case the server will substitute the
+ * value null, in which case the server will substitute the
* current time automatically.
*
*
* @see InstantDt
*/
PUBLISHED,
-
+
/**
- * The value for this key is the bundle entry Updated time. This
- * is defined by FHIR as "Last Updated for resource". This value is also
- * used for populating the "Last-Modified" header in the case of methods
- * that return a single resource (read, vread, etc.)
+ * The value for this key is the list of tags associated with this resource
+ *
+ * Values for this key are of type {@link TagList}
+ *
+ *
+ * @see TagList
+ */
+ TAG_LIST,
+
+ /**
+ * The value for this key is the bundle entry Updated time. This is
+ * defined by FHIR as "Last Updated for resource". This value is also used
+ * for populating the "Last-Modified" header in the case of methods that
+ * return a single resource (read, vread, etc.)
*
* Values for this key are of type {@link InstantDt}
*
*
* @see InstantDt
*/
- UPDATED;
-
+ UPDATED,
+
+ /**
+ * The value for this key is the version ID of the resource object.
+ *
+ * Values for this key are of type {@link IdDt}
+ *
+ */
+ VERSION_ID;
+
}
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
new file mode 100644
index 00000000000..cb55ad0fd6e
--- /dev/null
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Tag.java
@@ -0,0 +1,145 @@
+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 static org.apache.commons.lang3.StringUtils.*;
+
+import java.net.URI;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+public class Tag {
+
+ /**
+ * Convenience constant containing the "http://hl7.org/fhir/tag" scheme
+ * value
+ */
+ public static final String HL7_ORG_FHIR_TAG = "http://hl7.org/fhir/tag";
+
+ private String myLabel;
+ private String myScheme;
+ private String myTerm;
+
+ public Tag() {
+ }
+
+ public Tag(String theTerm) {
+ this(theTerm, null, (String) null);
+ }
+
+ public Tag(String theTerm, String theLabel, String theScheme) {
+ myTerm = theTerm;
+ myLabel = theLabel;
+ myScheme = theScheme;
+ }
+
+ public Tag(String theTerm, String theLabel, URI theScheme) {
+ myTerm = theTerm;
+ myLabel = theLabel;
+ if (theScheme != null) {
+ myScheme = theScheme.toASCIIString();
+ }
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ Tag other = (Tag) obj;
+ if (myLabel == null) {
+ if (other.myLabel != null)
+ return false;
+ } else if (!myLabel.equals(other.myLabel))
+ return false;
+ if (myScheme == null) {
+ if (other.myScheme != null)
+ return false;
+ } else if (!myScheme.equals(other.myScheme))
+ return false;
+ if (myTerm == null) {
+ if (other.myTerm != null)
+ return false;
+ } else if (!myTerm.equals(other.myTerm))
+ return false;
+ return true;
+ }
+
+ @Override
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this, ToStringStyle.SIMPLE_STYLE);
+ b.append("Term", myTerm);
+ b.append("Label", myLabel);
+ b.append("Scheme", myScheme);
+ return b.toString();
+ }
+
+ public String getLabel() {
+ return myLabel;
+ }
+
+ public String getScheme() {
+ return myScheme;
+ }
+
+ public String getTerm() {
+ return myTerm;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((myLabel == null) ? 0 : myLabel.hashCode());
+ result = prime * result + ((myScheme == null) ? 0 : myScheme.hashCode());
+ result = prime * result + ((myTerm == null) ? 0 : myTerm.hashCode());
+ return result;
+ }
+
+ public void setLabel(String theLabel) {
+ myLabel = theLabel;
+ }
+
+ public void setScheme(String theScheme) {
+ myScheme = theScheme;
+ }
+
+ public void setTerm(String theTerm) {
+ myTerm = theTerm;
+ }
+
+ public String toHeaderValue() {
+ StringBuilder b = new StringBuilder();
+ b.append(this.getTerm());
+ if (isNotBlank(this.getLabel())) {
+ b.append("; label=\"").append(this.getLabel()).append('"');
+ }
+ if (isNotBlank(this.getScheme())) {
+ b.append("; scheme=\"").append(this.getScheme()).append('"');
+ }
+ return b.toString();
+ }
+
+}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/TagList.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/TagList.java
new file mode 100644
index 00000000000..e0ccad233ea
--- /dev/null
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/TagList.java
@@ -0,0 +1,33 @@
+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 java.util.ArrayList;
+
+public class TagList extends ArrayList {
+
+ private static final long serialVersionUID = 1L;
+
+ public void addTag(String theTerm, String theLabel, String theScheme) {
+ add(new Tag(theTerm, theLabel, theScheme));
+ }
+
+}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/SearchParamDefinition.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/SearchParamDefinition.java
new file mode 100644
index 00000000000..b5eba87c39f
--- /dev/null
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/SearchParamDefinition.java
@@ -0,0 +1,38 @@
+package ca.uhn.fhir.model.api.annotation;
+
+/*
+ * #%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.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Target(value=ElementType.FIELD)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface SearchParamDefinition {
+
+ String name();
+
+ String path();
+
+ String description() default "";
+
+}
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 f4d8184346e..e8143c38427 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
@@ -96,6 +96,11 @@ public class IdentifierDt
setValue(theValue);
setLabel(theLabel);
}
+
+ @Override
+ public String toString() {
+ return "IdentifierDt[" + getValueAsQueryToken() + "]";
+ }
@Child(name="use", type=CodeDt.class, order=0, min=0, max=1)
@Description(
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 1d5e42d5b43..001e3298859 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
@@ -200,6 +200,19 @@ public class QuantityDt
*
* 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) {
@@ -220,19 +233,6 @@ public class QuantityDt
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;
- }
-
/**
* Gets the value(s) for comparator (< | <= | >= | > - how to understand the value).
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 ca541d9ee69..d0e98c27503 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
@@ -259,6 +259,19 @@ public class SampledDataDt
*
* Definition:
* The length of time between sampling times, measured in milliseconds
+ *
+ */
+ public SampledDataDt setPeriod( long theValue) {
+ myPeriod = new DecimalDt(theValue);
+ return this;
+ }
+
+ /**
+ * Sets the value for period (Number of milliseconds between samples)
+ *
+ *
+ * Definition:
+ * The length of time between sampling times, measured in milliseconds
*
*/
public SampledDataDt setPeriod( double theValue) {
@@ -279,19 +292,6 @@ public class SampledDataDt
return this;
}
- /**
- * Sets the value for period (Number of milliseconds between samples)
- *
- *
- * Definition:
- * The length of time between sampling times, measured in milliseconds
- *
- */
- public SampledDataDt setPeriod( long theValue) {
- myPeriod = new DecimalDt(theValue);
- return this;
- }
-
/**
* Gets the value(s) for factor (Multiply data by this before adding to origin).
@@ -329,6 +329,19 @@ public class SampledDataDt
*
* Definition:
* A correction factor that is applied to the sampled data points before they are added to the origin
+ *
+ */
+ public SampledDataDt setFactor( long theValue) {
+ myFactor = new DecimalDt(theValue);
+ return this;
+ }
+
+ /**
+ * Sets the value for factor (Multiply data by this before adding to origin)
+ *
+ *
+ * Definition:
+ * A correction factor that is applied to the sampled data points before they are added to the origin
*
*/
public SampledDataDt setFactor( double theValue) {
@@ -349,19 +362,6 @@ public class SampledDataDt
return this;
}
- /**
- * Sets the value for factor (Multiply data by this before adding to origin)
- *
- *
- * Definition:
- * A correction factor that is applied to the sampled data points before they are added to the origin
- *
- */
- public SampledDataDt setFactor( long theValue) {
- myFactor = new DecimalDt(theValue);
- return this;
- }
-
/**
* Gets the value(s) for lowerLimit (Lower limit of detection).
@@ -399,6 +399,19 @@ public class SampledDataDt
*
* Definition:
* The lower limit of detection of the measured points. This is needed if any of the data points have the value \"L\" (lower than detection limit)
+ *
+ */
+ public SampledDataDt setLowerLimit( long theValue) {
+ myLowerLimit = new DecimalDt(theValue);
+ return this;
+ }
+
+ /**
+ * Sets the value for lowerLimit (Lower limit of detection)
+ *
+ *
+ * Definition:
+ * The lower limit of detection of the measured points. This is needed if any of the data points have the value \"L\" (lower than detection limit)
*
*/
public SampledDataDt setLowerLimit( double theValue) {
@@ -419,19 +432,6 @@ public class SampledDataDt
return this;
}
- /**
- * Sets the value for lowerLimit (Lower limit of detection)
- *
- *
- * Definition:
- * The lower limit of detection of the measured points. This is needed if any of the data points have the value \"L\" (lower than detection limit)
- *
- */
- public SampledDataDt setLowerLimit( long theValue) {
- myLowerLimit = new DecimalDt(theValue);
- return this;
- }
-
/**
* Gets the value(s) for upperLimit (Upper limit of detection).
@@ -469,6 +469,19 @@ public class SampledDataDt
*
* Definition:
* The upper limit of detection of the measured points. This is needed if any of the data points have the value \"U\" (higher than detection limit)
+ *
+ */
+ public SampledDataDt setUpperLimit( long theValue) {
+ myUpperLimit = new DecimalDt(theValue);
+ return this;
+ }
+
+ /**
+ * Sets the value for upperLimit (Upper limit of detection)
+ *
+ *
+ * Definition:
+ * The upper limit of detection of the measured points. This is needed if any of the data points have the value \"U\" (higher than detection limit)
*
*/
public SampledDataDt setUpperLimit( double theValue) {
@@ -489,19 +502,6 @@ public class SampledDataDt
return this;
}
- /**
- * Sets the value for upperLimit (Upper limit of detection)
- *
- *
- * Definition:
- * The upper limit of detection of the measured points. This is needed if any of the data points have the value \"U\" (higher than detection limit)
- *
- */
- public SampledDataDt setUpperLimit( long theValue) {
- myUpperLimit = new DecimalDt(theValue);
- return this;
- }
-
/**
* Gets the value(s) for dimensions (Number of sample points at each time point).
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 84fe9db2074..212454a7681 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
@@ -211,7 +211,7 @@ public class ScheduleDt
* Identifies a repeating pattern to the intended time periods.
*
*/
- @Block(name="Schedule.repeat")
+ @Block()
public static class Repeat extends BaseElement implements IResourceBlock {
@Child(name="frequency", type=IntegerDt.class, order=0, min=0, max=1)
@@ -396,6 +396,19 @@ public class ScheduleDt
*
* Definition:
* How long each repetition should last
+ *
+ */
+ public Repeat setDuration( long theValue) {
+ myDuration = new DecimalDt(theValue);
+ return this;
+ }
+
+ /**
+ * Sets the value for duration (Repeating or event-related duration)
+ *
+ *
+ * Definition:
+ * How long each repetition should last
*
*/
public Repeat setDuration( double theValue) {
@@ -416,19 +429,6 @@ public class ScheduleDt
return this;
}
- /**
- * Sets the value for duration (Repeating or event-related duration)
- *
- *
- * Definition:
- * How long each repetition should last
- *
- */
- public Repeat setDuration( long theValue) {
- myDuration = new DecimalDt(theValue);
- return this;
- }
-
/**
* Gets the value(s) for units (s | min | h | d | wk | mo | a - unit of time (UCUM)).
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 bca8b5c2d9a..4e2706a7d61 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
@@ -50,6 +50,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
@@ -94,6 +95,7 @@ public class AdverseReaction extends BaseResource implements IResource {
* Path: AdverseReaction.symptom.code
*
*/
+ @SearchParamDefinition(name="symptom", path="AdverseReaction.symptom.code", description="One of the symptoms of the reaction")
public static final String SP_SYMPTOM = "symptom";
/**
@@ -104,6 +106,7 @@ public class AdverseReaction extends BaseResource implements IResource {
* Path: AdverseReaction.exposure.substance
*
*/
+ @SearchParamDefinition(name="substance", path="AdverseReaction.exposure.substance", description="The name or code of the substance that produces the sensitivity")
public static final String SP_SUBSTANCE = "substance";
/**
@@ -114,6 +117,7 @@ public class AdverseReaction extends BaseResource implements IResource {
* Path: AdverseReaction.date
*
*/
+ @SearchParamDefinition(name="date", path="AdverseReaction.date", description="The date of the reaction")
public static final String SP_DATE = "date";
/**
@@ -124,6 +128,7 @@ public class AdverseReaction extends BaseResource implements IResource {
* Path: AdverseReaction.subject
*
*/
+ @SearchParamDefinition(name="subject", path="AdverseReaction.subject", description="The subject that the sensitivity is about")
public static final String SP_SUBJECT = "subject";
@@ -578,7 +583,7 @@ public class AdverseReaction extends BaseResource implements IResource {
* The signs and symptoms that were observed as part of the reaction
*
*/
- @Block(name="AdverseReaction.symptom")
+ @Block()
public static class Symptom extends BaseElement implements IResourceBlock {
@Child(name="code", type=CodeableConceptDt.class, order=0, min=1, max=1)
@@ -698,7 +703,7 @@ public class AdverseReaction extends BaseResource implements IResource {
* An exposure to a substance that preceded a reaction occurrence
*
*/
- @Block(name="AdverseReaction.exposure")
+ @Block()
public static class Exposure extends BaseElement implements IResourceBlock {
@Child(name="date", type=DateTimeDt.class, order=0, min=0, max=1)
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 7c4787eade1..b111e8dcebb 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
@@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
@@ -86,6 +87,7 @@ public class Alert extends BaseResource implements IResource {
* Path: Alert.subject
*
*/
+ @SearchParamDefinition(name="subject", path="Alert.subject", description="The identity of a subject to list alerts for")
public static final String SP_SUBJECT = "subject";
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 6776eeb6f50..c7e75db3d07 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
@@ -47,6 +47,7 @@ import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.CriticalityEnum;
@@ -89,6 +90,7 @@ public class AllergyIntolerance extends BaseResource implements IResource {
* Path: AllergyIntolerance.sensitivityType
*
*/
+ @SearchParamDefinition(name="type", path="AllergyIntolerance.sensitivityType", description="The type of sensitivity")
public static final String SP_TYPE = "type";
/**
@@ -99,6 +101,7 @@ public class AllergyIntolerance extends BaseResource implements IResource {
* Path: AllergyIntolerance.substance
*
*/
+ @SearchParamDefinition(name="substance", path="AllergyIntolerance.substance", description="The name or code of the substance that produces the sensitivity")
public static final String SP_SUBSTANCE = "substance";
/**
@@ -109,6 +112,7 @@ public class AllergyIntolerance extends BaseResource implements IResource {
* Path: AllergyIntolerance.recordedDate
*
*/
+ @SearchParamDefinition(name="date", path="AllergyIntolerance.recordedDate", description="Recorded date/time.")
public static final String SP_DATE = "date";
/**
@@ -119,6 +123,7 @@ public class AllergyIntolerance extends BaseResource implements IResource {
* Path: AllergyIntolerance.status
*
*/
+ @SearchParamDefinition(name="status", path="AllergyIntolerance.status", description="The status of the sensitivity")
public static final String SP_STATUS = "status";
/**
@@ -129,6 +134,7 @@ public class AllergyIntolerance extends BaseResource implements IResource {
* Path: AllergyIntolerance.subject
*
*/
+ @SearchParamDefinition(name="subject", path="AllergyIntolerance.subject", description="The subject that the sensitivity is about")
public static final String SP_SUBJECT = "subject";
/**
@@ -139,6 +145,7 @@ public class AllergyIntolerance extends BaseResource implements IResource {
* Path: AllergyIntolerance.recorder
*
*/
+ @SearchParamDefinition(name="recorder", path="AllergyIntolerance.recorder", description="Who recorded the sensitivity")
public static final String SP_RECORDER = "recorder";
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 cd06aa77a1f..6f7e026fc3a 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
@@ -50,6 +50,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
@@ -95,6 +96,7 @@ public class Appointment extends BaseResource implements IResource {
* Path: Appointment.start
*
*/
+ @SearchParamDefinition(name="date", path="Appointment.start", description="Appointment date/time.")
public static final String SP_DATE = "date";
/**
@@ -105,6 +107,7 @@ public class Appointment extends BaseResource implements IResource {
* Path: Appointment.status
*
*/
+ @SearchParamDefinition(name="status", path="Appointment.status", description="The overall status of the appointment")
public static final String SP_STATUS = "status";
/**
@@ -115,6 +118,7 @@ public class Appointment extends BaseResource implements IResource {
* Path: Appointment.participant.individual
*
*/
+ @SearchParamDefinition(name="subject", path="Appointment.participant.individual", description="The subject that the sensitivity is about")
public static final String SP_SUBJECT = "subject";
/**
@@ -125,6 +129,7 @@ public class Appointment extends BaseResource implements IResource {
* Path: Appointment.minutesDuration
*
*/
+ @SearchParamDefinition(name="!duration", path="Appointment.minutesDuration", description="The number of minutes that the appointment is to go for")
public static final String SP_DURATION = "!duration";
/**
@@ -135,6 +140,7 @@ public class Appointment extends BaseResource implements IResource {
* Path: Appointment.participant.status
*
*/
+ @SearchParamDefinition(name="partstatus", path="Appointment.participant.status", description="The Participation status of the subject, or other participant on the appointment ")
public static final String SP_PARTSTATUS = "partstatus";
@@ -529,8 +535,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;
}
@@ -542,8 +548,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;
}
@@ -586,8 +592,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;
}
@@ -599,8 +605,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;
}
@@ -983,7 +989,7 @@ public class Appointment extends BaseResource implements IResource {
*
*
*/
- @Block(name="Appointment.participant")
+ @Block()
public static class Participant extends BaseElement implements IResourceBlock {
@Child(name="type", type=CodeableConceptDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
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 c9eb1e36318..0264c0d1a0d 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
@@ -47,6 +47,7 @@ import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
@@ -91,6 +92,7 @@ public class AppointmentResponse extends BaseResource implements IResource {
* Path: AppointmentResponse.participantStatus
*
*/
+ @SearchParamDefinition(name="partstatus", path="AppointmentResponse.participantStatus", description="The overall status of the appointment")
public static final String SP_PARTSTATUS = "partstatus";
/**
@@ -101,6 +103,7 @@ public class AppointmentResponse extends BaseResource implements IResource {
* Path: AppointmentResponse.individual
*
*/
+ @SearchParamDefinition(name="subject", path="AppointmentResponse.individual", description="The subject that the appointment response replies for")
public static final String SP_SUBJECT = "subject";
/**
@@ -111,6 +114,7 @@ public class AppointmentResponse extends BaseResource implements IResource {
* Path: AppointmentResponse.appointment
*
*/
+ @SearchParamDefinition(name="appointment", path="AppointmentResponse.appointment", description="The appointment that the response is attached to")
public static final String SP_APPOINTMENT = "appointment";
@@ -568,8 +572,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;
}
@@ -581,8 +585,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;
}
@@ -625,8 +629,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;
}
@@ -638,8 +642,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;
}
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 7ed14f392df..c2c6be39c7f 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
@@ -47,6 +47,7 @@ import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.PeriodDt;
@@ -87,6 +88,7 @@ public class Availability extends BaseResource implements IResource {
* Path: Availability.period
*
*/
+ @SearchParamDefinition(name="!period", path="Availability.period", description="Appointment date/time.")
public static final String SP_PERIOD = "!period";
/**
@@ -97,6 +99,7 @@ public class Availability extends BaseResource implements IResource {
* Path: Availability.individual
*
*/
+ @SearchParamDefinition(name="individual", path="Availability.individual", description="The individual to find an availability for")
public static final String SP_INDIVIDUAL = "individual";
/**
@@ -107,6 +110,7 @@ public class Availability extends BaseResource implements IResource {
* Path: Availability.type
*
*/
+ @SearchParamDefinition(name="slottype", path="Availability.type", description="The type of appointments that can be booked into associated slot(s)")
public static final String SP_SLOTTYPE = "slottype";
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 de2d28fb2dc..e128dc4e161 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
@@ -22,7 +22,6 @@ package ca.uhn.fhir.model.dstu.resource;
import java.util.List;
-import ca.uhn.fhir.model.api.BaseElement;
import ca.uhn.fhir.model.api.BaseResource;
import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
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 1c4ccb3bd1c..8ae970a12ef 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
@@ -51,6 +51,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.PeriodDt;
@@ -102,6 +103,7 @@ public class CarePlan extends BaseResource implements IResource {
* Path: CarePlan.patient
*
*/
+ @SearchParamDefinition(name="patient", path="CarePlan.patient", description="")
public static final String SP_PATIENT = "patient";
/**
@@ -112,6 +114,7 @@ public class CarePlan extends BaseResource implements IResource {
* Path: CarePlan.concern
*
*/
+ @SearchParamDefinition(name="condition", path="CarePlan.concern", description="")
public static final String SP_CONDITION = "condition";
/**
@@ -122,6 +125,7 @@ public class CarePlan extends BaseResource implements IResource {
* Path: CarePlan.period
*
*/
+ @SearchParamDefinition(name="date", path="CarePlan.period", description="")
public static final String SP_DATE = "date";
/**
@@ -132,6 +136,7 @@ public class CarePlan extends BaseResource implements IResource {
* Path: CarePlan.participant.member
*
*/
+ @SearchParamDefinition(name="participant", path="CarePlan.participant.member", description="")
public static final String SP_PARTICIPANT = "participant";
/**
@@ -142,6 +147,7 @@ public class CarePlan extends BaseResource implements IResource {
* Path: CarePlan.activity.simple.code
*
*/
+ @SearchParamDefinition(name="activitycode", path="CarePlan.activity.simple.code", description="")
public static final String SP_ACTIVITYCODE = "activitycode";
/**
@@ -152,6 +158,7 @@ public class CarePlan extends BaseResource implements IResource {
* Path: CarePlan.activity.simple.timing[x]
*
*/
+ @SearchParamDefinition(name="activitydate", path="CarePlan.activity.simple.timing[x]", description="Specified date occurs within period specified by CarePlan.activity.timingSchedule")
public static final String SP_ACTIVITYDATE = "activitydate";
/**
@@ -162,6 +169,7 @@ public class CarePlan extends BaseResource implements IResource {
* Path: CarePlan.activity.detail
*
*/
+ @SearchParamDefinition(name="activitydetail", path="CarePlan.activity.detail", description="")
public static final String SP_ACTIVITYDETAIL = "activitydetail";
@@ -788,7 +796,7 @@ public class CarePlan extends BaseResource implements IResource {
* Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.
*
*/
- @Block(name="CarePlan.participant")
+ @Block()
public static class Participant extends BaseElement implements IResourceBlock {
@Child(name="role", type=CodeableConceptDt.class, order=0, min=0, max=1)
@@ -893,7 +901,7 @@ public class CarePlan extends BaseResource implements IResource {
* Describes the intended objective(s) of carrying out the Care Plan.
*
*/
- @Block(name="CarePlan.goal")
+ @Block()
public static class Goal extends BaseElement implements IResourceBlock {
@Child(name="description", type=StringDt.class, order=0, min=1, max=1)
@@ -1129,7 +1137,7 @@ public class CarePlan extends BaseResource implements IResource {
* Identifies a planned action to occur as part of the plan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.
*
*/
- @Block(name="CarePlan.activity")
+ @Block()
public static class Activity extends BaseElement implements IResourceBlock {
@Child(name="goal", type=IdrefDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@@ -1505,7 +1513,7 @@ public class CarePlan extends BaseResource implements IResource {
* A simple summary of details suitable for a general care plan system (e.g. form driven) that doesn't know about specific resources such as procedure etc
*
*/
- @Block(name="CarePlan.activity.simple")
+ @Block()
public static class ActivitySimple extends BaseElement implements IResourceBlock {
@Child(name="category", type=CodeDt.class, order=0, min=1, max=1)
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 0e196c31ece..bff0ccf7c7d 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
@@ -50,6 +50,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.AddressDt;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.CodingDt;
@@ -95,6 +96,7 @@ public class Claim extends BaseResource implements IResource {
* Path: Claim.number
*
*/
+ @SearchParamDefinition(name="number", path="Claim.number", description="")
public static final String SP_NUMBER = "number";
@@ -675,7 +677,7 @@ public class Claim extends BaseResource implements IResource {
* Patient Details.
*
*/
- @Block(name="Claim.patient")
+ @Block()
public static class Patient extends BaseElement implements IResourceBlock {
@Child(name="name", type=HumanNameDt.class, order=0, min=0, max=1)
@@ -884,7 +886,7 @@ public class Claim extends BaseResource implements IResource {
* Financial instrument by which payment information for health care
*
*/
- @Block(name="Claim.coverage")
+ @Block()
public static class Coverage extends BaseElement implements IResourceBlock {
@Child(name="issuer", order=0, min=0, max=1, type={
@@ -1425,7 +1427,7 @@ public class Claim extends BaseResource implements IResource {
* Th demographics for the individual in whose name the insurance coverage is issued.
*
*/
- @Block(name="Claim.coverage.subscriber")
+ @Block()
public static class CoverageSubscriber extends BaseElement implements IResourceBlock {
@Child(name="name", type=HumanNameDt.class, order=0, min=0, max=1)
@@ -1597,7 +1599,7 @@ public class Claim extends BaseResource implements IResource {
*
*
*/
- @Block(name="Claim.service")
+ @Block()
public static class Service extends BaseElement implements IResourceBlock {
@Child(name="service", type=CodeableConceptDt.class, order=0, min=1, max=1)
@@ -1769,6 +1771,19 @@ public class Claim extends BaseResource implements IResource {
*
* Definition:
*
+ *
+ */
+ public Service setFee( long theValue) {
+ myFee = new DecimalDt(theValue);
+ return this;
+ }
+
+ /**
+ * Sets the value for fee (Professional fee)
+ *
+ *
+ * Definition:
+ *
*
*/
public Service setFee( double theValue) {
@@ -1789,19 +1804,6 @@ public class Claim extends BaseResource implements IResource {
return this;
}
- /**
- * Sets the value for fee (Professional fee)
- *
- *
- * Definition:
- *
- *
- */
- public Service setFee( long theValue) {
- myFee = new DecimalDt(theValue);
- return this;
- }
-
/**
* Gets the value(s) for location (Service Location).
@@ -1907,7 +1909,7 @@ public class Claim extends BaseResource implements IResource {
*
*
*/
- @Block(name="Claim.service.lab")
+ @Block()
public static class ServiceLab extends BaseElement implements IResourceBlock {
@Child(name="service", type=CodeableConceptDt.class, order=0, min=1, max=1)
@@ -2007,6 +2009,19 @@ public class Claim extends BaseResource implements IResource {
*
* Definition:
* The amount to reimbuse for a laboratory service.
+ *
+ */
+ public ServiceLab setFee( long theValue) {
+ myFee = new DecimalDt(theValue);
+ return this;
+ }
+
+ /**
+ * Sets the value for fee (Lab fee)
+ *
+ *
+ * Definition:
+ * The amount to reimbuse for a laboratory service.
*
*/
public ServiceLab setFee( double theValue) {
@@ -2027,19 +2042,6 @@ public class Claim extends BaseResource implements IResource {
return this;
}
- /**
- * Sets the value for fee (Lab fee)
- *
- *
- * Definition:
- * The amount to reimbuse for a laboratory service.
- *
- */
- public ServiceLab setFee( long theValue) {
- myFee = new DecimalDt(theValue);
- return this;
- }
-
}
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 d2e536da685..28de45b5898 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
@@ -50,6 +50,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.CodingDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
@@ -95,6 +96,7 @@ public class Composition extends BaseResource implements IResource {
* Path: Composition.type
*
*/
+ @SearchParamDefinition(name="type", path="Composition.type", description="")
public static final String SP_TYPE = "type";
/**
@@ -105,6 +107,7 @@ public class Composition extends BaseResource implements IResource {
* Path: Composition.class
*
*/
+ @SearchParamDefinition(name="class", path="Composition.class", description="")
public static final String SP_CLASS = "class";
/**
@@ -115,6 +118,7 @@ public class Composition extends BaseResource implements IResource {
* Path: Composition.date
*
*/
+ @SearchParamDefinition(name="date", path="Composition.date", description="")
public static final String SP_DATE = "date";
/**
@@ -125,6 +129,7 @@ public class Composition extends BaseResource implements IResource {
* Path: Composition.subject
*
*/
+ @SearchParamDefinition(name="subject", path="Composition.subject", description="")
public static final String SP_SUBJECT = "subject";
/**
@@ -135,6 +140,7 @@ public class Composition extends BaseResource implements IResource {
* Path: Composition.author
*
*/
+ @SearchParamDefinition(name="author", path="Composition.author", description="")
public static final String SP_AUTHOR = "author";
/**
@@ -145,6 +151,7 @@ public class Composition extends BaseResource implements IResource {
* Path: Composition.attester.party
*
*/
+ @SearchParamDefinition(name="attester", path="Composition.attester.party", description="")
public static final String SP_ATTESTER = "attester";
/**
@@ -155,6 +162,7 @@ public class Composition extends BaseResource implements IResource {
* Path: Composition.event.code
*
*/
+ @SearchParamDefinition(name="context", path="Composition.event.code", description="")
public static final String SP_CONTEXT = "context";
/**
@@ -165,6 +173,7 @@ public class Composition extends BaseResource implements IResource {
* Path: Composition.section.code
*
*/
+ @SearchParamDefinition(name="section-type", path="Composition.section.code", description="")
public static final String SP_SECTION_TYPE = "section-type";
/**
@@ -175,6 +184,7 @@ public class Composition extends BaseResource implements IResource {
* Path: Composition.section.content
*
*/
+ @SearchParamDefinition(name="section-content", path="Composition.section.content", description="")
public static final String SP_SECTION_CONTENT = "section-content";
/**
@@ -185,6 +195,7 @@ public class Composition extends BaseResource implements IResource {
* Path: Composition.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="Composition.identifier", description="")
public static final String SP_IDENTIFIER = "identifier";
@@ -891,7 +902,7 @@ public class Composition extends BaseResource implements IResource {
* A participant who has attested to the accuracy of the composition/document
*
*/
- @Block(name="Composition.attester")
+ @Block()
public static class Attester extends BaseElement implements IResourceBlock {
@Child(name="mode", type=CodeDt.class, order=0, min=1, max=Child.MAX_UNLIMITED)
@@ -1086,7 +1097,7 @@ public class Composition extends BaseResource implements IResource {
* The main event/act/item, such as a colonoscopy or an appendectomy, being documented
*
*/
- @Block(name="Composition.event")
+ @Block()
public static class Event extends BaseElement implements IResourceBlock {
@Child(name="code", type=CodeableConceptDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@@ -1274,7 +1285,7 @@ public class Composition extends BaseResource implements IResource {
* The root of the sections that make up the composition
*
*/
- @Block(name="Composition.section")
+ @Block()
public static class Section extends BaseElement implements IResourceBlock {
@Child(name="title", type=StringDt.class, order=0, min=0, max=1)
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 967dae9c631..3e3a0842e93 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
@@ -50,6 +50,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
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.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.ConceptMapEquivalenceEnum;
@@ -93,6 +94,7 @@ public class ConceptMap extends BaseResource implements IResource {
* Path: ConceptMap.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="ConceptMap.identifier", description="The identifier of the concept map")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -103,6 +105,7 @@ public class ConceptMap extends BaseResource implements IResource {
* Path: ConceptMap.version
*
*/
+ @SearchParamDefinition(name="version", path="ConceptMap.version", description="The version identifier of the concept map")
public static final String SP_VERSION = "version";
/**
@@ -113,6 +116,7 @@ public class ConceptMap extends BaseResource implements IResource {
* Path: ConceptMap.name
*
*/
+ @SearchParamDefinition(name="name", path="ConceptMap.name", description="Name of the concept map")
public static final String SP_NAME = "name";
/**
@@ -123,6 +127,7 @@ public class ConceptMap extends BaseResource implements IResource {
* Path: ConceptMap.publisher
*
*/
+ @SearchParamDefinition(name="publisher", path="ConceptMap.publisher", description="Name of the publisher of the concept map")
public static final String SP_PUBLISHER = "publisher";
/**
@@ -133,6 +138,7 @@ public class ConceptMap extends BaseResource implements IResource {
* Path: ConceptMap.description
*
*/
+ @SearchParamDefinition(name="description", path="ConceptMap.description", description="Text search in the description of the concept map")
public static final String SP_DESCRIPTION = "description";
/**
@@ -143,6 +149,7 @@ public class ConceptMap extends BaseResource implements IResource {
* Path: ConceptMap.status
*
*/
+ @SearchParamDefinition(name="status", path="ConceptMap.status", description="Status of the concept map")
public static final String SP_STATUS = "status";
/**
@@ -153,6 +160,7 @@ public class ConceptMap extends BaseResource implements IResource {
* Path: ConceptMap.date
*
*/
+ @SearchParamDefinition(name="date", path="ConceptMap.date", description="The concept map publication date")
public static final String SP_DATE = "date";
/**
@@ -163,6 +171,7 @@ public class ConceptMap extends BaseResource implements IResource {
* Path: ConceptMap.source
*
*/
+ @SearchParamDefinition(name="source", path="ConceptMap.source", description="The system for any concepts mapped by this concept map")
public static final String SP_SOURCE = "source";
/**
@@ -173,6 +182,7 @@ public class ConceptMap extends BaseResource implements IResource {
* Path: ConceptMap.target
*
*/
+ @SearchParamDefinition(name="target", path="ConceptMap.target", description="")
public static final String SP_TARGET = "target";
/**
@@ -183,6 +193,7 @@ public class ConceptMap extends BaseResource implements IResource {
* Path: ConceptMap.concept.map.system
*
*/
+ @SearchParamDefinition(name="system", path="ConceptMap.concept.map.system", description="The system for any destination concepts mapped by this map")
public static final String SP_SYSTEM = "system";
/**
@@ -193,6 +204,7 @@ public class ConceptMap extends BaseResource implements IResource {
* Path: ConceptMap.concept.dependsOn.concept
*
*/
+ @SearchParamDefinition(name="dependson", path="ConceptMap.concept.dependsOn.concept", description="")
public static final String SP_DEPENDSON = "dependson";
/**
@@ -203,6 +215,7 @@ public class ConceptMap extends BaseResource implements IResource {
* Path: ConceptMap.concept.map.product.concept
*
*/
+ @SearchParamDefinition(name="product", path="ConceptMap.concept.map.product.concept", description="")
public static final String SP_PRODUCT = "product";
@@ -914,7 +927,7 @@ public class ConceptMap extends BaseResource implements IResource {
*
*
*/
- @Block(name="ConceptMap.concept")
+ @Block()
public static class Concept extends BaseElement implements IResourceBlock {
@Child(name="system", type=UriDt.class, order=0, min=1, max=1)
@@ -1180,7 +1193,7 @@ public class ConceptMap extends BaseResource implements IResource {
* A set of additional dependencies for this mapping to hold. This mapping is only applicable if the specified concept can be resolved, and it has the specified value
*
*/
- @Block(name="ConceptMap.concept.dependsOn")
+ @Block()
public static class ConceptDependsOn extends BaseElement implements IResourceBlock {
@Child(name="concept", type=UriDt.class, order=0, min=1, max=1)
@@ -1364,7 +1377,7 @@ public class ConceptMap extends BaseResource implements IResource {
*
*
*/
- @Block(name="ConceptMap.concept.map")
+ @Block()
public static class ConceptMap2 extends BaseElement implements IResourceBlock {
@Child(name="system", type=UriDt.class, order=0, min=0, max=1)
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 dbb38d70afe..7606e05468b 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
@@ -51,6 +51,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.AgeDt;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
@@ -96,6 +97,7 @@ public class Condition extends BaseResource implements IResource {
* Path: Condition.code
*
*/
+ @SearchParamDefinition(name="code", path="Condition.code", description="Code for the condition")
public static final String SP_CODE = "code";
/**
@@ -106,6 +108,7 @@ public class Condition extends BaseResource implements IResource {
* Path: Condition.status
*
*/
+ @SearchParamDefinition(name="status", path="Condition.status", description="The status of the condition")
public static final String SP_STATUS = "status";
/**
@@ -116,6 +119,7 @@ public class Condition extends BaseResource implements IResource {
* Path: Condition.severity
*
*/
+ @SearchParamDefinition(name="severity", path="Condition.severity", description="The severity of the condition")
public static final String SP_SEVERITY = "severity";
/**
@@ -126,6 +130,7 @@ public class Condition extends BaseResource implements IResource {
* Path: Condition.category
*
*/
+ @SearchParamDefinition(name="category", path="Condition.category", description="The category of the condition")
public static final String SP_CATEGORY = "category";
/**
@@ -136,6 +141,7 @@ public class Condition extends BaseResource implements IResource {
* Path: Condition.onset[x]
*
*/
+ @SearchParamDefinition(name="onset", path="Condition.onset[x]", description="When the Condition started (if started on a date)")
public static final String SP_ONSET = "onset";
/**
@@ -146,6 +152,7 @@ public class Condition extends BaseResource implements IResource {
* Path: Condition.subject
*
*/
+ @SearchParamDefinition(name="subject", path="Condition.subject", description="")
public static final String SP_SUBJECT = "subject";
/**
@@ -156,6 +163,7 @@ public class Condition extends BaseResource implements IResource {
* Path: Condition.encounter
*
*/
+ @SearchParamDefinition(name="encounter", path="Condition.encounter", description="")
public static final String SP_ENCOUNTER = "encounter";
/**
@@ -166,6 +174,7 @@ public class Condition extends BaseResource implements IResource {
* Path: Condition.asserter
*
*/
+ @SearchParamDefinition(name="asserter", path="Condition.asserter", description="")
public static final String SP_ASSERTER = "asserter";
/**
@@ -176,6 +185,7 @@ public class Condition extends BaseResource implements IResource {
* Path: Condition.dateAsserted
*
*/
+ @SearchParamDefinition(name="date-asserted", path="Condition.dateAsserted", description="")
public static final String SP_DATE_ASSERTED = "date-asserted";
/**
@@ -186,6 +196,7 @@ public class Condition extends BaseResource implements IResource {
* Path: Condition.evidence.code
*
*/
+ @SearchParamDefinition(name="evidence", path="Condition.evidence.code", description="")
public static final String SP_EVIDENCE = "evidence";
/**
@@ -196,6 +207,7 @@ public class Condition extends BaseResource implements IResource {
* Path: Condition.location.code
*
*/
+ @SearchParamDefinition(name="location", path="Condition.location.code", description="")
public static final String SP_LOCATION = "location";
/**
@@ -206,6 +218,7 @@ public class Condition extends BaseResource implements IResource {
* Path: Condition.relatedItem.target
*
*/
+ @SearchParamDefinition(name="related-item", path="Condition.relatedItem.target", description="")
public static final String SP_RELATED_ITEM = "related-item";
/**
@@ -216,6 +229,7 @@ public class Condition extends BaseResource implements IResource {
* Path: Condition.stage.summary
*
*/
+ @SearchParamDefinition(name="stage", path="Condition.stage.summary", description="")
public static final String SP_STAGE = "stage";
/**
@@ -226,6 +240,7 @@ public class Condition extends BaseResource implements IResource {
* Path: Condition.relatedItem.code
*
*/
+ @SearchParamDefinition(name="related-code", path="Condition.relatedItem.code", description="")
public static final String SP_RELATED_CODE = "related-code";
@@ -1099,7 +1114,7 @@ public class Condition extends BaseResource implements IResource {
* Clinical stage or grade of a condition. May include formal severity assessments
*
*/
- @Block(name="Condition.stage")
+ @Block()
public static class Stage extends BaseElement implements IResourceBlock {
@Child(name="summary", type=CodeableConceptDt.class, order=0, min=0, max=1)
@@ -1220,7 +1235,7 @@ public class Condition extends BaseResource implements IResource {
* Supporting Evidence / manifestations that are the basis on which this condition is suspected or confirmed
*
*/
- @Block(name="Condition.evidence")
+ @Block()
public static class Evidence extends BaseElement implements IResourceBlock {
@Child(name="code", type=CodeableConceptDt.class, order=0, min=0, max=1)
@@ -1341,7 +1356,7 @@ public class Condition extends BaseResource implements IResource {
* The anatomical location where this condition manifests itself
*
*/
- @Block(name="Condition.location")
+ @Block()
public static class Location extends BaseElement implements IResourceBlock {
@Child(name="code", type=CodeableConceptDt.class, order=0, min=0, max=1)
@@ -1461,7 +1476,7 @@ public class Condition extends BaseResource implements IResource {
* Further conditions, problems, diagnoses, procedures or events that are related in some way to this condition, or the substance that caused/triggered this Condition
*
*/
- @Block(name="Condition.relatedItem")
+ @Block()
public static class RelatedItem extends BaseElement implements IResourceBlock {
@Child(name="type", type=CodeDt.class, order=0, min=1, max=1)
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 3687b682e71..f0d8500e33b 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
@@ -50,6 +50,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.CodingDt;
import ca.uhn.fhir.model.dstu.composite.ContactDt;
@@ -107,6 +108,7 @@ public class Conformance extends BaseResource implements IResource {
* Path: Conformance.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="Conformance.identifier", description="The identifier of the conformance statement")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -117,6 +119,7 @@ public class Conformance extends BaseResource implements IResource {
* Path: Conformance.version
*
*/
+ @SearchParamDefinition(name="version", path="Conformance.version", description="The version identifier of the conformance statement")
public static final String SP_VERSION = "version";
/**
@@ -127,6 +130,7 @@ public class Conformance extends BaseResource implements IResource {
* Path: Conformance.name
*
*/
+ @SearchParamDefinition(name="name", path="Conformance.name", description="Name of the conformance statement")
public static final String SP_NAME = "name";
/**
@@ -137,6 +141,7 @@ public class Conformance extends BaseResource implements IResource {
* Path: Conformance.publisher
*
*/
+ @SearchParamDefinition(name="publisher", path="Conformance.publisher", description="Name of the publisher of the conformance statement")
public static final String SP_PUBLISHER = "publisher";
/**
@@ -147,6 +152,7 @@ public class Conformance extends BaseResource implements IResource {
* Path: Conformance.description
*
*/
+ @SearchParamDefinition(name="description", path="Conformance.description", description="Text search in the description of the conformance statement")
public static final String SP_DESCRIPTION = "description";
/**
@@ -157,6 +163,7 @@ public class Conformance extends BaseResource implements IResource {
* Path: Conformance.status
*
*/
+ @SearchParamDefinition(name="status", path="Conformance.status", description="The current status of the conformance statement")
public static final String SP_STATUS = "status";
/**
@@ -167,6 +174,7 @@ public class Conformance extends BaseResource implements IResource {
* Path: Conformance.date
*
*/
+ @SearchParamDefinition(name="date", path="Conformance.date", description="The conformance statement publication date")
public static final String SP_DATE = "date";
/**
@@ -177,6 +185,7 @@ public class Conformance extends BaseResource implements IResource {
* Path: Conformance.software.name
*
*/
+ @SearchParamDefinition(name="software", path="Conformance.software.name", description="Part of a the name of a software application")
public static final String SP_SOFTWARE = "software";
/**
@@ -187,6 +196,7 @@ public class Conformance extends BaseResource implements IResource {
* Path: Conformance.version
*
*/
+ @SearchParamDefinition(name="fhirversion", path="Conformance.version", description="The version of FHIR")
public static final String SP_FHIRVERSION = "fhirversion";
/**
@@ -197,6 +207,7 @@ public class Conformance extends BaseResource implements IResource {
* Path: Conformance.rest.resource.type
*
*/
+ @SearchParamDefinition(name="resource", path="Conformance.rest.resource.type", description="Name of a resource mentioned in a conformance statement")
public static final String SP_RESOURCE = "resource";
/**
@@ -207,6 +218,7 @@ public class Conformance extends BaseResource implements IResource {
* Path: Conformance.messaging.event.code
*
*/
+ @SearchParamDefinition(name="event", path="Conformance.messaging.event.code", description="Event code in a conformance statement")
public static final String SP_EVENT = "event";
/**
@@ -217,6 +229,7 @@ public class Conformance extends BaseResource implements IResource {
* Path: Conformance.rest.mode
*
*/
+ @SearchParamDefinition(name="mode", path="Conformance.rest.mode", description="Mode - restful (server/client) or messaging (sender/receiver)")
public static final String SP_MODE = "mode";
/**
@@ -227,6 +240,7 @@ public class Conformance extends BaseResource implements IResource {
* Path: Conformance.rest.resource.profile
*
*/
+ @SearchParamDefinition(name="profile", path="Conformance.rest.resource.profile", description="A profile id invoked in a conformance statement")
public static final String SP_PROFILE = "profile";
/**
@@ -237,6 +251,7 @@ public class Conformance extends BaseResource implements IResource {
* Path: Conformance.format
*
*/
+ @SearchParamDefinition(name="format", path="Conformance.format", description="")
public static final String SP_FORMAT = "format";
/**
@@ -247,6 +262,7 @@ public class Conformance extends BaseResource implements IResource {
* Path: Conformance.rest.security
*
*/
+ @SearchParamDefinition(name="security", path="Conformance.rest.security", description="")
public static final String SP_SECURITY = "security";
/**
@@ -257,6 +273,7 @@ public class Conformance extends BaseResource implements IResource {
* Path: Conformance.profile
*
*/
+ @SearchParamDefinition(name="supported-profile", path="Conformance.profile", description="")
public static final String SP_SUPPORTED_PROFILE = "supported-profile";
@@ -1288,7 +1305,7 @@ public class Conformance extends BaseResource implements IResource {
* Software that is covered by this conformance statement. It is used when the profile describes the capabilities of a particular software version, independent of an installation.
*
*/
- @Block(name="Conformance.software")
+ @Block()
public static class Software extends BaseElement implements IResourceBlock {
@Child(name="name", type=StringDt.class, order=0, min=1, max=1)
@@ -1485,7 +1502,7 @@ public class Conformance extends BaseResource implements IResource {
* Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program
*
*/
- @Block(name="Conformance.implementation")
+ @Block()
public static class Implementation extends BaseElement implements IResourceBlock {
@Child(name="description", type=StringDt.class, order=0, min=1, max=1)
@@ -1618,7 +1635,7 @@ public class Conformance extends BaseResource implements IResource {
* A definition of the restful capabilities of the solution, if any
*
*/
- @Block(name="Conformance.rest")
+ @Block()
public static class Rest extends BaseElement implements IResourceBlock {
@Child(name="mode", type=CodeDt.class, order=0, min=1, max=1)
@@ -2074,7 +2091,7 @@ public class Conformance extends BaseResource implements IResource {
* Information about security of implementation
*
*/
- @Block(name="Conformance.rest.security")
+ @Block()
public static class RestSecurity extends BaseElement implements IResourceBlock {
@Child(name="cors", type=BooleanDt.class, order=0, min=0, max=1)
@@ -2337,7 +2354,7 @@ public class Conformance extends BaseResource implements IResource {
* Certificates associated with security profiles
*
*/
- @Block(name="Conformance.rest.security.certificate")
+ @Block()
public static class RestSecurityCertificate extends BaseElement implements IResourceBlock {
@Child(name="type", type=CodeDt.class, order=0, min=0, max=1)
@@ -2471,7 +2488,7 @@ public class Conformance extends BaseResource implements IResource {
* A specification of the restful capabilities of the solution for a specific resource type
*
*/
- @Block(name="Conformance.rest.resource")
+ @Block()
public static class RestResource extends BaseElement implements IResourceBlock {
@Child(name="type", type=CodeDt.class, order=0, min=1, max=1)
@@ -2912,7 +2929,7 @@ public class Conformance extends BaseResource implements IResource {
* Identifies a restful operation supported by the solution
*
*/
- @Block(name="Conformance.rest.resource.operation")
+ @Block()
public static class RestResourceOperation extends BaseElement implements IResourceBlock {
@Child(name="code", type=CodeDt.class, order=0, min=1, max=1)
@@ -3045,7 +3062,7 @@ public class Conformance extends BaseResource implements IResource {
* Additional search parameters for implementations to support and/or make use of
*
*/
- @Block(name="Conformance.rest.resource.searchParam")
+ @Block()
public static class RestResourceSearchParam extends BaseElement implements IResourceBlock {
@Child(name="name", type=StringDt.class, order=0, min=1, max=1)
@@ -3430,7 +3447,7 @@ public class Conformance extends BaseResource implements IResource {
* A specification of restful operations supported by the system
*
*/
- @Block(name="Conformance.rest.operation")
+ @Block()
public static class RestOperation extends BaseElement implements IResourceBlock {
@Child(name="code", type=CodeDt.class, order=0, min=1, max=1)
@@ -3563,7 +3580,7 @@ public class Conformance extends BaseResource implements IResource {
* Definition of a named query and its parameters and their meaning
*
*/
- @Block(name="Conformance.rest.query")
+ @Block()
public static class RestQuery extends BaseElement implements IResourceBlock {
@Child(name="name", type=StringDt.class, order=0, min=1, max=1)
@@ -3815,7 +3832,7 @@ public class Conformance extends BaseResource implements IResource {
* A description of the messaging capabilities of the solution
*
*/
- @Block(name="Conformance.messaging")
+ @Block()
public static class Messaging extends BaseElement implements IResourceBlock {
@Child(name="endpoint", type=UriDt.class, order=0, min=0, max=1)
@@ -4065,7 +4082,7 @@ public class Conformance extends BaseResource implements IResource {
* A description of the solution's support for an event at this end point.
*
*/
- @Block(name="Conformance.messaging.event")
+ @Block()
public static class MessagingEvent extends BaseElement implements IResourceBlock {
@Child(name="code", type=CodingDt.class, order=0, min=1, max=1)
@@ -4484,7 +4501,7 @@ public class Conformance extends BaseResource implements IResource {
* A document definition
*
*/
- @Block(name="Conformance.document")
+ @Block()
public static class Document extends BaseElement implements IResourceBlock {
@Child(name="mode", type=CodeDt.class, order=0, min=1, max=1)
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 9ee47ebce64..3835999a164 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
@@ -50,6 +50,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.AddressDt;
import ca.uhn.fhir.model.dstu.composite.CodingDt;
import ca.uhn.fhir.model.dstu.composite.HumanNameDt;
@@ -92,6 +93,7 @@ public class Coverage extends BaseResource implements IResource {
* Path: Coverage.issuer
*
*/
+ @SearchParamDefinition(name="issuer", path="Coverage.issuer", description="The identity of the insurer")
public static final String SP_ISSUER = "issuer";
/**
@@ -102,6 +104,7 @@ public class Coverage extends BaseResource implements IResource {
* Path: Coverage.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="Coverage.identifier", description="The primary identifier of the insured")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -112,6 +115,7 @@ public class Coverage extends BaseResource implements IResource {
* Path: Coverage.type
*
*/
+ @SearchParamDefinition(name="type", path="Coverage.type", description="The kind of coverage")
public static final String SP_TYPE = "type";
/**
@@ -122,6 +126,7 @@ public class Coverage extends BaseResource implements IResource {
* Path: Coverage.plan
*
*/
+ @SearchParamDefinition(name="plan", path="Coverage.plan", description="A plan or policy identifier")
public static final String SP_PLAN = "plan";
/**
@@ -132,6 +137,7 @@ public class Coverage extends BaseResource implements IResource {
* Path: Coverage.subplan
*
*/
+ @SearchParamDefinition(name="subplan", path="Coverage.subplan", description="Sub-plan identifier")
public static final String SP_SUBPLAN = "subplan";
/**
@@ -142,6 +148,7 @@ public class Coverage extends BaseResource implements IResource {
* Path: Coverage.group
*
*/
+ @SearchParamDefinition(name="group", path="Coverage.group", description="Group identifier")
public static final String SP_GROUP = "group";
/**
@@ -152,6 +159,7 @@ public class Coverage extends BaseResource implements IResource {
* Path: Coverage.dependent
*
*/
+ @SearchParamDefinition(name="dependent", path="Coverage.dependent", description="Dependent number")
public static final String SP_DEPENDENT = "dependent";
/**
@@ -162,6 +170,7 @@ public class Coverage extends BaseResource implements IResource {
* Path: Coverage.sequence
*
*/
+ @SearchParamDefinition(name="sequence", path="Coverage.sequence", description="Sequence number")
public static final String SP_SEQUENCE = "sequence";
/**
@@ -172,6 +181,7 @@ public class Coverage extends BaseResource implements IResource {
* Path: Coverage.subscriber.name
*
*/
+ @SearchParamDefinition(name="name", path="Coverage.subscriber.name", description="The name of the subscriber")
public static final String SP_NAME = "name";
@@ -710,7 +720,7 @@ public class Coverage extends BaseResource implements IResource {
*
*
*/
- @Block(name="Coverage.subscriber")
+ @Block()
public static class Subscriber extends BaseElement implements IResourceBlock {
@Child(name="name", type=HumanNameDt.class, order=0, min=0, max=1)
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 30f6802f39e..77c0a00da8d 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
@@ -47,6 +47,7 @@ import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.ContactDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
@@ -88,6 +89,7 @@ public class Device extends BaseResource implements IResource {
* Path: Device.type
*
*/
+ @SearchParamDefinition(name="type", path="Device.type", description="The type of the device")
public static final String SP_TYPE = "type";
/**
@@ -98,6 +100,7 @@ public class Device extends BaseResource implements IResource {
* Path: Device.manufacturer
*
*/
+ @SearchParamDefinition(name="manufacturer", path="Device.manufacturer", description="The manufacturer of the device")
public static final String SP_MANUFACTURER = "manufacturer";
/**
@@ -108,6 +111,7 @@ public class Device extends BaseResource implements IResource {
* Path: Device.model
*
*/
+ @SearchParamDefinition(name="model", path="Device.model", description="The model of the device")
public static final String SP_MODEL = "model";
/**
@@ -118,6 +122,7 @@ public class Device extends BaseResource implements IResource {
* Path: Device.owner
*
*/
+ @SearchParamDefinition(name="organization", path="Device.owner", description="The organization responsible for the device")
public static final String SP_ORGANIZATION = "organization";
/**
@@ -128,6 +133,7 @@ public class Device extends BaseResource implements IResource {
* Path: Device.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="Device.identifier", description="")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -138,6 +144,7 @@ public class Device extends BaseResource implements IResource {
* Path: Device.location
*
*/
+ @SearchParamDefinition(name="location", path="Device.location", description="A location, where the resource is found")
public static final String SP_LOCATION = "location";
/**
@@ -148,6 +155,7 @@ public class Device extends BaseResource implements IResource {
* Path: Device.patient
*
*/
+ @SearchParamDefinition(name="patient", path="Device.patient", description="Patient information, if the resource is affixed to a person")
public static final String SP_PATIENT = "patient";
/**
@@ -158,6 +166,7 @@ public class Device extends BaseResource implements IResource {
* Path: Device.udi
*
*/
+ @SearchParamDefinition(name="udi", path="Device.udi", description="")
public static final String SP_UDI = "udi";
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 a1859110d32..8325ea325fc 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
@@ -50,6 +50,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
@@ -88,6 +89,7 @@ public class DeviceObservationReport extends BaseResource implements IResource {
* Path: DeviceObservationReport.source
*
*/
+ @SearchParamDefinition(name="source", path="DeviceObservationReport.source", description="")
public static final String SP_SOURCE = "source";
/**
@@ -98,6 +100,7 @@ public class DeviceObservationReport extends BaseResource implements IResource {
* Path: DeviceObservationReport.virtualDevice.code
*
*/
+ @SearchParamDefinition(name="code", path="DeviceObservationReport.virtualDevice.code", description="The compatment code")
public static final String SP_CODE = "code";
/**
@@ -108,6 +111,7 @@ public class DeviceObservationReport extends BaseResource implements IResource {
* Path: DeviceObservationReport.virtualDevice.channel.code
*
*/
+ @SearchParamDefinition(name="channel", path="DeviceObservationReport.virtualDevice.channel.code", description="The channel code")
public static final String SP_CHANNEL = "channel";
/**
@@ -118,6 +122,7 @@ public class DeviceObservationReport extends BaseResource implements IResource {
* Path: DeviceObservationReport.virtualDevice.channel.metric.observation
*
*/
+ @SearchParamDefinition(name="observation", path="DeviceObservationReport.virtualDevice.channel.metric.observation", description="")
public static final String SP_OBSERVATION = "observation";
/**
@@ -128,6 +133,7 @@ public class DeviceObservationReport extends BaseResource implements IResource {
* Path: DeviceObservationReport.subject
*
*/
+ @SearchParamDefinition(name="subject", path="DeviceObservationReport.subject", description="")
public static final String SP_SUBJECT = "subject";
@@ -222,8 +228,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;
}
@@ -235,8 +241,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;
}
@@ -425,7 +431,7 @@ public class DeviceObservationReport extends BaseResource implements IResource {
* A medical-related subsystem of a medical device
*
*/
- @Block(name="DeviceObservationReport.virtualDevice")
+ @Block()
public static class VirtualDevice extends BaseElement implements IResourceBlock {
@Child(name="code", type=CodeableConceptDt.class, order=0, min=0, max=1)
@@ -560,7 +566,7 @@ public class DeviceObservationReport extends BaseResource implements IResource {
* Groups together physiological measurement data and derived data
*
*/
- @Block(name="DeviceObservationReport.virtualDevice.channel")
+ @Block()
public static class VirtualDeviceChannel extends BaseElement implements IResourceBlock {
@Child(name="code", type=CodeableConceptDt.class, order=0, min=0, max=1)
@@ -695,7 +701,7 @@ public class DeviceObservationReport extends BaseResource implements IResource {
* A piece of measured or derived data that is reported by the machine
*
*/
- @Block(name="DeviceObservationReport.virtualDevice.channel.metric")
+ @Block()
public static class VirtualDeviceChannelMetric extends BaseElement implements IResourceBlock {
@Child(name="observation", order=0, min=1, max=1, type={
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 094cba8953b..b4e89deaea6 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
@@ -50,6 +50,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
@@ -93,6 +94,7 @@ public class DiagnosticOrder extends BaseResource implements IResource {
* Path: DiagnosticOrder.event.actor | DiagnosticOrder.item.event.actor
*
*/
+ @SearchParamDefinition(name="actor", path="DiagnosticOrder.event.actor | DiagnosticOrder.item.event.actor", description="")
public static final String SP_ACTOR = "actor";
/**
@@ -103,6 +105,7 @@ public class DiagnosticOrder extends BaseResource implements IResource {
* Path: DiagnosticOrder.item.bodySite
*
*/
+ @SearchParamDefinition(name="bodysite", path="DiagnosticOrder.item.bodySite", description="")
public static final String SP_BODYSITE = "bodysite";
/**
@@ -113,6 +116,7 @@ public class DiagnosticOrder extends BaseResource implements IResource {
* Path: DiagnosticOrder.item.code
*
*/
+ @SearchParamDefinition(name="code", path="DiagnosticOrder.item.code", description="")
public static final String SP_CODE = "code";
/**
@@ -123,6 +127,7 @@ public class DiagnosticOrder extends BaseResource implements IResource {
* Path: DiagnosticOrder.event.dateTime
*
*/
+ @SearchParamDefinition(name="event-date", path="DiagnosticOrder.event.dateTime", description="")
public static final String SP_EVENT_DATE = "event-date";
/**
@@ -133,6 +138,7 @@ public class DiagnosticOrder extends BaseResource implements IResource {
* Path: DiagnosticOrder.encounter
*
*/
+ @SearchParamDefinition(name="encounter", path="DiagnosticOrder.encounter", description="")
public static final String SP_ENCOUNTER = "encounter";
/**
@@ -143,6 +149,7 @@ public class DiagnosticOrder extends BaseResource implements IResource {
* Path: DiagnosticOrder.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="DiagnosticOrder.identifier", description="")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -153,6 +160,7 @@ public class DiagnosticOrder extends BaseResource implements IResource {
* Path: DiagnosticOrder.item.event.dateTime
*
*/
+ @SearchParamDefinition(name="item-date", path="DiagnosticOrder.item.event.dateTime", description="")
public static final String SP_ITEM_DATE = "item-date";
/**
@@ -163,6 +171,7 @@ public class DiagnosticOrder extends BaseResource implements IResource {
* Path: DiagnosticOrder.item.event.status
*
*/
+ @SearchParamDefinition(name="item-past-status", path="DiagnosticOrder.item.event.status", description="")
public static final String SP_ITEM_PAST_STATUS = "item-past-status";
/**
@@ -173,6 +182,7 @@ public class DiagnosticOrder extends BaseResource implements IResource {
* Path: DiagnosticOrder.item.status
*
*/
+ @SearchParamDefinition(name="item-status", path="DiagnosticOrder.item.status", description="")
public static final String SP_ITEM_STATUS = "item-status";
/**
@@ -183,6 +193,7 @@ public class DiagnosticOrder extends BaseResource implements IResource {
* Path: item-past-status & item-date
*
*/
+ @SearchParamDefinition(name="item-status-date", path="item-past-status & item-date", description="A combination of item-past-status and item-date")
public static final String SP_ITEM_STATUS_DATE = "item-status-date";
/**
@@ -193,6 +204,7 @@ public class DiagnosticOrder extends BaseResource implements IResource {
* Path: DiagnosticOrder.orderer
*
*/
+ @SearchParamDefinition(name="orderer", path="DiagnosticOrder.orderer", description="")
public static final String SP_ORDERER = "orderer";
/**
@@ -203,6 +215,7 @@ public class DiagnosticOrder extends BaseResource implements IResource {
* Path: DiagnosticOrder.event.status
*
*/
+ @SearchParamDefinition(name="event-status", path="DiagnosticOrder.event.status", description="")
public static final String SP_EVENT_STATUS = "event-status";
/**
@@ -213,6 +226,7 @@ public class DiagnosticOrder extends BaseResource implements IResource {
* Path: DiagnosticOrder.specimen | DiagnosticOrder.item.specimen
*
*/
+ @SearchParamDefinition(name="specimen", path="DiagnosticOrder.specimen | DiagnosticOrder.item.specimen", description="")
public static final String SP_SPECIMEN = "specimen";
/**
@@ -223,6 +237,7 @@ public class DiagnosticOrder extends BaseResource implements IResource {
* Path: DiagnosticOrder.status
*
*/
+ @SearchParamDefinition(name="status", path="DiagnosticOrder.status", description="")
public static final String SP_STATUS = "status";
/**
@@ -233,6 +248,7 @@ public class DiagnosticOrder extends BaseResource implements IResource {
* Path: event-status & event-date
*
*/
+ @SearchParamDefinition(name="event-status-date", path="event-status & event-date", description="A combination of past-status and date")
public static final String SP_EVENT_STATUS_DATE = "event-status-date";
/**
@@ -243,6 +259,7 @@ public class DiagnosticOrder extends BaseResource implements IResource {
* Path: DiagnosticOrder.subject
*
*/
+ @SearchParamDefinition(name="subject", path="DiagnosticOrder.subject", description="")
public static final String SP_SUBJECT = "subject";
@@ -826,7 +843,7 @@ public class DiagnosticOrder extends BaseResource implements IResource {
* A summary of the events of interest that have occurred as the request is processed. E.g. when the order was made, various processing steps (specimens received), when it was completed
*
*/
- @Block(name="DiagnosticOrder.event")
+ @Block()
public static class Event extends BaseElement implements IResourceBlock {
@Child(name="status", type=CodeDt.class, order=0, min=1, max=1)
@@ -1046,7 +1063,7 @@ public class DiagnosticOrder extends BaseResource implements IResource {
* The specific diagnostic investigations that are requested as part of this request. Sometimes, there can only be one item per request, but in most contexts, more than one investigation can be requested
*
*/
- @Block(name="DiagnosticOrder.item")
+ @Block()
public static class Item extends BaseElement implements IResourceBlock {
@Child(name="code", type=CodeableConceptDt.class, order=0, min=1, max=1)
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 fe75aa2a983..55bbd0f33b0 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
@@ -51,6 +51,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.AttachmentDt;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
@@ -95,6 +96,7 @@ public class DiagnosticReport extends BaseResource implements IResource {
* Path: DiagnosticReport.status
*
*/
+ @SearchParamDefinition(name="status", path="DiagnosticReport.status", description="The status of the report")
public static final String SP_STATUS = "status";
/**
@@ -105,6 +107,7 @@ public class DiagnosticReport extends BaseResource implements IResource {
* Path: DiagnosticReport.issued
*
*/
+ @SearchParamDefinition(name="issued", path="DiagnosticReport.issued", description="When the report was issued")
public static final String SP_ISSUED = "issued";
/**
@@ -115,6 +118,7 @@ public class DiagnosticReport extends BaseResource implements IResource {
* Path: DiagnosticReport.subject
*
*/
+ @SearchParamDefinition(name="subject", path="DiagnosticReport.subject", description="The subject of the report")
public static final String SP_SUBJECT = "subject";
/**
@@ -125,6 +129,7 @@ public class DiagnosticReport extends BaseResource implements IResource {
* Path: DiagnosticReport.performer
*
*/
+ @SearchParamDefinition(name="performer", path="DiagnosticReport.performer", description="Who was the source of the report (organization)")
public static final String SP_PERFORMER = "performer";
/**
@@ -135,6 +140,7 @@ public class DiagnosticReport extends BaseResource implements IResource {
* Path: DiagnosticReport.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="DiagnosticReport.identifier", description="An identifier for the report")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -145,6 +151,7 @@ public class DiagnosticReport extends BaseResource implements IResource {
* Path: DiagnosticReport.serviceCategory
*
*/
+ @SearchParamDefinition(name="service", path="DiagnosticReport.serviceCategory", description="Which diagnostic discipline/department created the report")
public static final String SP_SERVICE = "service";
/**
@@ -155,6 +162,7 @@ public class DiagnosticReport extends BaseResource implements IResource {
* Path: DiagnosticReport.diagnostic[x]
*
*/
+ @SearchParamDefinition(name="date", path="DiagnosticReport.diagnostic[x]", description="The clinically relevant time of the report")
public static final String SP_DATE = "date";
/**
@@ -165,6 +173,7 @@ public class DiagnosticReport extends BaseResource implements IResource {
* Path: DiagnosticReport.specimen
*
*/
+ @SearchParamDefinition(name="specimen", path="DiagnosticReport.specimen", description="The specimen details")
public static final String SP_SPECIMEN = "specimen";
/**
@@ -175,6 +184,7 @@ public class DiagnosticReport extends BaseResource implements IResource {
* Path: DiagnosticReport.name
*
*/
+ @SearchParamDefinition(name="name", path="DiagnosticReport.name", description="The name of the report (e.g. the code for the report as a whole, as opposed to codes for the atomic results, which are the names on the observation resource referred to from the result)")
public static final String SP_NAME = "name";
/**
@@ -185,6 +195,7 @@ public class DiagnosticReport extends BaseResource implements IResource {
* Path: DiagnosticReport.result
*
*/
+ @SearchParamDefinition(name="result", path="DiagnosticReport.result", description="Link to an atomic result (observation resource)")
public static final String SP_RESULT = "result";
/**
@@ -195,6 +206,7 @@ public class DiagnosticReport extends BaseResource implements IResource {
* Path: DiagnosticReport.codedDiagnosis
*
*/
+ @SearchParamDefinition(name="diagnosis", path="DiagnosticReport.codedDiagnosis", description="A coded diagnosis on the report")
public static final String SP_DIAGNOSIS = "diagnosis";
/**
@@ -205,6 +217,7 @@ public class DiagnosticReport extends BaseResource implements IResource {
* Path: DiagnosticReport.image.link
*
*/
+ @SearchParamDefinition(name="image", path="DiagnosticReport.image.link", description="")
public static final String SP_IMAGE = "image";
/**
@@ -215,6 +228,7 @@ public class DiagnosticReport extends BaseResource implements IResource {
* Path: DiagnosticReport.requestDetail
*
*/
+ @SearchParamDefinition(name="request", path="DiagnosticReport.requestDetail", description="")
public static final String SP_REQUEST = "request";
@@ -1065,7 +1079,7 @@ public class DiagnosticReport extends BaseResource implements IResource {
* A list of key images associated with this report. The images are generally created during the diagnostic process, and may be directly of the patient, or of treated specimens (i.e. slides of interest)
*
*/
- @Block(name="DiagnosticReport.image")
+ @Block()
public static class Image extends BaseElement implements IResourceBlock {
@Child(name="comment", type=StringDt.class, order=0, min=0, max=1)
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 2c25fe72c10..c1dbb5a0c03 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
@@ -47,6 +47,7 @@ import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
@@ -90,6 +91,7 @@ public class DocumentManifest extends BaseResource implements IResource {
* Path: DocumentManifest.masterIdentifier | DocumentManifest.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="DocumentManifest.masterIdentifier | DocumentManifest.identifier", description="")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -100,6 +102,7 @@ public class DocumentManifest extends BaseResource implements IResource {
* Path: DocumentManifest.subject
*
*/
+ @SearchParamDefinition(name="subject", path="DocumentManifest.subject", description="")
public static final String SP_SUBJECT = "subject";
/**
@@ -110,6 +113,7 @@ public class DocumentManifest extends BaseResource implements IResource {
* Path: DocumentManifest.type
*
*/
+ @SearchParamDefinition(name="type", path="DocumentManifest.type", description="")
public static final String SP_TYPE = "type";
/**
@@ -120,6 +124,7 @@ public class DocumentManifest extends BaseResource implements IResource {
* Path: DocumentManifest.recipient
*
*/
+ @SearchParamDefinition(name="recipient", path="DocumentManifest.recipient", description="")
public static final String SP_RECIPIENT = "recipient";
/**
@@ -130,6 +135,7 @@ public class DocumentManifest extends BaseResource implements IResource {
* Path: DocumentManifest.author
*
*/
+ @SearchParamDefinition(name="author", path="DocumentManifest.author", description="")
public static final String SP_AUTHOR = "author";
/**
@@ -140,6 +146,7 @@ public class DocumentManifest extends BaseResource implements IResource {
* Path: DocumentManifest.created
*
*/
+ @SearchParamDefinition(name="created", path="DocumentManifest.created", description="")
public static final String SP_CREATED = "created";
/**
@@ -150,6 +157,7 @@ public class DocumentManifest extends BaseResource implements IResource {
* Path: DocumentManifest.status
*
*/
+ @SearchParamDefinition(name="status", path="DocumentManifest.status", description="")
public static final String SP_STATUS = "status";
/**
@@ -160,6 +168,7 @@ public class DocumentManifest extends BaseResource implements IResource {
* Path: DocumentManifest.supercedes
*
*/
+ @SearchParamDefinition(name="supersedes", path="DocumentManifest.supercedes", description="")
public static final String SP_SUPERSEDES = "supersedes";
/**
@@ -170,6 +179,7 @@ public class DocumentManifest extends BaseResource implements IResource {
* Path: DocumentManifest.description
*
*/
+ @SearchParamDefinition(name="description", path="DocumentManifest.description", description="")
public static final String SP_DESCRIPTION = "description";
/**
@@ -180,6 +190,7 @@ public class DocumentManifest extends BaseResource implements IResource {
* Path: DocumentManifest.confidentiality
*
*/
+ @SearchParamDefinition(name="confidentiality", path="DocumentManifest.confidentiality", description="")
public static final String SP_CONFIDENTIALITY = "confidentiality";
/**
@@ -190,6 +201,7 @@ public class DocumentManifest extends BaseResource implements IResource {
* Path: DocumentManifest.content
*
*/
+ @SearchParamDefinition(name="content", path="DocumentManifest.content", description="")
public static final String SP_CONTENT = "content";
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 86ead948901..15bf205c670 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
@@ -50,6 +50,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.PeriodDt;
@@ -97,6 +98,7 @@ public class DocumentReference extends BaseResource implements IResource {
* Path: DocumentReference.masterIdentifier | DocumentReference.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="DocumentReference.masterIdentifier | DocumentReference.identifier", description="")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -107,6 +109,7 @@ public class DocumentReference extends BaseResource implements IResource {
* Path: DocumentReference.subject
*
*/
+ @SearchParamDefinition(name="subject", path="DocumentReference.subject", description="")
public static final String SP_SUBJECT = "subject";
/**
@@ -117,6 +120,7 @@ public class DocumentReference extends BaseResource implements IResource {
* Path: DocumentReference.type
*
*/
+ @SearchParamDefinition(name="type", path="DocumentReference.type", description="")
public static final String SP_TYPE = "type";
/**
@@ -127,6 +131,7 @@ public class DocumentReference extends BaseResource implements IResource {
* Path: DocumentReference.class
*
*/
+ @SearchParamDefinition(name="class", path="DocumentReference.class", description="")
public static final String SP_CLASS = "class";
/**
@@ -137,6 +142,7 @@ public class DocumentReference extends BaseResource implements IResource {
* Path: DocumentReference.author
*
*/
+ @SearchParamDefinition(name="author", path="DocumentReference.author", description="")
public static final String SP_AUTHOR = "author";
/**
@@ -147,6 +153,7 @@ public class DocumentReference extends BaseResource implements IResource {
* Path: DocumentReference.custodian
*
*/
+ @SearchParamDefinition(name="custodian", path="DocumentReference.custodian", description="")
public static final String SP_CUSTODIAN = "custodian";
/**
@@ -157,6 +164,7 @@ public class DocumentReference extends BaseResource implements IResource {
* Path: DocumentReference.authenticator
*
*/
+ @SearchParamDefinition(name="authenticator", path="DocumentReference.authenticator", description="")
public static final String SP_AUTHENTICATOR = "authenticator";
/**
@@ -167,6 +175,7 @@ public class DocumentReference extends BaseResource implements IResource {
* Path: DocumentReference.created
*
*/
+ @SearchParamDefinition(name="created", path="DocumentReference.created", description="")
public static final String SP_CREATED = "created";
/**
@@ -177,6 +186,7 @@ public class DocumentReference extends BaseResource implements IResource {
* Path: DocumentReference.indexed
*
*/
+ @SearchParamDefinition(name="indexed", path="DocumentReference.indexed", description="")
public static final String SP_INDEXED = "indexed";
/**
@@ -187,6 +197,7 @@ public class DocumentReference extends BaseResource implements IResource {
* Path: DocumentReference.status
*
*/
+ @SearchParamDefinition(name="status", path="DocumentReference.status", description="")
public static final String SP_STATUS = "status";
/**
@@ -197,6 +208,7 @@ public class DocumentReference extends BaseResource implements IResource {
* Path: DocumentReference.relatesTo.target
*
*/
+ @SearchParamDefinition(name="relatesto", path="DocumentReference.relatesTo.target", description="")
public static final String SP_RELATESTO = "relatesto";
/**
@@ -207,6 +219,7 @@ public class DocumentReference extends BaseResource implements IResource {
* Path: DocumentReference.relatesTo.code
*
*/
+ @SearchParamDefinition(name="relation", path="DocumentReference.relatesTo.code", description="")
public static final String SP_RELATION = "relation";
/**
@@ -217,6 +230,7 @@ public class DocumentReference extends BaseResource implements IResource {
* Path: relatesto & relation
*
*/
+ @SearchParamDefinition(name="relationship", path="relatesto & relation", description="Combination of relation and relatesTo")
public static final String SP_RELATIONSHIP = "relationship";
/**
@@ -227,6 +241,7 @@ public class DocumentReference extends BaseResource implements IResource {
* Path: DocumentReference.description
*
*/
+ @SearchParamDefinition(name="description", path="DocumentReference.description", description="")
public static final String SP_DESCRIPTION = "description";
/**
@@ -237,6 +252,7 @@ public class DocumentReference extends BaseResource implements IResource {
* Path: DocumentReference.confidentiality
*
*/
+ @SearchParamDefinition(name="confidentiality", path="DocumentReference.confidentiality", description="")
public static final String SP_CONFIDENTIALITY = "confidentiality";
/**
@@ -247,6 +263,7 @@ public class DocumentReference extends BaseResource implements IResource {
* Path: DocumentReference.primaryLanguage
*
*/
+ @SearchParamDefinition(name="language", path="DocumentReference.primaryLanguage", description="")
public static final String SP_LANGUAGE = "language";
/**
@@ -257,6 +274,7 @@ public class DocumentReference extends BaseResource implements IResource {
* Path: DocumentReference.format
*
*/
+ @SearchParamDefinition(name="format", path="DocumentReference.format", description="")
public static final String SP_FORMAT = "format";
/**
@@ -267,6 +285,7 @@ public class DocumentReference extends BaseResource implements IResource {
* Path: DocumentReference.size
*
*/
+ @SearchParamDefinition(name="size", path="DocumentReference.size", description="")
public static final String SP_SIZE = "size";
/**
@@ -277,6 +296,7 @@ public class DocumentReference extends BaseResource implements IResource {
* Path: DocumentReference.location
*
*/
+ @SearchParamDefinition(name="location", path="DocumentReference.location", description="")
public static final String SP_LOCATION = "location";
/**
@@ -287,6 +307,7 @@ public class DocumentReference extends BaseResource implements IResource {
* Path: DocumentReference.context.event
*
*/
+ @SearchParamDefinition(name="event", path="DocumentReference.context.event", description="")
public static final String SP_EVENT = "event";
/**
@@ -297,6 +318,7 @@ public class DocumentReference extends BaseResource implements IResource {
* Path: DocumentReference.context.period
*
*/
+ @SearchParamDefinition(name="period", path="DocumentReference.context.period", description="")
public static final String SP_PERIOD = "period";
/**
@@ -307,6 +329,7 @@ public class DocumentReference extends BaseResource implements IResource {
* Path: DocumentReference.context.facilityType
*
*/
+ @SearchParamDefinition(name="facility", path="DocumentReference.context.facilityType", description="")
public static final String SP_FACILITY = "facility";
@@ -980,8 +1003,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;
}
@@ -993,8 +1016,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;
}
@@ -1606,7 +1629,7 @@ public class DocumentReference extends BaseResource implements IResource {
* Relationships that this document has with other document references that already exist
*
*/
- @Block(name="DocumentReference.relatesTo")
+ @Block()
public static class RelatesTo extends BaseElement implements IResourceBlock {
@Child(name="code", type=CodeDt.class, order=0, min=1, max=1)
@@ -1727,7 +1750,7 @@ public class DocumentReference extends BaseResource implements IResource {
* A description of a service call that can be used to retrieve the document
*
*/
- @Block(name="DocumentReference.service")
+ @Block()
public static class Service extends BaseElement implements IResourceBlock {
@Child(name="type", type=CodeableConceptDt.class, order=0, min=1, max=1)
@@ -1913,7 +1936,7 @@ public class DocumentReference extends BaseResource implements IResource {
* A list of named parameters that is used in the service call
*
*/
- @Block(name="DocumentReference.service.parameter")
+ @Block()
public static class ServiceParameter extends BaseElement implements IResourceBlock {
@Child(name="name", type=StringDt.class, order=0, min=1, max=1)
@@ -2047,7 +2070,7 @@ public class DocumentReference extends BaseResource implements IResource {
* The clinical context in which the document was prepared
*
*/
- @Block(name="DocumentReference.context")
+ @Block()
public static class Context extends BaseElement implements IResourceBlock {
@Child(name="event", type=CodeableConceptDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
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 003b8fc0d8e..03350039c15 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
@@ -48,6 +48,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.DurationDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
@@ -97,6 +98,7 @@ public class Encounter extends BaseResource implements IResource {
* Path: Encounter.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="Encounter.identifier", description="")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -107,6 +109,7 @@ public class Encounter extends BaseResource implements IResource {
* Path: Encounter.status
*
*/
+ @SearchParamDefinition(name="status", path="Encounter.status", description="")
public static final String SP_STATUS = "status";
/**
@@ -117,6 +120,7 @@ public class Encounter extends BaseResource implements IResource {
* Path: Encounter.period
*
*/
+ @SearchParamDefinition(name="date", path="Encounter.period", description="A date within the period the Encounter lasted")
public static final String SP_DATE = "date";
/**
@@ -127,6 +131,7 @@ public class Encounter extends BaseResource implements IResource {
* Path: Encounter.subject
*
*/
+ @SearchParamDefinition(name="subject", path="Encounter.subject", description="")
public static final String SP_SUBJECT = "subject";
/**
@@ -137,6 +142,7 @@ public class Encounter extends BaseResource implements IResource {
* Path: Encounter.fulfills
*
*/
+ @SearchParamDefinition(name="!fulfills", path="Encounter.fulfills", description="")
public static final String SP_FULFILLS = "!fulfills";
/**
@@ -147,6 +153,7 @@ public class Encounter extends BaseResource implements IResource {
* Path: Encounter.length
*
*/
+ @SearchParamDefinition(name="length", path="Encounter.length", description="Length of encounter in days")
public static final String SP_LENGTH = "length";
/**
@@ -157,6 +164,7 @@ public class Encounter extends BaseResource implements IResource {
* Path: Encounter.indication
*
*/
+ @SearchParamDefinition(name="indication", path="Encounter.indication", description="")
public static final String SP_INDICATION = "indication";
/**
@@ -167,6 +175,7 @@ public class Encounter extends BaseResource implements IResource {
* Path: Encounter.location.location
*
*/
+ @SearchParamDefinition(name="location", path="Encounter.location.location", description="")
public static final String SP_LOCATION = "location";
/**
@@ -177,6 +186,7 @@ public class Encounter extends BaseResource implements IResource {
* Path: Encounter.location.period
*
*/
+ @SearchParamDefinition(name="location-period", path="Encounter.location.period", description="")
public static final String SP_LOCATION_PERIOD = "location-period";
@@ -966,7 +976,7 @@ public class Encounter extends BaseResource implements IResource {
* The main practitioner responsible for providing the service
*
*/
- @Block(name="Encounter.participant")
+ @Block()
public static class Participant extends BaseElement implements IResourceBlock {
@Child(name="type", type=CodeableConceptDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@@ -1097,7 +1107,7 @@ public class Encounter extends BaseResource implements IResource {
* Details about an admission to a clinic
*
*/
- @Block(name="Encounter.hospitalization")
+ @Block()
public static class Hospitalization extends BaseElement implements IResourceBlock {
@Child(name="preAdmissionIdentifier", type=IdentifierDt.class, order=0, min=0, max=1)
@@ -1725,7 +1735,7 @@ public class Encounter extends BaseResource implements IResource {
*
*
*/
- @Block(name="Encounter.hospitalization.accomodation")
+ @Block()
public static class HospitalizationAccomodation extends BaseElement implements IResourceBlock {
@Child(name="bed", order=0, min=0, max=1, type={
@@ -1834,7 +1844,7 @@ public class Encounter extends BaseResource implements IResource {
* List of locations at which the patient has been
*
*/
- @Block(name="Encounter.location")
+ @Block()
public static class Location extends BaseElement implements IResourceBlock {
@Child(name="location", order=0, min=1, max=1, type={
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 7b521f18c8e..01f4bc4990e 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
@@ -49,6 +49,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.AgeDt;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
@@ -92,6 +93,7 @@ public class FamilyHistory extends BaseResource implements IResource {
* Path: FamilyHistory.subject
*
*/
+ @SearchParamDefinition(name="subject", path="FamilyHistory.subject", description="The identity of a subject to list family history items for")
public static final String SP_SUBJECT = "subject";
@@ -379,7 +381,7 @@ public class FamilyHistory extends BaseResource implements IResource {
* The related person. Each FamilyHistory resource contains the entire family history for a single person.
*
*/
- @Block(name="FamilyHistory.relation")
+ @Block()
public static class Relation extends BaseElement implements IResourceBlock {
@Child(name="name", type=StringDt.class, order=0, min=0, max=1)
@@ -688,7 +690,7 @@ public class FamilyHistory extends BaseResource implements IResource {
* The significant Conditions (or condition) that the family member had. This is a repeating section to allow a system to represent more than one condition per resource, though there is nothing stopping multiple resources - one per condition.
*
*/
- @Block(name="FamilyHistory.relation.condition")
+ @Block()
public static class RelationCondition extends BaseElement implements IResourceBlock {
@Child(name="type", type=CodeableConceptDt.class, order=0, min=1, max=1)
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 52017fe9014..2569681def2 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
@@ -50,6 +50,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.AttachmentDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.primitive.CodeDt;
@@ -90,6 +91,7 @@ public class GVFMeta extends BaseResource implements IResource {
* Path: GVFMeta.subject.patient
*
*/
+ @SearchParamDefinition(name="patient", path="GVFMeta.subject.patient", description="Patient being described in the file")
public static final String SP_PATIENT = "patient";
/**
@@ -100,6 +102,7 @@ public class GVFMeta extends BaseResource implements IResource {
* Path: GVFMeta.sourceFile
*
*/
+ @SearchParamDefinition(name="file", path="GVFMeta.sourceFile", description="URL to source file of the resource")
public static final String SP_FILE = "file";
@@ -980,7 +983,7 @@ public class GVFMeta extends BaseResource implements IResource {
* Subject being described by the file
*
*/
- @Block(name="GVFMeta.subject")
+ @Block()
public static class Subject extends BaseElement implements IResourceBlock {
@Child(name="patient", order=0, min=0, max=1, type={
@@ -1101,7 +1104,7 @@ public class GVFMeta extends BaseResource implements IResource {
* Technology platform used in the sequencing
*
*/
- @Block(name="GVFMeta.platform")
+ @Block()
public static class Platform extends BaseElement implements IResourceBlock {
@Child(name="class", type=CodeDt.class, order=0, min=0, max=1)
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 5320dae12ee..17f5993bc2a 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
@@ -48,6 +48,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.AttachmentDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.primitive.CodeDt;
@@ -87,6 +88,7 @@ public class GVFVariant extends BaseResource implements IResource {
* Path: GVFVariant.subject.patient
*
*/
+ @SearchParamDefinition(name="patient", path="GVFVariant.subject.patient", description="Patient being described ")
public static final String SP_PATIENT = "patient";
/**
@@ -97,6 +99,7 @@ public class GVFVariant extends BaseResource implements IResource {
* Path:
*
*/
+ @SearchParamDefinition(name="coordinate", path="", description="Coordinate of the variant being studied")
public static final String SP_COORDINATE = "coordinate";
@@ -1015,6 +1018,24 @@ public class GVFVariant extends BaseResource implements IResource {
* Frequency of the variant
*
*
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public GVFVariant addVariantFreq( long theValue) {
+ if (myVariantFreq == null) {
+ myVariantFreq = new java.util.ArrayList();
+ }
+ myVariantFreq.add(new DecimalDt(theValue));
+ return this;
+ }
+
+ /**
+ * Adds a new value for variantFreq (Variant frequency)
+ *
+ *
+ * Definition:
+ * Frequency of the variant
+ *
+ *
* @return Returns a reference to this object, to allow for simple chaining.
*/
public GVFVariant addVariantFreq( double theValue) {
@@ -1043,24 +1064,6 @@ public class GVFVariant extends BaseResource implements IResource {
return this;
}
- /**
- * Adds a new value for variantFreq (Variant frequency)
- *
- *
- * Definition:
- * Frequency of the variant
- *
- *
- * @return Returns a reference to this object, to allow for simple chaining.
- */
- public GVFVariant addVariantFreq( long theValue) {
- if (myVariantFreq == null) {
- myVariantFreq = new java.util.ArrayList();
- }
- myVariantFreq.add(new DecimalDt(theValue));
- return this;
- }
-
/**
* Gets the value(s) for variantEffect (Variant effect).
@@ -1670,7 +1673,7 @@ public class GVFVariant extends BaseResource implements IResource {
* Subject described by this segment of GVF file
*
*/
- @Block(name="GVFVariant.subject")
+ @Block()
public static class Subject extends BaseElement implements IResourceBlock {
@Child(name="patient", order=0, min=1, max=1, type={
@@ -1791,7 +1794,7 @@ public class GVFVariant extends BaseResource implements IResource {
* Reference of the feature in a database
*
*/
- @Block(name="GVFVariant.dbxref")
+ @Block()
public static class Dbxref extends BaseElement implements IResourceBlock {
@Child(name="database", type=CodeDt.class, order=0, min=1, max=1)
@@ -1924,7 +1927,7 @@ public class GVFVariant extends BaseResource implements IResource {
* Effect of the variant
*
*/
- @Block(name="GVFVariant.variantEffect")
+ @Block()
public static class VariantEffect extends BaseElement implements IResourceBlock {
@Child(name="sequenceVariant", type=CodeDt.class, order=0, min=1, max=1)
@@ -2193,7 +2196,7 @@ public class GVFVariant extends BaseResource implements IResource {
* Attribute describing ambiguity of the start position of the feature
*
*/
- @Block(name="GVFVariant.startRange")
+ @Block()
public static class StartRange extends BaseElement implements IResourceBlock {
@Child(name="start", type=IntegerDt.class, order=0, min=1, max=1)
@@ -2326,7 +2329,7 @@ public class GVFVariant extends BaseResource implements IResource {
* Attribute describing ambiguity of the end position of the feature
*
*/
- @Block(name="GVFVariant.endRange")
+ @Block()
public static class EndRange extends BaseElement implements IResourceBlock {
@Child(name="start", type=IntegerDt.class, order=0, min=1, max=1)
@@ -2459,7 +2462,7 @@ public class GVFVariant extends BaseResource implements IResource {
* Coordinate of a variant with zero length
*
*/
- @Block(name="GVFVariant.breakpointDetail")
+ @Block()
public static class BreakpointDetail extends BaseElement implements IResourceBlock {
@Child(name="seqid", type=StringDt.class, order=0, min=1, max=1)
@@ -2694,7 +2697,7 @@ public class GVFVariant extends BaseResource implements IResource {
* Sequences adjacent to the feature
*
*/
- @Block(name="GVFVariant.sequenceContext")
+ @Block()
public static class SequenceContext extends BaseElement implements IResourceBlock {
@Child(name="fivePrime", type=StringDt.class, order=0, min=1, max=1)
@@ -2827,7 +2830,7 @@ public class GVFVariant extends BaseResource implements IResource {
* Individual genotypic information
*
*/
- @Block(name="GVFVariant.sample")
+ @Block()
public static class Sample extends BaseElement implements IResourceBlock {
@Child(name="phased", type=StringDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
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 3bca9ac8afa..ed51638f323 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
@@ -48,6 +48,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.primitive.DecimalDt;
import ca.uhn.fhir.model.primitive.IntegerDt;
@@ -85,6 +86,7 @@ public class GeneExpression extends BaseResource implements IResource {
* Path: GeneExpression.subject
*
*/
+ @SearchParamDefinition(name="subject", path="GeneExpression.subject", description="subject being described by the resource")
public static final String SP_SUBJECT = "subject";
/**
@@ -95,6 +97,7 @@ public class GeneExpression extends BaseResource implements IResource {
* Path: GeneExpression.gene.identifier
*
*/
+ @SearchParamDefinition(name="gene", path="GeneExpression.gene.identifier", description="Id of the gene")
public static final String SP_GENE = "gene";
/**
@@ -105,6 +108,7 @@ public class GeneExpression extends BaseResource implements IResource {
* Path: GeneExpression.gene.coordinate
*
*/
+ @SearchParamDefinition(name="coordinate", path="GeneExpression.gene.coordinate", description="Coordinate of the gene")
public static final String SP_COORDINATE = "coordinate";
@@ -328,7 +332,7 @@ public class GeneExpression extends BaseResource implements IResource {
* Gene of study
*
*/
- @Block(name="GeneExpression.gene")
+ @Block()
public static class Gene extends BaseElement implements IResourceBlock {
@Child(name="identifier", type=StringDt.class, order=0, min=0, max=1)
@@ -447,7 +451,7 @@ public class GeneExpression extends BaseResource implements IResource {
* Coordinate of the gene
*
*/
- @Block(name="GeneExpression.gene.coordinate")
+ @Block()
public static class GeneCoordinate extends BaseElement implements IResourceBlock {
@Child(name="chromosome", type=StringDt.class, order=0, min=1, max=1)
@@ -632,7 +636,7 @@ public class GeneExpression extends BaseResource implements IResource {
* RNA-Seq that studies the gene
*
*/
- @Block(name="GeneExpression.rnaSeq")
+ @Block()
public static class RnaSeq extends BaseElement implements IResourceBlock {
@Child(name="inputLab", order=0, min=0, max=1, type={
@@ -779,6 +783,19 @@ public class GeneExpression extends BaseResource implements IResource {
*
* Definition:
* Expression level of the gene in RPKM
+ *
+ */
+ public RnaSeq setExpression( long theValue) {
+ myExpression = new DecimalDt(theValue);
+ return this;
+ }
+
+ /**
+ * Sets the value for expression (Expression level of the gene in RPKM)
+ *
+ *
+ * Definition:
+ * Expression level of the gene in RPKM
*
*/
public RnaSeq setExpression( double theValue) {
@@ -799,19 +816,6 @@ public class GeneExpression extends BaseResource implements IResource {
return this;
}
- /**
- * Sets the value for expression (Expression level of the gene in RPKM)
- *
- *
- * Definition:
- * Expression level of the gene in RPKM
- *
- */
- public RnaSeq setExpression( long theValue) {
- myExpression = new DecimalDt(theValue);
- return this;
- }
-
/**
* Gets the value(s) for isoform (Isoform of the gene).
@@ -884,7 +888,7 @@ public class GeneExpression extends BaseResource implements IResource {
* Isoform of the gene
*
*/
- @Block(name="GeneExpression.rnaSeq.isoform")
+ @Block()
public static class RnaSeqIsoform extends BaseElement implements IResourceBlock {
@Child(name="identity", type=StringDt.class, order=0, min=1, max=1)
@@ -997,6 +1001,19 @@ public class GeneExpression extends BaseResource implements IResource {
*
* Definition:
* Expression level of the isoform in RPKM
+ *
+ */
+ public RnaSeqIsoform setExpression( long theValue) {
+ myExpression = new DecimalDt(theValue);
+ return this;
+ }
+
+ /**
+ * Sets the value for expression (Expression level of the isoform in RPKM)
+ *
+ *
+ * Definition:
+ * Expression level of the isoform in RPKM
*
*/
public RnaSeqIsoform setExpression( double theValue) {
@@ -1017,19 +1034,6 @@ public class GeneExpression extends BaseResource implements IResource {
return this;
}
- /**
- * Sets the value for expression (Expression level of the isoform in RPKM)
- *
- *
- * Definition:
- * Expression level of the isoform in RPKM
- *
- */
- public RnaSeqIsoform setExpression( long theValue) {
- myExpression = new DecimalDt(theValue);
- return this;
- }
-
}
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 87b21ab148a..f5b5b7d36a8 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
@@ -50,6 +50,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodingDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.primitive.DateDt;
@@ -88,6 +89,7 @@ public class GeneticAnalysis extends BaseResource implements IResource {
* Path: GeneticAnalysis.subject
*
*/
+ @SearchParamDefinition(name="subject", path="GeneticAnalysis.subject", description="Subject of the analysis")
public static final String SP_SUBJECT = "subject";
/**
@@ -98,6 +100,7 @@ public class GeneticAnalysis extends BaseResource implements IResource {
* Path: GeneticAnalysis.author
*
*/
+ @SearchParamDefinition(name="author", path="GeneticAnalysis.author", description="Author of the analysis")
public static final String SP_AUTHOR = "author";
/**
@@ -108,6 +111,7 @@ public class GeneticAnalysis extends BaseResource implements IResource {
* Path: GeneticAnalysis.date
*
*/
+ @SearchParamDefinition(name="date", path="GeneticAnalysis.date", description="Date when result of the analysis is uploaded")
public static final String SP_DATE = "date";
@@ -391,7 +395,7 @@ public class GeneticAnalysis extends BaseResource implements IResource {
* Summary of the analysis
*
*/
- @Block(name="GeneticAnalysis.geneticAnalysisSummary")
+ @Block()
public static class GeneticAnalysisSummary extends BaseElement implements IResourceBlock {
@Child(name="geneticDiseaseAssessed", type=CodingDt.class, order=0, min=0, max=1)
@@ -752,7 +756,7 @@ public class GeneticAnalysis extends BaseResource implements IResource {
* Coverage of the genetic test
*
*/
- @Block(name="GeneticAnalysis.dnaRegionAnalysisTestCoverage")
+ @Block()
public static class DnaRegionAnalysisTestCoverage extends BaseElement implements IResourceBlock {
@Child(name="dnaRegionOfInterest", order=0, min=0, max=Child.MAX_UNLIMITED)
@@ -849,7 +853,7 @@ public class GeneticAnalysis extends BaseResource implements IResource {
* DNA studied
*
*/
- @Block(name="GeneticAnalysis.dnaRegionAnalysisTestCoverage.dnaRegionOfInterest")
+ @Block()
public static class DnaRegionAnalysisTestCoverageDnaRegionOfInterest extends BaseElement implements IResourceBlock {
@Child(name="genomicReferenceSequenceIdentifier", type=StringDt.class, order=0, min=0, max=1)
@@ -1289,7 +1293,7 @@ public class GeneticAnalysis extends BaseResource implements IResource {
* Genetic analysis discrete result
*
*/
- @Block(name="GeneticAnalysis.geneticAnalysisDiscreteResult")
+ @Block()
public static class GeneticAnalysisDiscreteResult extends BaseElement implements IResourceBlock {
@Child(name="dnaAnalysisDiscreteSequenceVariation", type=StringDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
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 67abba742d8..41a8a9f9d4a 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
@@ -49,6 +49,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.QuantityDt;
@@ -94,6 +95,7 @@ public class Group extends BaseResource implements IResource {
* Path: Group.type
*
*/
+ @SearchParamDefinition(name="type", path="Group.type", description="The type of resources the group contains")
public static final String SP_TYPE = "type";
/**
@@ -104,6 +106,7 @@ public class Group extends BaseResource implements IResource {
* Path: Group.code
*
*/
+ @SearchParamDefinition(name="code", path="Group.code", description="The kind of resources contained")
public static final String SP_CODE = "code";
/**
@@ -114,6 +117,7 @@ public class Group extends BaseResource implements IResource {
* Path: Group.actual
*
*/
+ @SearchParamDefinition(name="actual", path="Group.actual", description="")
public static final String SP_ACTUAL = "actual";
/**
@@ -124,6 +128,7 @@ public class Group extends BaseResource implements IResource {
* Path: Group.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="Group.identifier", description="")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -134,6 +139,7 @@ public class Group extends BaseResource implements IResource {
* Path: Group.member
*
*/
+ @SearchParamDefinition(name="member", path="Group.member", description="")
public static final String SP_MEMBER = "member";
/**
@@ -144,6 +150,7 @@ public class Group extends BaseResource implements IResource {
* Path: Group.characteristic.code
*
*/
+ @SearchParamDefinition(name="characteristic", path="Group.characteristic.code", description="")
public static final String SP_CHARACTERISTIC = "characteristic";
/**
@@ -154,6 +161,7 @@ public class Group extends BaseResource implements IResource {
* Path: Group.characteristic.value[x]
*
*/
+ @SearchParamDefinition(name="value", path="Group.characteristic.value[x]", description="")
public static final String SP_VALUE = "value";
/**
@@ -164,6 +172,7 @@ public class Group extends BaseResource implements IResource {
* Path: Group.characteristic.exclude
*
*/
+ @SearchParamDefinition(name="exclude", path="Group.characteristic.exclude", description="")
public static final String SP_EXCLUDE = "exclude";
/**
@@ -174,6 +183,7 @@ public class Group extends BaseResource implements IResource {
* Path: characteristic & value
*
*/
+ @SearchParamDefinition(name="characteristic-value", path="characteristic & value", description="A composite of both characteristic and value")
public static final String SP_CHARACTERISTIC_VALUE = "characteristic-value";
@@ -623,7 +633,7 @@ public class Group extends BaseResource implements IResource {
* Identifies the traits shared by members of the group
*
*/
- @Block(name="Group.characteristic")
+ @Block()
public static class Characteristic extends BaseElement implements IResourceBlock {
@Child(name="code", type=CodeableConceptDt.class, order=0, min=1, max=1)
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 a719699eb28..855edc11c7f 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
@@ -50,6 +50,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodingDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
@@ -97,6 +98,7 @@ public class ImagingStudy extends BaseResource implements IResource {
* Path: ImagingStudy.subject
*
*/
+ @SearchParamDefinition(name="subject", path="ImagingStudy.subject", description="Who the study is about")
public static final String SP_SUBJECT = "subject";
/**
@@ -107,6 +109,7 @@ public class ImagingStudy extends BaseResource implements IResource {
* Path: ImagingStudy.dateTime
*
*/
+ @SearchParamDefinition(name="date", path="ImagingStudy.dateTime", description="The date the study was done was taken")
public static final String SP_DATE = "date";
/**
@@ -117,6 +120,7 @@ public class ImagingStudy extends BaseResource implements IResource {
* Path: ImagingStudy.accessionNo
*
*/
+ @SearchParamDefinition(name="accession", path="ImagingStudy.accessionNo", description="The accession id for the image")
public static final String SP_ACCESSION = "accession";
/**
@@ -127,6 +131,7 @@ public class ImagingStudy extends BaseResource implements IResource {
* Path: ImagingStudy.uid
*
*/
+ @SearchParamDefinition(name="study", path="ImagingStudy.uid", description="The study id for the image")
public static final String SP_STUDY = "study";
/**
@@ -137,6 +142,7 @@ public class ImagingStudy extends BaseResource implements IResource {
* Path: ImagingStudy.series.uid
*
*/
+ @SearchParamDefinition(name="series", path="ImagingStudy.series.uid", description="The series id for the image")
public static final String SP_SERIES = "series";
/**
@@ -147,6 +153,7 @@ public class ImagingStudy extends BaseResource implements IResource {
* Path: ImagingStudy.series.modality
*
*/
+ @SearchParamDefinition(name="modality", path="ImagingStudy.series.modality", description="The modality of the image")
public static final String SP_MODALITY = "modality";
/**
@@ -157,6 +164,7 @@ public class ImagingStudy extends BaseResource implements IResource {
* Path:
*
*/
+ @SearchParamDefinition(name="size", path="", description="The size of the image in MB - may include > or < in the value")
public static final String SP_SIZE = "size";
/**
@@ -167,6 +175,7 @@ public class ImagingStudy extends BaseResource implements IResource {
* Path: ImagingStudy.series.bodySite
*
*/
+ @SearchParamDefinition(name="bodysite", path="ImagingStudy.series.bodySite", description="")
public static final String SP_BODYSITE = "bodysite";
/**
@@ -177,6 +186,7 @@ public class ImagingStudy extends BaseResource implements IResource {
* Path: ImagingStudy.series.instance.uid
*
*/
+ @SearchParamDefinition(name="uid", path="ImagingStudy.series.instance.uid", description="")
public static final String SP_UID = "uid";
/**
@@ -187,6 +197,7 @@ public class ImagingStudy extends BaseResource implements IResource {
* Path: ImagingStudy.series.instance.sopclass
*
*/
+ @SearchParamDefinition(name="dicom-class", path="ImagingStudy.series.instance.sopclass", description="")
public static final String SP_DICOM_CLASS = "dicom-class";
@@ -1156,7 +1167,7 @@ public class ImagingStudy extends BaseResource implements IResource {
* Each study has one or more series of image instances
*
*/
- @Block(name="ImagingStudy.series")
+ @Block()
public static class Series extends BaseElement implements IResourceBlock {
@Child(name="number", type=IntegerDt.class, order=0, min=0, max=1)
@@ -1699,7 +1710,7 @@ public class ImagingStudy extends BaseResource implements IResource {
* A single image taken from a patient
*
*/
- @Block(name="ImagingStudy.series.instance")
+ @Block()
public static class SeriesInstance extends BaseElement implements IResourceBlock {
@Child(name="number", type=IntegerDt.class, order=0, min=0, max=1)
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 93091d44bec..0204ab8391c 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
@@ -50,6 +50,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.QuantityDt;
@@ -97,6 +98,7 @@ public class Immunization extends BaseResource implements IResource {
* Path: Immunization.date
*
*/
+ @SearchParamDefinition(name="date", path="Immunization.date", description="Vaccination Administration / Refusal Date")
public static final String SP_DATE = "date";
/**
@@ -107,6 +109,7 @@ public class Immunization extends BaseResource implements IResource {
* Path: Immunization.vaccinationProtocol.doseSequence
*
*/
+ @SearchParamDefinition(name="dose-sequence", path="Immunization.vaccinationProtocol.doseSequence", description="")
public static final String SP_DOSE_SEQUENCE = "dose-sequence";
/**
@@ -117,6 +120,7 @@ public class Immunization extends BaseResource implements IResource {
* Path: Immunization.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="Immunization.identifier", description="")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -127,6 +131,7 @@ public class Immunization extends BaseResource implements IResource {
* Path: Immunization.location
*
*/
+ @SearchParamDefinition(name="location", path="Immunization.location", description="The service delivery location or facility in which the vaccine was / was to be administered")
public static final String SP_LOCATION = "location";
/**
@@ -137,6 +142,7 @@ public class Immunization extends BaseResource implements IResource {
* Path: Immunization.lotNumber
*
*/
+ @SearchParamDefinition(name="lot-number", path="Immunization.lotNumber", description="Vaccine Lot Number")
public static final String SP_LOT_NUMBER = "lot-number";
/**
@@ -147,6 +153,7 @@ public class Immunization extends BaseResource implements IResource {
* Path: Immunization.manufacturer
*
*/
+ @SearchParamDefinition(name="manufacturer", path="Immunization.manufacturer", description="Vaccine Manufacturer")
public static final String SP_MANUFACTURER = "manufacturer";
/**
@@ -157,6 +164,7 @@ public class Immunization extends BaseResource implements IResource {
* Path: Immunization.performer
*
*/
+ @SearchParamDefinition(name="performer", path="Immunization.performer", description="The practitioner who administered the vaccination")
public static final String SP_PERFORMER = "performer";
/**
@@ -167,6 +175,7 @@ public class Immunization extends BaseResource implements IResource {
* Path: Immunization.reaction.detail
*
*/
+ @SearchParamDefinition(name="reaction", path="Immunization.reaction.detail", description="")
public static final String SP_REACTION = "reaction";
/**
@@ -177,6 +186,7 @@ public class Immunization extends BaseResource implements IResource {
* Path: Immunization.reaction.date
*
*/
+ @SearchParamDefinition(name="reaction-date", path="Immunization.reaction.date", description="")
public static final String SP_REACTION_DATE = "reaction-date";
/**
@@ -187,6 +197,7 @@ public class Immunization extends BaseResource implements IResource {
* Path: Immunization.explanation.reason
*
*/
+ @SearchParamDefinition(name="reason", path="Immunization.explanation.reason", description="")
public static final String SP_REASON = "reason";
/**
@@ -197,6 +208,7 @@ public class Immunization extends BaseResource implements IResource {
* Path: Immunization.explanation.refusalReason
*
*/
+ @SearchParamDefinition(name="refusal-reason", path="Immunization.explanation.refusalReason", description="Explanation of refusal / exemption")
public static final String SP_REFUSAL_REASON = "refusal-reason";
/**
@@ -207,6 +219,7 @@ public class Immunization extends BaseResource implements IResource {
* Path: Immunization.refusedIndicator
*
*/
+ @SearchParamDefinition(name="refused", path="Immunization.refusedIndicator", description="")
public static final String SP_REFUSED = "refused";
/**
@@ -217,6 +230,7 @@ public class Immunization extends BaseResource implements IResource {
* Path: Immunization.requester
*
*/
+ @SearchParamDefinition(name="requester", path="Immunization.requester", description="The practitioner who ordered the vaccination")
public static final String SP_REQUESTER = "requester";
/**
@@ -227,6 +241,7 @@ public class Immunization extends BaseResource implements IResource {
* Path: Immunization.subject
*
*/
+ @SearchParamDefinition(name="subject", path="Immunization.subject", description="The subject of the vaccination event / refusal")
public static final String SP_SUBJECT = "subject";
/**
@@ -237,6 +252,7 @@ public class Immunization extends BaseResource implements IResource {
* Path: Immunization.vaccineType
*
*/
+ @SearchParamDefinition(name="vaccine-type", path="Immunization.vaccineType", description="Vaccine Product Type Administered")
public static final String SP_VACCINE_TYPE = "vaccine-type";
@@ -1232,7 +1248,7 @@ public class Immunization extends BaseResource implements IResource {
* Reasons why a vaccine was administered or refused
*
*/
- @Block(name="Immunization.explanation")
+ @Block()
public static class Explanation extends BaseElement implements IResourceBlock {
@Child(name="reason", type=CodeableConceptDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@@ -1394,7 +1410,7 @@ public class Immunization extends BaseResource implements IResource {
* Categorical data indicating that an adverse event is associated in time to an immunization
*
*/
- @Block(name="Immunization.reaction")
+ @Block()
public static class Reaction extends BaseElement implements IResourceBlock {
@Child(name="date", type=DateTimeDt.class, order=0, min=0, max=1)
@@ -1576,7 +1592,7 @@ public class Immunization extends BaseResource implements IResource {
* Contains information about the protocol(s) under which the vaccine was administered
*
*/
- @Block(name="Immunization.vaccinationProtocol")
+ @Block()
public static class VaccinationProtocol extends BaseElement implements IResourceBlock {
@Child(name="doseSequence", type=IntegerDt.class, order=0, min=1, max=1)
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 f763fb0bab9..c1efa137420 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
@@ -50,6 +50,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
@@ -93,6 +94,7 @@ public class ImmunizationRecommendation extends BaseResource implements IResourc
* Path: ImmunizationRecommendation.subject
*
*/
+ @SearchParamDefinition(name="subject", path="ImmunizationRecommendation.subject", description="")
public static final String SP_SUBJECT = "subject";
/**
@@ -103,6 +105,7 @@ public class ImmunizationRecommendation extends BaseResource implements IResourc
* Path: ImmunizationRecommendation.recommendation.vaccineType
*
*/
+ @SearchParamDefinition(name="vaccine-type", path="ImmunizationRecommendation.recommendation.vaccineType", description="")
public static final String SP_VACCINE_TYPE = "vaccine-type";
/**
@@ -113,6 +116,7 @@ public class ImmunizationRecommendation extends BaseResource implements IResourc
* Path: ImmunizationRecommendation.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="ImmunizationRecommendation.identifier", description="")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -123,6 +127,7 @@ public class ImmunizationRecommendation extends BaseResource implements IResourc
* Path: ImmunizationRecommendation.recommendation.date
*
*/
+ @SearchParamDefinition(name="date", path="ImmunizationRecommendation.recommendation.date", description="")
public static final String SP_DATE = "date";
/**
@@ -133,6 +138,7 @@ public class ImmunizationRecommendation extends BaseResource implements IResourc
* Path: ImmunizationRecommendation.recommendation.doseNumber
*
*/
+ @SearchParamDefinition(name="dose-number", path="ImmunizationRecommendation.recommendation.doseNumber", description="")
public static final String SP_DOSE_NUMBER = "dose-number";
/**
@@ -143,6 +149,7 @@ public class ImmunizationRecommendation extends BaseResource implements IResourc
* Path: ImmunizationRecommendation.recommendation.forecastStatus
*
*/
+ @SearchParamDefinition(name="status", path="ImmunizationRecommendation.recommendation.forecastStatus", description="")
public static final String SP_STATUS = "status";
/**
@@ -153,6 +160,7 @@ public class ImmunizationRecommendation extends BaseResource implements IResourc
* Path: ImmunizationRecommendation.recommendation.protocol.doseSequence
*
*/
+ @SearchParamDefinition(name="dose-sequence", path="ImmunizationRecommendation.recommendation.protocol.doseSequence", description="")
public static final String SP_DOSE_SEQUENCE = "dose-sequence";
/**
@@ -163,6 +171,7 @@ public class ImmunizationRecommendation extends BaseResource implements IResourc
* Path: ImmunizationRecommendation.recommendation.supportingImmunization
*
*/
+ @SearchParamDefinition(name="support", path="ImmunizationRecommendation.recommendation.supportingImmunization", description="")
public static final String SP_SUPPORT = "support";
/**
@@ -173,6 +182,7 @@ public class ImmunizationRecommendation extends BaseResource implements IResourc
* Path: ImmunizationRecommendation.recommendation.supportingPatientInformation
*
*/
+ @SearchParamDefinition(name="information", path="ImmunizationRecommendation.recommendation.supportingPatientInformation", description="")
public static final String SP_INFORMATION = "information";
@@ -409,7 +419,7 @@ public class ImmunizationRecommendation extends BaseResource implements IResourc
* Vaccine administration recommendations
*
*/
- @Block(name="ImmunizationRecommendation.recommendation")
+ @Block()
public static class Recommendation extends BaseElement implements IResourceBlock {
@Child(name="date", type=DateTimeDt.class, order=0, min=1, max=1)
@@ -849,7 +859,7 @@ public class ImmunizationRecommendation extends BaseResource implements IResourc
* Vaccine date recommendations - e.g. earliest date to administer, latest date to administer, etc.
*
*/
- @Block(name="ImmunizationRecommendation.recommendation.dateCriterion")
+ @Block()
public static class RecommendationDateCriterion extends BaseElement implements IResourceBlock {
@Child(name="code", type=CodeableConceptDt.class, order=0, min=1, max=1)
@@ -995,7 +1005,7 @@ public class ImmunizationRecommendation extends BaseResource implements IResourc
* Contains information about the protocol under which the vaccine was administered
*
*/
- @Block(name="ImmunizationRecommendation.recommendation.protocol")
+ @Block()
public static class RecommendationProtocol extends BaseElement implements IResourceBlock {
@Child(name="doseSequence", type=IntegerDt.class, order=0, min=0, max=1)
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 749871425a9..cf06277ed04 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
@@ -50,6 +50,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
@@ -92,6 +93,7 @@ public class ListResource extends BaseResource implements IResource {
* Path: List.source
*
*/
+ @SearchParamDefinition(name="source", path="List.source", description="")
public static final String SP_SOURCE = "source";
/**
@@ -102,6 +104,7 @@ public class ListResource extends BaseResource implements IResource {
* Path: List.entry.item
*
*/
+ @SearchParamDefinition(name="item", path="List.entry.item", description="")
public static final String SP_ITEM = "item";
/**
@@ -112,6 +115,7 @@ public class ListResource extends BaseResource implements IResource {
* Path: List.emptyReason
*
*/
+ @SearchParamDefinition(name="empty-reason", path="List.emptyReason", description="")
public static final String SP_EMPTY_REASON = "empty-reason";
/**
@@ -122,6 +126,7 @@ public class ListResource extends BaseResource implements IResource {
* Path: List.date
*
*/
+ @SearchParamDefinition(name="date", path="List.date", description="")
public static final String SP_DATE = "date";
/**
@@ -132,6 +137,7 @@ public class ListResource extends BaseResource implements IResource {
* Path: List.code
*
*/
+ @SearchParamDefinition(name="code", path="List.code", description="")
public static final String SP_CODE = "code";
/**
@@ -142,6 +148,7 @@ public class ListResource extends BaseResource implements IResource {
* Path: List.subject
*
*/
+ @SearchParamDefinition(name="subject", path="List.subject", description="")
public static final String SP_SUBJECT = "subject";
@@ -653,7 +660,7 @@ public class ListResource extends BaseResource implements IResource {
* Entries in this list
*
*/
- @Block(name="List.entry")
+ @Block()
public static class Entry extends BaseElement implements IResourceBlock {
@Child(name="flag", type=CodeableConceptDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
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 334a494a545..b11db5f954e 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
@@ -48,6 +48,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.AddressDt;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.ContactDt;
@@ -95,6 +96,7 @@ public class Location extends BaseResource implements IResource {
* Path: Location.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="Location.identifier", description="")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -105,6 +107,7 @@ public class Location extends BaseResource implements IResource {
* Path: Location.name
*
*/
+ @SearchParamDefinition(name="name", path="Location.name", description="A (portion of the) name of the location")
public static final String SP_NAME = "name";
/**
@@ -115,6 +118,7 @@ public class Location extends BaseResource implements IResource {
* Path: Location.type
*
*/
+ @SearchParamDefinition(name="type", path="Location.type", description="A code for the type of location")
public static final String SP_TYPE = "type";
/**
@@ -125,6 +129,7 @@ public class Location extends BaseResource implements IResource {
* Path: Location.address
*
*/
+ @SearchParamDefinition(name="address", path="Location.address", description="A (part of the) address of the location")
public static final String SP_ADDRESS = "address";
/**
@@ -135,6 +140,7 @@ public class Location extends BaseResource implements IResource {
* Path: Location.status
*
*/
+ @SearchParamDefinition(name="status", path="Location.status", description="Searches for locations with a specific kind of status")
public static final String SP_STATUS = "status";
/**
@@ -145,6 +151,7 @@ public class Location extends BaseResource implements IResource {
* Path: Location.partOf
*
*/
+ @SearchParamDefinition(name="partof", path="Location.partOf", description="The location of which this location is a part")
public static final String SP_PARTOF = "partof";
/**
@@ -155,6 +162,7 @@ public class Location extends BaseResource implements IResource {
* Path:
*
*/
+ @SearchParamDefinition(name="near", path="", description="The coordinates expressed as [lat],[long] (using KML, see notes) to find locations near to (servers may search using a square rather than a circle for efficiency)")
public static final String SP_NEAR = "near";
/**
@@ -165,6 +173,7 @@ public class Location extends BaseResource implements IResource {
* Path:
*
*/
+ @SearchParamDefinition(name="near-distance", path="", description="A distance quantity to limit the near search to locations within a specific distance")
public static final String SP_NEAR_DISTANCE = "near-distance";
@@ -770,7 +779,7 @@ public class Location extends BaseResource implements IResource {
* The absolute geographic location of the Location, expressed in a KML compatible manner (see notes below for KML)
*
*/
- @Block(name="Location.position")
+ @Block()
public static class Position extends BaseElement implements IResourceBlock {
@Child(name="longitude", type=DecimalDt.class, order=0, min=1, max=1)
@@ -846,6 +855,19 @@ public class Location extends BaseResource implements IResource {
*
* Definition:
* Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below)
+ *
+ */
+ public Position setLongitude( long theValue) {
+ myLongitude = new DecimalDt(theValue);
+ return this;
+ }
+
+ /**
+ * Sets the value for longitude (Longitude as expressed in KML)
+ *
+ *
+ * Definition:
+ * Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below)
*
*/
public Position setLongitude( double theValue) {
@@ -866,19 +888,6 @@ public class Location extends BaseResource implements IResource {
return this;
}
- /**
- * Sets the value for longitude (Longitude as expressed in KML)
- *
- *
- * Definition:
- * Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below)
- *
- */
- public Position setLongitude( long theValue) {
- myLongitude = new DecimalDt(theValue);
- return this;
- }
-
/**
* Gets the value(s) for latitude (Latitude as expressed in KML).
@@ -916,6 +925,19 @@ public class Location extends BaseResource implements IResource {
*
* Definition:
* Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below)
+ *
+ */
+ public Position setLatitude( long theValue) {
+ myLatitude = new DecimalDt(theValue);
+ return this;
+ }
+
+ /**
+ * Sets the value for latitude (Latitude as expressed in KML)
+ *
+ *
+ * Definition:
+ * Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below)
*
*/
public Position setLatitude( double theValue) {
@@ -936,19 +958,6 @@ public class Location extends BaseResource implements IResource {
return this;
}
- /**
- * Sets the value for latitude (Latitude as expressed in KML)
- *
- *
- * Definition:
- * Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below)
- *
- */
- public Position setLatitude( long theValue) {
- myLatitude = new DecimalDt(theValue);
- return this;
- }
-
/**
* Gets the value(s) for altitude (Altitude as expressed in KML).
@@ -986,6 +995,19 @@ public class Location extends BaseResource implements IResource {
*
* Definition:
* Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below)
+ *
+ */
+ public Position setAltitude( long theValue) {
+ myAltitude = new DecimalDt(theValue);
+ return this;
+ }
+
+ /**
+ * Sets the value for altitude (Altitude as expressed in KML)
+ *
+ *
+ * Definition:
+ * Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below)
*
*/
public Position setAltitude( double theValue) {
@@ -1006,19 +1028,6 @@ public class Location extends BaseResource implements IResource {
return this;
}
- /**
- * Sets the value for altitude (Altitude as expressed in KML)
- *
- *
- * Definition:
- * Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below)
- *
- */
- public Position setAltitude( long theValue) {
- myAltitude = new DecimalDt(theValue);
- return this;
- }
-
}
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 440ab8b650a..f8f310a0983 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
@@ -47,6 +47,7 @@ import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.AttachmentDt;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
@@ -91,6 +92,7 @@ public class Media extends BaseResource implements IResource {
* Path: Media.type
*
*/
+ @SearchParamDefinition(name="type", path="Media.type", description="")
public static final String SP_TYPE = "type";
/**
@@ -101,6 +103,7 @@ public class Media extends BaseResource implements IResource {
* Path: Media.subtype
*
*/
+ @SearchParamDefinition(name="subtype", path="Media.subtype", description="")
public static final String SP_SUBTYPE = "subtype";
/**
@@ -111,6 +114,7 @@ public class Media extends BaseResource implements IResource {
* Path: Media.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="Media.identifier", description="")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -121,6 +125,7 @@ public class Media extends BaseResource implements IResource {
* Path: Media.dateTime
*
*/
+ @SearchParamDefinition(name="date", path="Media.dateTime", description="")
public static final String SP_DATE = "date";
/**
@@ -131,6 +136,7 @@ public class Media extends BaseResource implements IResource {
* Path: Media.subject
*
*/
+ @SearchParamDefinition(name="subject", path="Media.subject", description="")
public static final String SP_SUBJECT = "subject";
/**
@@ -141,6 +147,7 @@ public class Media extends BaseResource implements IResource {
* Path: Media.operator
*
*/
+ @SearchParamDefinition(name="operator", path="Media.operator", description="")
public static final String SP_OPERATOR = "operator";
/**
@@ -151,6 +158,7 @@ public class Media extends BaseResource implements IResource {
* Path: Media.view
*
*/
+ @SearchParamDefinition(name="view", path="Media.view", description="")
public static final String SP_VIEW = "view";
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 efc789ec806..7cbb3920382 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
@@ -48,6 +48,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.RatioDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
@@ -89,6 +90,7 @@ public class Medication extends BaseResource implements IResource {
* Path: Medication.code
*
*/
+ @SearchParamDefinition(name="code", path="Medication.code", description="")
public static final String SP_CODE = "code";
/**
@@ -99,6 +101,7 @@ public class Medication extends BaseResource implements IResource {
* Path: Medication.name
*
*/
+ @SearchParamDefinition(name="name", path="Medication.name", description="")
public static final String SP_NAME = "name";
/**
@@ -109,6 +112,7 @@ public class Medication extends BaseResource implements IResource {
* Path: Medication.manufacturer
*
*/
+ @SearchParamDefinition(name="manufacturer", path="Medication.manufacturer", description="")
public static final String SP_MANUFACTURER = "manufacturer";
/**
@@ -119,6 +123,7 @@ public class Medication extends BaseResource implements IResource {
* Path: Medication.product.form
*
*/
+ @SearchParamDefinition(name="form", path="Medication.product.form", description="")
public static final String SP_FORM = "form";
/**
@@ -129,6 +134,7 @@ public class Medication extends BaseResource implements IResource {
* Path: Medication.product.ingredient.item
*
*/
+ @SearchParamDefinition(name="ingredient", path="Medication.product.ingredient.item", description="")
public static final String SP_INGREDIENT = "ingredient";
/**
@@ -139,6 +145,7 @@ public class Medication extends BaseResource implements IResource {
* Path: Medication.package.container
*
*/
+ @SearchParamDefinition(name="container", path="Medication.package.container", description="")
public static final String SP_CONTAINER = "container";
/**
@@ -149,6 +156,7 @@ public class Medication extends BaseResource implements IResource {
* Path: Medication.package.content.item
*
*/
+ @SearchParamDefinition(name="content", path="Medication.package.content.item", description="")
public static final String SP_CONTENT = "content";
@@ -495,7 +503,7 @@ public class Medication extends BaseResource implements IResource {
* Information that only applies to products (not packages)
*
*/
- @Block(name="Medication.product")
+ @Block()
public static class Product extends BaseElement implements IResourceBlock {
@Child(name="form", type=CodeableConceptDt.class, order=0, min=0, max=1)
@@ -630,7 +638,7 @@ public class Medication extends BaseResource implements IResource {
* Identifies a particular constituent of interest in the product
*
*/
- @Block(name="Medication.product.ingredient")
+ @Block()
public static class ProductIngredient extends BaseElement implements IResourceBlock {
@Child(name="item", order=0, min=1, max=1, type={
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 4a4970d7bf7..798aeac42c9 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
@@ -49,6 +49,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.PeriodDt;
@@ -95,6 +96,7 @@ public class MedicationAdministration extends BaseResource implements IResource
* Path: MedicationAdministration.device
*
*/
+ @SearchParamDefinition(name="device", path="MedicationAdministration.device", description="Return administrations with this administration device identity")
public static final String SP_DEVICE = "device";
/**
@@ -105,6 +107,7 @@ public class MedicationAdministration extends BaseResource implements IResource
* Path: MedicationAdministration.encounter
*
*/
+ @SearchParamDefinition(name="encounter", path="MedicationAdministration.encounter", description="Return administrations that share this encounter")
public static final String SP_ENCOUNTER = "encounter";
/**
@@ -115,6 +118,7 @@ public class MedicationAdministration extends BaseResource implements IResource
* Path: MedicationAdministration.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="MedicationAdministration.identifier", description="Return administrations with this external identity")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -125,6 +129,7 @@ public class MedicationAdministration extends BaseResource implements IResource
* Path: MedicationAdministration.medication
*
*/
+ @SearchParamDefinition(name="medication", path="MedicationAdministration.medication", description="Return administrations of this medication")
public static final String SP_MEDICATION = "medication";
/**
@@ -135,6 +140,7 @@ public class MedicationAdministration extends BaseResource implements IResource
* Path: MedicationAdministration.wasNotGiven
*
*/
+ @SearchParamDefinition(name="notgiven", path="MedicationAdministration.wasNotGiven", description="Administrations that were not made")
public static final String SP_NOTGIVEN = "notgiven";
/**
@@ -145,6 +151,7 @@ public class MedicationAdministration extends BaseResource implements IResource
* Path: MedicationAdministration.patient
*
*/
+ @SearchParamDefinition(name="patient", path="MedicationAdministration.patient", description="The identity of a patient to list administrations for")
public static final String SP_PATIENT = "patient";
/**
@@ -155,6 +162,7 @@ public class MedicationAdministration extends BaseResource implements IResource
* Path: MedicationAdministration.prescription
*
*/
+ @SearchParamDefinition(name="prescription", path="MedicationAdministration.prescription", description="The identity of a prescription to list administrations from")
public static final String SP_PRESCRIPTION = "prescription";
/**
@@ -165,6 +173,7 @@ public class MedicationAdministration extends BaseResource implements IResource
* Path: MedicationAdministration.status
*
*/
+ @SearchParamDefinition(name="status", path="MedicationAdministration.status", description="MedicationAdministration event status (for example one of active/paused/completed/nullified)")
public static final String SP_STATUS = "status";
/**
@@ -175,6 +184,7 @@ public class MedicationAdministration extends BaseResource implements IResource
* Path: MedicationAdministration.whenGiven
*
*/
+ @SearchParamDefinition(name="whengiven", path="MedicationAdministration.whenGiven", description="Date of administration")
public static final String SP_WHENGIVEN = "whengiven";
@@ -826,7 +836,7 @@ public class MedicationAdministration extends BaseResource implements IResource
* Provides details of how much of the medication was administered
*
*/
- @Block(name="MedicationAdministration.dosage")
+ @Block()
public static class Dosage extends BaseElement implements IResourceBlock {
@Child(name="timing", order=0, min=0, max=1, type={
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 4cd79636041..2528d717343 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
@@ -51,6 +51,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.PeriodDt;
@@ -98,6 +99,7 @@ public class MedicationDispense extends BaseResource implements IResource {
* Path: MedicationDispense.dispense.destination
*
*/
+ @SearchParamDefinition(name="destination", path="MedicationDispense.dispense.destination", description="Return dispenses that should be sent to a secific destination")
public static final String SP_DESTINATION = "destination";
/**
@@ -108,6 +110,7 @@ public class MedicationDispense extends BaseResource implements IResource {
* Path: MedicationDispense.dispenser
*
*/
+ @SearchParamDefinition(name="dispenser", path="MedicationDispense.dispenser", description="Return all dispenses performed by a specific indiividual")
public static final String SP_DISPENSER = "dispenser";
/**
@@ -118,6 +121,7 @@ public class MedicationDispense extends BaseResource implements IResource {
* Path: MedicationDispense.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="MedicationDispense.identifier", description="Return dispenses with this external identity")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -128,6 +132,7 @@ public class MedicationDispense extends BaseResource implements IResource {
* Path: MedicationDispense.dispense.medication
*
*/
+ @SearchParamDefinition(name="medication", path="MedicationDispense.dispense.medication", description="Returns dispenses of this medicine")
public static final String SP_MEDICATION = "medication";
/**
@@ -138,6 +143,7 @@ public class MedicationDispense extends BaseResource implements IResource {
* Path: MedicationDispense.patient
*
*/
+ @SearchParamDefinition(name="patient", path="MedicationDispense.patient", description="The identity of a patient to list dispenses for")
public static final String SP_PATIENT = "patient";
/**
@@ -148,6 +154,7 @@ public class MedicationDispense extends BaseResource implements IResource {
* Path: MedicationDispense.authorizingPrescription
*
*/
+ @SearchParamDefinition(name="prescription", path="MedicationDispense.authorizingPrescription", description="The identity of a prescription to list dispenses from")
public static final String SP_PRESCRIPTION = "prescription";
/**
@@ -158,6 +165,7 @@ public class MedicationDispense extends BaseResource implements IResource {
* Path: MedicationDispense.substitution.responsibleParty
*
*/
+ @SearchParamDefinition(name="responsibleparty", path="MedicationDispense.substitution.responsibleParty", description="Return all dispenses with the specified responsible party")
public static final String SP_RESPONSIBLEPARTY = "responsibleparty";
/**
@@ -168,6 +176,7 @@ public class MedicationDispense extends BaseResource implements IResource {
* Path: MedicationDispense.dispense.status
*
*/
+ @SearchParamDefinition(name="status", path="MedicationDispense.dispense.status", description="Status of the dispense")
public static final String SP_STATUS = "status";
/**
@@ -178,6 +187,7 @@ public class MedicationDispense extends BaseResource implements IResource {
* Path: MedicationDispense.dispense.type
*
*/
+ @SearchParamDefinition(name="type", path="MedicationDispense.dispense.type", description="Return all dispenses of a specific type")
public static final String SP_TYPE = "type";
/**
@@ -188,6 +198,7 @@ public class MedicationDispense extends BaseResource implements IResource {
* Path: MedicationDispense.dispense.whenHandedOver
*
*/
+ @SearchParamDefinition(name="whenhandedover", path="MedicationDispense.dispense.whenHandedOver", description="Date when medication handed over to patient (outpatient setting), or supplied to ward or clinic (inpatient setting)")
public static final String SP_WHENHANDEDOVER = "whenhandedover";
/**
@@ -198,6 +209,7 @@ public class MedicationDispense extends BaseResource implements IResource {
* Path: MedicationDispense.dispense.whenPrepared
*
*/
+ @SearchParamDefinition(name="whenprepared", path="MedicationDispense.dispense.whenPrepared", description="Date when medication prepared")
public static final String SP_WHENPREPARED = "whenprepared";
@@ -575,7 +587,7 @@ public class MedicationDispense extends BaseResource implements IResource {
* Indicates the details of the dispense event such as the days supply and quantity of medication dispensed.
*
*/
- @Block(name="MedicationDispense.dispense")
+ @Block()
public static class Dispense extends BaseElement implements IResourceBlock {
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=1)
@@ -1170,7 +1182,7 @@ public class MedicationDispense extends BaseResource implements IResource {
* Indicates how the medication is to be used by the patient
*
*/
- @Block(name="MedicationDispense.dispense.dosage")
+ @Block()
public static class DispenseDosage extends BaseElement implements IResourceBlock {
@Child(name="additionalInstructions", type=CodeableConceptDt.class, order=0, min=0, max=1)
@@ -1592,7 +1604,7 @@ public class MedicationDispense extends BaseResource implements IResource {
* Indicates whether or not substitution was made as part of the dispense. In some cases substitution will be expected but doesn't happen, in other cases substitution is not expected but does happen. This block explains what substitition did or did not happen and why.
*
*/
- @Block(name="MedicationDispense.substitution")
+ @Block()
public static class Substitution extends BaseElement implements IResourceBlock {
@Child(name="type", type=CodeableConceptDt.class, order=0, min=1, max=1)
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 8abd3c4a0e7..50afa4480ae 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
@@ -51,6 +51,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.DurationDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
@@ -101,6 +102,7 @@ public class MedicationPrescription extends BaseResource implements IResource {
* Path: MedicationPrescription.dateWritten
*
*/
+ @SearchParamDefinition(name="datewritten", path="MedicationPrescription.dateWritten", description="Return prescriptions written on this date")
public static final String SP_DATEWRITTEN = "datewritten";
/**
@@ -111,6 +113,7 @@ public class MedicationPrescription extends BaseResource implements IResource {
* Path: MedicationPrescription.encounter
*
*/
+ @SearchParamDefinition(name="encounter", path="MedicationPrescription.encounter", description="Return prescriptions with this encounter identity")
public static final String SP_ENCOUNTER = "encounter";
/**
@@ -121,6 +124,7 @@ public class MedicationPrescription extends BaseResource implements IResource {
* Path: MedicationPrescription.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="MedicationPrescription.identifier", description="Return prescriptions with this external identity")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -131,6 +135,7 @@ public class MedicationPrescription extends BaseResource implements IResource {
* Path: MedicationPrescription.medication
*
*/
+ @SearchParamDefinition(name="medication", path="MedicationPrescription.medication", description="Code for medicine or text in medicine name")
public static final String SP_MEDICATION = "medication";
/**
@@ -141,6 +146,7 @@ public class MedicationPrescription extends BaseResource implements IResource {
* Path: MedicationPrescription.patient
*
*/
+ @SearchParamDefinition(name="patient", path="MedicationPrescription.patient", description="The identity of a patient to list dispenses for")
public static final String SP_PATIENT = "patient";
/**
@@ -151,6 +157,7 @@ public class MedicationPrescription extends BaseResource implements IResource {
* Path: MedicationPrescription.status
*
*/
+ @SearchParamDefinition(name="status", path="MedicationPrescription.status", description="Status of the prescription")
public static final String SP_STATUS = "status";
@@ -731,7 +738,7 @@ public class MedicationPrescription extends BaseResource implements IResource {
* Indicates how the medication is to be used by the patient
*
*/
- @Block(name="MedicationPrescription.dosageInstruction")
+ @Block()
public static class DosageInstruction extends BaseElement implements IResourceBlock {
@Child(name="text", type=StringDt.class, order=0, min=0, max=1)
@@ -1203,7 +1210,7 @@ public class MedicationPrescription extends BaseResource implements IResource {
* Deals with details of the dispense part of the order
*
*/
- @Block(name="MedicationPrescription.dispense")
+ @Block()
public static class Dispense extends BaseElement implements IResourceBlock {
@Child(name="medication", order=0, min=0, max=1, type={
@@ -1490,7 +1497,7 @@ public class MedicationPrescription extends BaseResource implements IResource {
* Indicates whether or not substitution can or should be part of the dispense. In some cases substitution must happen, in other cases substitution must not happen, and in others it does not matter. This block explains the prescriber's intent. If nothing is specified substitution may be done.
*
*/
- @Block(name="MedicationPrescription.substitution")
+ @Block()
public static class Substitution extends BaseElement implements IResourceBlock {
@Child(name="type", type=CodeableConceptDt.class, order=0, min=1, max=1)
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 274d68b34a4..0079725a30d 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
@@ -49,6 +49,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.PeriodDt;
@@ -92,6 +93,7 @@ public class MedicationStatement extends BaseResource implements IResource {
* Path: MedicationStatement.device
*
*/
+ @SearchParamDefinition(name="device", path="MedicationStatement.device", description="Return administrations with this administration device identity")
public static final String SP_DEVICE = "device";
/**
@@ -102,6 +104,7 @@ public class MedicationStatement extends BaseResource implements IResource {
* Path: MedicationStatement.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="MedicationStatement.identifier", description="Return administrations with this external identity")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -112,6 +115,7 @@ public class MedicationStatement extends BaseResource implements IResource {
* Path: MedicationStatement.medication
*
*/
+ @SearchParamDefinition(name="medication", path="MedicationStatement.medication", description="Code for medicine or text in medicine name")
public static final String SP_MEDICATION = "medication";
/**
@@ -122,6 +126,7 @@ public class MedicationStatement extends BaseResource implements IResource {
* Path: MedicationStatement.patient
*
*/
+ @SearchParamDefinition(name="patient", path="MedicationStatement.patient", description="The identity of a patient to list administrations for")
public static final String SP_PATIENT = "patient";
/**
@@ -132,6 +137,7 @@ public class MedicationStatement extends BaseResource implements IResource {
* Path: MedicationStatement.whenGiven
*
*/
+ @SearchParamDefinition(name="when-given", path="MedicationStatement.whenGiven", description="Date of administration")
public static final String SP_WHEN_GIVEN = "when-given";
@@ -615,7 +621,7 @@ public class MedicationStatement extends BaseResource implements IResource {
* Indicates how the medication is/was used by the patient
*
*/
- @Block(name="MedicationStatement.dosage")
+ @Block()
public static class Dosage extends BaseElement implements IResourceBlock {
@Child(name="timing", type=ScheduleDt.class, order=0, min=0, max=1)
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 1e84fb49243..5c4f7dc7a76 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
@@ -274,8 +274,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;
}
@@ -287,8 +287,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;
}
@@ -647,7 +647,7 @@ public class MessageHeader extends BaseResource implements IResource {
* Information about the message that this message is a response to. Only present if this message is a response.
*
*/
- @Block(name="MessageHeader.response")
+ @Block()
public static class Response extends BaseElement implements IResourceBlock {
@Child(name="identifier", type=IdDt.class, order=0, min=1, max=1)
@@ -819,7 +819,7 @@ public class MessageHeader extends BaseResource implements IResource {
* The source application from which this message originated
*
*/
- @Block(name="MessageHeader.source")
+ @Block()
public static class Source extends BaseElement implements IResourceBlock {
@Child(name="name", type=StringDt.class, order=0, min=0, max=1)
@@ -1092,7 +1092,7 @@ public class MessageHeader extends BaseResource implements IResource {
* The destination application which the message is intended for
*
*/
- @Block(name="MessageHeader.destination")
+ @Block()
public static class Destination extends BaseElement implements IResourceBlock {
@Child(name="name", type=StringDt.class, order=0, min=0, max=1)
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 483f1833b8e..94ba230bca1 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
@@ -50,6 +50,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.primitive.BooleanDt;
@@ -90,6 +91,7 @@ public class Microarray extends BaseResource implements IResource {
* Path: Microarray.subject.patient
*
*/
+ @SearchParamDefinition(name="patient", path="Microarray.subject.patient", description="Patient described by the microarray")
public static final String SP_PATIENT = "patient";
/**
@@ -100,6 +102,7 @@ public class Microarray extends BaseResource implements IResource {
* Path: Microarray.sample.gene.identity
*
*/
+ @SearchParamDefinition(name="gene", path="Microarray.sample.gene.identity", description="Gene studied in the microarray")
public static final String SP_GENE = "gene";
/**
@@ -110,6 +113,7 @@ public class Microarray extends BaseResource implements IResource {
* Path: Microarray.sample.gene.coordinate
*
*/
+ @SearchParamDefinition(name="coordinate", path="Microarray.sample.gene.coordinate", description="Coordinate of the gene")
public static final String SP_COORDINATE = "coordinate";
@@ -412,7 +416,7 @@ public class Microarray extends BaseResource implements IResource {
* Subject of the microarray
*
*/
- @Block(name="Microarray.subject")
+ @Block()
public static class Subject extends BaseElement implements IResourceBlock {
@Child(name="patient", order=0, min=0, max=1, type={
@@ -567,7 +571,7 @@ public class Microarray extends BaseResource implements IResource {
* Scanner used in the microarray
*
*/
- @Block(name="Microarray.scanner")
+ @Block()
public static class Scanner extends BaseElement implements IResourceBlock {
@Child(name="manufacturer", order=0, min=0, max=1, type={
@@ -739,7 +743,7 @@ public class Microarray extends BaseResource implements IResource {
* Sample of a grid on the chip
*
*/
- @Block(name="Microarray.sample")
+ @Block()
public static class Sample extends BaseElement implements IResourceBlock {
@Child(name="identity", type=StringDt.class, order=0, min=1, max=1)
@@ -973,6 +977,19 @@ public class Microarray extends BaseResource implements IResource {
*
* Definition:
* Intensity(expression) of the gene
+ *
+ */
+ public Sample setIntensity( long theValue) {
+ myIntensity = new DecimalDt(theValue);
+ return this;
+ }
+
+ /**
+ * Sets the value for intensity (Intensity)
+ *
+ *
+ * Definition:
+ * Intensity(expression) of the gene
*
*/
public Sample setIntensity( double theValue) {
@@ -993,19 +1010,6 @@ public class Microarray extends BaseResource implements IResource {
return this;
}
- /**
- * Sets the value for intensity (Intensity)
- *
- *
- * Definition:
- * Intensity(expression) of the gene
- *
- */
- public Sample setIntensity( long theValue) {
- myIntensity = new DecimalDt(theValue);
- return this;
- }
-
/**
* Gets the value(s) for isControl (Control).
@@ -1062,7 +1066,7 @@ public class Microarray extends BaseResource implements IResource {
* Specimen used on the grid
*
*/
- @Block(name="Microarray.sample.specimen")
+ @Block()
public static class SampleSpecimen extends BaseElement implements IResourceBlock {
@Child(name="type", type=StringDt.class, order=0, min=1, max=1)
@@ -1182,7 +1186,7 @@ public class Microarray extends BaseResource implements IResource {
* Gene of study
*
*/
- @Block(name="Microarray.sample.gene")
+ @Block()
public static class SampleGene extends BaseElement implements IResourceBlock {
@Child(name="identity", type=StringDt.class, order=0, min=0, max=1)
@@ -1301,7 +1305,7 @@ public class Microarray extends BaseResource implements IResource {
* Coordinate of the gene
*
*/
- @Block(name="Microarray.sample.gene.coordinate")
+ @Block()
public static class SampleGeneCoordinate extends BaseElement implements IResourceBlock {
@Child(name="chromosome", type=StringDt.class, order=0, min=1, max=1)
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 c7343bd2d20..1d720e91001 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
@@ -51,6 +51,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.AttachmentDt;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
@@ -105,6 +106,7 @@ public class Observation extends BaseResource implements IResource {
* Path: Observation.name
*
*/
+ @SearchParamDefinition(name="name", path="Observation.name", description="The name of the observation type")
public static final String SP_NAME = "name";
/**
@@ -115,6 +117,7 @@ public class Observation extends BaseResource implements IResource {
* Path: Observation.value[x]
*
*/
+ @SearchParamDefinition(name="value-quantity", path="Observation.value[x]", description="The value of the observation, if the value is a Quantity, or a SampledData (just search on the bounds of the values in sampled data)")
public static final String SP_VALUE_QUANTITY = "value-quantity";
/**
@@ -125,6 +128,7 @@ public class Observation extends BaseResource implements IResource {
* Path: Observation.value[x]
*
*/
+ @SearchParamDefinition(name="value-concept", path="Observation.value[x]", description="The value of the observation, if the value is a CodeableConcept")
public static final String SP_VALUE_CONCEPT = "value-concept";
/**
@@ -135,6 +139,7 @@ public class Observation extends BaseResource implements IResource {
* Path: Observation.value[x]
*
*/
+ @SearchParamDefinition(name="value-date", path="Observation.value[x]", description="The value of the observation, if the value is a Period")
public static final String SP_VALUE_DATE = "value-date";
/**
@@ -145,6 +150,7 @@ public class Observation extends BaseResource implements IResource {
* Path: Observation.value[x]
*
*/
+ @SearchParamDefinition(name="value-string", path="Observation.value[x]", description="The value of the observation, if the value is a string, and also searches in CodeableConcept.text")
public static final String SP_VALUE_STRING = "value-string";
/**
@@ -155,6 +161,7 @@ public class Observation extends BaseResource implements IResource {
* Path: name & value-[x]
*
*/
+ @SearchParamDefinition(name="name-value-[x]", path="name & value-[x]", description="Both name and one of the value parameters")
public static final String SP_NAME_VALUE_X = "name-value-[x]";
/**
@@ -165,6 +172,7 @@ public class Observation extends BaseResource implements IResource {
* Path: Observation.applies[x]
*
*/
+ @SearchParamDefinition(name="date", path="Observation.applies[x]", description="Obtained date/time. If the obtained element is a period, a date that falls in the period")
public static final String SP_DATE = "date";
/**
@@ -175,6 +183,7 @@ public class Observation extends BaseResource implements IResource {
* Path: Observation.status
*
*/
+ @SearchParamDefinition(name="status", path="Observation.status", description="The status of the observation")
public static final String SP_STATUS = "status";
/**
@@ -185,6 +194,7 @@ public class Observation extends BaseResource implements IResource {
* Path: Observation.reliability
*
*/
+ @SearchParamDefinition(name="reliability", path="Observation.reliability", description="The reliability of the observation")
public static final String SP_RELIABILITY = "reliability";
/**
@@ -195,6 +205,7 @@ public class Observation extends BaseResource implements IResource {
* Path: Observation.subject
*
*/
+ @SearchParamDefinition(name="subject", path="Observation.subject", description="The subject that the observation is about")
public static final String SP_SUBJECT = "subject";
/**
@@ -205,6 +216,7 @@ public class Observation extends BaseResource implements IResource {
* Path: Observation.performer
*
*/
+ @SearchParamDefinition(name="performer", path="Observation.performer", description="Who and/or what performed the observation")
public static final String SP_PERFORMER = "performer";
/**
@@ -215,6 +227,7 @@ public class Observation extends BaseResource implements IResource {
* Path: Observation.specimen
*
*/
+ @SearchParamDefinition(name="specimen", path="Observation.specimen", description="")
public static final String SP_SPECIMEN = "specimen";
/**
@@ -225,6 +238,7 @@ public class Observation extends BaseResource implements IResource {
* Path: Observation.related.type
*
*/
+ @SearchParamDefinition(name="related-type", path="Observation.related.type", description="")
public static final String SP_RELATED_TYPE = "related-type";
/**
@@ -235,6 +249,7 @@ public class Observation extends BaseResource implements IResource {
* Path: Observation.related.target
*
*/
+ @SearchParamDefinition(name="related-target", path="Observation.related.target", description="")
public static final String SP_RELATED_TARGET = "related-target";
/**
@@ -245,6 +260,7 @@ public class Observation extends BaseResource implements IResource {
* Path: related-target & related-type
*
*/
+ @SearchParamDefinition(name="related", path="related-target & related-type", description="Related Observations - search on related-type and related-target together")
public static final String SP_RELATED = "related";
@@ -594,8 +610,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;
}
@@ -607,8 +623,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;
}
@@ -1048,7 +1064,7 @@ public class Observation extends BaseResource implements IResource {
* Guidance on how to interpret the value by comparison to a normal or recommended range
*
*/
- @Block(name="Observation.referenceRange")
+ @Block()
public static class ReferenceRange extends BaseElement implements IResourceBlock {
@Child(name="low", type=QuantityDt.class, order=0, min=0, max=1)
@@ -1335,7 +1351,7 @@ public class Observation extends BaseResource implements IResource {
* Related observations - either components, or previous observations, or statements of derivation
*
*/
- @Block(name="Observation.related")
+ @Block()
public static class Related extends BaseElement implements IResourceBlock {
@Child(name="type", type=CodeDt.class, order=0, min=0, max=1)
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 90077fcdc99..825df1f729a 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
@@ -170,7 +170,7 @@ public class OperationOutcome extends BaseResource implements IResource {
* An error, warning or information message that results from a system action
*
*/
- @Block(name="OperationOutcome.issue")
+ @Block()
public static class Issue extends BaseElement implements IResourceBlock {
@Child(name="severity", type=CodeDt.class, order=0, min=1, max=1)
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 969e642c114..6877366137d 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
@@ -51,6 +51,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
@@ -90,6 +91,7 @@ public class Order extends BaseResource implements IResource {
* Path: Order.date
*
*/
+ @SearchParamDefinition(name="date", path="Order.date", description="")
public static final String SP_DATE = "date";
/**
@@ -100,6 +102,7 @@ public class Order extends BaseResource implements IResource {
* Path: Order.subject
*
*/
+ @SearchParamDefinition(name="subject", path="Order.subject", description="")
public static final String SP_SUBJECT = "subject";
/**
@@ -110,6 +113,7 @@ public class Order extends BaseResource implements IResource {
* Path: Order.source
*
*/
+ @SearchParamDefinition(name="source", path="Order.source", description="")
public static final String SP_SOURCE = "source";
/**
@@ -120,6 +124,7 @@ public class Order extends BaseResource implements IResource {
* Path: Order.target
*
*/
+ @SearchParamDefinition(name="target", path="Order.target", description="")
public static final String SP_TARGET = "target";
/**
@@ -130,6 +135,7 @@ public class Order extends BaseResource implements IResource {
* Path: Order.authority
*
*/
+ @SearchParamDefinition(name="authority", path="Order.authority", description="")
public static final String SP_AUTHORITY = "authority";
/**
@@ -140,6 +146,7 @@ public class Order extends BaseResource implements IResource {
* Path: Order.when.code
*
*/
+ @SearchParamDefinition(name="when_code", path="Order.when.code", description="")
public static final String SP_WHEN_CODE = "when_code";
/**
@@ -150,6 +157,7 @@ public class Order extends BaseResource implements IResource {
* Path: Order.when.schedule
*
*/
+ @SearchParamDefinition(name="when", path="Order.when.schedule", description="")
public static final String SP_WHEN = "when";
/**
@@ -160,6 +168,7 @@ public class Order extends BaseResource implements IResource {
* Path: Order.detail
*
*/
+ @SearchParamDefinition(name="detail", path="Order.detail", description="")
public static final String SP_DETAIL = "detail";
@@ -633,7 +642,7 @@ public class Order extends BaseResource implements IResource {
*
*
*/
- @Block(name="Order.when")
+ @Block()
public static class When extends BaseElement implements IResourceBlock {
@Child(name="code", type=CodeableConceptDt.class, order=0, min=0, max=1)
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 e20e920edd6..980198e997a 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
@@ -48,6 +48,7 @@ import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
@@ -90,6 +91,7 @@ public class OrderResponse extends BaseResource implements IResource {
* Path: OrderResponse.request
*
*/
+ @SearchParamDefinition(name="request", path="OrderResponse.request", description="")
public static final String SP_REQUEST = "request";
/**
@@ -100,6 +102,7 @@ public class OrderResponse extends BaseResource implements IResource {
* Path: OrderResponse.date
*
*/
+ @SearchParamDefinition(name="date", path="OrderResponse.date", description="")
public static final String SP_DATE = "date";
/**
@@ -110,6 +113,7 @@ public class OrderResponse extends BaseResource implements IResource {
* Path: OrderResponse.who
*
*/
+ @SearchParamDefinition(name="who", path="OrderResponse.who", description="")
public static final String SP_WHO = "who";
/**
@@ -120,6 +124,7 @@ public class OrderResponse extends BaseResource implements IResource {
* Path: OrderResponse.code
*
*/
+ @SearchParamDefinition(name="code", path="OrderResponse.code", description="")
public static final String SP_CODE = "code";
/**
@@ -130,6 +135,7 @@ public class OrderResponse extends BaseResource implements IResource {
* Path: OrderResponse.fulfillment
*
*/
+ @SearchParamDefinition(name="fulfillment", path="OrderResponse.fulfillment", description="")
public static final String SP_FULFILLMENT = "fulfillment";
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 c310addd9f9..0db6f3e5c6d 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
@@ -48,6 +48,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.AddressDt;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.ContactDt;
@@ -93,6 +94,7 @@ public class Organization extends BaseResource implements IResource {
* Path: Organization.name
*
*/
+ @SearchParamDefinition(name="name", path="Organization.name", description="A portion of the organization's name")
public static final String SP_NAME = "name";
/**
@@ -103,6 +105,7 @@ public class Organization extends BaseResource implements IResource {
* Path:
*
*/
+ @SearchParamDefinition(name="phonetic", path="", description="A portion of the organization's name using some kind of phonetic matching algorithm")
public static final String SP_PHONETIC = "phonetic";
/**
@@ -113,6 +116,7 @@ public class Organization extends BaseResource implements IResource {
* Path: Organization.type
*
*/
+ @SearchParamDefinition(name="type", path="Organization.type", description="A code for the type of organization")
public static final String SP_TYPE = "type";
/**
@@ -123,6 +127,7 @@ public class Organization extends BaseResource implements IResource {
* Path: Organization.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="Organization.identifier", description="Any identifier for the organization (not the accreditation issuer's identifier)")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -133,6 +138,7 @@ public class Organization extends BaseResource implements IResource {
* Path: Organization.accreditation.code
*
*/
+ @SearchParamDefinition(name="!accreditation", path="Organization.accreditation.code", description="Any accreditation code")
public static final String SP_ACCREDITATION = "!accreditation";
/**
@@ -143,6 +149,7 @@ public class Organization extends BaseResource implements IResource {
* Path: Organization.partOf
*
*/
+ @SearchParamDefinition(name="partof", path="Organization.partOf", description="Search all organizations that are part of the given organization")
public static final String SP_PARTOF = "partof";
/**
@@ -153,6 +160,7 @@ public class Organization extends BaseResource implements IResource {
* Path: Organization.active
*
*/
+ @SearchParamDefinition(name="active", path="Organization.active", description="Whether the organization's record is active")
public static final String SP_ACTIVE = "active";
@@ -728,7 +736,7 @@ public class Organization extends BaseResource implements IResource {
*
*
*/
- @Block(name="Organization.contact")
+ @Block()
public static class Contact extends BaseElement implements IResourceBlock {
@Child(name="purpose", type=CodeableConceptDt.class, order=0, min=0, max=1)
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 a45208146f7..f9913e550fe 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
@@ -47,6 +47,7 @@ import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
@@ -85,6 +86,7 @@ public class Other extends BaseResource implements IResource {
* Path: Other.subject
*
*/
+ @SearchParamDefinition(name="subject", path="Other.subject", description="")
public static final String SP_SUBJECT = "subject";
/**
@@ -95,6 +97,7 @@ public class Other extends BaseResource implements IResource {
* Path: Other.created
*
*/
+ @SearchParamDefinition(name="created", path="Other.created", description="")
public static final String SP_CREATED = "created";
/**
@@ -105,6 +108,7 @@ public class Other extends BaseResource implements IResource {
* Path: Other.code
*
*/
+ @SearchParamDefinition(name="code", path="Other.code", description="")
public static final String SP_CODE = "code";
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 b1e3655f32a..8d1420bab85 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
@@ -51,6 +51,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.AddressDt;
import ca.uhn.fhir.model.dstu.composite.AttachmentDt;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
@@ -102,6 +103,7 @@ public class Patient extends BaseResource implements IResource {
* Path: Patient.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="Patient.identifier", description="A patient identifier")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -112,6 +114,7 @@ public class Patient extends BaseResource implements IResource {
* Path: Patient.name
*
*/
+ @SearchParamDefinition(name="name", path="Patient.name", description="A portion of either family or given name of the patient")
public static final String SP_NAME = "name";
/**
@@ -122,6 +125,7 @@ public class Patient extends BaseResource implements IResource {
* Path: Patient.name.family
*
*/
+ @SearchParamDefinition(name="family", path="Patient.name.family", description="A portion of the family name of the patient")
public static final String SP_FAMILY = "family";
/**
@@ -132,6 +136,7 @@ public class Patient extends BaseResource implements IResource {
* Path: Patient.name.given
*
*/
+ @SearchParamDefinition(name="given", path="Patient.name.given", description="A portion of the given name of the patient")
public static final String SP_GIVEN = "given";
/**
@@ -142,6 +147,7 @@ public class Patient extends BaseResource implements IResource {
* Path:
*
*/
+ @SearchParamDefinition(name="phonetic", path="", description="A portion of either family or given name using some kind of phonetic matching algorithm")
public static final String SP_PHONETIC = "phonetic";
/**
@@ -152,6 +158,7 @@ public class Patient extends BaseResource implements IResource {
* Path: Patient.telecom
*
*/
+ @SearchParamDefinition(name="telecom", path="Patient.telecom", description="The value in any kind of telecom details of the patient")
public static final String SP_TELECOM = "telecom";
/**
@@ -162,6 +169,7 @@ public class Patient extends BaseResource implements IResource {
* Path: Patient.address
*
*/
+ @SearchParamDefinition(name="address", path="Patient.address", description="An address in any kind of address/part of the patient")
public static final String SP_ADDRESS = "address";
/**
@@ -172,6 +180,7 @@ public class Patient extends BaseResource implements IResource {
* Path: Patient.gender
*
*/
+ @SearchParamDefinition(name="gender", path="Patient.gender", description="Gender of the patient")
public static final String SP_GENDER = "gender";
/**
@@ -182,6 +191,7 @@ public class Patient extends BaseResource implements IResource {
* Path: Patient.communication
*
*/
+ @SearchParamDefinition(name="language", path="Patient.communication", description="Language code (irrespective of use value)")
public static final String SP_LANGUAGE = "language";
/**
@@ -192,6 +202,7 @@ public class Patient extends BaseResource implements IResource {
* Path: Patient.birthDate
*
*/
+ @SearchParamDefinition(name="birthdate", path="Patient.birthDate", description="The patient's date of birth")
public static final String SP_BIRTHDATE = "birthdate";
/**
@@ -202,6 +213,7 @@ public class Patient extends BaseResource implements IResource {
* Path: Patient.managingOrganization
*
*/
+ @SearchParamDefinition(name="provider", path="Patient.managingOrganization", description="The organization at which this person is a patient")
public static final String SP_PROVIDER = "provider";
/**
@@ -212,6 +224,7 @@ public class Patient extends BaseResource implements IResource {
* Path: Patient.active
*
*/
+ @SearchParamDefinition(name="active", path="Patient.active", description="Whether the patient record is active")
public static final String SP_ACTIVE = "active";
/**
@@ -222,6 +235,7 @@ public class Patient extends BaseResource implements IResource {
* Path: Patient.animal.species
*
*/
+ @SearchParamDefinition(name="animal-species", path="Patient.animal.species", description="The species for animal patients")
public static final String SP_ANIMAL_SPECIES = "animal-species";
/**
@@ -232,6 +246,7 @@ public class Patient extends BaseResource implements IResource {
* Path: Patient.animal.breed
*
*/
+ @SearchParamDefinition(name="animal-breed", path="Patient.animal.breed", description="The breed for animal patients")
public static final String SP_ANIMAL_BREED = "animal-breed";
/**
@@ -242,6 +257,7 @@ public class Patient extends BaseResource implements IResource {
* Path: Patient.link.other
*
*/
+ @SearchParamDefinition(name="link", path="Patient.link.other", description="All patients linked to the given patient")
public static final String SP_LINK = "link";
@@ -1256,7 +1272,7 @@ public class Patient extends BaseResource implements IResource {
* A contact party (e.g. guardian, partner, friend) for the patient
*
*/
- @Block(name="Patient.contact")
+ @Block()
public static class Contact extends BaseElement implements IResourceBlock {
@Child(name="relationship", type=CodeableConceptDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@@ -1587,7 +1603,7 @@ public class Patient extends BaseResource implements IResource {
* This element has a value if the patient is an animal
*
*/
- @Block(name="Patient.animal")
+ @Block()
public static class Animal extends BaseElement implements IResourceBlock {
@Child(name="species", type=CodeableConceptDt.class, order=0, min=1, max=1)
@@ -1745,7 +1761,7 @@ public class Patient extends BaseResource implements IResource {
* Link to another patient resource that concerns the same actual person
*
*/
- @Block(name="Patient.link")
+ @Block()
public static class Link extends BaseElement implements IResourceBlock {
@Child(name="other", order=0, min=1, max=1, type={
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 ef2e67b1631..393c72fe32c 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
@@ -50,6 +50,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.AddressDt;
import ca.uhn.fhir.model.dstu.composite.AttachmentDt;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
@@ -97,6 +98,7 @@ public class Practitioner extends BaseResource implements IResource {
* Path: Practitioner.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="Practitioner.identifier", description="A practitioner's Identifier")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -107,6 +109,7 @@ public class Practitioner extends BaseResource implements IResource {
* Path: Practitioner.name
*
*/
+ @SearchParamDefinition(name="name", path="Practitioner.name", description="A portion of either family or given name")
public static final String SP_NAME = "name";
/**
@@ -117,6 +120,7 @@ public class Practitioner extends BaseResource implements IResource {
* Path: Practitioner.name
*
*/
+ @SearchParamDefinition(name="family", path="Practitioner.name", description="A portion of the family name")
public static final String SP_FAMILY = "family";
/**
@@ -127,6 +131,7 @@ public class Practitioner extends BaseResource implements IResource {
* Path: Practitioner.name
*
*/
+ @SearchParamDefinition(name="given", path="Practitioner.name", description="A portion of the given name")
public static final String SP_GIVEN = "given";
/**
@@ -137,6 +142,7 @@ public class Practitioner extends BaseResource implements IResource {
* Path: Practitioner.name
*
*/
+ @SearchParamDefinition(name="phonetic", path="Practitioner.name", description="A portion of either family or given name using some kind of phonetic matching algorithm")
public static final String SP_PHONETIC = "phonetic";
/**
@@ -147,6 +153,7 @@ public class Practitioner extends BaseResource implements IResource {
* Path: Practitioner.telecom
*
*/
+ @SearchParamDefinition(name="telecom", path="Practitioner.telecom", description="The value in any kind of contact")
public static final String SP_TELECOM = "telecom";
/**
@@ -157,6 +164,7 @@ public class Practitioner extends BaseResource implements IResource {
* Path: Practitioner.address
*
*/
+ @SearchParamDefinition(name="address", path="Practitioner.address", description="An address in any kind of address/part")
public static final String SP_ADDRESS = "address";
/**
@@ -167,6 +175,7 @@ public class Practitioner extends BaseResource implements IResource {
* Path: Practitioner.gender
*
*/
+ @SearchParamDefinition(name="gender", path="Practitioner.gender", description="Gender of the practitioner")
public static final String SP_GENDER = "gender";
/**
@@ -177,6 +186,7 @@ public class Practitioner extends BaseResource implements IResource {
* Path: Practitioner.organization
*
*/
+ @SearchParamDefinition(name="organization", path="Practitioner.organization", description="The identity of the organization the practitioner represents / acts on behalf of")
public static final String SP_ORGANIZATION = "organization";
@@ -1023,7 +1033,7 @@ public class Practitioner extends BaseResource implements IResource {
*
*
*/
- @Block(name="Practitioner.qualification")
+ @Block()
public static class Qualification extends BaseElement implements IResourceBlock {
@Child(name="code", type=CodeableConceptDt.class, order=0, min=1, max=1)
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 e447f345e8d..44e90ab253a 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
@@ -48,6 +48,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.PeriodDt;
@@ -90,6 +91,7 @@ public class Procedure extends BaseResource implements IResource {
* Path: Procedure.type
*
*/
+ @SearchParamDefinition(name="type", path="Procedure.type", description="Type of procedure")
public static final String SP_TYPE = "type";
/**
@@ -100,6 +102,7 @@ public class Procedure extends BaseResource implements IResource {
* Path: Procedure.subject
*
*/
+ @SearchParamDefinition(name="subject", path="Procedure.subject", description="The identity of a patient to list procedures for")
public static final String SP_SUBJECT = "subject";
/**
@@ -110,6 +113,7 @@ public class Procedure extends BaseResource implements IResource {
* Path: Procedure.date
*
*/
+ @SearchParamDefinition(name="date", path="Procedure.date", description="The date the procedure was performed on")
public static final String SP_DATE = "date";
@@ -934,7 +938,7 @@ public class Procedure extends BaseResource implements IResource {
* Limited to 'real' people rather than equipment
*
*/
- @Block(name="Procedure.performer")
+ @Block()
public static class Performer extends BaseElement implements IResourceBlock {
@Child(name="person", order=0, min=0, max=1, type={
@@ -1042,7 +1046,7 @@ public class Procedure extends BaseResource implements IResource {
* Procedures may be related to other items such as procedures or medications. For example treating wound dehiscence following a previous procedure
*
*/
- @Block(name="Procedure.relatedItem")
+ @Block()
public static class RelatedItem extends BaseElement implements IResourceBlock {
@Child(name="type", type=CodeDt.class, order=0, min=0, max=1)
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 f27fcc1e6b2..30004cdca60 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
@@ -51,6 +51,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodingDt;
import ca.uhn.fhir.model.dstu.composite.ContactDt;
import ca.uhn.fhir.model.dstu.valueset.AggregationModeEnum;
@@ -105,6 +106,7 @@ public class Profile extends BaseResource implements IResource {
* Path: Profile.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="Profile.identifier", description="The identifier of the profile")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -115,6 +117,7 @@ public class Profile extends BaseResource implements IResource {
* Path: Profile.version
*
*/
+ @SearchParamDefinition(name="version", path="Profile.version", description="The version identifier of the profile")
public static final String SP_VERSION = "version";
/**
@@ -125,6 +128,7 @@ public class Profile extends BaseResource implements IResource {
* Path: Profile.name
*
*/
+ @SearchParamDefinition(name="name", path="Profile.name", description="Name of the profile")
public static final String SP_NAME = "name";
/**
@@ -135,6 +139,7 @@ public class Profile extends BaseResource implements IResource {
* Path: Profile.publisher
*
*/
+ @SearchParamDefinition(name="publisher", path="Profile.publisher", description="Name of the publisher of the profile")
public static final String SP_PUBLISHER = "publisher";
/**
@@ -145,6 +150,7 @@ public class Profile extends BaseResource implements IResource {
* Path: Profile.description
*
*/
+ @SearchParamDefinition(name="description", path="Profile.description", description="Text search in the description of the profile")
public static final String SP_DESCRIPTION = "description";
/**
@@ -155,6 +161,7 @@ public class Profile extends BaseResource implements IResource {
* Path: Profile.status
*
*/
+ @SearchParamDefinition(name="status", path="Profile.status", description="The current status of the profile")
public static final String SP_STATUS = "status";
/**
@@ -165,6 +172,7 @@ public class Profile extends BaseResource implements IResource {
* Path: Profile.date
*
*/
+ @SearchParamDefinition(name="date", path="Profile.date", description="The profile publication date")
public static final String SP_DATE = "date";
/**
@@ -175,6 +183,7 @@ public class Profile extends BaseResource implements IResource {
* Path: Profile.code
*
*/
+ @SearchParamDefinition(name="code", path="Profile.code", description="A code for the profile in the format uri::code (server may choose to do subsumption)")
public static final String SP_CODE = "code";
/**
@@ -185,6 +194,7 @@ public class Profile extends BaseResource implements IResource {
* Path: Profile.extensionDefn.code
*
*/
+ @SearchParamDefinition(name="extension", path="Profile.extensionDefn.code", description="An extension code (use or definition)")
public static final String SP_EXTENSION = "extension";
/**
@@ -195,6 +205,7 @@ public class Profile extends BaseResource implements IResource {
* Path: Profile.structure.element.definition.binding.reference[x]
*
*/
+ @SearchParamDefinition(name="valueset", path="Profile.structure.element.definition.binding.reference[x]", description="A vocabulary binding code")
public static final String SP_VALUESET = "valueset";
/**
@@ -205,6 +216,7 @@ public class Profile extends BaseResource implements IResource {
* Path: Profile.structure.type
*
*/
+ @SearchParamDefinition(name="type", path="Profile.structure.type", description="Type of resource that is constrained in the profile")
public static final String SP_TYPE = "type";
@@ -1157,7 +1169,7 @@ public class Profile extends BaseResource implements IResource {
* An external specification that the content is mapped to
*
*/
- @Block(name="Profile.mapping")
+ @Block()
public static class Mapping extends BaseElement implements IResourceBlock {
@Child(name="identity", type=IdDt.class, order=0, min=1, max=1)
@@ -1392,7 +1404,7 @@ public class Profile extends BaseResource implements IResource {
* A constraint statement about what contents a resource or data type may have
*
*/
- @Block(name="Profile.structure")
+ @Block()
public static class Structure extends BaseElement implements IResourceBlock {
@Child(name="type", type=CodeDt.class, order=0, min=1, max=1)
@@ -1760,7 +1772,7 @@ public class Profile extends BaseResource implements IResource {
* Captures constraints on each element within the resource
*
*/
- @Block(name="Profile.structure.element")
+ @Block()
public static class StructureElement extends BaseElement implements IResourceBlock {
@Child(name="path", type=StringDt.class, order=0, min=1, max=1)
@@ -2032,7 +2044,7 @@ public class Profile extends BaseResource implements IResource {
* Indicates that the element is sliced into a set of alternative definitions (there are multiple definitions on a single element in the base resource). The set of slices is any elements that come after this in the element sequence that have the same path, until a shorter path occurs (the shorter path terminates the set)
*
*/
- @Block(name="Profile.structure.element.slicing")
+ @Block()
public static class StructureElementSlicing extends BaseElement implements IResourceBlock {
@Child(name="discriminator", type=IdDt.class, order=0, min=1, max=1)
@@ -2216,7 +2228,7 @@ public class Profile extends BaseResource implements IResource {
* Definition of the content of the element to provide a more specific definition than that contained for the element in the base resource
*
*/
- @Block(name="Profile.structure.element.definition")
+ @Block()
public static class StructureElementDefinition extends BaseElement implements IResourceBlock {
@Child(name="short", type=StringDt.class, order=0, min=1, max=1)
@@ -3235,7 +3247,7 @@ public class Profile extends BaseResource implements IResource {
* The data type or resource that the value of this element is permitted to be
*
*/
- @Block(name="Profile.structure.element.definition.type")
+ @Block()
public static class StructureElementDefinitionType extends BaseElement implements IResourceBlock {
@Child(name="code", type=CodeDt.class, order=0, min=1, max=1)
@@ -3432,7 +3444,7 @@ public class Profile extends BaseResource implements IResource {
* Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance
*
*/
- @Block(name="Profile.structure.element.definition.constraint")
+ @Block()
public static class StructureElementDefinitionConstraint extends BaseElement implements IResourceBlock {
@Child(name="key", type=IdDt.class, order=0, min=1, max=1)
@@ -3718,7 +3730,7 @@ public class Profile extends BaseResource implements IResource {
* Binds to a value set if this element is coded (code, Coding, CodeableConcept)
*
*/
- @Block(name="Profile.structure.element.definition.binding")
+ @Block()
public static class StructureElementDefinitionBinding extends BaseElement implements IResourceBlock {
@Child(name="name", type=StringDt.class, order=0, min=1, max=1)
@@ -3989,7 +4001,7 @@ public class Profile extends BaseResource implements IResource {
* Identifies a concept from an external specification that roughly corresponds to this element
*
*/
- @Block(name="Profile.structure.element.definition.mapping")
+ @Block()
public static class StructureElementDefinitionMapping extends BaseElement implements IResourceBlock {
@Child(name="identity", type=IdDt.class, order=0, min=1, max=1)
@@ -4124,7 +4136,7 @@ public class Profile extends BaseResource implements IResource {
* Additional search parameters for implementations to support and/or make use of
*
*/
- @Block(name="Profile.structure.searchParam")
+ @Block()
public static class StructureSearchParam extends BaseElement implements IResourceBlock {
@Child(name="name", type=StringDt.class, order=0, min=1, max=1)
@@ -4424,7 +4436,7 @@ public class Profile extends BaseResource implements IResource {
* An extension defined as part of the profile
*
*/
- @Block(name="Profile.extensionDefn")
+ @Block()
public static class ExtensionDefn extends BaseElement implements IResourceBlock {
@Child(name="code", type=CodeDt.class, order=0, min=1, max=1)
@@ -4731,7 +4743,7 @@ public class Profile extends BaseResource implements IResource {
* Definition of a named query and its parameters and their meaning
*
*/
- @Block(name="Profile.query")
+ @Block()
public static class Query extends BaseElement implements IResourceBlock {
@Child(name="name", type=StringDt.class, order=0, min=1, max=1)
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 3e1be6647b6..aadea8bd043 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
@@ -50,6 +50,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.CodingDt;
import ca.uhn.fhir.model.dstu.composite.PeriodDt;
@@ -93,6 +94,7 @@ public class Provenance extends BaseResource implements IResource {
* Path: Provenance.target
*
*/
+ @SearchParamDefinition(name="target", path="Provenance.target", description="")
public static final String SP_TARGET = "target";
/**
@@ -103,6 +105,7 @@ public class Provenance extends BaseResource implements IResource {
* Path: Provenance.period.start
*
*/
+ @SearchParamDefinition(name="start", path="Provenance.period.start", description="")
public static final String SP_START = "start";
/**
@@ -113,6 +116,7 @@ public class Provenance extends BaseResource implements IResource {
* Path: Provenance.period.end
*
*/
+ @SearchParamDefinition(name="end", path="Provenance.period.end", description="")
public static final String SP_END = "end";
/**
@@ -123,6 +127,7 @@ public class Provenance extends BaseResource implements IResource {
* Path: Provenance.location
*
*/
+ @SearchParamDefinition(name="location", path="Provenance.location", description="")
public static final String SP_LOCATION = "location";
/**
@@ -133,6 +138,7 @@ public class Provenance extends BaseResource implements IResource {
* Path: Provenance.agent.reference
*
*/
+ @SearchParamDefinition(name="party", path="Provenance.agent.reference", description="")
public static final String SP_PARTY = "party";
/**
@@ -143,6 +149,7 @@ public class Provenance extends BaseResource implements IResource {
* Path: Provenance.agent.type
*
*/
+ @SearchParamDefinition(name="partytype", path="Provenance.agent.type", description="")
public static final String SP_PARTYTYPE = "partytype";
@@ -340,8 +347,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;
}
@@ -353,8 +360,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;
}
@@ -671,7 +678,7 @@ public class Provenance extends BaseResource implements IResource {
* An agent takes a role in an activity such that the agent can be assigned some degree of responsibility for the activity taking place. An agent can be a person, a piece of software, an inanimate object, an organization, or other entities that may be ascribed responsibility
*
*/
- @Block(name="Provenance.agent")
+ @Block()
public static class Agent extends BaseElement implements IResourceBlock {
@Child(name="role", type=CodingDt.class, order=0, min=1, max=1)
@@ -880,7 +887,7 @@ public class Provenance extends BaseResource implements IResource {
* An entity used in this activity
*
*/
- @Block(name="Provenance.entity")
+ @Block()
public static class Entity extends BaseElement implements IResourceBlock {
@Child(name="role", type=CodeDt.class, order=0, min=1, max=1)
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 49e0e21f5a0..a56c05e9333 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
@@ -49,6 +49,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.dstu.valueset.QueryOutcomeEnum;
import ca.uhn.fhir.model.primitive.BoundCodeDt;
@@ -88,6 +89,7 @@ public class Query extends BaseResource implements IResource {
* Path: Query.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="Query.identifier", description="")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -98,6 +100,7 @@ public class Query extends BaseResource implements IResource {
* Path: Query.response.identifier
*
*/
+ @SearchParamDefinition(name="response", path="Query.response.identifier", description="")
public static final String SP_RESPONSE = "response";
@@ -281,7 +284,7 @@ public class Query extends BaseResource implements IResource {
*
*
*/
- @Block(name="Query.response")
+ @Block()
public static class Response extends BaseElement implements IResourceBlock {
@Child(name="identifier", type=UriDt.class, order=0, min=1, max=1)
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 558c5dd4829..937183ec11c 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
@@ -51,6 +51,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.CodingDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
@@ -102,6 +103,7 @@ public class Questionnaire extends BaseResource implements IResource {
* Path: Questionnaire.status
*
*/
+ @SearchParamDefinition(name="status", path="Questionnaire.status", description="The status of the questionnaire")
public static final String SP_STATUS = "status";
/**
@@ -112,6 +114,7 @@ public class Questionnaire extends BaseResource implements IResource {
* Path: Questionnaire.authored
*
*/
+ @SearchParamDefinition(name="authored", path="Questionnaire.authored", description="When the questionnaire was authored")
public static final String SP_AUTHORED = "authored";
/**
@@ -122,6 +125,7 @@ public class Questionnaire extends BaseResource implements IResource {
* Path: Questionnaire.subject
*
*/
+ @SearchParamDefinition(name="subject", path="Questionnaire.subject", description="The subject of the questionnaire")
public static final String SP_SUBJECT = "subject";
/**
@@ -132,6 +136,7 @@ public class Questionnaire extends BaseResource implements IResource {
* Path: Questionnaire.author
*
*/
+ @SearchParamDefinition(name="author", path="Questionnaire.author", description="The author of the questionnaire")
public static final String SP_AUTHOR = "author";
/**
@@ -142,6 +147,7 @@ public class Questionnaire extends BaseResource implements IResource {
* Path: Questionnaire.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="Questionnaire.identifier", description="An identifier for the questionnaire")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -152,6 +158,7 @@ public class Questionnaire extends BaseResource implements IResource {
* Path: Questionnaire.name
*
*/
+ @SearchParamDefinition(name="name", path="Questionnaire.name", description="Name of the questionnaire")
public static final String SP_NAME = "name";
/**
@@ -162,6 +169,7 @@ public class Questionnaire extends BaseResource implements IResource {
* Path: Questionnaire.encounter
*
*/
+ @SearchParamDefinition(name="encounter", path="Questionnaire.encounter", description="Encounter during which questionnaire was authored")
public static final String SP_ENCOUNTER = "encounter";
@@ -643,7 +651,7 @@ public class Questionnaire extends BaseResource implements IResource {
* A group of questions to a possibly similarly grouped set of questions in the questionnaire
*
*/
- @Block(name="Questionnaire.group")
+ @Block()
public static class Group extends BaseElement implements IResourceBlock {
@Child(name="name", type=CodeableConceptDt.class, order=0, min=0, max=1)
@@ -999,7 +1007,7 @@ public class Questionnaire extends BaseResource implements IResource {
* Set of questions within this group. The order of questions within the group is relevant
*
*/
- @Block(name="Questionnaire.group.question")
+ @Block()
public static class GroupQuestion extends BaseElement implements IResourceBlock {
@Child(name="name", type=CodeableConceptDt.class, order=0, min=0, max=1)
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 a3a4a7f863c..eea42bb5d50 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
@@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.AddressDt;
import ca.uhn.fhir.model.dstu.composite.AttachmentDt;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
@@ -89,6 +90,7 @@ public class RelatedPerson extends BaseResource implements IResource {
* Path: RelatedPerson.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="RelatedPerson.identifier", description="A patient Identifier")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -99,6 +101,7 @@ public class RelatedPerson extends BaseResource implements IResource {
* Path: RelatedPerson.name
*
*/
+ @SearchParamDefinition(name="name", path="RelatedPerson.name", description="A portion of name in any name part")
public static final String SP_NAME = "name";
/**
@@ -109,6 +112,7 @@ public class RelatedPerson extends BaseResource implements IResource {
* Path:
*
*/
+ @SearchParamDefinition(name="phonetic", path="", description="A portion of name using some kind of phonetic matching algorithm")
public static final String SP_PHONETIC = "phonetic";
/**
@@ -119,6 +123,7 @@ public class RelatedPerson extends BaseResource implements IResource {
* Path: RelatedPerson.telecom
*
*/
+ @SearchParamDefinition(name="telecom", path="RelatedPerson.telecom", description="The value in any kind of contact")
public static final String SP_TELECOM = "telecom";
/**
@@ -129,6 +134,7 @@ public class RelatedPerson extends BaseResource implements IResource {
* Path: RelatedPerson.address
*
*/
+ @SearchParamDefinition(name="address", path="RelatedPerson.address", description="An address in any kind of address/part")
public static final String SP_ADDRESS = "address";
/**
@@ -139,6 +145,7 @@ public class RelatedPerson extends BaseResource implements IResource {
* Path: RelatedPerson.gender
*
*/
+ @SearchParamDefinition(name="gender", path="RelatedPerson.gender", description="Gender of the person")
public static final String SP_GENDER = "gender";
/**
@@ -149,6 +156,7 @@ public class RelatedPerson extends BaseResource implements IResource {
* Path: RelatedPerson.patient
*
*/
+ @SearchParamDefinition(name="patient", path="RelatedPerson.patient", description="The patient this person is related to")
public static final String SP_PATIENT = "patient";
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 ad694463de6..2d4f93b9774 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
@@ -48,6 +48,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum;
@@ -86,6 +87,7 @@ public class Remittance extends BaseResource implements IResource {
* Path: Remittance.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="Remittance.identifier", description="")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -96,6 +98,7 @@ public class Remittance extends BaseResource implements IResource {
* Path: Remittance.service.code
*
*/
+ @SearchParamDefinition(name="service", path="Remittance.service.code", description="")
public static final String SP_SERVICE = "service";
@@ -254,7 +257,7 @@ public class Remittance extends BaseResource implements IResource {
* A service paid as part of remittance
*
*/
- @Block(name="Remittance.service")
+ @Block()
public static class Service extends BaseElement implements IResourceBlock {
@Child(name="instance", type=IntegerDt.class, order=0, min=1, max=1)
@@ -412,6 +415,19 @@ public class Remittance extends BaseResource implements IResource {
*
* Definition:
* The percent of the service fee which would be elegible for coverage
+ *
+ */
+ public Service setRate( long theValue) {
+ myRate = new DecimalDt(theValue);
+ return this;
+ }
+
+ /**
+ * Sets the value for rate (Benefit Rate %)
+ *
+ *
+ * Definition:
+ * The percent of the service fee which would be elegible for coverage
*
*/
public Service setRate( double theValue) {
@@ -432,19 +448,6 @@ public class Remittance extends BaseResource implements IResource {
return this;
}
- /**
- * Sets the value for rate (Benefit Rate %)
- *
- *
- * Definition:
- * The percent of the service fee which would be elegible for coverage
- *
- */
- public Service setRate( long theValue) {
- myRate = new DecimalDt(theValue);
- return this;
- }
-
/**
* Gets the value(s) for benefit (Benefit amount).
@@ -482,6 +485,19 @@ public class Remittance extends BaseResource implements IResource {
*
* Definition:
* The amount payable for a submitted service (includes both professional and lab fees.)
+ *
+ */
+ public Service setBenefit( long theValue) {
+ myBenefit = new DecimalDt(theValue);
+ return this;
+ }
+
+ /**
+ * Sets the value for benefit (Benefit amount)
+ *
+ *
+ * Definition:
+ * The amount payable for a submitted service (includes both professional and lab fees.)
*
*/
public Service setBenefit( double theValue) {
@@ -502,19 +518,6 @@ public class Remittance extends BaseResource implements IResource {
return this;
}
- /**
- * Sets the value for benefit (Benefit amount)
- *
- *
- * Definition:
- * The amount payable for a submitted service (includes both professional and lab fees.)
- *
- */
- public Service setBenefit( long theValue) {
- myBenefit = new DecimalDt(theValue);
- return this;
- }
-
}
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 9a063b21907..8983479035a 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
@@ -50,6 +50,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.CodingDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
@@ -102,6 +103,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Path: SecurityEvent.event.type
*
*/
+ @SearchParamDefinition(name="type", path="SecurityEvent.event.type", description="")
public static final String SP_TYPE = "type";
/**
@@ -112,6 +114,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Path: SecurityEvent.event.action
*
*/
+ @SearchParamDefinition(name="action", path="SecurityEvent.event.action", description="")
public static final String SP_ACTION = "action";
/**
@@ -122,6 +125,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Path: SecurityEvent.event.dateTime
*
*/
+ @SearchParamDefinition(name="date", path="SecurityEvent.event.dateTime", description="")
public static final String SP_DATE = "date";
/**
@@ -132,6 +136,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Path: SecurityEvent.event.subtype
*
*/
+ @SearchParamDefinition(name="subtype", path="SecurityEvent.event.subtype", description="")
public static final String SP_SUBTYPE = "subtype";
/**
@@ -142,6 +147,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Path: SecurityEvent.participant.userId
*
*/
+ @SearchParamDefinition(name="user", path="SecurityEvent.participant.userId", description="")
public static final String SP_USER = "user";
/**
@@ -152,6 +158,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Path: SecurityEvent.participant.name
*
*/
+ @SearchParamDefinition(name="name", path="SecurityEvent.participant.name", description="")
public static final String SP_NAME = "name";
/**
@@ -162,6 +169,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Path: SecurityEvent.participant.network.identifier
*
*/
+ @SearchParamDefinition(name="address", path="SecurityEvent.participant.network.identifier", description="")
public static final String SP_ADDRESS = "address";
/**
@@ -172,6 +180,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Path: SecurityEvent.source.identifier
*
*/
+ @SearchParamDefinition(name="source", path="SecurityEvent.source.identifier", description="")
public static final String SP_SOURCE = "source";
/**
@@ -182,6 +191,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Path: SecurityEvent.source.site
*
*/
+ @SearchParamDefinition(name="site", path="SecurityEvent.source.site", description="")
public static final String SP_SITE = "site";
/**
@@ -192,6 +202,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Path: SecurityEvent.object.type
*
*/
+ @SearchParamDefinition(name="object-type", path="SecurityEvent.object.type", description="")
public static final String SP_OBJECT_TYPE = "object-type";
/**
@@ -202,6 +213,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Path: SecurityEvent.object.identifier
*
*/
+ @SearchParamDefinition(name="identity", path="SecurityEvent.object.identifier", description="")
public static final String SP_IDENTITY = "identity";
/**
@@ -212,6 +224,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Path: SecurityEvent.object.reference
*
*/
+ @SearchParamDefinition(name="reference", path="SecurityEvent.object.reference", description="")
public static final String SP_REFERENCE = "reference";
/**
@@ -222,6 +235,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Path: SecurityEvent.object.name
*
*/
+ @SearchParamDefinition(name="desc", path="SecurityEvent.object.name", description="")
public static final String SP_DESC = "desc";
/**
@@ -232,6 +246,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Path:
*
*/
+ @SearchParamDefinition(name="patientid", path="", description="The id of the patient (one of multiple kinds of participations)")
public static final String SP_PATIENTID = "patientid";
/**
@@ -242,6 +257,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Path: SecurityEvent.participant.altId
*
*/
+ @SearchParamDefinition(name="altid", path="SecurityEvent.participant.altId", description="")
public static final String SP_ALTID = "altid";
@@ -479,7 +495,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Identifies the name, action type, time, and disposition of the audited event
*
*/
- @Block(name="SecurityEvent.event")
+ @Block()
public static class Event extends BaseElement implements IResourceBlock {
@Child(name="type", type=CodeableConceptDt.class, order=0, min=1, max=1)
@@ -713,8 +729,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;
}
@@ -726,8 +742,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;
}
@@ -832,7 +848,7 @@ public class SecurityEvent extends BaseResource implements IResource {
*
*
*/
- @Block(name="SecurityEvent.participant")
+ @Block()
public static class Participant extends BaseElement implements IResourceBlock {
@Child(name="role", type=CodeableConceptDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@@ -1245,7 +1261,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Logical network location for application activity, if the activity has a network location
*
*/
- @Block(name="SecurityEvent.participant.network")
+ @Block()
public static class ParticipantNetwork extends BaseElement implements IResourceBlock {
@Child(name="identifier", type=StringDt.class, order=0, min=0, max=1)
@@ -1379,7 +1395,7 @@ public class SecurityEvent extends BaseResource implements IResource {
*
*
*/
- @Block(name="SecurityEvent.source")
+ @Block()
public static class Source extends BaseElement implements IResourceBlock {
@Child(name="site", type=StringDt.class, order=0, min=0, max=1)
@@ -1579,7 +1595,7 @@ public class SecurityEvent extends BaseResource implements IResource {
* Specific instances of data or objects that have been accessed
*
*/
- @Block(name="SecurityEvent.object")
+ @Block()
public static class Object extends BaseElement implements IResourceBlock {
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=1)
@@ -2136,7 +2152,7 @@ public class SecurityEvent extends BaseResource implements IResource {
*
*
*/
- @Block(name="SecurityEvent.object.detail")
+ @Block()
public static class ObjectDetail extends BaseElement implements IResourceBlock {
@Child(name="type", type=StringDt.class, order=0, min=1, max=1)
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 e7f238ecdf4..50196c6b309 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
@@ -50,6 +50,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.AttachmentDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
import ca.uhn.fhir.model.primitive.CodeDt;
@@ -88,6 +89,7 @@ public class SequencingAnalysis extends BaseResource implements IResource {
* Path: SequencingAnalysis.subject
*
*/
+ @SearchParamDefinition(name="subject", path="SequencingAnalysis.subject", description="Subject of the analysis")
public static final String SP_SUBJECT = "subject";
/**
@@ -98,6 +100,7 @@ public class SequencingAnalysis extends BaseResource implements IResource {
* Path: SequencingAnalysis.date
*
*/
+ @SearchParamDefinition(name="date", path="SequencingAnalysis.date", description="Date when result of the analysis is updated")
public static final String SP_DATE = "date";
/**
@@ -108,6 +111,7 @@ public class SequencingAnalysis extends BaseResource implements IResource {
* Path: SequencingAnalysis.genome.name
*
*/
+ @SearchParamDefinition(name="genome", path="SequencingAnalysis.genome.name", description="Name of the reference genome used in the analysis")
public static final String SP_GENOME = "genome";
@@ -498,7 +502,7 @@ public class SequencingAnalysis extends BaseResource implements IResource {
* Reference genome used in the analysis
*
*/
- @Block(name="SequencingAnalysis.genome")
+ @Block()
public static class Genome extends BaseElement implements IResourceBlock {
@Child(name="name", type=CodeDt.class, order=0, min=1, max=1)
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 fb414ffeeec..ecd12f2338c 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
@@ -50,6 +50,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.AttachmentDt;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
@@ -89,6 +90,7 @@ public class SequencingLab extends BaseResource implements IResource {
* Path: SequencingLab.subject
*
*/
+ @SearchParamDefinition(name="subject", path="SequencingLab.subject", description="Subject of the lab")
public static final String SP_SUBJECT = "subject";
/**
@@ -99,6 +101,7 @@ public class SequencingLab extends BaseResource implements IResource {
* Path: SequencingLab.specimen.type
*
*/
+ @SearchParamDefinition(name="specimen", path="SequencingLab.specimen.type", description="Type of the specimen used for the lab")
public static final String SP_SPECIMEN = "specimen";
/**
@@ -109,6 +112,7 @@ public class SequencingLab extends BaseResource implements IResource {
* Path: SequencingLab.date
*
*/
+ @SearchParamDefinition(name="date", path="SequencingLab.date", description="Date when result of the lab is uploaded")
public static final String SP_DATE = "date";
/**
@@ -119,6 +123,7 @@ public class SequencingLab extends BaseResource implements IResource {
* Path: SequencingLab.organization
*
*/
+ @SearchParamDefinition(name="organization", path="SequencingLab.organization", description="Organization that does the lab")
public static final String SP_ORGANIZATION = "organization";
/**
@@ -129,6 +134,7 @@ public class SequencingLab extends BaseResource implements IResource {
* Path: SequencingLab.system.class
*
*/
+ @SearchParamDefinition(name="system-class", path="SequencingLab.system.class", description="Class of the sequencing system")
public static final String SP_SYSTEM_CLASS = "system-class";
/**
@@ -139,6 +145,7 @@ public class SequencingLab extends BaseResource implements IResource {
* Path: SequencingLab.system.name
*
*/
+ @SearchParamDefinition(name="system-name", path="SequencingLab.system.name", description="Name of the sequencing system")
public static final String SP_SYSTEM_NAME = "system-name";
@@ -565,7 +572,7 @@ public class SequencingLab extends BaseResource implements IResource {
* System of machine used for sequencing
*
*/
- @Block(name="SequencingLab.system")
+ @Block()
public static class System extends BaseElement implements IResourceBlock {
@Child(name="class", type=CodeDt.class, order=0, min=0, max=1)
@@ -800,7 +807,7 @@ public class SequencingLab extends BaseResource implements IResource {
* Specimen of the lab
*
*/
- @Block(name="SequencingLab.specimen")
+ @Block()
public static class Specimen extends BaseElement implements IResourceBlock {
@Child(name="type", type=CodeDt.class, order=0, min=1, max=1)
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 b5c2e64ede9..e10e10a2b02 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
@@ -47,6 +47,7 @@ import ca.uhn.fhir.model.api.TemporalPrecisionEnum;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
@@ -88,6 +89,7 @@ public class Slot extends BaseResource implements IResource {
* Path: Slot.type
*
*/
+ @SearchParamDefinition(name="slottype", path="Slot.type", description="The type of appointments that can be booked into the slot")
public static final String SP_SLOTTYPE = "slottype";
/**
@@ -98,6 +100,7 @@ public class Slot extends BaseResource implements IResource {
* Path: Slot.availability
*
*/
+ @SearchParamDefinition(name="availability", path="Slot.availability", description="The Availability Resource that we are seeking a slot within")
public static final String SP_AVAILABILITY = "availability";
/**
@@ -108,6 +111,7 @@ public class Slot extends BaseResource implements IResource {
* Path: Slot.start
*
*/
+ @SearchParamDefinition(name="start", path="Slot.start", description="Appointment date/time.")
public static final String SP_START = "start";
/**
@@ -118,6 +122,7 @@ public class Slot extends BaseResource implements IResource {
* Path: Slot.freeBusyType
*
*/
+ @SearchParamDefinition(name="fbtype", path="Slot.freeBusyType", description="The free/busy status of the appointment")
public static final String SP_FBTYPE = "fbtype";
@@ -442,8 +447,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;
}
@@ -455,8 +460,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;
}
@@ -499,8 +504,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;
}
@@ -512,8 +517,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;
}
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 78b9193969f..4f2524cb528 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
@@ -51,6 +51,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.PeriodDt;
@@ -99,6 +100,7 @@ public class Specimen extends BaseResource implements IResource {
* Path: Specimen.subject
*
*/
+ @SearchParamDefinition(name="subject", path="Specimen.subject", description="The subject of the specimen")
public static final String SP_SUBJECT = "subject";
@@ -670,7 +672,7 @@ public class Specimen extends BaseResource implements IResource {
* Parent specimen from which the focal specimen was a component
*
*/
- @Block(name="Specimen.source")
+ @Block()
public static class Source extends BaseElement implements IResourceBlock {
@Child(name="relationship", type=CodeDt.class, order=0, min=1, max=1)
@@ -804,7 +806,7 @@ public class Specimen extends BaseResource implements IResource {
* Details concerning the specimen collection
*
*/
- @Block(name="Specimen.collection")
+ @Block()
public static class Collection extends BaseElement implements IResourceBlock {
@Child(name="collector", order=0, min=0, max=1, type={
@@ -1174,7 +1176,7 @@ public class Specimen extends BaseResource implements IResource {
* Details concerning treatment and processing steps for the specimen
*
*/
- @Block(name="Specimen.treatment")
+ @Block()
public static class Treatment extends BaseElement implements IResourceBlock {
@Child(name="description", type=StringDt.class, order=0, min=0, max=1)
@@ -1359,7 +1361,7 @@ public class Specimen extends BaseResource implements IResource {
* The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.
*
*/
- @Block(name="Specimen.container")
+ @Block()
public static class Container extends BaseElement implements IResourceBlock {
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
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 eef1f0a2c0c..432670355d9 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
@@ -50,6 +50,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.QuantityDt;
@@ -94,6 +95,7 @@ public class Substance extends BaseResource implements IResource {
* Path: Substance.type
*
*/
+ @SearchParamDefinition(name="type", path="Substance.type", description="The type of the substance")
public static final String SP_TYPE = "type";
/**
@@ -104,6 +106,7 @@ public class Substance extends BaseResource implements IResource {
* Path: Substance.instance.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="Substance.instance.identifier", description="")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -114,6 +117,7 @@ public class Substance extends BaseResource implements IResource {
* Path: Substance.instance.expiry
*
*/
+ @SearchParamDefinition(name="expiry", path="Substance.instance.expiry", description="")
public static final String SP_EXPIRY = "expiry";
/**
@@ -124,6 +128,7 @@ public class Substance extends BaseResource implements IResource {
* Path: Substance.instance.quantity
*
*/
+ @SearchParamDefinition(name="quantity", path="Substance.instance.quantity", description="")
public static final String SP_QUANTITY = "quantity";
/**
@@ -134,6 +139,7 @@ public class Substance extends BaseResource implements IResource {
* Path: Substance.ingredient.substance
*
*/
+ @SearchParamDefinition(name="substance", path="Substance.ingredient.substance", description="")
public static final String SP_SUBSTANCE = "substance";
@@ -368,7 +374,7 @@ public class Substance extends BaseResource implements IResource {
* Substance may be used to describe a kind of substance, or a specific package/container of the substance: an instance
*
*/
- @Block(name="Substance.instance")
+ @Block()
public static class Instance extends BaseElement implements IResourceBlock {
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=1)
@@ -617,7 +623,7 @@ public class Substance extends BaseResource implements IResource {
* A substance can be composed of other substances
*
*/
- @Block(name="Substance.ingredient")
+ @Block()
public static class Ingredient extends BaseElement implements IResourceBlock {
@Child(name="quantity", type=RatioDt.class, order=0, min=0, max=1)
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 451c46cebf5..3dcc01d5c65 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
@@ -48,6 +48,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
+import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.IdentifierDt;
import ca.uhn.fhir.model.dstu.composite.PeriodDt;
@@ -95,6 +96,7 @@ public class Supply extends BaseResource implements IResource {
* Path: Supply.kind
*
*/
+ @SearchParamDefinition(name="kind", path="Supply.kind", description="")
public static final String SP_KIND = "kind";
/**
@@ -105,6 +107,7 @@ public class Supply extends BaseResource implements IResource {
* Path: Supply.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="Supply.identifier", description="")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -115,6 +118,7 @@ public class Supply extends BaseResource implements IResource {
* Path: Supply.status
*
*/
+ @SearchParamDefinition(name="status", path="Supply.status", description="")
public static final String SP_STATUS = "status";
/**
@@ -125,6 +129,7 @@ public class Supply extends BaseResource implements IResource {
* Path: Supply.patient
*
*/
+ @SearchParamDefinition(name="patient", path="Supply.patient", description="")
public static final String SP_PATIENT = "patient";
/**
@@ -135,6 +140,7 @@ public class Supply extends BaseResource implements IResource {
* Path: Supply.dispense.supplier
*
*/
+ @SearchParamDefinition(name="supplier", path="Supply.dispense.supplier", description="")
public static final String SP_SUPPLIER = "supplier";
/**
@@ -145,6 +151,7 @@ public class Supply extends BaseResource implements IResource {
* Path: Supply.dispense.identifier
*
*/
+ @SearchParamDefinition(name="dispenseid", path="Supply.dispense.identifier", description="")
public static final String SP_DISPENSEID = "dispenseid";
/**
@@ -155,6 +162,7 @@ public class Supply extends BaseResource implements IResource {
* Path: Supply.dispense.status
*
*/
+ @SearchParamDefinition(name="dispensestatus", path="Supply.dispense.status", description="")
public static final String SP_DISPENSESTATUS = "dispensestatus";
@@ -490,7 +498,7 @@ public class Supply extends BaseResource implements IResource {
* Indicates the details of the dispense event such as the days supply and quantity of a supply dispensed.
*
*/
- @Block(name="Supply.dispense")
+ @Block()
public static class Dispense extends BaseElement implements IResourceBlock {
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=1)
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 26da765f299..c8a71476fae 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
@@ -737,6 +737,24 @@ public class Test extends BaseResource implements IResource {
*
*
*
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public Test addDecimalErr( long theValue) {
+ if (myDecimalErr == null) {
+ myDecimalErr = new java.util.ArrayList();
+ }
+ myDecimalErr.add(new DecimalDt(theValue));
+ return this;
+ }
+
+ /**
+ * Adds a new value for decimalErr (Decimals with invalid content)
+ *
+ *
+ * Definition:
+ *
+ *
+ *
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Test addDecimalErr( double theValue) {
@@ -765,24 +783,6 @@ public class Test extends BaseResource implements IResource {
return this;
}
- /**
- * Adds a new value for decimalErr (Decimals with invalid content)
- *
- *
- * Definition:
- *
- *
- *
- * @return Returns a reference to this object, to allow for simple chaining.
- */
- public Test addDecimalErr( long theValue) {
- if (myDecimalErr == null) {
- myDecimalErr = new java.util.ArrayList();
- }
- myDecimalErr.add(new DecimalDt(theValue));
- return this;
- }
-
/**
* Gets the value(s) for decimalCorr (Decimals with correct content).
@@ -851,6 +851,24 @@ public class Test extends BaseResource implements IResource {
*
*
*
+ * @return Returns a reference to this object, to allow for simple chaining.
+ */
+ public Test addDecimalCorr( long theValue) {
+ if (myDecimalCorr == null) {
+ myDecimalCorr = new java.util.ArrayList();
+ }
+ myDecimalCorr.add(new DecimalDt(theValue));
+ return this;
+ }
+
+ /**
+ * Adds a new value for decimalCorr (Decimals with correct content)
+ *
+ *
+ * Definition:
+ *
+ *
+ *
* @return Returns a reference to this object, to allow for simple chaining.
*/
public Test addDecimalCorr( double theValue) {
@@ -879,24 +897,6 @@ public class Test extends BaseResource implements IResource {
return this;
}
- /**
- * Adds a new value for decimalCorr (Decimals with correct content)
- *
- *
- * Definition:
- *
- *
- *
- * @return Returns a reference to this object, to allow for simple chaining.
- */
- public Test addDecimalCorr( long theValue) {
- if (myDecimalCorr == null) {
- myDecimalCorr = new java.util.ArrayList();
- }
- myDecimalCorr.add(new DecimalDt(theValue));
- return this;
- }
-
/**
* Gets the value(s) for b64Err (Binaries with invalid content).
@@ -1123,11 +1123,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;
}
@@ -1141,11 +1141,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;
}
@@ -1219,11 +1219,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;
}
@@ -1237,11 +1237,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;
}
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 c542697384a..1ff2405f623 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
@@ -45,6 +45,7 @@ import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
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.HumanNameDt;
import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt;
@@ -85,6 +86,7 @@ public class User extends BaseResource implements IResource {
* Path: User.name
*
*/
+ @SearchParamDefinition(name="name", path="User.name", description="")
public static final String SP_NAME = "name";
/**
@@ -95,6 +97,7 @@ public class User extends BaseResource implements IResource {
* Path: User.provider
*
*/
+ @SearchParamDefinition(name="provider", path="User.provider", description="")
public static final String SP_PROVIDER = "provider";
/**
@@ -105,6 +108,7 @@ public class User extends BaseResource implements IResource {
* Path: User.login
*
*/
+ @SearchParamDefinition(name="login", path="User.login", description="")
public static final String SP_LOGIN = "login";
/**
@@ -115,6 +119,7 @@ public class User extends BaseResource implements IResource {
* Path: User.level
*
*/
+ @SearchParamDefinition(name="level", path="User.level", description="")
public static final String SP_LEVEL = "level";
/**
@@ -125,6 +130,7 @@ public class User extends BaseResource implements IResource {
* Path: User.patient
*
*/
+ @SearchParamDefinition(name="patient", path="User.patient", description="")
public static final String SP_PATIENT = "patient";
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 3328282ae99..480de36846f 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
@@ -50,6 +50,7 @@ import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.Description;
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.FilterOperatorEnum;
@@ -95,6 +96,7 @@ public class ValueSet extends BaseResource implements IResource {
* Path: ValueSet.identifier
*
*/
+ @SearchParamDefinition(name="identifier", path="ValueSet.identifier", description="The identifier of the value set")
public static final String SP_IDENTIFIER = "identifier";
/**
@@ -105,6 +107,7 @@ public class ValueSet extends BaseResource implements IResource {
* Path: ValueSet.version
*
*/
+ @SearchParamDefinition(name="version", path="ValueSet.version", description="The version identifier of the value set")
public static final String SP_VERSION = "version";
/**
@@ -115,6 +118,7 @@ public class ValueSet extends BaseResource implements IResource {
* Path: ValueSet.name
*
*/
+ @SearchParamDefinition(name="name", path="ValueSet.name", description="The name of the value set")
public static final String SP_NAME = "name";
/**
@@ -125,6 +129,7 @@ public class ValueSet extends BaseResource implements IResource {
* Path: ValueSet.publisher
*
*/
+ @SearchParamDefinition(name="publisher", path="ValueSet.publisher", description="Name of the publisher of the value set")
public static final String SP_PUBLISHER = "publisher";
/**
@@ -135,6 +140,7 @@ public class ValueSet extends BaseResource implements IResource {
* Path: ValueSet.description
*
*/
+ @SearchParamDefinition(name="description", path="ValueSet.description", description="Text search in the description of the value set")
public static final String SP_DESCRIPTION = "description";
/**
@@ -145,6 +151,7 @@ public class ValueSet extends BaseResource implements IResource {
* Path: ValueSet.status
*
*/
+ @SearchParamDefinition(name="status", path="ValueSet.status", description="The status of the value set")
public static final String SP_STATUS = "status";
/**
@@ -155,6 +162,7 @@ public class ValueSet extends BaseResource implements IResource {
* Path: ValueSet.date
*
*/
+ @SearchParamDefinition(name="date", path="ValueSet.date", description="The value set publication date")
public static final String SP_DATE = "date";
/**
@@ -165,6 +173,7 @@ public class ValueSet extends BaseResource implements IResource {
* Path: ValueSet.define.system
*
*/
+ @SearchParamDefinition(name="system", path="ValueSet.define.system", description="The system for any codes defined by this value set")
public static final String SP_SYSTEM = "system";
/**
@@ -175,6 +184,7 @@ public class ValueSet extends BaseResource implements IResource {
* Path: ValueSet.define.concept.code
*
*/
+ @SearchParamDefinition(name="code", path="ValueSet.define.concept.code", description="A code defined in the value set")
public static final String SP_CODE = "code";
/**
@@ -185,6 +195,7 @@ public class ValueSet extends BaseResource implements IResource {
* Path: ValueSet.compose.include.system
*
*/
+ @SearchParamDefinition(name="reference", path="ValueSet.compose.include.system", description="A code system included or excluded in the value set or an imported value set")
public static final String SP_REFERENCE = "reference";
/**
@@ -195,6 +206,7 @@ public class ValueSet extends BaseResource implements IResource {
* Path: ValueSet.compose.restricts
*
*/
+ @SearchParamDefinition(name="!restricts", path="ValueSet.compose.restricts", description="A value set listed in the restricts list")
public static final String SP_RESTRICTS = "!restricts";
@@ -926,7 +938,7 @@ public class ValueSet extends BaseResource implements IResource {
*
*
*/
- @Block(name="ValueSet.define")
+ @Block()
public static class Define extends BaseElement implements IResourceBlock {
@Child(name="system", type=UriDt.class, order=0, min=1, max=1)
@@ -1176,7 +1188,7 @@ public class ValueSet extends BaseResource implements IResource {
*
*
*/
- @Block(name="ValueSet.define.concept")
+ @Block()
public static class DefineConcept extends BaseElement implements IResourceBlock {
@Child(name="code", type=CodeDt.class, order=0, min=1, max=1)
@@ -1479,7 +1491,7 @@ public class ValueSet extends BaseResource implements IResource {
*
*
*/
- @Block(name="ValueSet.compose")
+ @Block()
public static class Compose extends BaseElement implements IResourceBlock {
@Child(name="import", type=UriDt.class, order=0, min=0, max=Child.MAX_UNLIMITED)
@@ -1728,7 +1740,7 @@ public class ValueSet extends BaseResource implements IResource {
* Include one or more codes from a code system
*
*/
- @Block(name="ValueSet.compose.include")
+ @Block()
public static class ComposeInclude extends BaseElement implements IResourceBlock {
@Child(name="system", type=UriDt.class, order=0, min=1, max=1)
@@ -2012,7 +2024,7 @@ public class ValueSet extends BaseResource implements IResource {
* Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true.
*
*/
- @Block(name="ValueSet.compose.include.filter")
+ @Block()
public static class ComposeIncludeFilter extends BaseElement implements IResourceBlock {
@Child(name="property", type=CodeDt.class, order=0, min=1, max=1)
@@ -2198,7 +2210,7 @@ public class ValueSet extends BaseResource implements IResource {
*
*
*/
- @Block(name="ValueSet.expansion")
+ @Block()
public static class Expansion extends BaseElement implements IResourceBlock {
@Child(name="identifier", type=IdentifierDt.class, order=0, min=0, max=1)
@@ -2333,8 +2345,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;
}
@@ -2346,8 +2358,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;
}
@@ -2423,7 +2435,7 @@ public class ValueSet extends BaseResource implements IResource {
*
*
*/
- @Block(name="ValueSet.expansion.contains")
+ @Block()
public static class ExpansionContains extends BaseElement implements IResourceBlock {
@Child(name="system", type=UriDt.class, order=0, min=0, max=1)
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 0735011df81..71a678ab861 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
@@ -31,7 +31,7 @@ import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt;
import ca.uhn.fhir.model.dstu.composite.CodingDt;
-@DatatypeDef(name = "CodeableConcept")
+@DatatypeDef(name = "CodeableConcept", isSpecialization=true)
public class BoundCodeableConceptDt> extends CodeableConceptDt {
private IValueSetEnumBinder myBinder;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/InstantDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/InstantDt.java
index cdc9b6ebb50..28f8ee55604 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/InstantDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/InstantDt.java
@@ -38,10 +38,13 @@ public class InstantDt extends BaseDateTimeDt {
public static final TemporalPrecisionEnum DEFAULT_PRECISION = TemporalPrecisionEnum.MILLI;
/**
- * Constructor which creates an InstantDt with no timne value. Note that unlike the default constructor for the Java {@link Date} or {@link Calendar} objects, this constructor does not
- * initialize the object with the current time.
+ * Constructor which creates an InstantDt with no timne value. Note
+ * that unlike the default constructor for the Java {@link Date} or
+ * {@link Calendar} objects, this constructor does not initialize the object
+ * with the current time.
*
- * @see #withCurrentTime() to create a new object that has been initialized with the current time.
+ * @see #withCurrentTime() to create a new object that has been initialized
+ * with the current time.
*/
public InstantDt() {
super();
@@ -67,7 +70,8 @@ public class InstantDt extends BaseDateTimeDt {
}
/**
- * Constructor which accepts a date value and a precision value. Valid precisions values for this type are:
+ * Constructor which accepts a date value and a precision value. Valid
+ * precisions values for this type are:
*
*
{@link TemporalPrecisionEnum#SECOND}
*
{@link TemporalPrecisionEnum#MILLI}
@@ -84,13 +88,47 @@ public class InstantDt extends BaseDateTimeDt {
* Create a new InstantDt from a string value
*
* @param theString
- * The string representation of the string. Must be in a valid format according to the FHIR specification
+ * The string representation of the string. Must be in a valid
+ * format according to the FHIR specification
* @throws DataFormatException
*/
public InstantDt(String theString) {
setValueAsString(theString);
}
+ /**
+ * Invokes {@link Date#after(Date)} on the contained Date against the given
+ * date
+ *
+ * @throws NullPointerException
+ * If the {@link #getValue() contained Date} is null
+ */
+ public boolean after(Date theDate) {
+ return getValue().after(theDate);
+ }
+
+ /**
+ * Invokes {@link Date#before(Date)} on the contained Date against the given
+ * date
+ *
+ * @throws NullPointerException
+ * If the {@link #getValue() contained Date} is null
+ */
+ public boolean before(Date theDate) {
+ return getValue().before(theDate);
+ }
+
+ /**
+ * Sets the value of this instant to the current time (from the system
+ * clock) and the local/default timezone (as retrieved using
+ * {@link TimeZone#getDefault()}. This TimeZone is generally obtained from
+ * the underlying OS.
+ */
+ public void setToCurrentTimeInLocalTimeZone() {
+ setValue(new Date());
+ setTimeZone(TimeZone.getDefault());
+ }
+
@Override
boolean isPrecisionAllowed(TemporalPrecisionEnum thePrecision) {
switch (thePrecision) {
@@ -103,16 +141,8 @@ public class InstantDt extends BaseDateTimeDt {
}
/**
- * Sets the value of this instant to the current time (from the system clock) and the local/default timezone (as retrieved using {@link TimeZone#getDefault()}. This TimeZone is generally obtained
- * from the underlying OS.
- */
- public void setToCurrentTimeInLocalTimeZone() {
- setValue(new Date());
- setTimeZone(TimeZone.getDefault());
- }
-
- /**
- * Factory method which creates a new InstantDt and initializes it with the current time.
+ * Factory method which creates a new InstantDt and initializes it with the
+ * current time.
*/
public static InstantDt withCurrentTime() {
return new InstantDt(new Date());
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 6b19a088f91..f715eedb4ed 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
@@ -61,6 +61,7 @@ import ca.uhn.fhir.context.RuntimeChildUndeclaredExtensionDefinition;
import ca.uhn.fhir.context.RuntimeResourceDefinition;
import ca.uhn.fhir.model.api.BaseBundle;
import ca.uhn.fhir.model.api.Bundle;
+import ca.uhn.fhir.model.api.BundleCategory;
import ca.uhn.fhir.model.api.BundleEntry;
import ca.uhn.fhir.model.api.ExtensionDt;
import ca.uhn.fhir.model.api.IElement;
@@ -181,6 +182,18 @@ public class JsonParser extends BaseParser implements IParser {
writeOptionalTagWithTextNode(eventWriter, "updated", nextEntry.getUpdated());
writeOptionalTagWithTextNode(eventWriter, "published", nextEntry.getPublished());
+ if (nextEntry.getCategories() != null) {
+ eventWriter.writeStartArray("category");
+ for (BundleCategory next : nextEntry.getCategories()) {
+ eventWriter.writeStartObject();
+ eventWriter.write("term", defaultString(next.getTerm()));
+ eventWriter.write("label", defaultString(next.getLabel()));
+ eventWriter.write("scheme", defaultString(next.getScheme()));
+ eventWriter.writeEnd();
+ }
+ eventWriter.writeEnd();
+ }
+
writeAuthor(nextEntry, eventWriter);
IResource resource = nextEntry.getResource();
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 3b9b2e53c6a..a84b71f2dba 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
@@ -67,9 +67,9 @@ class ParserState {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ParserState.class);
private FhirContext myContext;
+ private boolean myJsonMode;
private T myObject;
private BaseState myState;
- private boolean myJsonMode;
private ParserState(FhirContext theContext, boolean theJsonMode) {
myContext = theContext;
@@ -101,6 +101,10 @@ class ParserState {
return myObject != null;
}
+ public boolean isPreResource() {
+ return myState.isPreResource();
+ }
+
public void string(String theData) {
myState.string(theData);
}
@@ -176,6 +180,15 @@ class ParserState {
public class AtomCategoryState extends BaseState {
+ private static final int STATE_LABEL = 2;
+ 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 BundleCategory myInstance;
public AtomCategoryState(BundleCategory theEntry) {
@@ -191,17 +204,47 @@ class ParserState {
myInstance.setLabel(theValue);
} else if ("scheme".equals(theName)) {
myInstance.setScheme(theValue);
+ } else if ("value".equals(theName)) {
+ // This is for the JSON parsing, which is weird for Categories..
+ switch (myCatState) {
+ case STATE_LABEL:
+ myInstance.setLabel(theValue);
+ break;
+ case STATE_TERM:
+ myInstance.setTerm(theValue);
+ break;
+ case STATE_SCHEME:
+ myInstance.setScheme(theValue);
+ break;
+ default:
+ super.string(theValue);
+ break;
+ }
+
}
}
@Override
public void endingElement() throws DataFormatException {
- pop();
+ if (myCatState != STATE_NONE) {
+ myCatState = STATE_NONE;
+ } else {
+ pop();
+ }
}
@Override
- public void enteringNewElement(String theNamespaceURI, String theLocalPart) throws DataFormatException {
- throw new DataFormatException("Unexpected element: " + theLocalPart);
+ public void enteringNewElement(String theNamespaceURI, String theName) throws DataFormatException {
+ if (myCatState != STATE_NONE) {
+ throw new DataFormatException("Unexpected element in entry: " + theName);
+ }
+ if ("term".equals(theName)) {
+ myCatState = STATE_TERM;
+ } else if ("label".equals(theName)) {
+ myCatState = STATE_LABEL;
+ } else if ("scheme".equals(theName)) {
+ myCatState = STATE_SCHEME;
+ }
}
}
@@ -224,6 +267,33 @@ class ParserState {
pop();
}
+ @Override
+ public void enteringNewElement(String theNamespaceURI, String theLocalPart) throws DataFormatException {
+ if ("title".equals(theLocalPart)) {
+ push(new AtomPrimitiveState(myEntry.getTitle()));
+ } else if ("id".equals(theLocalPart)) {
+ push(new AtomPrimitiveState(myEntry.getId()));
+ } else if ("link".equals(theLocalPart)) {
+ push(new AtomLinkState(myEntry));
+ } else if ("updated".equals(theLocalPart)) {
+ push(new AtomPrimitiveState(myEntry.getUpdated()));
+ } else if ("published".equals(theLocalPart)) {
+ push(new AtomPrimitiveState(myEntry.getPublished()));
+ } else if ("author".equals(theLocalPart)) {
+ push(new AtomAuthorState(myEntry));
+ } else if ("content".equals(theLocalPart)) {
+ push(new PreResourceState(myEntry, myResourceType));
+ } else if ("summary".equals(theLocalPart)) {
+ push(new XhtmlState(getPreResourceState(), myEntry.getSummary(), false));
+ } else if ("category".equals(theLocalPart)) {
+ push(new AtomCategoryState(myEntry.addCategory()));
+ } else {
+ throw new DataFormatException("Unexpected element in entry: " + theLocalPart);
+ }
+
+ // TODO: handle category
+ }
+
private void populateResourceMetadata() {
if (myEntry.getResource() == null) {
return;
@@ -262,33 +332,6 @@ class ParserState {
}
- @Override
- public void enteringNewElement(String theNamespaceURI, String theLocalPart) throws DataFormatException {
- if ("title".equals(theLocalPart)) {
- push(new AtomPrimitiveState(myEntry.getTitle()));
- } else if ("id".equals(theLocalPart)) {
- push(new AtomPrimitiveState(myEntry.getId()));
- } else if ("link".equals(theLocalPart)) {
- push(new AtomLinkState(myEntry));
- } else if ("updated".equals(theLocalPart)) {
- push(new AtomPrimitiveState(myEntry.getUpdated()));
- } else if ("published".equals(theLocalPart)) {
- push(new AtomPrimitiveState(myEntry.getPublished()));
- } else if ("author".equals(theLocalPart)) {
- push(new AtomAuthorState(myEntry));
- } else if ("content".equals(theLocalPart)) {
- push(new PreResourceState(myEntry, myResourceType));
- } else if ("summary".equals(theLocalPart)) {
- push(new XhtmlState(getPreResourceState(), myEntry.getSummary(), false));
- } else if ("category".equals(theLocalPart)) {
- push(new AtomCategoryState(myEntry.addCategory()));
- } else {
- throw new DataFormatException("Unexpected element in entry: " + theLocalPart);
- }
-
- // TODO: handle category
- }
-
}
private class AtomLinkState extends BaseState {
@@ -414,14 +457,18 @@ class ParserState {
push(new AtomPrimitiveState(myInstance.getBundleId()));
} else if ("link".equals(theLocalPart)) {
push(new AtomLinkState(myInstance));
- } else if ("totalResults".equals(theLocalPart) && verifyNamespace(XmlParser.OPENSEARCH_NS, theNamespaceURI)) {
+ } else if ("totalResults".equals(theLocalPart) && (verifyNamespace(XmlParser.OPENSEARCH_NS, theNamespaceURI) || verifyNamespace(Constants.OPENSEARCH_NS_OLDER, theNamespaceURI))) {
push(new AtomPrimitiveState(myInstance.getTotalResults()));
} else if ("updated".equals(theLocalPart)) {
push(new AtomPrimitiveState(myInstance.getUpdated()));
} else if ("author".equals(theLocalPart)) {
push(new AtomAuthorState(myInstance));
} else {
- throw new DataFormatException("Unexpected element: " + theLocalPart);
+ if (theNamespaceURI != null) {
+ throw new DataFormatException("Unexpected element: {" + theNamespaceURI + "}" + theLocalPart);
+ } else {
+ throw new DataFormatException("Unexpected element: " + theLocalPart);
+ }
}
// TODO: handle category and DSig
@@ -481,6 +528,10 @@ class ParserState {
return myPreResourceState;
}
+ public boolean isPreResource() {
+ return false;
+ }
+
public void setStack(BaseState theState) {
myStack = theState;
}
@@ -501,10 +552,6 @@ class ParserState {
return null;
}
- public boolean isPreResource() {
- return false;
- }
-
}
private class ContainedResourcesState extends PreResourceState {
@@ -614,29 +661,6 @@ class ParserState {
}
- private class SwallowChildrenWholeState extends BaseState {
-
- private int myDepth;
-
- public SwallowChildrenWholeState(PreResourceState thePreResourceState) {
- super(thePreResourceState);
- }
-
- @Override
- public void endingElement() throws DataFormatException {
- myDepth--;
- if (myDepth < 0) {
- pop();
- }
- }
-
- @Override
- public void enteringNewElement(String theNamespaceURI, String theLocalPart) throws DataFormatException {
- myDepth++;
- }
-
- }
-
private class ElementCompositeState extends BaseState {
private BaseRuntimeElementCompositeDefinition> myDefinition;
@@ -878,15 +902,10 @@ class ParserState {
private Class extends IResource> myResourceType;
- @Override
- public boolean isPreResource() {
- return true;
- }
-
public PreResourceState(BundleEntry theEntry, Class extends IResource> theResourceType) {
super(null);
myEntry = theEntry;
- myResourceType=theResourceType;
+ myResourceType = theResourceType;
}
/**
@@ -939,6 +958,11 @@ class ParserState {
return myResourceReferences;
}
+ @Override
+ public boolean isPreResource() {
+ return true;
+ }
+
@SuppressWarnings("unchecked")
@Override
public void wereBack() {
@@ -1090,6 +1114,29 @@ class ParserState {
DISPLAY, INITIAL, REFERENCE
}
+ private class SwallowChildrenWholeState extends BaseState {
+
+ private int myDepth;
+
+ public SwallowChildrenWholeState(PreResourceState thePreResourceState) {
+ super(thePreResourceState);
+ }
+
+ @Override
+ public void endingElement() throws DataFormatException {
+ myDepth--;
+ if (myDepth < 0) {
+ pop();
+ }
+ }
+
+ @Override
+ public void enteringNewElement(String theNamespaceURI, String theLocalPart) throws DataFormatException {
+ myDepth++;
+ }
+
+ }
+
private class XhtmlState extends BaseState {
private int myDepth;
private XhtmlDt myDt;
@@ -1150,8 +1197,4 @@ class ParserState {
}
- public boolean isPreResource() {
- return myState.isPreResource();
- }
-
}
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 8e27d9e4f35..ec216d1b395 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,8 +20,7 @@ package ca.uhn.fhir.parser;
* #L%
*/
-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.Reader;
import java.io.StringWriter;
@@ -57,6 +56,7 @@ import ca.uhn.fhir.context.RuntimeChildNarrativeDefinition;
import ca.uhn.fhir.context.RuntimeChildUndeclaredExtensionDefinition;
import ca.uhn.fhir.context.RuntimeResourceDefinition;
import ca.uhn.fhir.model.api.Bundle;
+import ca.uhn.fhir.model.api.BundleCategory;
import ca.uhn.fhir.model.api.BundleEntry;
import ca.uhn.fhir.model.api.ExtensionDt;
import ca.uhn.fhir.model.api.IElement;
@@ -74,7 +74,6 @@ import ca.uhn.fhir.narrative.INarrativeGenerator;
import ca.uhn.fhir.util.PrettyPrintWriterWrapper;
public class XmlParser extends BaseParser implements IParser {
- @SuppressWarnings("unused")
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(XmlParser.class);
static final String ATOM_NS = "http://www.w3.org/2005/Atom";
static final String FHIR_NS = "http://hl7.org/fhir";
@@ -147,6 +146,16 @@ public class XmlParser extends BaseParser implements IParser {
writeOptionalTagWithTextNode(eventWriter, "updated", nextEntry.getUpdated());
writeOptionalTagWithTextNode(eventWriter, "published", nextEntry.getPublished());
+ if (nextEntry.getCategories() != null) {
+ for (BundleCategory next : nextEntry.getCategories()) {
+ eventWriter.writeStartElement("category");
+ eventWriter.writeAttribute("term", defaultString(next.getTerm()));
+ eventWriter.writeAttribute("label", defaultString(next.getLabel()));
+ eventWriter.writeAttribute("scheme", defaultString(next.getScheme()));
+ eventWriter.writeEndElement();
+ }
+ }
+
if (!nextEntry.getLinkSelf().isEmpty()) {
writeAtomLink(eventWriter, "self", nextEntry.getLinkSelf());
}
@@ -155,7 +164,11 @@ public class XmlParser extends BaseParser implements IParser {
eventWriter.writeAttribute("type", "text/xml");
IResource resource = nextEntry.getResource();
- encodeResourceToXmlStreamWriter(resource, eventWriter, false);
+ if (resource != null) {
+ encodeResourceToXmlStreamWriter(resource, eventWriter, false);
+ } else {
+ ourLog.warn("Bundle entry contains null resource");
+ }
eventWriter.writeEndElement(); // content
eventWriter.writeEndElement(); // entry
@@ -193,7 +206,6 @@ public class XmlParser extends BaseParser implements IParser {
}
}
-
@Override
public Bundle parseBundle(Class theResourceType, Reader theReader) {
XMLEventReader streamReader;
@@ -301,8 +313,8 @@ public class XmlParser extends BaseParser implements IParser {
}
}
- private void encodeChildElementToStreamWriter(RuntimeResourceDefinition theResDef, IResource theResource, XMLStreamWriter theEventWriter, IElement nextValue, String childName,
- BaseRuntimeElementDefinition> childDef, String theExtensionUrl, boolean theIncludedResource) throws XMLStreamException, DataFormatException {
+ private void encodeChildElementToStreamWriter(RuntimeResourceDefinition theResDef, IResource theResource, XMLStreamWriter theEventWriter, IElement nextValue, String childName, BaseRuntimeElementDefinition> childDef, String theExtensionUrl, boolean theIncludedResource)
+ throws XMLStreamException, DataFormatException {
if (nextValue.isEmpty()) {
return;
}
@@ -366,8 +378,8 @@ public class XmlParser extends BaseParser implements IParser {
}
- private void encodeCompositeElementChildrenToStreamWriter(RuntimeResourceDefinition theResDef, IResource theResource, IElement theElement, XMLStreamWriter theEventWriter,
- List extends BaseRuntimeChildDefinition> children, boolean theIncludedResource) throws XMLStreamException, DataFormatException {
+ private void encodeCompositeElementChildrenToStreamWriter(RuntimeResourceDefinition theResDef, IResource theResource, IElement theElement, XMLStreamWriter theEventWriter, List extends BaseRuntimeChildDefinition> children, boolean theIncludedResource)
+ throws XMLStreamException, DataFormatException {
for (BaseRuntimeChildDefinition nextChild : children) {
if (nextChild instanceof RuntimeChildNarrativeDefinition && !theIncludedResource) {
INarrativeGenerator gen = myContext.getNarrativeGenerator();
@@ -418,8 +430,8 @@ public class XmlParser extends BaseParser implements IParser {
}
}
- private void encodeCompositeElementToStreamWriter(RuntimeResourceDefinition theResDef, IResource theResource, IElement theElement, XMLStreamWriter theEventWriter,
- BaseRuntimeElementCompositeDefinition> resDef, boolean theIncludedResource) throws XMLStreamException, DataFormatException {
+ private void encodeCompositeElementToStreamWriter(RuntimeResourceDefinition theResDef, IResource theResource, IElement theElement, XMLStreamWriter theEventWriter, BaseRuntimeElementCompositeDefinition> resDef, boolean theIncludedResource) throws XMLStreamException,
+ DataFormatException {
encodeExtensionsIfPresent(theResDef, theResource, theEventWriter, theElement, theIncludedResource);
encodeCompositeElementChildrenToStreamWriter(theResDef, theResource, theElement, theEventWriter, resDef.getExtensions(), theIncludedResource);
encodeCompositeElementChildrenToStreamWriter(theResDef, theResource, theElement, theEventWriter, resDef.getChildren(), theIncludedResource);
@@ -455,7 +467,9 @@ public class XmlParser extends BaseParser implements IParser {
/**
* @param theIncludedResource
- * Set to true only if this resource is an "included" resource, as opposed to a "root level" resource by itself or in a bundle entry
+ * Set to true only if this resource is an "included" resource,
+ * as opposed to a "root level" resource by itself or in a bundle
+ * entry
*
*/
private void encodeResourceToXmlStreamWriter(IResource theResource, XMLStreamWriter theEventWriter, boolean theIncludedResource) throws XMLStreamException, DataFormatException {
@@ -478,8 +492,7 @@ public class XmlParser extends BaseParser implements IParser {
theEventWriter.writeEndElement();
}
- private void encodeUndeclaredExtensions(RuntimeResourceDefinition theResDef, IResource theResource, XMLStreamWriter theWriter, List extensions, String tagName, boolean theIncludedResource)
- throws XMLStreamException, DataFormatException {
+ private void encodeUndeclaredExtensions(RuntimeResourceDefinition theResDef, IResource theResource, XMLStreamWriter theWriter, List extensions, String tagName, boolean theIncludedResource) throws XMLStreamException, DataFormatException {
for (ExtensionDt next : extensions) {
theWriter.writeStartElement(tagName);
theWriter.writeAttribute("url", next.getUrl().getValue());
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Sort.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Sort.java
index bfcd51c9498..efae16dea83 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Sort.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/annotation/Sort.java
@@ -1,5 +1,25 @@
package ca.uhn.fhir.rest.annotation;
+/*
+ * #%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.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/SortOrderEnum.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/SortOrderEnum.java
index e35d72b4409..81090173a9e 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/SortOrderEnum.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/SortOrderEnum.java
@@ -1,5 +1,25 @@
package ca.uhn.fhir.rest.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%
+ */
+
public enum SortOrderEnum {
ASC,
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/SortSpec.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/SortSpec.java
index e6835a53415..b9cec2e10f9 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/SortSpec.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/api/SortSpec.java
@@ -1,5 +1,25 @@
package ca.uhn.fhir.rest.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%
+ */
+
/**
* Represents values for sorting
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/BaseClientInvocation.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/BaseClientInvocation.java
index 5471bea738c..6560a38fac5 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/BaseClientInvocation.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/BaseClientInvocation.java
@@ -22,14 +22,26 @@ package ca.uhn.fhir.rest.client;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
+import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
+import org.apache.http.Header;
import org.apache.http.client.methods.HttpRequestBase;
+import org.apache.http.message.BasicHeader;
public abstract class BaseClientInvocation {
+ private List myHeaders;
+
+ public void addHeader(String theName, String theValue) {
+ if (myHeaders == null) {
+ myHeaders = new ArrayList();
+ }
+ myHeaders.add(new BasicHeader(theName, theValue));
+ }
+
/**
* Create an HTTP request out of this client request
*
@@ -40,7 +52,7 @@ public abstract class BaseClientInvocation {
*/
public abstract HttpRequestBase asHttpRequest(String theUrlBase, Map> theExtraParams);
- protected static void appendExtraParamsWithQuestionMark(Map> theExtraParams, StringBuilder theUrlBuilder, boolean theWithQuestionMark) {
+ protected static void appendExtraParamsWithQuestionMark(Map> theExtraParams, StringBuilder theUrlBuilder, boolean theWithQuestionMark) {
boolean first = theWithQuestionMark;
if (theExtraParams != null && theExtraParams.isEmpty() == false) {
@@ -64,4 +76,12 @@ public abstract class BaseClientInvocation {
}
}
+ public void addHeadersToRequest(HttpRequestBase theHttpRequest) {
+ if (myHeaders != null) {
+ for (Header next : myHeaders) {
+ theHttpRequest.addHeader(next);
+ }
+ }
+ }
+
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/BaseClientInvocationWithContents.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/BaseClientInvocationWithContents.java
index c72a8afcd51..c180f5c7471 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/BaseClientInvocationWithContents.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/BaseClientInvocationWithContents.java
@@ -42,7 +42,6 @@ public abstract class BaseClientInvocationWithContents extends BaseClientInvocat
private final Bundle myBundle;
private final FhirContext myContext;
- private List myHeaders;
private final IResource myResource;
private String myUrlExtension;
@@ -61,13 +60,6 @@ public abstract class BaseClientInvocationWithContents extends BaseClientInvocat
myUrlExtension = theUrlExtension;
}
- public void addHeader(String theName, String theValue) {
- if (myHeaders == null) {
- myHeaders = new ArrayList();
- }
- myHeaders.add(new BasicHeader(theName, theValue));
- }
-
@Override
public HttpRequestBase asHttpRequest(String theUrlBase, Map> theExtraParams) throws DataFormatException {
StringBuilder b = new StringBuilder();
@@ -83,13 +75,9 @@ public abstract class BaseClientInvocationWithContents extends BaseClientInvocat
String contents = myContext.newXmlParser().encodeResourceToString(myResource);
StringEntity entity = new StringEntity(contents, ContentType.create(Constants.CT_FHIR_XML, "UTF-8"));
- HttpRequestBase http = createRequest(url, entity);
- if (myHeaders != null) {
- for (Header next : myHeaders) {
- http.addHeader(next);
- }
- }
- return http;
+ HttpRequestBase retVal = createRequest(url, entity);
+ super.addHeadersToRequest(retVal);
+ return retVal;
}
protected abstract HttpRequestBase createRequest(String url, StringEntity theEntity);
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/DeleteClientInvocation.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/DeleteClientInvocation.java
index dfe94bf9e72..439715b66c0 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/DeleteClientInvocation.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/DeleteClientInvocation.java
@@ -48,6 +48,7 @@ public class DeleteClientInvocation extends BaseClientInvocation {
appendExtraParamsWithQuestionMark(theExtraParams, b,true);
HttpDelete retVal = new HttpDelete(b.toString());
+ super.addHeadersToRequest(retVal);
return retVal;
}
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 da7f6757f23..68d420bcf7d 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
@@ -175,6 +175,7 @@ public class GenericClient extends BaseClient implements IGenericClient {
return resp;
}
+ @Override
public MethodOutcome create(IResource theResource) {
BaseClientInvocation invocation = CreateMethodBinding.createCreateInvocation(theResource, myContext);
if (isKeepResponses()) {
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/GetClientInvocation.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/GetClientInvocation.java
index 7cdc6fb8097..84caef94360 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/GetClientInvocation.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/GetClientInvocation.java
@@ -95,7 +95,10 @@ public class GetClientInvocation extends BaseClientInvocation {
appendExtraParamsWithQuestionMark(theExtraParams, b, first);
- return new HttpGet(b.toString());
+ HttpGet retVal = new HttpGet(b.toString());
+ super.addHeadersToRequest(retVal);
+
+ return retVal;
}
}
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 b3cafcf9f3e..e0557cb4c27 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
@@ -98,4 +98,11 @@ public interface IGenericClient {
*/
Conformance conformance();
+ /**
+ * Implementation of the "type create" method.
+ * @param theResource The resource to create
+ * @return An outcome
+ */
+ MethodOutcome create(IResource theResource);
+
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IRestfulClient.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IRestfulClient.java
index 308846f4fa3..d1413eab4ae 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IRestfulClient.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IRestfulClient.java
@@ -24,6 +24,7 @@ package ca.uhn.fhir.rest.client.api;
import org.apache.http.client.HttpClient;
import ca.uhn.fhir.context.FhirContext;
+import ca.uhn.fhir.rest.server.EncodingEnum;
public interface IRestfulClient {
@@ -31,6 +32,21 @@ public interface IRestfulClient {
HttpClient getHttpClient();
+ /**
+ * Specifies that the client should use the given encoding to do its
+ * queries. This means that the client will append the "_format" param
+ * to GET methods (read/search/etc), and will add an appropriate header for
+ * write methods.
+ */
+ void setEncoding(EncodingEnum theEncoding);
+
+ /**
+ * Specifies that the client should request that the server respond with "pretty printing"
+ * enabled. Note that this is a non-standard parameter, so it may only
+ * work against HAPI based servers.
+ */
+ void setPrettyPrint(boolean thePrettyPrint);
+
/**
* Base URL for the server, with no trailing "/"
*/
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 d34d318a928..2f1cf5780db 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
@@ -116,6 +116,14 @@ public abstract class BaseMethodBinding implements IClientResponseHandler {
parser = getContext().newXmlParser();
} else if (Constants.CT_FHIR_XML.equals(theResponseMimeType)) {
parser = getContext().newXmlParser();
+ } else if (Constants.CT_FHIR_JSON.equals(theResponseMimeType)) {
+ parser = getContext().newJsonParser(); // TODO: move all this so it only happens in one place in the lib, and maybe use a hashmap?
+ } else if ("application/json".equals(theResponseMimeType)) {
+ parser = getContext().newJsonParser();
+ } else if ("application/xml".equals(theResponseMimeType)) {
+ parser = getContext().newXmlParser();
+ } else if ("text/xml".equals(theResponseMimeType)) {
+ parser = getContext().newXmlParser();
} else {
throw new NonFhirResponseException("Response contains non-FHIR content-type: " + theResponseMimeType, theResponseMimeType, theResponseStatusCode, IOUtils.toString(theResponseReader));
}
@@ -185,7 +193,7 @@ public abstract class BaseMethodBinding implements IClientResponseHandler {
+ " - Must return a resource type or a collection (List, Set) of a resource type");
}
} else {
- if (!verifyIsValidResourceReturnType(returnTypeFromMethod)) {
+ if (!IResource.class.equals(returnTypeFromMethod) && !verifyIsValidResourceReturnType(returnTypeFromMethod)) {
throw new ConfigurationException("Method '" + theMethod.getName() + "' from " + IResourceProvider.class.getSimpleName() + " type " + theMethod.getDeclaringClass().getCanonicalName() + " returns " + toLogString(returnTypeFromMethod)
+ " - Must return a resource type");
}
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 ef4eb7eb236..080f3edc65e 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
@@ -347,8 +347,10 @@ public abstract class BaseOutcomeReturningMethodBinding extends BaseMethodBindin
if (reader != null) {
IParser parser = ct.newParser(theContext);
- OperationOutcome outcome = parser.parseResource(OperationOutcome.class, reader);
- retVal.setOperationOutcome(outcome);
+ IResource outcome = parser.parseResource(reader);
+ if (outcome instanceof OperationOutcome) {
+ retVal.setOperationOutcome((OperationOutcome) outcome);
+ }
}
} else {
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseOutcomeReturningMethodBindingWithResourceParam.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseOutcomeReturningMethodBindingWithResourceParam.java
index 36537213d9d..af018031d54 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseOutcomeReturningMethodBindingWithResourceParam.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/BaseOutcomeReturningMethodBindingWithResourceParam.java
@@ -29,6 +29,7 @@ import ca.uhn.fhir.rest.annotation.ResourceParam;
import ca.uhn.fhir.rest.client.BaseClientInvocation;
import ca.uhn.fhir.rest.param.IParameter;
import ca.uhn.fhir.rest.param.ResourceParameter;
+import ca.uhn.fhir.rest.server.IResourceProvider;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
abstract class BaseOutcomeReturningMethodBindingWithResourceParam extends BaseOutcomeReturningMethodBinding {
@@ -44,7 +45,14 @@ abstract class BaseOutcomeReturningMethodBindingWithResourceParam extends BaseOu
for (IParameter next : getParameters()) {
if (next instanceof ResourceParameter) {
resourceParameter = (ResourceParameter) next;
- myResourceName = theContext.getResourceDefinition(resourceParameter.getResourceType()).getName();
+ Class extends IResource> resourceType = resourceParameter.getResourceType();
+
+ if (theProvider instanceof IResourceProvider) {
+ resourceType=((IResourceProvider) theProvider).getResourceType();
+ }
+
+ myResourceName = theContext.getResourceDefinition(resourceType).getName();
+
myResourceParameterIndex = index;
}
index++;
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 f4e63903ca3..ed7ee7fed3f 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
@@ -46,6 +46,8 @@ import ca.uhn.fhir.model.api.Bundle;
import ca.uhn.fhir.model.api.BundleEntry;
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.valueset.RestfulOperationSystemEnum;
import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum;
@@ -154,8 +156,12 @@ abstract class BaseResourceReturningMethodBinding extends BaseMethodBinding {
List lmHeaders = theHeaders.get(Constants.HEADER_LAST_MODIFIED_LOWERCASE);
if (lmHeaders != null && lmHeaders.size() > 0 && StringUtils.isNotBlank(lmHeaders.get(0))) {
+ try {
InstantDt lmValue = new InstantDt(lmHeaders.get(0));
resource.getResourceMetadata().put(ResourceMetadataKeyEnum.UPDATED, lmValue);
+ } catch (Exception e) {
+ // TODO: This shouldn't be thrown - Time format is not in InstandDt format for this header, find examples online
+ }
}
switch (getMethodReturnType()) {
@@ -310,6 +316,15 @@ abstract class BaseResourceReturningMethodBinding extends BaseMethodBinding {
bundle.getEntries().add(entry);
entry.setResource(next);
+ TagList list = (TagList) next.getResourceMetadata().get(ResourceMetadataKeyEnum.TAG_LIST);
+ if (list != null) {
+ for (Tag tag : list) {
+ if (StringUtils.isNotBlank(tag.getTerm())) {
+ entry.addCategory().setTerm(tag.getTerm()).setLabel(tag.getLabel()).setScheme(tag.getScheme());
+ }
+ }
+ }
+
RuntimeResourceDefinition def = getContext().getResourceDefinition(next);
@@ -409,6 +424,15 @@ abstract class BaseResourceReturningMethodBinding extends BaseMethodBinding {
theHttpResponse.addHeader(Constants.HEADER_LAST_MODIFIED, lastUpdated.getValueAsString());
}
+ TagList list = (TagList) theResource.getResourceMetadata().get(ResourceMetadataKeyEnum.TAG_LIST);
+ if (list != null) {
+ for (Tag tag : list) {
+ if (StringUtils.isNotBlank(tag.getTerm())) {
+ theHttpResponse.addHeader(Constants.HEADER_CATEGORY, tag.toHeaderValue());
+ }
+ }
+ }
+
PrintWriter writer = theHttpResponse.getWriter();
try {
if (theNarrativeMode == NarrativeModeEnum.ONLY) {
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/ConformanceMethodBinding.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/ConformanceMethodBinding.java
index cb0ff1e8c99..46f1fe34f6e 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/ConformanceMethodBinding.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/ConformanceMethodBinding.java
@@ -32,6 +32,7 @@ import ca.uhn.fhir.model.dstu.valueset.RestfulOperationSystemEnum;
import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum;
import ca.uhn.fhir.rest.client.GetClientInvocation;
import ca.uhn.fhir.rest.method.SearchMethodBinding.RequestType;
+import ca.uhn.fhir.rest.param.IParameter;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
@@ -53,7 +54,16 @@ public class ConformanceMethodBinding extends BaseResourceReturningMethodBinding
@Override
public GetClientInvocation invokeClient(Object[] theArgs) throws InternalErrorException {
- return createConformanceInvocation();
+ GetClientInvocation retVal = createConformanceInvocation();
+
+ if (theArgs != null) {
+ for (int idx = 0; idx < theArgs.length; idx++) {
+ IParameter nextParam = getParameters().get(idx);
+ nextParam.translateClientArgumentIntoQueryArgument(theArgs[idx], null, retVal);
+ }
+ }
+
+ return retVal;
}
public static GetClientInvocation createConformanceInvocation() {
@@ -61,8 +71,7 @@ public class ConformanceMethodBinding extends BaseResourceReturningMethodBinding
}
@Override
- public List invokeServer(Object theResourceProvider, Request theRequest, Object[] theMethodParams) throws InvalidRequestException,
- InternalErrorException {
+ public List invokeServer(Object theResourceProvider, Request theRequest, Object[] theMethodParams) throws InvalidRequestException, InternalErrorException {
IResource conf;
try {
conf = (Conformance) invokeServerMethod(theResourceProvider, theMethodParams);
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/CreateMethodBinding.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/CreateMethodBinding.java
index 01d983d55b6..2d2fb6776e0 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/CreateMethodBinding.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/CreateMethodBinding.java
@@ -33,6 +33,7 @@ import ca.uhn.fhir.rest.annotation.Create;
import ca.uhn.fhir.rest.client.BaseClientInvocation;
import ca.uhn.fhir.rest.client.PostClientInvocation;
import ca.uhn.fhir.rest.method.SearchMethodBinding.RequestType;
+import ca.uhn.fhir.rest.param.IParameter;
public class CreateMethodBinding extends BaseOutcomeReturningMethodBindingWithResourceParam {
@@ -59,10 +60,19 @@ public class CreateMethodBinding extends BaseOutcomeReturningMethodBindingWithRe
protected BaseClientInvocation createClientInvocation(Object[] theArgs, IResource resource) {
FhirContext context = getContext();
- return createCreateInvocation(resource, context);
+ BaseClientInvocation retVal = createCreateInvocation(resource, context);
+
+ if (theArgs != null) {
+ for (int idx = 0; idx < theArgs.length; idx++) {
+ IParameter nextParam = getParameters().get(idx);
+ nextParam.translateClientArgumentIntoQueryArgument(theArgs[idx], null, retVal);
+ }
+ }
+
+ return retVal;
}
- public static BaseClientInvocation createCreateInvocation(IResource resource, FhirContext context) {
+ public static PostClientInvocation createCreateInvocation(IResource resource, FhirContext context) {
RuntimeResourceDefinition def = context.getResourceDefinition(resource);
String resourceName = def.getName();
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/DeleteMethodBinding.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/DeleteMethodBinding.java
index 57cb69eb1f0..9d00183b1d2 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/DeleteMethodBinding.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/DeleteMethodBinding.java
@@ -38,6 +38,7 @@ import ca.uhn.fhir.rest.client.BaseClientInvocation;
import ca.uhn.fhir.rest.client.DeleteClientInvocation;
import ca.uhn.fhir.rest.client.PostClientInvocation;
import ca.uhn.fhir.rest.method.SearchMethodBinding.RequestType;
+import ca.uhn.fhir.rest.param.IParameter;
import ca.uhn.fhir.rest.server.IResourceProvider;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
@@ -133,6 +134,11 @@ public class DeleteMethodBinding extends BaseOutcomeReturningMethodBinding {
DeleteClientInvocation retVal = createDeleteInvocation(resourceName, idDt);
+ for (int idx = 0; idx < theArgs.length; idx++) {
+ IParameter nextParam = getParameters().get(idx);
+ nextParam.translateClientArgumentIntoQueryArgument(theArgs[idx], null, retVal);
+ }
+
return retVal;
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/HistoryMethodBinding.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/HistoryMethodBinding.java
index 583ac0623cd..ebfc6f044f9 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/HistoryMethodBinding.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/HistoryMethodBinding.java
@@ -117,7 +117,7 @@ public class HistoryMethodBinding extends BaseResourceReturningMethodBinding {
if (theArgs != null) {
for (int idx = 0; idx < theArgs.length; idx++) {
IParameter nextParam = getParameters().get(idx);
- nextParam.translateClientArgumentIntoQueryArgument(theArgs[idx], retVal.getParameters());
+ nextParam.translateClientArgumentIntoQueryArgument(theArgs[idx], retVal.getParameters(),retVal);
}
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/ReadMethodBinding.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/ReadMethodBinding.java
index 1ba3848bdc5..4fa74536a71 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/ReadMethodBinding.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/ReadMethodBinding.java
@@ -34,6 +34,7 @@ import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum;
import ca.uhn.fhir.model.primitive.IdDt;
import ca.uhn.fhir.rest.client.GetClientInvocation;
import ca.uhn.fhir.rest.method.SearchMethodBinding.RequestType;
+import ca.uhn.fhir.rest.param.IParameter;
import ca.uhn.fhir.rest.server.Constants;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
@@ -118,15 +119,23 @@ public class ReadMethodBinding extends BaseResourceReturningMethodBinding {
@Override
public GetClientInvocation invokeClient(Object[] theArgs) {
+ GetClientInvocation retVal;
IdDt id = ((IdDt) theArgs[myIdIndex]);
if (myVersionIdIndex == null) {
String resourceName = getResourceName();
- return createReadInvocation(id, resourceName);
+ retVal = createReadInvocation(id, resourceName);
} else {
IdDt vid = ((IdDt) theArgs[myVersionIdIndex]);
String resourceName = getResourceName();
- return createVReadInvocation(id, vid, resourceName);
+ retVal = createVReadInvocation(id, vid, resourceName);
}
+
+ for (int idx = 0; idx < theArgs.length; idx++) {
+ IParameter nextParam = getParameters().get(idx);
+ nextParam.translateClientArgumentIntoQueryArgument(theArgs[idx], null, retVal);
+ }
+
+ return retVal;
}
public static GetClientInvocation createVReadInvocation(IdDt theId, IdDt vid, String resourceName) {
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/SearchMethodBinding.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/SearchMethodBinding.java
index c64efe022c3..c62dcd4ace7 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/SearchMethodBinding.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/SearchMethodBinding.java
@@ -84,16 +84,18 @@ public class SearchMethodBinding extends BaseResourceReturningMethodBinding {
if (myQueryName != null) {
queryStringArgs.put(Constants.PARAM_QUERY, Collections.singletonList(myQueryName));
}
+
+ String resourceName = getResourceName();
+ GetClientInvocation retVal = createSearchInvocation(resourceName, queryStringArgs);
if (theArgs != null) {
for (int idx = 0; idx < theArgs.length; idx++) {
IParameter nextParam = getParameters().get(idx);
- nextParam.translateClientArgumentIntoQueryArgument(theArgs[idx], queryStringArgs);
+ nextParam.translateClientArgumentIntoQueryArgument(theArgs[idx], queryStringArgs,retVal);
}
}
- String resourceName = getResourceName();
- return createSearchInvocation(resourceName, queryStringArgs);
+ return retVal;
}
public static GetClientInvocation createSearchInvocation(String theResourceName, Map> theParameters) {
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 5ec638f60a0..d55dfa1d696 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
@@ -40,6 +40,7 @@ import ca.uhn.fhir.rest.api.MethodOutcome;
import ca.uhn.fhir.rest.client.BaseClientInvocation;
import ca.uhn.fhir.rest.client.PutClientInvocation;
import ca.uhn.fhir.rest.method.SearchMethodBinding.RequestType;
+import ca.uhn.fhir.rest.param.IParameter;
import ca.uhn.fhir.rest.server.Constants;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
@@ -113,6 +114,11 @@ public class UpdateMethodBinding extends BaseOutcomeReturningMethodBindingWithRe
PutClientInvocation retVal = createUpdateInvocation(theResource, idDt, versionIdDt, context);
+ for (int idx = 0; idx < theArgs.length; idx++) {
+ IParameter nextParam = getParameters().get(idx);
+ nextParam.translateClientArgumentIntoQueryArgument(theArgs[idx], null, retVal);
+ }
+
return retVal;
}
@@ -124,7 +130,7 @@ public class UpdateMethodBinding extends BaseOutcomeReturningMethodBindingWithRe
urlExtension.append('/');
urlExtension.append(id);
PutClientInvocation retVal = new PutClientInvocation(context, theResource, urlExtension.toString());
-
+
if (versionIdDt != null) {
String versionId = versionIdDt.getValue();
if (StringUtils.isNotBlank(versionId)) {
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/ValidateMethodBinding.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/ValidateMethodBinding.java
index 98b33fd3b3d..e94525c66cf 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/ValidateMethodBinding.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/ValidateMethodBinding.java
@@ -33,6 +33,7 @@ import ca.uhn.fhir.rest.annotation.Validate;
import ca.uhn.fhir.rest.client.BaseClientInvocation;
import ca.uhn.fhir.rest.client.PostClientInvocation;
import ca.uhn.fhir.rest.method.SearchMethodBinding.RequestType;
+import ca.uhn.fhir.rest.param.IParameter;
import ca.uhn.fhir.rest.server.Constants;
public class ValidateMethodBinding extends BaseOutcomeReturningMethodBindingWithResourceParam {
@@ -72,6 +73,12 @@ public class ValidateMethodBinding extends BaseOutcomeReturningMethodBindingWith
}
PostClientInvocation retVal = createValidateInvocation(theResource, idDt, context);
+
+ for (int idx = 0; idx < theArgs.length; idx++) {
+ IParameter nextParam = getParameters().get(idx);
+ nextParam.translateClientArgumentIntoQueryArgument(theArgs[idx], null, retVal);
+ }
+
return retVal;
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/BaseQueryParameter.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/BaseQueryParameter.java
index 08fe8cdd901..c42e3364af7 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/BaseQueryParameter.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/BaseQueryParameter.java
@@ -28,6 +28,7 @@ import java.util.List;
import java.util.Map;
import ca.uhn.fhir.model.dstu.valueset.SearchParamTypeEnum;
+import ca.uhn.fhir.rest.client.BaseClientInvocation;
import ca.uhn.fhir.rest.method.Request;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
@@ -52,7 +53,7 @@ public abstract class BaseQueryParameter implements IParameter {
public abstract SearchParamTypeEnum getParamType();
@Override
- public void translateClientArgumentIntoQueryArgument(Object theSourceClientArgument, Map> theTargetQueryArguments) throws InternalErrorException {
+ public void translateClientArgumentIntoQueryArgument(Object theSourceClientArgument, Map> theTargetQueryArguments, BaseClientInvocation theClientInvocation) throws InternalErrorException {
if (theSourceClientArgument == null) {
if (isRequired()) {
throw new NullPointerException("SearchParameter '" + getName() + "' is required and may not be null");
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/CountParameter.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/CountParameter.java
index 8a8dc18bfe7..bdfaf63ed42 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/CountParameter.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/CountParameter.java
@@ -32,6 +32,7 @@ import ca.uhn.fhir.context.ConfigurationException;
import ca.uhn.fhir.model.primitive.IntegerDt;
import ca.uhn.fhir.parser.DataFormatException;
import ca.uhn.fhir.rest.annotation.Since;
+import ca.uhn.fhir.rest.client.BaseClientInvocation;
import ca.uhn.fhir.rest.method.Request;
import ca.uhn.fhir.rest.server.Constants;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
@@ -42,7 +43,7 @@ public class CountParameter implements IParameter {
private Class> myType;
@Override
- public void translateClientArgumentIntoQueryArgument(Object theSourceClientArgument, Map> theTargetQueryArguments) throws InternalErrorException {
+ public void translateClientArgumentIntoQueryArgument(Object theSourceClientArgument, Map> theTargetQueryArguments, BaseClientInvocation theClientInvocation) throws InternalErrorException {
if (theSourceClientArgument != null) {
IntegerDt since = ParameterUtil.toInteger(theSourceClientArgument);
if (since.isEmpty() == false) {
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/IParameter.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/IParameter.java
index f4fbc46faa9..7430199133e 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/IParameter.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/IParameter.java
@@ -26,6 +26,8 @@ import java.util.List;
import java.util.Map;
import ca.uhn.fhir.model.api.IResource;
+import ca.uhn.fhir.rest.client.BaseClientInvocation;
+import ca.uhn.fhir.rest.client.PutClientInvocation;
import ca.uhn.fhir.rest.method.Request;
import ca.uhn.fhir.rest.server.IResourceProvider;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
@@ -33,7 +35,7 @@ import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
public interface IParameter {
- void translateClientArgumentIntoQueryArgument(Object theSourceClientArgument, Map> theTargetQueryArguments) throws InternalErrorException;
+ void translateClientArgumentIntoQueryArgument(Object theSourceClientArgument, Map> theTargetQueryArguments, BaseClientInvocation theClientInvocation) throws InternalErrorException;
/**
* This server method method takes the data received by the server in an incoming request, and translates that data into a single argument for a server method invocation. Note that all
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/NullParameter.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/NullParameter.java
index 10d37fcd4e2..b14fa022424 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/NullParameter.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/NullParameter.java
@@ -25,6 +25,7 @@ import java.util.Collection;
import java.util.List;
import java.util.Map;
+import ca.uhn.fhir.rest.client.BaseClientInvocation;
import ca.uhn.fhir.rest.method.Request;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
@@ -32,7 +33,7 @@ import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
class NullParameter implements IParameter {
@Override
- public void translateClientArgumentIntoQueryArgument(Object theSourceClientArgument, Map> theTargetQueryArguments) throws InternalErrorException {
+ public void translateClientArgumentIntoQueryArgument(Object theSourceClientArgument, Map> theTargetQueryArguments, BaseClientInvocation theClientInvocation) throws InternalErrorException {
//nothing
}
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 4c3a1bc8bf5..50cdac8cc9d 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
@@ -42,6 +42,7 @@ import org.apache.commons.lang3.time.DateUtils;
import ca.uhn.fhir.context.ConfigurationException;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.model.api.PathSpecification;
+import ca.uhn.fhir.model.api.TagList;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.primitive.InstantDt;
import ca.uhn.fhir.model.primitive.IntegerDt;
@@ -70,19 +71,22 @@ public class ParameterUtil {
Class> parameterType = parameterTypes[paramIndex];
Class extends java.util.Collection>> outerCollectionType = null;
Class extends java.util.Collection>> innerCollectionType = null;
- if (Collection.class.isAssignableFrom(parameterType)) {
- innerCollectionType = (Class extends java.util.Collection>>) parameterType;
- parameterType = ReflectionUtil.getGenericCollectionTypeOfMethodParameter(theMethod, paramIndex);
+ if (TagList.class.isAssignableFrom(parameterType)) {
+ param = new TagListParameter();
+ } else {
+ if (Collection.class.isAssignableFrom(parameterType)) {
+ innerCollectionType = (Class extends java.util.Collection>>) parameterType;
+ parameterType = ReflectionUtil.getGenericCollectionTypeOfMethodParameter(theMethod, paramIndex);
+ }
+ if (Collection.class.isAssignableFrom(parameterType)) {
+ outerCollectionType = innerCollectionType;
+ innerCollectionType = (Class extends java.util.Collection>>) parameterType;
+ parameterType = ReflectionUtil.getGenericCollectionTypeOfMethodParameter(theMethod, paramIndex);
+ }
+ if (Collection.class.isAssignableFrom(parameterType)) {
+ throw new ConfigurationException("Argument #" + paramIndex + " of Method '" + theMethod.getName() + "' in type '" + theMethod.getDeclaringClass().getCanonicalName() + "' is of an invalid generic type (can not be a collection of a collection of a collection)");
+ }
}
- if (Collection.class.isAssignableFrom(parameterType)) {
- outerCollectionType = innerCollectionType;
- innerCollectionType = (Class extends java.util.Collection>>) parameterType;
- parameterType = ReflectionUtil.getGenericCollectionTypeOfMethodParameter(theMethod, paramIndex);
- }
- if (Collection.class.isAssignableFrom(parameterType)) {
- throw new ConfigurationException("Argument #" + paramIndex + " of Method '" + theMethod.getName() + "' in type '" + theMethod.getDeclaringClass().getCanonicalName() + "' is of an invalid generic type (can not be a collection of a collection of a collection)");
- }
-
if (parameterType.equals(HttpServletRequest.class) || parameterType.equals(ServletRequest.class)) {
param = new ServletRequestParameter();
} else if (parameterType.equals(HttpServletResponse.class) || parameterType.equals(ServletResponse.class)) {
@@ -110,15 +114,15 @@ public class ParameterUtil {
Class> specType;
if (parameterType == String.class) {
- instantiableCollectionType=null;
- specType=String.class;
- }else if (parameterType != PathSpecification.class || innerCollectionType == null || outerCollectionType != null) {
+ instantiableCollectionType = null;
+ specType = String.class;
+ } else if (parameterType != PathSpecification.class || innerCollectionType == null || outerCollectionType != null) {
throw new ConfigurationException("Method '" + theMethod.getName() + "' is annotated with @" + IncludeParam.class.getSimpleName() + " but has a type other than Collection<" + PathSpecification.class.getSimpleName() + ">");
} else {
instantiableCollectionType = (Class extends Collection>) CollectionBinder.getInstantiableCollectionType(innerCollectionType, "Method '" + theMethod.getName() + "'");
specType = PathSpecification.class;
}
-
+
param = new IncludeParameter((IncludeParam) nextAnnotation, instantiableCollectionType, specType);
} else if (nextAnnotation instanceof ResourceParam) {
if (!IResource.class.isAssignableFrom(parameterType)) {
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ResourceParameter.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ResourceParameter.java
index b71bb3ce35c..fc62d6da414 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ResourceParameter.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ResourceParameter.java
@@ -25,7 +25,9 @@ import java.util.Collection;
import java.util.List;
import java.util.Map;
+import ca.uhn.fhir.context.ConfigurationException;
import ca.uhn.fhir.model.api.IResource;
+import ca.uhn.fhir.rest.client.BaseClientInvocation;
import ca.uhn.fhir.rest.method.Request;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
@@ -39,7 +41,7 @@ public class ResourceParameter implements IParameter {
}
@Override
- public void translateClientArgumentIntoQueryArgument(Object theSourceClientArgument, Map> theTargetQueryArguments) throws InternalErrorException {
+ public void translateClientArgumentIntoQueryArgument(Object theSourceClientArgument, Map> theTargetQueryArguments, BaseClientInvocation theClientInvocation) throws InternalErrorException {
// TODO Auto-generated method stub
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ServerBaseParameter.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ServerBaseParameter.java
index 149d8394f89..6475f23841c 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ServerBaseParameter.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ServerBaseParameter.java
@@ -25,6 +25,7 @@ import java.util.Collection;
import java.util.List;
import java.util.Map;
+import ca.uhn.fhir.rest.client.BaseClientInvocation;
import ca.uhn.fhir.rest.method.Request;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
@@ -33,7 +34,7 @@ class ServerBaseParameter implements IParameter {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ServerBaseParameter.class);
@Override
- public void translateClientArgumentIntoQueryArgument(Object theSourceClientArgument, Map> theTargetQueryArguments) throws InternalErrorException {
+ public void translateClientArgumentIntoQueryArgument(Object theSourceClientArgument, Map> theTargetQueryArguments, BaseClientInvocation theClientInvocation) throws InternalErrorException {
/*
* Does nothing, since we just ignore serverbase arguments
*/
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ServletRequestParameter.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ServletRequestParameter.java
index 9c55ba591dd..7f6949803ab 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ServletRequestParameter.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ServletRequestParameter.java
@@ -25,6 +25,7 @@ import java.util.Collection;
import java.util.List;
import java.util.Map;
+import ca.uhn.fhir.rest.client.BaseClientInvocation;
import ca.uhn.fhir.rest.method.Request;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
@@ -33,7 +34,7 @@ class ServletRequestParameter implements IParameter {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ServletRequestParameter.class);
@Override
- public void translateClientArgumentIntoQueryArgument(Object theSourceClientArgument, Map> theTargetQueryArguments) throws InternalErrorException {
+ public void translateClientArgumentIntoQueryArgument(Object theSourceClientArgument, Map> theTargetQueryArguments, BaseClientInvocation theClientInvocation) throws InternalErrorException {
/*
* Does nothing, since we just ignore HttpServletRequest arguments
*/
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ServletResponseParameter.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ServletResponseParameter.java
index 8b1397a2676..ae49506fc09 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ServletResponseParameter.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/ServletResponseParameter.java
@@ -25,6 +25,7 @@ import java.util.Collection;
import java.util.List;
import java.util.Map;
+import ca.uhn.fhir.rest.client.BaseClientInvocation;
import ca.uhn.fhir.rest.method.Request;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
@@ -33,7 +34,7 @@ class ServletResponseParameter implements IParameter {
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ServletResponseParameter.class);
@Override
- public void translateClientArgumentIntoQueryArgument(Object theSourceClientArgument, Map> theTargetQueryArguments) throws InternalErrorException {
+ public void translateClientArgumentIntoQueryArgument(Object theSourceClientArgument, Map> theTargetQueryArguments, BaseClientInvocation theClientInvocation) throws InternalErrorException {
/*
* Does nothing, since we just ignore HttpServletResponse arguments
*/
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/SinceParameter.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/SinceParameter.java
index 9bc6850d5d8..56f8598a72b 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/SinceParameter.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/SinceParameter.java
@@ -32,6 +32,7 @@ import ca.uhn.fhir.context.ConfigurationException;
import ca.uhn.fhir.model.primitive.InstantDt;
import ca.uhn.fhir.parser.DataFormatException;
import ca.uhn.fhir.rest.annotation.Since;
+import ca.uhn.fhir.rest.client.BaseClientInvocation;
import ca.uhn.fhir.rest.method.Request;
import ca.uhn.fhir.rest.server.Constants;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
@@ -42,7 +43,7 @@ public class SinceParameter implements IParameter {
private Class> myType;
@Override
- public void translateClientArgumentIntoQueryArgument(Object theSourceClientArgument, Map> theTargetQueryArguments) throws InternalErrorException {
+ public void translateClientArgumentIntoQueryArgument(Object theSourceClientArgument, Map> theTargetQueryArguments, BaseClientInvocation theClientInvocation) throws InternalErrorException {
if (theSourceClientArgument != null) {
InstantDt since = ParameterUtil.toInstant(theSourceClientArgument);
if (since.isEmpty() == false) {
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/SortParameter.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/SortParameter.java
index 8faa24da88d..82680e1e027 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/SortParameter.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/SortParameter.java
@@ -1,5 +1,25 @@
package ca.uhn.fhir.rest.param;
+/*
+ * #%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.lang.reflect.Method;
import java.util.Collection;
import java.util.List;
@@ -9,6 +29,7 @@ import ca.uhn.fhir.context.ConfigurationException;
import ca.uhn.fhir.rest.annotation.Sort;
import ca.uhn.fhir.rest.api.SortOrderEnum;
import ca.uhn.fhir.rest.api.SortSpec;
+import ca.uhn.fhir.rest.client.BaseClientInvocation;
import ca.uhn.fhir.rest.method.Request;
import ca.uhn.fhir.rest.server.Constants;
import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
@@ -17,7 +38,7 @@ import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
public class SortParameter implements IParameter {
@Override
- public void translateClientArgumentIntoQueryArgument(Object theSourceClientArgument, Map> theTargetQueryArguments) throws InternalErrorException {
+ public void translateClientArgumentIntoQueryArgument(Object theSourceClientArgument, Map> theTargetQueryArguments, BaseClientInvocation theClientInvocation) throws InternalErrorException {
SortSpec ss = (SortSpec) theSourceClientArgument;
if (ss ==null) {
return;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TagListParameter.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TagListParameter.java
new file mode 100644
index 00000000000..d5d4f216ab3
--- /dev/null
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/TagListParameter.java
@@ -0,0 +1,150 @@
+package ca.uhn.fhir.rest.param;
+
+/*
+ * #%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 static org.apache.commons.lang3.StringUtils.*;
+
+import java.lang.reflect.Method;
+import java.util.Collection;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.lang3.StringUtils;
+
+import ca.uhn.fhir.model.api.Tag;
+import ca.uhn.fhir.model.api.TagList;
+import ca.uhn.fhir.rest.client.BaseClientInvocation;
+import ca.uhn.fhir.rest.method.Request;
+import ca.uhn.fhir.rest.server.Constants;
+import ca.uhn.fhir.rest.server.exceptions.InternalErrorException;
+import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
+
+public class TagListParameter implements IParameter {
+ private static final String SCHEME = "scheme=\"";
+ private static final String LABEL = "label=\"";
+ private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(TagListParameter.class);
+
+ @Override
+ public void translateClientArgumentIntoQueryArgument(Object theSourceClientArgument, Map> theTargetQueryArguments, BaseClientInvocation theClientInvocation) throws InternalErrorException {
+ TagList list = (TagList) theSourceClientArgument;
+ if (list != null) {
+ for (Tag tag : list) {
+ if (StringUtils.isNotBlank(tag.getTerm())) {
+ theClientInvocation.addHeader(Constants.HEADER_CATEGORY, tag.toHeaderValue());
+ }
+ }
+ }
+ }
+
+ @Override
+ public Object translateQueryParametersIntoServerArgument(Request theRequest, Object theRequestContents) throws InternalErrorException, InvalidRequestException {
+ TagList retVal = new TagList();
+
+ for (Enumeration enumeration = theRequest.getServletRequest().getHeaders(Constants.HEADER_CATEGORY); enumeration.hasMoreElements();) {
+ String nextTagComplete = enumeration.nextElement();
+ StringBuilder next = new StringBuilder(nextTagComplete);
+
+ parseTagValue(retVal, nextTagComplete, next);
+
+ }
+ return retVal;
+ }
+
+ private void parseTagValue(TagList theTagList, String theCompleteHeaderValue, StringBuilder theBuffer) {
+ int firstSemicolon = theBuffer.indexOf(";");
+ int deleteTo;
+ if (firstSemicolon == -1) {
+ firstSemicolon = theBuffer.indexOf(",");
+ if (firstSemicolon == -1) {
+ firstSemicolon = theBuffer.length();
+ deleteTo = theBuffer.length();
+ } else {
+ deleteTo = firstSemicolon;
+ }
+ } else {
+ deleteTo = firstSemicolon + 1;
+ }
+
+ String term = theBuffer.substring(0, firstSemicolon);
+ String scheme = null;
+ String label = null;
+ if (isBlank(term)) {
+ return;
+ }
+
+ theBuffer.delete(0, deleteTo);
+ while (theBuffer.length() > 0 && theBuffer.charAt(0) == ' ') {
+ theBuffer.deleteCharAt(0);
+ }
+
+ while (theBuffer.length() > 0) {
+ boolean foundSomething = false;
+ if (theBuffer.length() > SCHEME.length() && theBuffer.substring(0, SCHEME.length()).equals(SCHEME)) {
+ int closeIdx = theBuffer.indexOf("\"", SCHEME.length());
+ scheme = theBuffer.substring(SCHEME.length(), closeIdx);
+ theBuffer.delete(0, closeIdx + 1);
+ foundSomething = true;
+ }
+ if (theBuffer.length() > LABEL.length() && theBuffer.substring(0, LABEL.length()).equals(LABEL)) {
+ int closeIdx = theBuffer.indexOf("\"", LABEL.length());
+ label = theBuffer.substring(LABEL.length(), closeIdx);
+ theBuffer.delete(0, closeIdx + 1);
+ foundSomething = true;
+ }
+ // TODO: support enc2231-string as described in
+ // http://tools.ietf.org/html/draft-johnston-http-category-header-02
+ // TODO: support multiple tags in one header as described in
+ // http://hl7.org/implement/standards/fhir/http.html#tags
+
+ while (theBuffer.length() > 0 && (theBuffer.charAt(0) == ' ' || theBuffer.charAt(0) == ';')) {
+ theBuffer.deleteCharAt(0);
+ }
+
+ if (!foundSomething) {
+ break;
+ }
+ }
+
+ if (theBuffer.length() > 0 && theBuffer.charAt(0) == ',') {
+ theBuffer.deleteCharAt(0);
+ while (theBuffer.length() > 0 && theBuffer.charAt(0) == ' ') {
+ theBuffer.deleteCharAt(0);
+ }
+ theTagList.add(new Tag(term, label, scheme));
+ parseTagValue(theTagList, theCompleteHeaderValue, theBuffer);
+ } else {
+ theTagList.add(new Tag(term, label, scheme));
+ }
+
+ if (theBuffer.length() > 0) {
+ ourLog.warn("Ignoring extra text at the end of " + Constants.HEADER_CATEGORY + " tag '" + theBuffer.toString() + "' - Complete tag value was: " + theCompleteHeaderValue);
+ }
+
+ }
+
+ @Override
+ public void initializeTypes(Method theMethod, Class extends Collection>> theOuterCollectionType, Class extends Collection>> theInnerCollectionType, Class> theParameterType) {
+ // TODO Auto-generated method stub
+
+ }
+
+}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/Constants.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/Constants.java
index 96c0194fd0e..f0f21774ff7 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/Constants.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/Constants.java
@@ -40,7 +40,7 @@ public class Constants {
public static final String CT_JSON = "application/json";
public static final String CT_HTML = "text/html";
public static final String PARAM_NARRATIVE = "_narrative";
- public static final String PARAM_HISTORY = "_history";
+ public static final String PARAM_HISTORY = "_history";
public static final String PARAM_PRETTY = "_pretty";
public static final String PARAM_QUERY = "_query";
public static final int STATUS_HTTP_201_CREATED = 201;
@@ -66,10 +66,12 @@ public class Constants {
public static final String PARAM_SORT = "_sort";
public static final String PARAM_SORT_ASC = "_sort:asc";
public static final String PARAM_SORT_DESC = "_sort:desc";
+ public static final String HEADER_CATEGORY = "Category";
+ public static final String OPENSEARCH_NS_OLDER = "http://purl.org/atompub/tombstones/1.0";
static {
Map valToEncoding = new HashMap();
-
+
HashSet valXml = new HashSet();
valXml.add(CT_FHIR_XML);
valXml.add("application/xml");
@@ -88,7 +90,7 @@ public class Constants {
valToEncoding.put(string, EncodingEnum.JSON);
}
- FORMAT_VAL_TO_ENCODING=Collections.unmodifiableMap(valToEncoding);
+ FORMAT_VAL_TO_ENCODING = Collections.unmodifiableMap(valToEncoding);
}
}
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 77d7c3bea18..7cce26c0dc1 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
@@ -339,8 +339,17 @@ public class RestfulServer extends HttpServlet {
private void findResourceMethods(Object theProvider) throws Exception {
ourLog.info("Scanning type for RESTful methods: {}", theProvider.getClass());
-
+
Class> clazz = theProvider.getClass();
+ Class> supertype = clazz.getSuperclass();
+ if (!Object.class.equals(supertype)) {
+ findResourceMethods(theProvider, supertype);
+ }
+
+ findResourceMethods(theProvider, clazz);
+ }
+
+ private void findResourceMethods(Object theProvider, Class> clazz) {
for (Method m : clazz.getDeclaredMethods()) {
if (Modifier.isPublic(m.getModifiers()) && !Modifier.isStatic(m.getModifiers())) {
ourLog.debug("Scanning public method: {}#{}", theProvider.getClass(), m.getName());
@@ -374,6 +383,17 @@ public class RestfulServer extends HttpServlet {
private void findSystemMethods(Object theSystemProvider) {
Class> clazz = theSystemProvider.getClass();
+
+ findSystemMethods(theSystemProvider, clazz);
+
+ }
+
+ private void findSystemMethods(Object theSystemProvider, Class> clazz) {
+ Class> supertype = clazz.getSuperclass();
+ if (!Object.class.equals(supertype)) {
+ findSystemMethods(theSystemProvider, supertype);
+ }
+
for (Method m : clazz.getDeclaredMethods()) {
if (Modifier.isPublic(m.getModifiers())) {
ourLog.debug("Scanning public method: {}#{}", theSystemProvider.getClass(), m.getName());
@@ -389,7 +409,6 @@ public class RestfulServer extends HttpServlet {
}
}
}
-
}
@Override
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/provider/ServerConformanceProvider.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/provider/ServerConformanceProvider.java
index f19efc0d8f4..ed40aa542d8 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/provider/ServerConformanceProvider.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/provider/ServerConformanceProvider.java
@@ -39,6 +39,7 @@ import ca.uhn.fhir.model.dstu.valueset.RestfulConformanceModeEnum;
import ca.uhn.fhir.model.dstu.valueset.RestfulOperationSystemEnum;
import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum;
import ca.uhn.fhir.model.primitive.BooleanDt;
+import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.IdDt;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.rest.annotation.Metadata;
@@ -107,16 +108,17 @@ public class ServerConformanceProvider {
if (nextMethodBinding instanceof SearchMethodBinding) {
List params = ((SearchMethodBinding) nextMethodBinding).getParameters();
- // TODO: this would probably work best if we sorted these by required first, then optional
-
+ // TODO: this would probably work best if we sorted these by
+ // required first, then optional
+
RestResourceSearchParam searchParam = null;
- StringDt searchParamChain = null;
+ ExtensionDt searchParamChain = null;
for (IParameter nextParameterObj : params) {
if (!(nextParameterObj instanceof SearchParameter)) {
continue;
}
-
- SearchParameter nextParameter = (SearchParameter)nextParameterObj;
+
+ SearchParameter nextParameter = (SearchParameter) nextParameterObj;
if (searchParam == null) {
if (!nameToSearchParam.containsKey(nextParameter.getName())) {
@@ -128,28 +130,41 @@ public class ServerConformanceProvider {
} else {
searchParam = nameToSearchParam.get(nextParameter.getName());
}
-
- if (searchParam !=null) {
+
+ if (searchParam != null) {
searchParam.setType(nextParameter.getParamType());
}
+
+ } else {
+
+ searchParamChain = searchParam.addUndeclaredExtension(false, ExtensionConstants.CONF_ADDITIONAL_PARAM);
- } else if (searchParamChain == null) {
- searchParam.addChain(nextParameter.getName());
- searchParamChain = searchParam.getChain().get(searchParam.getChain().size()-1);
+// if (searchParamChain == null) {
+// } else {
+// searchParamChain = searchParamChain.addUndeclaredExtension(false, ExtensionConstants.CONF_ADDITIONAL_PARAM);
+// }
+
ExtensionDt ext = new ExtensionDt();
- ext.setUrl(ExtensionConstants.CONF_CHAIN_REQUIRED);
+ ext.setUrl(ExtensionConstants.CONF_ADDITIONAL_PARAM_NAME);
+ ext.setValue(new StringDt(nextParameter.getName()));
+ searchParamChain.getUndeclaredExtensions().add(ext);
+
+ ext = new ExtensionDt();
+ ext.setUrl(ExtensionConstants.CONF_ADDITIONAL_PARAM_DESCRIPTION);
+ ext.setValue(new StringDt(nextParameter.getDescription()));
+ searchParamChain.getUndeclaredExtensions().add(ext);
+
+ ext = new ExtensionDt();
+ ext.setUrl(ExtensionConstants.CONF_ADDITIONAL_PARAM_TYPE);
+ if (nextParameter.getParamType() != null) {
+ ext.setValue(new CodeDt(nextParameter.getParamType().getCode()));
+ }
+ searchParamChain.getUndeclaredExtensions().add(ext);
+
+ ext = new ExtensionDt();
+ ext.setUrl(ExtensionConstants.CONF_ADDITIONAL_PARAM_REQUIRED);
ext.setValue(new BooleanDt(nextParameter.isRequired()));
searchParamChain.getUndeclaredExtensions().add(ext);
-
- } else {
- ExtensionDt ext = new ExtensionDt();
- ext.setUrl(ExtensionConstants.CONF_ALSO_CHAIN);
- searchParamChain.getUndeclaredExtensions().add(ext);
-
- ExtensionDt extReq = new ExtensionDt();
- extReq.setUrl(ExtensionConstants.CONF_CHAIN_REQUIRED);
- extReq.setValue(new BooleanDt(nextParameter.isRequired()));
- ext.getUndeclaredExtensions().add(extReq);
}
@@ -167,19 +182,18 @@ public class ServerConformanceProvider {
if (o1 == null) {
return 1;
}
- if (o2==null) {
+ if (o2 == null) {
return -1;
}
return o1.ordinal() - o2.ordinal();
- }});
-
+ }
+ });
+
}
-
}
myConformance = retVal;
return retVal;
}
-
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/tester/PublicTesterServlet.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/tester/PublicTesterServlet.java
index c9fcf06b1bf..39925f9f1b1 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/tester/PublicTesterServlet.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/server/tester/PublicTesterServlet.java
@@ -131,6 +131,7 @@ public class PublicTesterServlet extends HttpServlet {
myTemplateEngine.getCacheManager().clearAllCaches();
}
+ try {
ourLog.info("RequestURI: {}", theReq.getPathInfo());
String resName = theReq.getPathInfo().substring(1);
@@ -147,7 +148,10 @@ public class PublicTesterServlet extends HttpServlet {
ctx.setVariable("base", myServerBase);
ctx.setVariable("jsonEncodedConf", myCtx.newJsonParser().encodeResourceToString(conformance));
myTemplateEngine.process(theReq.getPathInfo(), ctx, theResp.getWriter());
-
+ } catch (Exception e) {
+ ourLog.error("Failed to respond", e);
+ theResp.sendError(500, e.getMessage());
+ }
}
@Override
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ExtensionConstants.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ExtensionConstants.java
index a261705f32b..02e71a88b5b 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ExtensionConstants.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/ExtensionConstants.java
@@ -22,8 +22,14 @@ package ca.uhn.fhir.util;
public class ExtensionConstants {
- public static final String CONF_ALSO_CHAIN = "http://hl7api.sourceforge.net/hapi-fhir/extensions.xml#alsoChain";
+ public static final String CONF_ADDITIONAL_PARAM = "http://hl7api.sourceforge.net/hapi-fhir/extensions.xml#additionalParam";
- public static final String CONF_CHAIN_REQUIRED = "http://hl7api.sourceforge.net/hapi-fhir/extensions.xml#chainRequired";
+ public static final String CONF_ADDITIONAL_PARAM_NAME = "http://hl7api.sourceforge.net/hapi-fhir/extensions.xml#additionalParamName";
+
+ public static final String CONF_ADDITIONAL_PARAM_DESCRIPTION = "http://hl7api.sourceforge.net/hapi-fhir/extensions.xml#additionalParamDescription";
+
+ public static final String CONF_ADDITIONAL_PARAM_TYPE = "http://hl7api.sourceforge.net/hapi-fhir/extensions.xml#additionalParamType";
+
+ public static final String CONF_ADDITIONAL_PARAM_REQUIRED = "http://hl7api.sourceforge.net/hapi-fhir/extensions.xml#additionalParamRequired";
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/FhirTerser.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/FhirTerser.java
new file mode 100644
index 00000000000..0a1352740f2
--- /dev/null
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/util/FhirTerser.java
@@ -0,0 +1,71 @@
+package ca.uhn.fhir.util;
+
+/*
+ * #%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.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import ca.uhn.fhir.context.BaseRuntimeChildDefinition;
+import ca.uhn.fhir.context.BaseRuntimeElementCompositeDefinition;
+import ca.uhn.fhir.context.FhirContext;
+import ca.uhn.fhir.context.RuntimeResourceDefinition;
+import ca.uhn.fhir.model.api.IElement;
+import ca.uhn.fhir.model.api.IResource;
+
+public class FhirTerser {
+
+ public FhirTerser(FhirContext theContext) {
+ super();
+ myContext = theContext;
+ }
+
+ private FhirContext myContext;
+
+ public List