* Note that before HAPI 0.9 this method returned a {@link StringDt} but as of
* HAPI 0.9 this method returns a plain string. This was changed because it does not make sense to use a StringDt here
* since the URL itself can not contain extensions and it was therefore misleading.
- *
+ *
*/
public String getUrl() {
return myUrl != null ? myUrl.getValue() : null;
@@ -79,7 +79,7 @@ public class ExtensionDt extends BaseIdentifiableElement implements ICompositeDa
/**
* Retained for backward compatibility
- *
+ *
* @see ExtensionDt#getUrl()
*/
public String getUrlAsString() {
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IFhirVersion.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IFhirVersion.java
index b500b9db3b8..c86da291d8b 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IFhirVersion.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/IFhirVersion.java
@@ -30,6 +30,7 @@ import ca.uhn.fhir.context.RuntimeResourceDefinition;
import ca.uhn.fhir.rest.server.IResourceProvider;
import ca.uhn.fhir.rest.server.IServerConformanceProvider;
import ca.uhn.fhir.rest.server.RestfulServer;
+import org.hl7.fhir.instance.model.api.IBaseExtension;
public interface IFhirVersion {
@@ -49,4 +50,5 @@ public interface IFhirVersion {
Class> getContainedType();
+
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Child.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Child.java
index 3e80a0c0203..8f001f3da6a 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Child.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/annotation/Child.java
@@ -99,10 +99,10 @@ public @interface Child {
// * HumanNameDt which adds extensions of your choosing) you could do that using a replacement field.
// */
// String replaces() default "";
-
+
/**
* For children which accept an {@link Enumeration} as the type, this
- * field indicates the type to use for the enum factory
+ * field indicates the type to use for the enum factory
*/
Class extends IBaseEnumFactory>> enumFactory() default NoEnumFactory.class;
@@ -111,7 +111,7 @@ public @interface Child {
private NoEnumFactory() {
// non instantiable
}
-
+
@Override
public Enum> fromCode(String theCodeString) throws IllegalArgumentException {
return null;
@@ -121,7 +121,7 @@ public @interface Child {
public String toCode(Enum> theCode) {
return null;
}
-
+
}
}
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
index 84ec07659dd..6f62be61f23 100644
--- 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
@@ -59,9 +59,9 @@ public @interface SearchParamDefinition {
*
*/
String[] compositeOf() default {};
-
+
/**
- * For search params of type "reference", this can optionally be used to
+ * For search params of type "reference", this can optionally be used to
* specify the resource type(s) that this parameter applies to.
*/
Class extends IBaseResource>[] target() default {};
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseCodingDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseCodingDt.java
index 0fa0f93cda7..9bc961b5def 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseCodingDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/base/composite/BaseCodingDt.java
@@ -65,10 +65,17 @@ public abstract class BaseCodingDt extends BaseIdentifiableElement implements IC
* A representation of the meaning of the code in the system, following the rules of the system.
*
*/
- public abstract StringDt getDisplayElement();
-
+ public abstract StringDt getDisplayElement();
+
public abstract BaseCodingDt setDisplay( String theString);
+ /*
+ todo: handle version
+ public abstract StringDt getVersion();
+
+ public abstract BaseCodingDt setVersion ( String theString);
+ */
+
/**
* {@inheritDoc}
*/
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IdDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IdDt.java
index a1e3aaf5a29..c7b646ddeb0 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IdDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IdDt.java
@@ -127,7 +127,7 @@ public class IdDt extends UriDt implements IPrimitiveDatatype {
/**
* Constructor
- *
+ *
* @param theResourceType
* The resource type (e.g. "Patient")
* @param theId
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 54617540aa3..dad5d934391 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
@@ -552,11 +552,11 @@ public class JsonParser extends BaseParser implements IParser {
if (primitive) {
if (nextValue instanceof ISupportsUndeclaredExtensions) {
List ext = ((ISupportsUndeclaredExtensions) nextValue).getUndeclaredExtensions();
- addToHeldExtensions(valueIdx, ext, extensions,false);
+ addToHeldExtensions(valueIdx, ext, extensions, false);
ext = ((ISupportsUndeclaredExtensions) nextValue).getUndeclaredModifierExtensions();
- addToHeldExtensions(valueIdx, ext, modifierExtensions,true);
- }else {
+ addToHeldExtensions(valueIdx, ext, modifierExtensions, true);
+ } else {
if (nextValue instanceof IBaseHasExtensions) {
IBaseHasExtensions element = (IBaseHasExtensions) nextValue;
List extends IBaseExtension>> ext = element.getExtension();
@@ -1378,7 +1378,7 @@ public class JsonParser extends BaseParser implements IParser {
if (myModifier) {
theEventWriter.writeStartArray("modifierExtension");
- }else {
+ } else {
theEventWriter.writeStartArray("extension");
}
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 4c7a1788fa7..7ab81f49569 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
@@ -822,16 +822,16 @@ class ParserState {
} else {
if (theIsModifier == false) {
if (getCurrentElement() instanceof IBaseHasExtensions) {
- IBaseExtension> ext = ((IBaseHasExtensions)getCurrentElement()).addExtension();
+ IBaseExtension> ext = ((IBaseHasExtensions) getCurrentElement()).addExtension();
ext.setUrl(theUrlAttr);
ParserState.ExtensionState newState = new ExtensionState(myPreResourceState, ext);
push(newState);
} else {
throw new DataFormatException("Type " + getCurrentElement() + " does not support undeclared extentions, and found an extension with URL: " + theUrlAttr);
}
- }else {
+ } else {
if (getCurrentElement() instanceof IBaseHasModifierExtensions) {
- IBaseExtension> ext = ((IBaseHasModifierExtensions)getCurrentElement()).addModifierExtension();
+ IBaseExtension> ext = ((IBaseHasModifierExtensions) getCurrentElement()).addModifierExtension();
ext.setUrl(theUrlAttr);
ParserState.ExtensionState newState = new ExtensionState(myPreResourceState, ext);
push(newState);
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 32704db43ea..2564b674a11 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
@@ -437,7 +437,7 @@ public class XmlParser extends BaseParser implements IParser {
}
private void encodeChildElementToStreamWriter(IBaseResource theResource, XMLStreamWriter theEventWriter, IBase nextValue, String childName, BaseRuntimeElementDefinition> childDef,
- String theExtensionUrl, boolean theIncludedResource) throws XMLStreamException, DataFormatException {
+ String theExtensionUrl, boolean theIncludedResource) throws XMLStreamException, DataFormatException {
if (nextValue.isEmpty()) {
if (childDef.getChildType() == ChildTypeEnum.CONTAINED_RESOURCES && getContainedResources().isEmpty() == false && theIncludedResource == false) {
// We still want to go in..
@@ -516,7 +516,7 @@ public class XmlParser extends BaseParser implements IParser {
}
private void encodeCompositeElementChildrenToStreamWriter(IBaseResource theResource, IBase theElement, XMLStreamWriter theEventWriter, List extends BaseRuntimeChildDefinition> children,
- boolean theIncludedResource) throws XMLStreamException, DataFormatException {
+ boolean theIncludedResource) throws XMLStreamException, DataFormatException {
for (BaseRuntimeChildDefinition nextChild : children) {
if (nextChild.getElementName().equals("extension") || nextChild.getElementName().equals("modifierExtension")) {
continue;
@@ -598,7 +598,7 @@ public class XmlParser extends BaseParser implements IParser {
}
private void encodeCompositeElementToStreamWriter(IBaseResource theResource, IBase theElement, XMLStreamWriter theEventWriter, BaseRuntimeElementCompositeDefinition> theElementDefinition,
- boolean theIncludedResource) throws XMLStreamException, DataFormatException {
+ boolean theIncludedResource) throws XMLStreamException, DataFormatException {
encodeExtensionsIfPresent(theResource, theEventWriter, theElement, theIncludedResource);
encodeCompositeElementChildrenToStreamWriter(theResource, theElement, theEventWriter, theElementDefinition.getExtensions(), theIncludedResource);
encodeCompositeElementChildrenToStreamWriter(theResource, theElement, theEventWriter, theElementDefinition.getChildren(), theIncludedResource);
@@ -646,7 +646,7 @@ public class XmlParser extends BaseParser implements IParser {
}
private void encodeResourceToStreamWriterInDstu2Format(RuntimeResourceDefinition theResDef, IBaseResource theResource, IBase theElement, XMLStreamWriter theEventWriter,
- BaseRuntimeElementCompositeDefinition> resDef, boolean theIncludedResource) throws XMLStreamException, DataFormatException {
+ BaseRuntimeElementCompositeDefinition> resDef, boolean theIncludedResource) throws XMLStreamException, DataFormatException {
/*
* DSTU2 requires extensions to come in a specific spot within the encoded content - This is a bit of a messy way to make that happen, but hopefully this won't matter as much once we use the
* HL7 structures
@@ -734,61 +734,18 @@ public class XmlParser extends BaseParser implements IParser {
// HL7.org Structures
encodeCompositeElementToStreamWriter(theResource, theResource, theEventWriter, resDef, theContainedResource);
- InstantDt updated = (InstantDt) resource.getResourceMetadata().get(ResourceMetadataKeyEnum.UPDATED);
- IdDt resourceId = resource.getId();
- if (resourceId != null && isNotBlank(resourceId.getVersionIdPart()) || (updated != null && !updated.isEmpty())) {
- theEventWriter.writeStartElement("meta");
- String versionIdPart = resourceId.getVersionIdPart();
- if (isBlank(versionIdPart)) {
- versionIdPart = ResourceMetadataKeyEnum.VERSION.get(resource);
- }
- writeOptionalTagWithValue(theEventWriter, "versionId", versionIdPart);
- if (updated != null) {
- writeOptionalTagWithValue(theEventWriter, "lastUpdated", updated.getValueAsString());
- }
-
- Object securityLabelRawObj = resource.getResourceMetadata().get(ResourceMetadataKeyEnum.SECURITY_LABELS);
- if (securityLabelRawObj != null) {
- List securityLabels = (List) securityLabelRawObj;
- if (!securityLabels.isEmpty()) {
-
- for (BaseCodingDt securityLabel : securityLabels) {
- theEventWriter.writeStartElement("security");
-
- UriDt system = securityLabel.getSystemElement();
- if (system != null && !system.isEmpty())
- writeOptionalTagWithValue(theEventWriter, "system", system.getValueAsString());
-
- CodeDt code = securityLabel.getCodeElement();
- if (code != null && !code.isEmpty())
- writeOptionalTagWithValue(theEventWriter, "code", code.getValueAsString());
-
- StringDt display = securityLabel.getDisplayElement();
- if (display != null && !display.isEmpty())
- writeOptionalTagWithValue(theEventWriter, "display", display.getValueAsString());
-
- /*todo: handle version
- StringDt version = securityLabel.getVersion();
- if (version != null && ! version.isEmpty())
- writeOptionalTagWithValue(theEventWriter, "version", version.getValueAsString());
- */
- theEventWriter.writeEndElement();
- }
-
- }
- }
-
- theEventWriter.writeEndElement();
- }
} else {
if (myContext.getVersion().getVersion().isNewerThan(FhirVersionEnum.DSTU1)) {
// DSTU2+
+
+
IResource resource = (IResource) theResource;
writeOptionalTagWithValue(theEventWriter, "id", theResourceId);
+
InstantDt updated = (InstantDt) resource.getResourceMetadata().get(ResourceMetadataKeyEnum.UPDATED);
IdDt resourceId = resource.getId();
if (resourceId != null && isNotBlank(resourceId.getVersionIdPart()) || (updated != null && !updated.isEmpty())) {
@@ -801,6 +758,36 @@ public class XmlParser extends BaseParser implements IParser {
if (updated != null) {
writeOptionalTagWithValue(theEventWriter, "lastUpdated", updated.getValueAsString());
}
+ Object securityLabelRawObj = resource.getResourceMetadata().get(ResourceMetadataKeyEnum.SECURITY_LABELS);
+ if (securityLabelRawObj != null) {
+ List securityLabels = (List) securityLabelRawObj;
+ if (!securityLabels.isEmpty()) {
+
+ for (BaseCodingDt securityLabel : securityLabels) {
+ theEventWriter.writeStartElement("security");
+
+ UriDt system = securityLabel.getSystemElement();
+ if (system != null && !system.isEmpty())
+ writeOptionalTagWithValue(theEventWriter, "system", system.getValueAsString());
+
+ CodeDt code = securityLabel.getCodeElement();
+ if (code != null && !code.isEmpty())
+ writeOptionalTagWithValue(theEventWriter, "code", code.getValueAsString());
+
+ StringDt display = securityLabel.getDisplayElement();
+ if (display != null && !display.isEmpty())
+ writeOptionalTagWithValue(theEventWriter, "display", display.getValueAsString());
+
+ /*todo: handle version
+ StringDt version = securityLabel.getVersion();
+ if (version != null && ! version.isEmpty())
+ writeOptionalTagWithValue(theEventWriter, "version", version.getValueAsString());
+ */
+ theEventWriter.writeEndElement();
+ }
+
+ }
+ }
theEventWriter.writeEndElement();
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/BaseHttpClientInvocation.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/BaseHttpClientInvocation.java
index 41cd049f4d5..0cd4a316e8e 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/BaseHttpClientInvocation.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/BaseHttpClientInvocation.java
@@ -59,7 +59,7 @@ public abstract class BaseHttpClientInvocation {
public abstract HttpRequestBase asHttpRequest(String theUrlBase, Map> theExtraParams, EncodingEnum theEncoding);
protected static void appendExtraParamsWithQuestionMark(Map> theExtraParams, StringBuilder theUrlBuilder, boolean theWithQuestionMark) {
- if (theExtraParams==null) {
+ if (theExtraParams == null) {
return;
}
boolean first = theWithQuestionMark;
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IBaseQuery.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IBaseQuery.java
index 8084e5e204c..613c91eacdc 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IBaseQuery.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IBaseQuery.java
@@ -2,8 +2,8 @@ package ca.uhn.fhir.rest.gclient;
public interface IBaseQuery {
- T where(ICriterion> theCriterion);
+ T where(ICriterion> theCriterion);
- T and(ICriterion> theCriterion);
+ T and(ICriterion> theCriterion);
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateTyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateTyped.java
index 9bea778502a..85e09f648f4 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateTyped.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/ICreateTyped.java
@@ -38,12 +38,11 @@ public interface ICreateTyped extends IClientExecutable[ResourceType]?[Parameters],
- * for example: Patient?name=Smith&identifier=13.2.4.11.4%7C847366
- *
+ * for example: Patient?name=Smith&identifier=13.2.4.11.4%7C847366
* @since HAPI 0.9 / FHIR DSTU 2
*/
ICreateTyped conditionalByUrl(String theSearchUrl);
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDelete.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDelete.java
index 866c7652ef8..ccd30029fa4 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDelete.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IDelete.java
@@ -32,12 +32,11 @@ public interface IDelete {
IDeleteTyped resourceById(String theResourceType, String theLogicalId);
/**
- * Specifies that the delete should be performed as a conditional delete
- * against a given search URL.
- *
+ * Specifies that the delete should be performed as a conditional delete
+ * against a given search URL.
+ *
* @param theSearchUrl The search URL to use. The format of this URL should be of the form [ResourceType]?[Parameters],
- * for example: Patient?name=Smith&identifier=13.2.4.11.4%7C847366
- *
+ * for example: Patient?name=Smith&identifier=13.2.4.11.4%7C847366
* @since HAPI 0.9 / FHIR DSTU 2
*/
IDeleteTyped resourceConditionalByUrl(String theSearchUrl);
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IQuery.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IQuery.java
index 0e14d5cda70..20ab12f4404 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IQuery.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IQuery.java
@@ -24,7 +24,7 @@ import ca.uhn.fhir.model.api.Bundle;
import ca.uhn.fhir.model.api.Include;
import ca.uhn.fhir.rest.method.SearchStyleEnum;
-public interface IQuery extends IClientExecutable, IBaseQuery {
+public interface IQuery extends IClientExecutable, IBaseQuery {
IQuery include(Include theIncludeManagingorganization);
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateTyped.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateTyped.java
index e7f98612732..d8874fd1db1 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateTyped.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/gclient/IUpdateTyped.java
@@ -29,12 +29,11 @@ public interface IUpdateTyped extends IUpdateExecutable {
IUpdateExecutable withId(String theId);
/**
- * Specifies that the update should be performed as a conditional create
- * against a given search URL.
- *
+ * Specifies that the update should be performed as a conditional create
+ * against a given search URL.
+ *
* @param theSearchUrl The search URL to use. The format of this URL should be of the form [ResourceType]?[Parameters],
- * for example: Patient?name=Smith&identifier=13.2.4.11.4%7C847366
- *
+ * for example: Patient?name=Smith&identifier=13.2.4.11.4%7C847366
* @since HAPI 0.9 / FHIR DSTU 2
*/
IUpdateTyped conditionalByUrl(String theSearchUrl);
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/MethodUtil.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/MethodUtil.java
index 37c8d260672..4ad33394b8e 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/MethodUtil.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/method/MethodUtil.java
@@ -196,11 +196,11 @@ public class MethodUtil {
public static HttpPutClientInvocation createUpdateInvocation(FhirContext theContext, IResource theResource, String theResourceBody, Map> theMatchParams) {
StringBuilder b = new StringBuilder();
-
+
String resourceType = theContext.getResourceDefinition(theResource).getName();
b.append(resourceType);
-
- boolean haveQuestionMark=false;
+
+ boolean haveQuestionMark = false;
for (Entry> nextEntry : theMatchParams.entrySet()) {
for (String nextValue : nextEntry.getValue()) {
b.append(haveQuestionMark ? '&' : '?');
@@ -215,7 +215,7 @@ public class MethodUtil {
}
}
-
+
HttpPutClientInvocation retVal;
if (StringUtils.isBlank(theResourceBody)) {
retVal = new HttpPutClientInvocation(theContext, theResource, b.toString());
@@ -231,9 +231,9 @@ public class MethodUtil {
public static HttpPutClientInvocation createUpdateInvocation(FhirContext theContext, IResource theResource, String theResourceBody, String theMatchUrl) {
HttpPutClientInvocation retVal;
if (StringUtils.isBlank(theResourceBody)) {
- retVal = new HttpPutClientInvocation(theContext, theResource, theMatchUrl);
+ retVal = new HttpPutClientInvocation(theContext, theResource, theMatchUrl);
} else {
- retVal = new HttpPutClientInvocation(theContext, theResourceBody, false,theMatchUrl);
+ retVal = new HttpPutClientInvocation(theContext, theResourceBody, false, theMatchUrl);
}
addTagsToPostOrPut(theResource, retVal);
@@ -244,10 +244,10 @@ public class MethodUtil {
public static EncodingEnum detectEncoding(String theBody) {
for (int i = 0; i < theBody.length(); i++) {
switch (theBody.charAt(i)) {
- case '<':
- return EncodingEnum.XML;
- case '{':
- return EncodingEnum.JSON;
+ case '<':
+ return EncodingEnum.XML;
+ case '{':
+ return EncodingEnum.JSON;
}
}
return EncodingEnum.XML;
@@ -502,26 +502,26 @@ public class MethodUtil {
public static IQueryParameterAnd> parseQueryParams(RuntimeSearchParam theParamDef, String theUnqualifiedParamName, List theParameters) {
QueryParameterAndBinder binder = null;
switch (theParamDef.getParamType()) {
- case COMPOSITE:
- throw new UnsupportedOperationException();
- case DATE:
- binder = new QueryParameterAndBinder(DateAndListParam.class, Collections.> emptyList());
- break;
- case NUMBER:
- binder = new QueryParameterAndBinder(NumberAndListParam.class, Collections.> emptyList());
- break;
- case QUANTITY:
- binder = new QueryParameterAndBinder(QuantityAndListParam.class, Collections.> emptyList());
- break;
- case REFERENCE:
- binder = new QueryParameterAndBinder(ReferenceAndListParam.class, Collections.> emptyList());
- break;
- case STRING:
- binder = new QueryParameterAndBinder(StringAndListParam.class, Collections.> emptyList());
- break;
- case TOKEN:
- binder = new QueryParameterAndBinder(TokenAndListParam.class, Collections.> emptyList());
- break;
+ case COMPOSITE:
+ throw new UnsupportedOperationException();
+ case DATE:
+ binder = new QueryParameterAndBinder(DateAndListParam.class, Collections.>emptyList());
+ break;
+ case NUMBER:
+ binder = new QueryParameterAndBinder(NumberAndListParam.class, Collections.>emptyList());
+ break;
+ case QUANTITY:
+ binder = new QueryParameterAndBinder(QuantityAndListParam.class, Collections.>emptyList());
+ break;
+ case REFERENCE:
+ binder = new QueryParameterAndBinder(ReferenceAndListParam.class, Collections.>emptyList());
+ break;
+ case STRING:
+ binder = new QueryParameterAndBinder(StringAndListParam.class, Collections.>emptyList());
+ break;
+ case TOKEN:
+ binder = new QueryParameterAndBinder(TokenAndListParam.class, Collections.>emptyList());
+ break;
}
return binder.parse(theUnqualifiedParamName, theParameters);
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/InternalCodingDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/InternalCodingDt.java
index dbd875641e6..a087c927640 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/InternalCodingDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/param/InternalCodingDt.java
@@ -49,8 +49,7 @@ import ca.uhn.fhir.model.primitive.CodeDt;
import ca.uhn.fhir.model.primitive.StringDt;
import ca.uhn.fhir.model.primitive.UriDt;
-public class InternalCodingDt
- extends BaseCodingDt implements ICompositeDatatype
+public class InternalCodingDt extends BaseCodingDt implements ICompositeDatatype
{
/**
diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseEnumFactory.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseEnumFactory.java
index ab56defe694..21eceaedee0 100644
--- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseEnumFactory.java
+++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseEnumFactory.java
@@ -2,24 +2,21 @@ package org.hl7.fhir.instance.model.api;
public interface IBaseEnumFactory> {
- /**
- * Read an enumeration value from the string that represents it on the XML or JSON
- *
- * @param codeString
- * the value found in the XML or JSON
- * @return the enumeration value
- * @throws IllegalArgumentException
- * is the value is not known
- */
- public T fromCode(String codeString) throws IllegalArgumentException;
+ /**
+ * Read an enumeration value from the string that represents it on the XML or JSON
+ *
+ * @param codeString the value found in the XML or JSON
+ * @return the enumeration value
+ * @throws IllegalArgumentException is the value is not known
+ */
+ public T fromCode(String codeString) throws IllegalArgumentException;
- /**
- * Get the XML/JSON representation for an enumerated value
- *
- * @param code
- * - the enumeration value
- * @return the XML/JSON representation
- */
- public String toCode(T code);
+ /**
+ * Get the XML/JSON representation for an enumerated value
+ *
+ * @param code - the enumeration value
+ * @return the XML/JSON representation
+ */
+ public String toCode(T code);
}
diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseExtension.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseExtension.java
index 0d0dbf01aec..6276ba13a8c 100644
--- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseExtension.java
+++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseExtension.java
@@ -6,14 +6,14 @@ import org.hl7.fhir.instance.model.ICompositeType;
public interface IBaseExtension extends ICompositeType {
- List getExtension();
-
+ List getExtension();
+
String getUrl();
-
+
IBaseDatatype getValue();
T setUrl(String theUrl);
-
+
T setValue(IBaseDatatype theValue);
}
diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasExtensions.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasExtensions.java
index 257b7466478..9ae4ffcb334 100644
--- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasExtensions.java
+++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasExtensions.java
@@ -4,8 +4,8 @@ import java.util.List;
public interface IBaseHasExtensions {
- public List extends IBaseExtension>> getExtension();
+ public List extends IBaseExtension>> getExtension();
+
+ public IBaseExtension> addExtension();
- public IBaseExtension> addExtension();
-
}
diff --git a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasModifierExtensions.java b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasModifierExtensions.java
index 23cba0358a3..074a3df228d 100644
--- a/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasModifierExtensions.java
+++ b/hapi-fhir-base/src/main/java/org/hl7/fhir/instance/model/api/IBaseHasModifierExtensions.java
@@ -4,8 +4,8 @@ import java.util.List;
public interface IBaseHasModifierExtensions {
- public List extends IBaseExtension>> getModifierExtension();
+ public List extends IBaseExtension>> getModifierExtension();
- public IBaseExtension> addModifierExtension();
+ public IBaseExtension> addModifierExtension();
}
diff --git a/hapi-fhir-base/testmindeps/src/test/java/ca/uhn/fhir/parser/MultiVersionJsonParserTest.java b/hapi-fhir-base/testmindeps/src/test/java/ca/uhn/fhir/parser/MultiVersionJsonParserTest.java
index 113baa19ce1..f11e483cad1 100644
--- a/hapi-fhir-base/testmindeps/src/test/java/ca/uhn/fhir/parser/MultiVersionJsonParserTest.java
+++ b/hapi-fhir-base/testmindeps/src/test/java/ca/uhn/fhir/parser/MultiVersionJsonParserTest.java
@@ -21,8 +21,8 @@ public class MultiVersionJsonParserTest {
String str = FhirContext.forDstu2().newJsonParser().encodeResourceToString(p);
ourLog.info(str);
-
- assertThat(str,StringContains.containsString("{\"resourceType\":\"Patient\",\"extension\":[{\"url\":\"http://foo#ext\",\"valueQuantity\":{\"value\":2.2}}],\"identifier\":[{\"system\":\"urn:sys\",\"value\":\"001\"}]}"));
+
+ assertThat(str, StringContains.containsString("{\"resourceType\":\"Patient\",\"extension\":[{\"url\":\"http://foo#ext\",\"valueQuantity\":{\"value\":2.2}}],\"identifier\":[{\"system\":\"urn:sys\",\"value\":\"001\"}]}"));
}
}
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseFhirDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseFhirDao.java
index 16b747575b4..498cfe17aec 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseFhirDao.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/BaseFhirDao.java
@@ -600,12 +600,12 @@ public abstract class BaseFhirDao implements IDao {
String qualifier = null;
for (int i = 0; i < paramMap.size(); i++) {
switch (paramName.charAt(i)) {
- case '.':
- case ':':
- qualifier = paramName.substring(i);
- paramName = paramName.substring(0, i);
- i = Integer.MAX_VALUE;
- break;
+ case '.':
+ case ':':
+ qualifier = paramName.substring(i);
+ paramName = paramName.substring(0, i);
+ i = Integer.MAX_VALUE;
+ break;
}
}
@@ -889,7 +889,7 @@ public abstract class BaseFhirDao implements IDao {
}
protected ResourceTable updateEntity(final IResource theResource, ResourceTable entity, boolean theUpdateHistory, Date theDeletedTimestampOrNull) {
- return updateEntity(theResource, entity, theUpdateHistory, theDeletedTimestampOrNull, true,true);
+ return updateEntity(theResource, entity, theUpdateHistory, theDeletedTimestampOrNull, true, true);
}
protected ResourceTable updateEntity(final IResource theResource, ResourceTable entity, boolean theUpdateHistory, Date theDeletedTimestampOrNull, boolean thePerformIndexing, boolean theUpdateVersion) {
@@ -972,7 +972,7 @@ public abstract class BaseFhirDao implements IDao {
entity.setHasLinks(links.isEmpty() == false);
} else {
-
+
populateResourceIntoEntity(theResource, entity);
entity.setUpdated(new Date());
entity.setLanguage(theResource.getLanguage().getValue());
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoMethodOutcome.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoMethodOutcome.java
index 89cef618eab..57491a178a8 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoMethodOutcome.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/DaoMethodOutcome.java
@@ -6,31 +6,31 @@ import ca.uhn.fhir.rest.api.MethodOutcome;
public class DaoMethodOutcome extends MethodOutcome {
- private ResourceTable myEntity;
- private IResource myResource;
+ private ResourceTable myEntity;
+ private IResource myResource;
- public ResourceTable getEntity() {
- return myEntity;
- }
+ public ResourceTable getEntity() {
+ return myEntity;
+ }
- public IResource getResource() {
- return myResource;
- }
+ public IResource getResource() {
+ return myResource;
+ }
- @Override
- public DaoMethodOutcome setCreated(Boolean theCreated) {
- super.setCreated(theCreated);
- return this;
- }
+ @Override
+ public DaoMethodOutcome setCreated(Boolean theCreated) {
+ super.setCreated(theCreated);
+ return this;
+ }
- public DaoMethodOutcome setEntity(ResourceTable theEntity) {
- myEntity = theEntity;
- return this;
- }
+ public DaoMethodOutcome setEntity(ResourceTable theEntity) {
+ myEntity = theEntity;
+ return this;
+ }
- public DaoMethodOutcome setResource(IResource theResource) {
- myResource = theResource;
- return this;
- }
+ public DaoMethodOutcome setResource(IResource theResource) {
+ myResource = theResource;
+ return this;
+ }
}
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDao.java
index a7f0f8f9e3a..98708c725e6 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDao.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirResourceDao.java
@@ -668,7 +668,7 @@ public class FhirResourceDao extends BaseFhirDao implements
myEntityManager.persist(newEntity);
myEntityManager.merge(entity);
notifyWriteCompleted();
- ourLog.info("Processed addTag {}/{} on {} in {}ms", new Object[] { theScheme, theTerm, theId, w.getMillisAndRestart() });
+ ourLog.info("Processed addTag {}/{} on {} in {}ms", new Object[]{theScheme, theTerm, theId, w.getMillisAndRestart()});
}
@Override
@@ -911,7 +911,7 @@ public class FhirResourceDao extends BaseFhirDao implements
}
Long pid = resource.iterator().next();
-
+
ResourceTable entity = myEntityManager.find(ResourceTable.class, pid);
ResourceTable savedEntity = updateEntity(null, entity, true, new Date());
@@ -1190,7 +1190,7 @@ public class FhirResourceDao extends BaseFhirDao implements
myEntityManager.merge(entity);
- ourLog.info("Processed remove tag {}/{} on {} in {}ms", new Object[] { theScheme, theTerm, theId.getValue(), w.getMillisAndRestart() });
+ ourLog.info("Processed remove tag {}/{} on {} in {}ms", new Object[]{theScheme, theTerm, theId.getValue(), w.getMillisAndRestart()});
}
@Override
@@ -1331,7 +1331,8 @@ public class FhirResourceDao extends BaseFhirDao implements
}
retVal.addAll(resources);
}
- } while (includePids.size() > 0 && previouslyLoadedPids.size() < getConfig().getIncludeLimit());
+ }
+ while (includePids.size() > 0 && previouslyLoadedPids.size() < getConfig().getIncludeLimit());
if (previouslyLoadedPids.size() >= getConfig().getIncludeLimit()) {
OperationOutcome oo = new OperationOutcome();
@@ -1351,7 +1352,7 @@ public class FhirResourceDao extends BaseFhirDao implements
}
};
- ourLog.info("Processed search for {} on {} in {}ms", new Object[] { myResourceName, theParams, w.getMillisAndRestart() });
+ ourLog.info("Processed search for {} on {} in {}ms", new Object[]{myResourceName, theParams, w.getMillisAndRestart()});
return retVal;
}
@@ -1436,62 +1437,62 @@ public class FhirResourceDao extends BaseFhirDao implements
RuntimeSearchParam nextParamDef = resourceDef.getSearchParam(nextParamName);
if (nextParamDef != null) {
switch (nextParamDef.getParamType()) {
- case DATE:
- for (List extends IQueryParameterType> nextAnd : nextParamEntry.getValue()) {
- pids = addPredicateDate(nextParamName, pids, nextAnd);
- if (pids.isEmpty()) {
- return new HashSet();
+ case DATE:
+ for (List extends IQueryParameterType> nextAnd : nextParamEntry.getValue()) {
+ pids = addPredicateDate(nextParamName, pids, nextAnd);
+ if (pids.isEmpty()) {
+ return new HashSet();
+ }
}
- }
- break;
- case QUANTITY:
- for (List extends IQueryParameterType> nextAnd : nextParamEntry.getValue()) {
- pids = addPredicateQuantity(nextParamName, pids, nextAnd);
- if (pids.isEmpty()) {
- return new HashSet();
+ break;
+ case QUANTITY:
+ for (List extends IQueryParameterType> nextAnd : nextParamEntry.getValue()) {
+ pids = addPredicateQuantity(nextParamName, pids, nextAnd);
+ if (pids.isEmpty()) {
+ return new HashSet();
+ }
}
- }
- break;
- case REFERENCE:
- for (List extends IQueryParameterType> nextAnd : nextParamEntry.getValue()) {
- pids = addPredicateReference(nextParamName, pids, nextAnd);
- if (pids.isEmpty()) {
- return new HashSet();
+ break;
+ case REFERENCE:
+ for (List extends IQueryParameterType> nextAnd : nextParamEntry.getValue()) {
+ pids = addPredicateReference(nextParamName, pids, nextAnd);
+ if (pids.isEmpty()) {
+ return new HashSet();
+ }
}
- }
- break;
- case STRING:
- for (List extends IQueryParameterType> nextAnd : nextParamEntry.getValue()) {
- pids = addPredicateString(nextParamName, pids, nextAnd);
- if (pids.isEmpty()) {
- return new HashSet();
+ break;
+ case STRING:
+ for (List extends IQueryParameterType> nextAnd : nextParamEntry.getValue()) {
+ pids = addPredicateString(nextParamName, pids, nextAnd);
+ if (pids.isEmpty()) {
+ return new HashSet();
+ }
}
- }
- break;
- case TOKEN:
- for (List extends IQueryParameterType> nextAnd : nextParamEntry.getValue()) {
- pids = addPredicateToken(nextParamName, pids, nextAnd);
- if (pids.isEmpty()) {
- return new HashSet();
+ break;
+ case TOKEN:
+ for (List extends IQueryParameterType> nextAnd : nextParamEntry.getValue()) {
+ pids = addPredicateToken(nextParamName, pids, nextAnd);
+ if (pids.isEmpty()) {
+ return new HashSet();
+ }
}
- }
- break;
- case NUMBER:
- for (List extends IQueryParameterType> nextAnd : nextParamEntry.getValue()) {
- pids = addPredicateNumber(nextParamName, pids, nextAnd);
- if (pids.isEmpty()) {
- return new HashSet();
+ break;
+ case NUMBER:
+ for (List extends IQueryParameterType> nextAnd : nextParamEntry.getValue()) {
+ pids = addPredicateNumber(nextParamName, pids, nextAnd);
+ if (pids.isEmpty()) {
+ return new HashSet();
+ }
}
- }
- break;
- case COMPOSITE:
- for (List extends IQueryParameterType> nextAnd : nextParamEntry.getValue()) {
- pids = addPredicateComposite(nextParamDef, pids, nextAnd);
- if (pids.isEmpty()) {
- return new HashSet();
+ break;
+ case COMPOSITE:
+ for (List extends IQueryParameterType> nextAnd : nextParamEntry.getValue()) {
+ pids = addPredicateComposite(nextParamDef, pids, nextAnd);
+ if (pids.isEmpty()) {
+ return new HashSet();
+ }
}
- }
- break;
+ break;
}
}
}
@@ -1568,14 +1569,14 @@ public class FhirResourceDao extends BaseFhirDao implements
@Override
public DaoMethodOutcome update(T theResource) {
- return update(theResource,null);
+ return update(theResource, null);
}
-
+
@Override
public DaoMethodOutcome update(T theResource, String theMatchUrl) {
return update(theResource, theMatchUrl, true);
}
-
+
@Override
public DaoMethodOutcome update(T theResource, String theMatchUrl, boolean thePerformIndexing) {
StopWatch w = new StopWatch();
@@ -1599,7 +1600,7 @@ public class FhirResourceDao extends BaseFhirDao implements
resourceId = theResource.getId();
entity = readEntityLatestVersion(resourceId);
}
-
+
if (resourceId.hasVersionIdPart() && resourceId.getVersionIdPartAsLong().longValue() != entity.getVersion()) {
throw new InvalidRequestException("Trying to update " + resourceId + " but this is not the current version");
}
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu2.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu2.java
index ba5bb94376d..447ae924e37 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu2.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu2.java
@@ -160,91 +160,91 @@ public class FhirSystemDaoDstu2 extends BaseFhirSystemDao {
}
switch (verb) {
- case POST: {
- // CREATE
- @SuppressWarnings("rawtypes")
- IFhirResourceDao resourceDao = getDao(res.getClass());
- res.setId(null);
- DaoMethodOutcome outcome;
- Entry newEntry = response.addEntry();
- outcome = resourceDao.create(res, nextEntry.getTransaction().getIfNoneExist(), false);
- handleTransactionCreateOrUpdateOutcome(idSubstitutions, idToPersistedOutcome, nextResourceId, outcome, newEntry);
- break;
- }
- case DELETE: {
- // DELETE
- Entry newEntry = response.addEntry();
- String url = extractTransactionUrlOrThrowException(nextEntry, verb);
- UrlParts parts = parseUrl(verb.getCode(), url);
- if (parts.getResourceId() != null) {
- parts.getDao().delete(new IdDt(parts.getResourceType(), parts.getResourceId()));
- } else {
- parts.getDao().deleteByUrl(parts.getResourceType() + '?' + parts.getParams());
- }
-
- newEntry.getTransactionResponse().setStatus(Integer.toString(Constants.STATUS_HTTP_204_NO_CONTENT));
- break;
- }
- case PUT: {
- // UPDATE
- @SuppressWarnings("rawtypes")
- IFhirResourceDao resourceDao = getDao(res.getClass());
-
- DaoMethodOutcome outcome;
- Entry newEntry = response.addEntry();
-
- String url = extractTransactionUrlOrThrowException(nextEntry, verb);
-
- UrlParts parts = parseUrl(verb.getCode(), url);
- if (parts.getResourceId() != null) {
- res.setId(new IdDt(parts.getResourceType(), parts.getResourceId()));
- outcome = resourceDao.update(res, null, false);
- } else {
+ case POST: {
+ // CREATE
+ @SuppressWarnings("rawtypes")
+ IFhirResourceDao resourceDao = getDao(res.getClass());
res.setId(null);
- outcome = resourceDao.update(res, parts.getResourceType() + '?' + parts.getParams(), false);
+ DaoMethodOutcome outcome;
+ Entry newEntry = response.addEntry();
+ outcome = resourceDao.create(res, nextEntry.getTransaction().getIfNoneExist(), false);
+ handleTransactionCreateOrUpdateOutcome(idSubstitutions, idToPersistedOutcome, nextResourceId, outcome, newEntry);
+ break;
}
-
- handleTransactionCreateOrUpdateOutcome(idSubstitutions, idToPersistedOutcome, nextResourceId, outcome, newEntry);
- break;
- }
- case GET: {
- // SEARCH/READ/VREAD
- String url = extractTransactionUrlOrThrowException(nextEntry, verb);
- UrlParts parts = parseUrl(verb.getCode(), url);
-
- @SuppressWarnings("rawtypes")
- IFhirResourceDao resourceDao = parts.getDao();
-
- if (parts.getResourceId() != null && parts.getParams() == null) {
- IResource found;
- if (parts.getVersionId() != null) {
- found = resourceDao.read(new IdDt(parts.getResourceType(), parts.getResourceId(), parts.getVersionId()));
+ case DELETE: {
+ // DELETE
+ Entry newEntry = response.addEntry();
+ String url = extractTransactionUrlOrThrowException(nextEntry, verb);
+ UrlParts parts = parseUrl(verb.getCode(), url);
+ if (parts.getResourceId() != null) {
+ parts.getDao().delete(new IdDt(parts.getResourceType(), parts.getResourceId()));
} else {
- found = resourceDao.read(new IdDt(parts.getResourceType(), parts.getResourceId()));
+ parts.getDao().deleteByUrl(parts.getResourceType() + '?' + parts.getParams());
+ }
+
+ newEntry.getTransactionResponse().setStatus(Integer.toString(Constants.STATUS_HTTP_204_NO_CONTENT));
+ break;
+ }
+ case PUT: {
+ // UPDATE
+ @SuppressWarnings("rawtypes")
+ IFhirResourceDao resourceDao = getDao(res.getClass());
+
+ DaoMethodOutcome outcome;
+ Entry newEntry = response.addEntry();
+
+ String url = extractTransactionUrlOrThrowException(nextEntry, verb);
+
+ UrlParts parts = parseUrl(verb.getCode(), url);
+ if (parts.getResourceId() != null) {
+ res.setId(new IdDt(parts.getResourceType(), parts.getResourceId()));
+ outcome = resourceDao.update(res, null, false);
+ } else {
+ res.setId(null);
+ outcome = resourceDao.update(res, parts.getResourceType() + '?' + parts.getParams(), false);
+ }
+
+ handleTransactionCreateOrUpdateOutcome(idSubstitutions, idToPersistedOutcome, nextResourceId, outcome, newEntry);
+ break;
+ }
+ case GET: {
+ // SEARCH/READ/VREAD
+ String url = extractTransactionUrlOrThrowException(nextEntry, verb);
+ UrlParts parts = parseUrl(verb.getCode(), url);
+
+ @SuppressWarnings("rawtypes")
+ IFhirResourceDao resourceDao = parts.getDao();
+
+ if (parts.getResourceId() != null && parts.getParams() == null) {
+ IResource found;
+ if (parts.getVersionId() != null) {
+ found = resourceDao.read(new IdDt(parts.getResourceType(), parts.getResourceId(), parts.getVersionId()));
+ } else {
+ found = resourceDao.read(new IdDt(parts.getResourceType(), parts.getResourceId()));
+ }
+ EntryTransactionResponse resp = response.addEntry().setResource(found).getTransactionResponse();
+ resp.setLocation(found.getId().toUnqualified().getValue());
+ resp.addEtag(found.getId().getVersionIdPart());
+ } else if (parts.getParams() != null) {
+ RuntimeResourceDefinition def = getContext().getResourceDefinition(parts.getDao().getResourceType());
+ SearchParameterMap params = translateMatchUrl(url, def);
+ IBundleProvider bundle = parts.getDao().search(params);
+
+ Bundle searchBundle = new Bundle();
+ searchBundle.setTotal(bundle.size());
+
+ int configuredMax = 100; // this should probably be configurable or something
+ if (bundle.size() > configuredMax) {
+ oo.addIssue().setSeverity(IssueSeverityEnum.WARNING).setDetails("Search nested within transaction found more than " + configuredMax + " matches, but paging is not supported in nested transactions");
+ }
+ List resourcesToAdd = bundle.getResources(0, Math.min(bundle.size(), configuredMax));
+ for (IResource next : resourcesToAdd) {
+ searchBundle.addEntry().setResource(next);
+ }
+
+ response.addEntry().setResource(searchBundle);
}
- EntryTransactionResponse resp = response.addEntry().setResource(found).getTransactionResponse();
- resp.setLocation(found.getId().toUnqualified().getValue());
- resp.addEtag(found.getId().getVersionIdPart());
- } else if (parts.getParams() != null) {
- RuntimeResourceDefinition def = getContext().getResourceDefinition(parts.getDao().getResourceType());
- SearchParameterMap params = translateMatchUrl(url, def);
- IBundleProvider bundle = parts.getDao().search(params);
-
- Bundle searchBundle = new Bundle();
- searchBundle.setTotal(bundle.size());
-
- int configuredMax = 100; // this should probably be configurable or something
- if (bundle.size() > configuredMax) {
- oo.addIssue().setSeverity(IssueSeverityEnum.WARNING).setDetails("Search nested within transaction found more than " + configuredMax + " matches, but paging is not supported in nested transactions");
- }
- List resourcesToAdd = bundle.getResources(0, Math.min(bundle.size(), configuredMax));
- for (IResource next : resourcesToAdd) {
- searchBundle.addEntry().setResource(next);
- }
-
- response.addEntry().setResource(searchBundle);
}
- }
}
}
@@ -452,7 +452,7 @@ public class FhirSystemDaoDstu2 extends BaseFhirSystemDao {
// }
long delay = System.currentTimeMillis() - start;
- ourLog.info("Transaction completed in {}ms", new Object[] { delay });
+ ourLog.info("Transaction completed in {}ms", new Object[]{delay});
oo.addIssue().setSeverity(IssueSeverityEnum.INFORMATION).setDetails("Transaction completed in " + delay + "ms");
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDao.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDao.java
index e5ac694c129..2fc5724d695 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDao.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/dao/IFhirResourceDao.java
@@ -41,9 +41,8 @@ public interface IFhirResourceDao extends IDao {
DaoMethodOutcome create(T theResource, String theIfNoneExist);
/**
- * @param thePerformIndexing
- * Use with caution! If you set this to false, you need to manually perform indexing or your resources
- * won't be indexed and searches won't work.
+ * @param thePerformIndexing Use with caution! If you set this to false, you need to manually perform indexing or your resources
+ * won't be indexed and searches won't work.
*/
DaoMethodOutcome create(T theResource, String theIfNoneExist, boolean thePerformIndexing);
@@ -75,9 +74,8 @@ public interface IFhirResourceDao extends IDao {
BaseHasResource readEntity(IdDt theId);
/**
- * @param theCheckForForcedId
- * If true, this method should fail if the requested ID contains a numeric PID which exists, but is
- * obscured by a "forced ID" so should not exist as far as the outside world is concerned.
+ * @param theCheckForForcedId If true, this method should fail if the requested ID contains a numeric PID which exists, but is
+ * obscured by a "forced ID" so should not exist as far as the outside world is concerned.
*/
BaseHasResource readEntity(IdDt theId, boolean theCheckForForcedId);
diff --git a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ForcedId.java b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ForcedId.java
index b459b0c1ca9..e3c2a0512ea 100644
--- a/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ForcedId.java
+++ b/hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/entity/ForcedId.java
@@ -34,11 +34,11 @@ import javax.persistence.UniqueConstraint;
//@formatter:off
@Entity()
-@Table(name = "HFJ_FORCED_ID", uniqueConstraints = {
- @UniqueConstraint(name = "IDX_FORCEDID", columnNames = { "FORCED_ID" })
+@Table(name = "HFJ_FORCED_ID", uniqueConstraints = {
+ @UniqueConstraint(name = "IDX_FORCEDID", columnNames = {"FORCED_ID"})
})
-@NamedQueries(value= {
- @NamedQuery(name = "Q_GET_FORCED_ID", query = "SELECT f FROM ForcedId f WHERE myForcedId = :ID")
+@NamedQueries(value = {
+ @NamedQuery(name = "Q_GET_FORCED_ID", query = "SELECT f FROM ForcedId f WHERE myForcedId = :ID")
})
//@formatter:on
public class ForcedId {
diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoTest.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoTest.java
index f16b60020fc..47a0b8e9e99 100644
--- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoTest.java
+++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirResourceDaoTest.java
@@ -114,7 +114,7 @@ public class FhirResourceDaoTest {
p.addIdentifier().setSystem("urn:system").setValue(methodName);
p.addName().addFamily("Hello");
p.setId("Patient/" + methodName);
-
+
ourPatientDao.update(p, "Patient?identifier=urn%3Asystem%7C" + methodName);
p = ourPatientDao.read(id.toVersionless());
@@ -125,7 +125,7 @@ public class FhirResourceDaoTest {
}
-
+
@Test
public void testCreateNumericIdFails() {
Patient p = new Patient();
@@ -140,7 +140,7 @@ public class FhirResourceDaoTest {
}
}
-
+
@Test
public void testDeleteWithMatchUrl() {
String methodName = "testDeleteWithMatchUrl";
@@ -171,14 +171,14 @@ public class FhirResourceDaoTest {
IBundleProvider history = ourPatientDao.history(id, null);
assertEquals(2, history.size());
-
+
assertNotNull(ResourceMetadataKeyEnum.DELETED_AT.get(history.getResources(0, 0).get(0)));
assertNotNull(ResourceMetadataKeyEnum.DELETED_AT.get(history.getResources(0, 0).get(0)).getValue());
- assertNull(ResourceMetadataKeyEnum.DELETED_AT.get(history.getResources(1,1).get(0)));
-
+ assertNull(ResourceMetadataKeyEnum.DELETED_AT.get(history.getResources(1, 1).get(0)));
+
}
-
+
@Test
public void testCreateWithIfNoneExist() {
String methodName = "testCreateWithIfNoneExist";
diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu1Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu1Test.java
index f50971f412f..fae4bd72bcd 100644
--- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu1Test.java
+++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu1Test.java
@@ -34,381 +34,381 @@ import ca.uhn.fhir.rest.server.exceptions.InvalidRequestException;
public class FhirSystemDaoDstu1Test {
- private static ClassPathXmlApplicationContext ourCtx;
- private static FhirContext ourFhirContext;
- private static IFhirResourceDao ourLocationDao;
- private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirSystemDaoDstu1Test.class);
- private static IFhirResourceDao ourObservationDao;
- private static IFhirResourceDao ourPatientDao;
- private static IFhirSystemDao> ourSystemDao;
+ private static ClassPathXmlApplicationContext ourCtx;
+ private static FhirContext ourFhirContext;
+ private static IFhirResourceDao ourLocationDao;
+ private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirSystemDaoDstu1Test.class);
+ private static IFhirResourceDao ourObservationDao;
+ private static IFhirResourceDao ourPatientDao;
+ private static IFhirSystemDao> ourSystemDao;
- @Test
- public void testGetResourceCounts() {
- Observation obs = new Observation();
- obs.getName().addCoding().setSystem("urn:system").setCode("testGetResourceCountsO01");
- ourObservationDao.create(obs);
+ @Test
+ public void testGetResourceCounts() {
+ Observation obs = new Observation();
+ obs.getName().addCoding().setSystem("urn:system").setCode("testGetResourceCountsO01");
+ ourObservationDao.create(obs);
- Map oldCounts = ourSystemDao.getResourceCounts();
+ Map oldCounts = ourSystemDao.getResourceCounts();
- Patient patient = new Patient();
- patient.addIdentifier().setSystem("urn:system").setValue("testGetResourceCountsP01");
- patient.addName().addFamily("Tester").addGiven("Joe");
- ourPatientDao.create(patient);
+ Patient patient = new Patient();
+ patient.addIdentifier().setSystem("urn:system").setValue("testGetResourceCountsP01");
+ patient.addName().addFamily("Tester").addGiven("Joe");
+ ourPatientDao.create(patient);
- Map newCounts = ourSystemDao.getResourceCounts();
+ Map newCounts = ourSystemDao.getResourceCounts();
- if (oldCounts.containsKey("Patient")) {
- assertEquals(oldCounts.get("Patient") + 1, (long) newCounts.get("Patient"));
- } else {
- assertEquals(1L, (long) newCounts.get("Patient"));
- }
+ if (oldCounts.containsKey("Patient")) {
+ assertEquals(oldCounts.get("Patient") + 1, (long) newCounts.get("Patient"));
+ } else {
+ assertEquals(1L, (long) newCounts.get("Patient"));
+ }
- assertEquals((long) oldCounts.get("Observation"), (long) newCounts.get("Observation"));
+ assertEquals((long) oldCounts.get("Observation"), (long) newCounts.get("Observation"));
- }
+ }
- @Test
- public void testHistory() throws Exception {
- Date start = new Date();
- Thread.sleep(10);
+ @Test
+ public void testHistory() throws Exception {
+ Date start = new Date();
+ Thread.sleep(10);
- Patient patient = new Patient();
- patient.addIdentifier().setSystem("urn:system").setValue("testHistory");
- patient.addName().addFamily("Tester").addGiven("Joe");
- IdDt pid = ourPatientDao.create(patient).getId().toVersionless();
+ Patient patient = new Patient();
+ patient.addIdentifier().setSystem("urn:system").setValue("testHistory");
+ patient.addName().addFamily("Tester").addGiven("Joe");
+ IdDt pid = ourPatientDao.create(patient).getId().toVersionless();
- Thread.sleep(10);
- patient.setId(pid);
- IdDt newpid = ourPatientDao.update(patient).getId();
+ Thread.sleep(10);
+ patient.setId(pid);
+ IdDt newpid = ourPatientDao.update(patient).getId();
- Thread.sleep(10);
- patient.setId(pid);
- IdDt newpid2 = ourPatientDao.update(patient).getId();
+ Thread.sleep(10);
+ patient.setId(pid);
+ IdDt newpid2 = ourPatientDao.update(patient).getId();
- Thread.sleep(10);
- patient.setId(pid);
- IdDt newpid3 = ourPatientDao.update(patient).getId();
+ Thread.sleep(10);
+ patient.setId(pid);
+ IdDt newpid3 = ourPatientDao.update(patient).getId();
- IBundleProvider values = ourSystemDao.history(start);
- assertEquals(4, values.size());
+ IBundleProvider values = ourSystemDao.history(start);
+ assertEquals(4, values.size());
- List res = values.getResources(0, 4);
- assertEquals(newpid3, res.get(0).getId());
- assertEquals(newpid2, res.get(1).getId());
- assertEquals(newpid, res.get(2).getId());
- assertEquals(pid.toUnqualifiedVersionless(), res.get(3).getId().toUnqualifiedVersionless());
+ List res = values.getResources(0, 4);
+ assertEquals(newpid3, res.get(0).getId());
+ assertEquals(newpid2, res.get(1).getId());
+ assertEquals(newpid, res.get(2).getId());
+ assertEquals(pid.toUnqualifiedVersionless(), res.get(3).getId().toUnqualifiedVersionless());
- Location loc = new Location();
- loc.getAddress().addLine("AAA");
- IdDt lid = ourLocationDao.create(loc).getId();
+ Location loc = new Location();
+ loc.getAddress().addLine("AAA");
+ IdDt lid = ourLocationDao.create(loc).getId();
- Location loc2 = new Location();
- loc2.getAddress().addLine("AAA");
- ourLocationDao.create(loc2).getId();
+ Location loc2 = new Location();
+ loc2.getAddress().addLine("AAA");
+ ourLocationDao.create(loc2).getId();
- Thread.sleep(2000);
+ Thread.sleep(2000);
- values = ourLocationDao.history(start);
- assertEquals(2, values.size());
+ values = ourLocationDao.history(start);
+ assertEquals(2, values.size());
- values = ourLocationDao.history(lid.getIdPartAsLong(), start);
- assertEquals(1, values.size());
+ values = ourLocationDao.history(lid.getIdPartAsLong(), start);
+ assertEquals(1, values.size());
- }
+ }
- @Test
- public void testPersistWithSimpleLink() {
- Patient patient = new Patient();
- patient.setId(new IdDt("Patient/testPersistWithSimpleLinkP01"));
- patient.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP01");
- patient.addName().addFamily("Tester").addGiven("Joe");
+ @Test
+ public void testPersistWithSimpleLink() {
+ Patient patient = new Patient();
+ patient.setId(new IdDt("Patient/testPersistWithSimpleLinkP01"));
+ patient.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP01");
+ patient.addName().addFamily("Tester").addGiven("Joe");
- Observation obs = new Observation();
- obs.getName().addCoding().setSystem("urn:system").setCode("testPersistWithSimpleLinkO01");
- obs.setSubject(new ResourceReferenceDt("Patient/testPersistWithSimpleLinkP01"));
+ Observation obs = new Observation();
+ obs.getName().addCoding().setSystem("urn:system").setCode("testPersistWithSimpleLinkO01");
+ obs.setSubject(new ResourceReferenceDt("Patient/testPersistWithSimpleLinkP01"));
- ourSystemDao.transaction(Arrays.asList((IResource) patient, obs));
+ ourSystemDao.transaction(Arrays.asList((IResource) patient, obs));
- String patientId = (patient.getId().getIdPart());
- String obsId = (obs.getId().getIdPart());
+ String patientId = (patient.getId().getIdPart());
+ String obsId = (obs.getId().getIdPart());
- // assertThat(patientId, greaterThan(0L));
- // assertEquals(patientVersion, 1L);
- // assertThat(obsId, greaterThan(patientId));
- // assertEquals(obsVersion, 1L);
+ // assertThat(patientId, greaterThan(0L));
+ // assertEquals(patientVersion, 1L);
+ // assertThat(obsId, greaterThan(patientId));
+ // assertEquals(obsVersion, 1L);
- // Try to search
+ // Try to search
- IBundleProvider obsResults = ourObservationDao.search(Observation.SP_NAME, new IdentifierDt("urn:system", "testPersistWithSimpleLinkO01"));
- assertEquals(1, obsResults.size());
+ IBundleProvider obsResults = ourObservationDao.search(Observation.SP_NAME, new IdentifierDt("urn:system", "testPersistWithSimpleLinkO01"));
+ assertEquals(1, obsResults.size());
- IBundleProvider patResults = ourPatientDao.search(Patient.SP_IDENTIFIER, new IdentifierDt("urn:system", "testPersistWithSimpleLinkP01"));
- assertEquals(1, obsResults.size());
+ IBundleProvider patResults = ourPatientDao.search(Patient.SP_IDENTIFIER, new IdentifierDt("urn:system", "testPersistWithSimpleLinkP01"));
+ assertEquals(1, obsResults.size());
- IdDt foundPatientId = patResults.getResources(0, 1).get(0).getId();
- ResourceReferenceDt subject = obs.getSubject();
- assertEquals(foundPatientId.getIdPart(), subject.getReference().getIdPart());
+ IdDt foundPatientId = patResults.getResources(0, 1).get(0).getId();
+ ResourceReferenceDt subject = obs.getSubject();
+ assertEquals(foundPatientId.getIdPart(), subject.getReference().getIdPart());
- // Update
+ // Update
- patient = (Patient) patResults.getResources(0, 1).get(0);
- obs = (Observation) obsResults.getResources(0, 1).get(0);
- patient.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP02");
- obs.getName().addCoding().setSystem("urn:system").setCode("testPersistWithSimpleLinkO02");
+ patient = (Patient) patResults.getResources(0, 1).get(0);
+ obs = (Observation) obsResults.getResources(0, 1).get(0);
+ patient.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP02");
+ obs.getName().addCoding().setSystem("urn:system").setCode("testPersistWithSimpleLinkO02");
- ourSystemDao.transaction(Arrays.asList((IResource) patient, obs));
+ ourSystemDao.transaction(Arrays.asList((IResource) patient, obs));
- String patientId2 = (patient.getId().getIdPart());
- String patientVersion2 = (patient.getId().getVersionIdPart());
- String obsId2 = (obs.getId().getIdPart());
- String obsVersion2 = (obs.getId().getVersionIdPart());
+ String patientId2 = (patient.getId().getIdPart());
+ String patientVersion2 = (patient.getId().getVersionIdPart());
+ String obsId2 = (obs.getId().getIdPart());
+ String obsVersion2 = (obs.getId().getVersionIdPart());
- assertEquals(patientId, patientId2);
- assertEquals(patientVersion2, "2");
- assertEquals(obsId, obsId2);
- assertEquals(obsVersion2, "2");
+ assertEquals(patientId, patientId2);
+ assertEquals(patientVersion2, "2");
+ assertEquals(obsId, obsId2);
+ assertEquals(obsVersion2, "2");
- }
+ }
- @Test
- public void testPersistWithUnknownId() {
- Observation obs = new Observation();
- obs.getName().addCoding().setSystem("urn:system").setCode("testPersistWithSimpleLinkO01");
- obs.setSubject(new ResourceReferenceDt("Patient/999998888888"));
+ @Test
+ public void testPersistWithUnknownId() {
+ Observation obs = new Observation();
+ obs.getName().addCoding().setSystem("urn:system").setCode("testPersistWithSimpleLinkO01");
+ obs.setSubject(new ResourceReferenceDt("Patient/999998888888"));
- try {
- ourSystemDao.transaction(Arrays.asList((IResource) obs));
- } catch (InvalidRequestException e) {
- assertThat(e.getMessage(), containsString("Resource Patient/999998888888 not found, specified in path: Observation.subject"));
- }
+ try {
+ ourSystemDao.transaction(Arrays.asList((IResource) obs));
+ } catch (InvalidRequestException e) {
+ assertThat(e.getMessage(), containsString("Resource Patient/999998888888 not found, specified in path: Observation.subject"));
+ }
- obs = new Observation();
- obs.getName().addCoding().setSystem("urn:system").setCode("testPersistWithSimpleLinkO01");
- obs.setSubject(new ResourceReferenceDt("Patient/1.2.3.4"));
+ obs = new Observation();
+ obs.getName().addCoding().setSystem("urn:system").setCode("testPersistWithSimpleLinkO01");
+ obs.setSubject(new ResourceReferenceDt("Patient/1.2.3.4"));
- try {
- ourSystemDao.transaction(Arrays.asList((IResource) obs));
- } catch (InvalidRequestException e) {
- assertThat(e.getMessage(), containsString("Resource Patient/1.2.3.4 not found, specified in path: Observation.subject"));
- }
+ try {
+ ourSystemDao.transaction(Arrays.asList((IResource) obs));
+ } catch (InvalidRequestException e) {
+ assertThat(e.getMessage(), containsString("Resource Patient/1.2.3.4 not found, specified in path: Observation.subject"));
+ }
- }
+ }
- @Test
- public void testTagOperationss() throws Exception {
+ @Test
+ public void testTagOperationss() throws Exception {
- TagList preSystemTl = ourSystemDao.getAllTags();
+ TagList preSystemTl = ourSystemDao.getAllTags();
- TagList tl1 = new TagList();
- tl1.addTag("testGetAllTagsScheme1", "testGetAllTagsTerm1", "testGetAllTagsLabel1");
- Patient p1 = new Patient();
- p1.addIdentifier().setSystem("foo").setValue("testGetAllTags01");
- ResourceMetadataKeyEnum.TAG_LIST.put(p1, tl1);
- ourPatientDao.create(p1);
+ TagList tl1 = new TagList();
+ tl1.addTag("testGetAllTagsScheme1", "testGetAllTagsTerm1", "testGetAllTagsLabel1");
+ Patient p1 = new Patient();
+ p1.addIdentifier().setSystem("foo").setValue("testGetAllTags01");
+ ResourceMetadataKeyEnum.TAG_LIST.put(p1, tl1);
+ ourPatientDao.create(p1);
- TagList tl2 = new TagList();
- tl2.addTag("testGetAllTagsScheme2", "testGetAllTagsTerm2", "testGetAllTagsLabel2");
- Observation o1 = new Observation();
- o1.getName().setText("testGetAllTags02");
- ResourceMetadataKeyEnum.TAG_LIST.put(o1, tl2);
- IdDt o1id = ourObservationDao.create(o1).getId();
- assertTrue(o1id.getVersionIdPart() != null);
+ TagList tl2 = new TagList();
+ tl2.addTag("testGetAllTagsScheme2", "testGetAllTagsTerm2", "testGetAllTagsLabel2");
+ Observation o1 = new Observation();
+ o1.getName().setText("testGetAllTags02");
+ ResourceMetadataKeyEnum.TAG_LIST.put(o1, tl2);
+ IdDt o1id = ourObservationDao.create(o1).getId();
+ assertTrue(o1id.getVersionIdPart() != null);
- TagList postSystemTl = ourSystemDao.getAllTags();
- assertEquals(preSystemTl.size() + 2, postSystemTl.size());
- assertEquals("testGetAllTagsLabel1", postSystemTl.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1").getLabel());
+ TagList postSystemTl = ourSystemDao.getAllTags();
+ assertEquals(preSystemTl.size() + 2, postSystemTl.size());
+ assertEquals("testGetAllTagsLabel1", postSystemTl.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1").getLabel());
- TagList tags = ourPatientDao.getAllResourceTags();
- assertEquals("testGetAllTagsLabel1", tags.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1").getLabel());
- assertNull(tags.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2"));
+ TagList tags = ourPatientDao.getAllResourceTags();
+ assertEquals("testGetAllTagsLabel1", tags.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1").getLabel());
+ assertNull(tags.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2"));
- TagList tags2 = ourObservationDao.getTags(o1id);
- assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1"));
- assertEquals("testGetAllTagsLabel2", tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2").getLabel());
+ TagList tags2 = ourObservationDao.getTags(o1id);
+ assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1"));
+ assertEquals("testGetAllTagsLabel2", tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2").getLabel());
- o1.getResourceMetadata().remove(ResourceMetadataKeyEnum.TAG_LIST);
- o1.setId(o1id);
- IdDt o1id2 = ourObservationDao.update(o1).getId();
- assertTrue(o1id2.getVersionIdPart() != null);
+ o1.getResourceMetadata().remove(ResourceMetadataKeyEnum.TAG_LIST);
+ o1.setId(o1id);
+ IdDt o1id2 = ourObservationDao.update(o1).getId();
+ assertTrue(o1id2.getVersionIdPart() != null);
- tags2 = ourObservationDao.getTags(o1id);
- assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1"));
- assertEquals("testGetAllTagsLabel2", tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2").getLabel());
+ tags2 = ourObservationDao.getTags(o1id);
+ assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1"));
+ assertEquals("testGetAllTagsLabel2", tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2").getLabel());
- tags2 = ourObservationDao.getTags(o1id2);
- assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1"));
- assertNotNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2"));
+ tags2 = ourObservationDao.getTags(o1id2);
+ assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1"));
+ assertNotNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2"));
/*
- * Remove a tag from a version
+ * Remove a tag from a version
*/
- ourObservationDao.removeTag(o1id2, "testGetAllTagsScheme2", "testGetAllTagsTerm2");
- tags2 = ourObservationDao.getTags(o1id2);
- assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1"));
- assertNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2"));
+ ourObservationDao.removeTag(o1id2, "testGetAllTagsScheme2", "testGetAllTagsTerm2");
+ tags2 = ourObservationDao.getTags(o1id2);
+ assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1"));
+ assertNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2"));
- tags2 = ourObservationDao.getTags(o1id);
- assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1"));
- assertNotNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2"));
+ tags2 = ourObservationDao.getTags(o1id);
+ assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1"));
+ assertNotNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2"));
/*
* Add a tag
*/
- ourObservationDao.addTag(o1id2, "testGetAllTagsScheme3", "testGetAllTagsTerm3", "testGetAllTagsLabel3");
- tags2 = ourObservationDao.getTags(o1id2);
- assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1"));
- assertNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2"));
- assertNotNull(tags2.getTag("testGetAllTagsScheme3", "testGetAllTagsTerm3"));
- assertEquals("testGetAllTagsLabel3", tags2.getTag("testGetAllTagsScheme3", "testGetAllTagsTerm3").getLabel());
+ ourObservationDao.addTag(o1id2, "testGetAllTagsScheme3", "testGetAllTagsTerm3", "testGetAllTagsLabel3");
+ tags2 = ourObservationDao.getTags(o1id2);
+ assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1"));
+ assertNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2"));
+ assertNotNull(tags2.getTag("testGetAllTagsScheme3", "testGetAllTagsTerm3"));
+ assertEquals("testGetAllTagsLabel3", tags2.getTag("testGetAllTagsScheme3", "testGetAllTagsTerm3").getLabel());
- tags2 = ourObservationDao.getTags(o1id);
- assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1"));
- assertNotNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2"));
+ tags2 = ourObservationDao.getTags(o1id);
+ assertNull(tags2.getTag("testGetAllTagsScheme1", "testGetAllTagsTerm1"));
+ assertNotNull(tags2.getTag("testGetAllTagsScheme2", "testGetAllTagsTerm2"));
- }
+ }
- @Test(expected = InvalidRequestException.class)
- public void testTransactionFailsWithDuplicateIds() {
- Patient patient1 = new Patient();
- patient1.setId(new IdDt("Patient/testTransactionFailsWithDusplicateIds"));
- patient1.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP01");
+ @Test(expected = InvalidRequestException.class)
+ public void testTransactionFailsWithDuplicateIds() {
+ Patient patient1 = new Patient();
+ patient1.setId(new IdDt("Patient/testTransactionFailsWithDusplicateIds"));
+ patient1.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP01");
- Patient patient2 = new Patient();
- patient2.setId(new IdDt("Patient/testTransactionFailsWithDusplicateIds"));
- patient2.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP02");
+ Patient patient2 = new Patient();
+ patient2.setId(new IdDt("Patient/testTransactionFailsWithDusplicateIds"));
+ patient2.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP02");
- ourSystemDao.transaction(Arrays.asList((IResource) patient1, patient2));
- }
+ ourSystemDao.transaction(Arrays.asList((IResource) patient1, patient2));
+ }
- @Test
- public void testTransactionFromBundle() throws Exception {
+ @Test
+ public void testTransactionFromBundle() throws Exception {
- InputStream bundleRes = FhirSystemDaoDstu1Test.class.getResourceAsStream("/bundle-dstu1.xml");
- Bundle bundle = ourFhirContext.newXmlParser().parseBundle(new InputStreamReader(bundleRes));
- List res = bundle.toListOfResources();
+ InputStream bundleRes = FhirSystemDaoDstu1Test.class.getResourceAsStream("/bundle-dstu1.xml");
+ Bundle bundle = ourFhirContext.newXmlParser().parseBundle(new InputStreamReader(bundleRes));
+ List res = bundle.toListOfResources();
- ourSystemDao.transaction(res);
+ ourSystemDao.transaction(res);
- Patient p1 = (Patient) res.get(0);
- String id = p1.getId().getValue();
- ourLog.info("ID: {}", id);
- assertThat(id, not(equalToIgnoringCase("74635")));
- assertThat(id, not(equalToIgnoringCase("")));
- }
+ Patient p1 = (Patient) res.get(0);
+ String id = p1.getId().getValue();
+ ourLog.info("ID: {}", id);
+ assertThat(id, not(equalToIgnoringCase("74635")));
+ assertThat(id, not(equalToIgnoringCase("")));
+ }
- /**
- * Issue #55
- */
- @Test
- public void testTransactionWithCidIds() throws Exception {
- List res = new ArrayList();
+ /**
+ * Issue #55
+ */
+ @Test
+ public void testTransactionWithCidIds() throws Exception {
+ List res = new ArrayList();
- Patient p1 = new Patient();
- p1.setId("cid:patient1");
- p1.addIdentifier().setSystem("system").setValue("testTransactionWithCidIds01");
- res.add(p1);
+ Patient p1 = new Patient();
+ p1.setId("cid:patient1");
+ p1.addIdentifier().setSystem("system").setValue("testTransactionWithCidIds01");
+ res.add(p1);
- Observation o1 = new Observation();
- o1.setId("cid:observation1");
- o1.getIdentifier().setSystem("system").setValue("testTransactionWithCidIds02");
- o1.setSubject(new ResourceReferenceDt("Patient/cid:patient1"));
- res.add(o1);
+ Observation o1 = new Observation();
+ o1.setId("cid:observation1");
+ o1.getIdentifier().setSystem("system").setValue("testTransactionWithCidIds02");
+ o1.setSubject(new ResourceReferenceDt("Patient/cid:patient1"));
+ res.add(o1);
- Observation o2 = new Observation();
- o2.setId("cid:observation2");
- o2.getIdentifier().setSystem("system").setValue("testTransactionWithCidIds03");
- o2.setSubject(new ResourceReferenceDt("Patient/cid:patient1"));
- res.add(o2);
+ Observation o2 = new Observation();
+ o2.setId("cid:observation2");
+ o2.getIdentifier().setSystem("system").setValue("testTransactionWithCidIds03");
+ o2.setSubject(new ResourceReferenceDt("Patient/cid:patient1"));
+ res.add(o2);
- ourSystemDao.transaction(res);
+ ourSystemDao.transaction(res);
- assertTrue(p1.getId().getValue(), p1.getId().getIdPart().matches("^[0-9]+$"));
- assertTrue(o1.getId().getValue(), o1.getId().getIdPart().matches("^[0-9]+$"));
- assertTrue(o2.getId().getValue(), o2.getId().getIdPart().matches("^[0-9]+$"));
+ assertTrue(p1.getId().getValue(), p1.getId().getIdPart().matches("^[0-9]+$"));
+ assertTrue(o1.getId().getValue(), o1.getId().getIdPart().matches("^[0-9]+$"));
+ assertTrue(o2.getId().getValue(), o2.getId().getIdPart().matches("^[0-9]+$"));
- assertThat(o1.getSubject().getReference().getValue(), endsWith("Patient/" + p1.getId().getIdPart()));
- assertThat(o2.getSubject().getReference().getValue(), endsWith("Patient/" + p1.getId().getIdPart()));
+ assertThat(o1.getSubject().getReference().getValue(), endsWith("Patient/" + p1.getId().getIdPart()));
+ assertThat(o2.getSubject().getReference().getValue(), endsWith("Patient/" + p1.getId().getIdPart()));
- }
+ }
- @Test
- public void testTransactionWithDelete() throws Exception {
+ @Test
+ public void testTransactionWithDelete() throws Exception {
/*
* Create 3
*/
- List res;
- res = new ArrayList();
+ List res;
+ res = new ArrayList();
- Patient p1 = new Patient();
- p1.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete");
- res.add(p1);
+ Patient p1 = new Patient();
+ p1.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete");
+ res.add(p1);
- Patient p2 = new Patient();
- p2.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete");
- res.add(p2);
+ Patient p2 = new Patient();
+ p2.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete");
+ res.add(p2);
- Patient p3 = new Patient();
- p3.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete");
- res.add(p3);
+ Patient p3 = new Patient();
+ p3.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete");
+ res.add(p3);
- ourSystemDao.transaction(res);
+ ourSystemDao.transaction(res);
/*
* Verify
*/
- IBundleProvider results = ourPatientDao.search(Patient.SP_IDENTIFIER, new TokenParam("urn:system", "testTransactionWithDelete"));
- assertEquals(3, results.size());
+ IBundleProvider results = ourPatientDao.search(Patient.SP_IDENTIFIER, new TokenParam("urn:system", "testTransactionWithDelete"));
+ assertEquals(3, results.size());
/*
* Now delete 2
*/
- res = new ArrayList();
- List existing = results.getResources(0, 3);
+ res = new ArrayList();
+ List existing = results.getResources(0, 3);
- p1 = new Patient();
- p1.setId(existing.get(0).getId());
- ResourceMetadataKeyEnum.DELETED_AT.put(p1, InstantDt.withCurrentTime());
- res.add(p1);
+ p1 = new Patient();
+ p1.setId(existing.get(0).getId());
+ ResourceMetadataKeyEnum.DELETED_AT.put(p1, InstantDt.withCurrentTime());
+ res.add(p1);
- p2 = new Patient();
- p2.setId(existing.get(1).getId());
- ResourceMetadataKeyEnum.DELETED_AT.put(p2, InstantDt.withCurrentTime());
- res.add(p2);
+ p2 = new Patient();
+ p2.setId(existing.get(1).getId());
+ ResourceMetadataKeyEnum.DELETED_AT.put(p2, InstantDt.withCurrentTime());
+ res.add(p2);
- ourSystemDao.transaction(res);
+ ourSystemDao.transaction(res);
/*
* Verify
*/
- IBundleProvider results2 = ourPatientDao.search(Patient.SP_IDENTIFIER, new TokenParam("urn:system", "testTransactionWithDelete"));
- assertEquals(1, results2.size());
- List existing2 = results2.getResources(0, 1);
- assertEquals(existing2.get(0).getId(), existing.get(2).getId());
+ IBundleProvider results2 = ourPatientDao.search(Patient.SP_IDENTIFIER, new TokenParam("urn:system", "testTransactionWithDelete"));
+ assertEquals(1, results2.size());
+ List existing2 = results2.getResources(0, 1);
+ assertEquals(existing2.get(0).getId(), existing.get(2).getId());
- }
+ }
- @AfterClass
- public static void afterClass() {
- ourCtx.close();
- }
+ @AfterClass
+ public static void afterClass() {
+ ourCtx.close();
+ }
- @SuppressWarnings("unchecked")
- @BeforeClass
- public static void beforeClass() {
- ourCtx = new ClassPathXmlApplicationContext("hapi-fhir-server-resourceproviders-dstu1.xml", "fhir-jpabase-spring-test-config.xml");
- ourFhirContext = ourCtx.getBean(FhirContext.class);
- ourPatientDao = ourCtx.getBean("myPatientDaoDstu1", IFhirResourceDao.class);
- ourObservationDao = ourCtx.getBean("myObservationDaoDstu1", IFhirResourceDao.class);
- ourLocationDao = ourCtx.getBean("myLocationDaoDstu1", IFhirResourceDao.class);
- ourSystemDao = ourCtx.getBean("mySystemDaoDstu1", IFhirSystemDao.class);
- }
+ @SuppressWarnings("unchecked")
+ @BeforeClass
+ public static void beforeClass() {
+ ourCtx = new ClassPathXmlApplicationContext("hapi-fhir-server-resourceproviders-dstu1.xml", "fhir-jpabase-spring-test-config.xml");
+ ourFhirContext = ourCtx.getBean(FhirContext.class);
+ ourPatientDao = ourCtx.getBean("myPatientDaoDstu1", IFhirResourceDao.class);
+ ourObservationDao = ourCtx.getBean("myObservationDaoDstu1", IFhirResourceDao.class);
+ ourLocationDao = ourCtx.getBean("myLocationDaoDstu1", IFhirResourceDao.class);
+ ourSystemDao = ourCtx.getBean("mySystemDaoDstu1", IFhirSystemDao.class);
+ }
}
diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu2Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu2Test.java
index 691a99c877a..82501a6f10a 100644
--- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu2Test.java
+++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/dao/FhirSystemDaoDstu2Test.java
@@ -44,638 +44,637 @@ import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException;
public class FhirSystemDaoDstu2Test {
- private static ClassPathXmlApplicationContext ourCtx;
- private static FhirContext ourFhirContext;
- private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirSystemDaoDstu2Test.class);
- private static IFhirResourceDao ourPatientDao;
- private static IFhirSystemDao ourSystemDao;
- private static IFhirResourceDao ourObservationDao;
-
- @Test
- public void testTransactionCreateMatchUrlWithOneMatch() {
- String methodName = "testTransactionCreateMatchUrlWithOneMatch";
- Bundle request = new Bundle();
-
- Patient p = new Patient();
- p.addIdentifier().setSystem("urn:system").setValue(methodName);
- p.setId("Patient/" + methodName);
- IdDt id = ourPatientDao.create(p).getId();
- ourLog.info("Created patient, got it: {}", id);
-
- p = new Patient();
- p.addIdentifier().setSystem("urn:system").setValue(methodName);
- p.addName().addFamily("Hello");
- p.setId("Patient/" + methodName);
- request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.POST).setIfNoneExist("Patient?identifier=urn%3Asystem%7C" + methodName);
-
- Observation o = new Observation();
- o.getName().setText("Some Observation");
- o.getSubject().setReference("Patient/" + methodName);
- request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST);
-
- Bundle resp = ourSystemDao.transaction(request);
- assertEquals(3, resp.getEntry().size());
-
- Entry respEntry = resp.getEntry().get(1);
- assertEquals(Constants.STATUS_HTTP_200_OK + "", respEntry.getTransactionResponse().getStatus());
- assertThat(respEntry.getTransactionResponse().getLocation(), endsWith("Patient/" + id.getIdPart() + "/_history/1"));
- assertEquals("1", respEntry.getTransactionResponse().getEtag().get(0).getValue());
-
- respEntry = resp.getEntry().get(2);
- assertEquals(Constants.STATUS_HTTP_201_CREATED + "", respEntry.getTransactionResponse().getStatus());
- assertThat(respEntry.getTransactionResponse().getLocation(), containsString("Observation/"));
- assertThat(respEntry.getTransactionResponse().getLocation(), endsWith("/_history/1"));
- assertEquals("1", respEntry.getTransactionResponse().getEtag().get(0).getValue());
-
- o = (Observation) ourObservationDao.read(new IdDt(respEntry.getTransactionResponse().getLocationElement()));
- assertEquals(id.toVersionless(), o.getSubject().getReference());
- assertEquals("1", o.getId().getVersionIdPart());
-
- }
-
-
- @Test
- public void testTransactionReadAndSearch() {
- String methodName = "testTransactionReadAndSearch";
-
- Patient p = new Patient();
- p.addIdentifier().setSystem("urn:system").setValue(methodName);
- p.setId("Patient/" + methodName);
- IdDt idv1 = ourPatientDao.create(p).getId();
- ourLog.info("Created patient, got id: {}", idv1);
-
- p = new Patient();
- p.addIdentifier().setSystem("urn:system").setValue(methodName);
- p.addName().addFamily("Family Name");
- p.setId("Patient/" + methodName);
- IdDt idv2 = ourPatientDao.update(p).getId();
- ourLog.info("Updated patient, got id: {}", idv2);
-
- Bundle request = new Bundle();
- request.addEntry().getTransaction().setMethod(HTTPVerbEnum.GET).setUrl(idv1.toUnqualifiedVersionless().getValue());
- request.addEntry().getTransaction().setMethod(HTTPVerbEnum.GET).setUrl(idv1.toUnqualified().getValue());
- request.addEntry().getTransaction().setMethod(HTTPVerbEnum.GET).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName);
-
- Bundle resp = ourSystemDao.transaction(request);
-
- assertEquals(4, resp.getEntry().size());
-
- Entry nextEntry;
-
- nextEntry = resp.getEntry().get(1);
- assertEquals(Patient.class, nextEntry.getResource().getClass());
- assertEquals(idv2.toUnqualified(), nextEntry.getResource().getId().toUnqualified());
-
- nextEntry = resp.getEntry().get(2);
- assertEquals(Patient.class, nextEntry.getResource().getClass());
- assertEquals(idv1.toUnqualified(), nextEntry.getResource().getId().toUnqualified());
-
- nextEntry = resp.getEntry().get(3);
- assertEquals(Bundle.class, nextEntry.getResource().getClass());
-
- Bundle respBundle = (Bundle)nextEntry.getResource();
- assertEquals(1, respBundle.getTotal().intValue());
- }
-
-
-
- @Test
- public void testTransactionCreateMatchUrlWithTwoMatch() {
- String methodName = "testTransactionCreateMatchUrlWithTwoMatch";
-
- Patient p = new Patient();
- p.addIdentifier().setSystem("urn:system").setValue(methodName);
- IdDt id = ourPatientDao.create(p).getId();
- ourLog.info("Created patient, got it: {}", id);
-
- p = new Patient();
- p.addIdentifier().setSystem("urn:system").setValue(methodName);
- id = ourPatientDao.create(p).getId();
- ourLog.info("Created patient, got it: {}", id);
-
- Bundle request = new Bundle();
- p = new Patient();
- p.addIdentifier().setSystem("urn:system").setValue(methodName);
- p.addName().addFamily("Hello");
- p.setId("Patient/" + methodName);
- request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.POST).setIfNoneExist("Patient?identifier=urn%3Asystem%7C" + methodName);
-
- Observation o = new Observation();
- o.getName().setText("Some Observation");
- o.getSubject().setReference("Patient/" + methodName);
- request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST);
-
- try {
- ourSystemDao.transaction(request);
- fail();
- } catch (PreconditionFailedException e) {
- assertThat(e.getMessage(), containsString("with match URL \"Patient"));
- }
- }
-
- @Test
- public void testTransactionCreateMatchUrlWithZeroMatch() {
- String methodName = "testTransactionCreateMatchUrlWithZeroMatch";
- Bundle request = new Bundle();
-
- Patient p = new Patient();
- p.addIdentifier().setSystem("urn:system").setValue(methodName);
- p.addName().addFamily("Hello");
- p.setId("Patient/" + methodName);
- request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.POST).setIfNoneExist("Patient?identifier=urn%3Asystem%7C" + methodName);
-
- Observation o = new Observation();
- o.getName().setText("Some Observation");
- o.getSubject().setReference("Patient/" + methodName);
- request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST);
-
- Bundle resp = ourSystemDao.transaction(request);
- assertEquals(3, resp.getEntry().size());
-
- Entry respEntry = resp.getEntry().get(1);
- assertEquals(Constants.STATUS_HTTP_201_CREATED + "", respEntry.getTransactionResponse().getStatus());
- String patientId = respEntry.getTransactionResponse().getLocation();
- assertThat(patientId, not(endsWith("Patient/" + methodName + "/_history/1")));
- assertThat(patientId, (endsWith("/_history/1")));
- assertThat(patientId, (containsString("Patient/")));
- assertEquals("1", respEntry.getTransactionResponse().getEtag().get(0).getValue());
-
- respEntry = resp.getEntry().get(2);
- assertEquals(Constants.STATUS_HTTP_201_CREATED + "", respEntry.getTransactionResponse().getStatus());
- assertThat(respEntry.getTransactionResponse().getLocation(), containsString("Observation/"));
- assertThat(respEntry.getTransactionResponse().getLocation(), endsWith("/_history/1"));
- assertEquals("1", respEntry.getTransactionResponse().getEtag().get(0).getValue());
-
- o = (Observation) ourObservationDao.read(new IdDt(respEntry.getTransactionResponse().getLocationElement()));
- assertEquals(new IdDt(patientId).toUnqualifiedVersionless(), o.getSubject().getReference());
- }
-
- @Test
- public void testTransactionCreateNoMatchUrl() {
- String methodName = "testTransactionCreateNoMatchUrl";
- Bundle request = new Bundle();
-
- Patient p = new Patient();
- p.addIdentifier().setSystem("urn:system").setValue(methodName);
- p.setId("Patient/" + methodName);
- request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.POST).setIfNoneExist("Patient?identifier=urn%3Asystem%7C" + methodName);
-
- Bundle resp = ourSystemDao.transaction(request);
- assertEquals(2, resp.getEntry().size());
-
- Entry respEntry = resp.getEntry().get(1);
- assertEquals(Constants.STATUS_HTTP_201_CREATED + "", respEntry.getTransactionResponse().getStatus());
- String patientId = respEntry.getTransactionResponse().getLocation();
- assertThat(patientId, not(containsString("test")));
- }
-
- @Test
- public void testTransactionDeleteMatchUrlWithOneMatch() {
- String methodName = "testTransactionDeleteMatchUrlWithOneMatch";
-
- Patient p = new Patient();
- p.addIdentifier().setSystem("urn:system").setValue(methodName);
- IdDt id = ourPatientDao.create(p).getId();
- ourLog.info("Created patient, got it: {}", id);
-
- Bundle request = new Bundle();
- request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName);
-
- Bundle resp = ourSystemDao.transaction(request);
- assertEquals(2, resp.getEntry().size());
-
- Entry nextEntry = resp.getEntry().get(1);
- assertEquals(Constants.STATUS_HTTP_204_NO_CONTENT + "", nextEntry.getTransactionResponse().getStatus());
-
- try {
- ourPatientDao.read(id.toVersionless());
- fail();
- } catch (ResourceGoneException e) {
- // ok
- }
-
- try {
- ourPatientDao.read(new IdDt("Patient/" + methodName));
- fail();
- } catch (ResourceNotFoundException e) {
- // ok
- }
-
- IBundleProvider history = ourPatientDao.history(id, null);
- assertEquals(2, history.size());
-
- assertNotNull(ResourceMetadataKeyEnum.DELETED_AT.get(history.getResources(0, 0).get(0)));
- assertNotNull(ResourceMetadataKeyEnum.DELETED_AT.get(history.getResources(0, 0).get(0)).getValue());
- assertNull(ResourceMetadataKeyEnum.DELETED_AT.get(history.getResources(1, 1).get(0)));
-
- }
-
- @Test
- public void testTransactionDeleteMatchUrlWithTwoMatch() {
- String methodName = "testTransactionDeleteMatchUrlWithTwoMatch";
-
- Patient p = new Patient();
- p.addIdentifier().setSystem("urn:system").setValue(methodName);
- IdDt id = ourPatientDao.create(p).getId();
- ourLog.info("Created patient, got it: {}", id);
-
- p = new Patient();
- p.addIdentifier().setSystem("urn:system").setValue(methodName);
- id = ourPatientDao.create(p).getId();
- ourLog.info("Created patient, got it: {}", id);
-
- p = new Patient();
- p.addIdentifier().setSystem("urn:system").setValue(methodName);
- p.addName().addFamily("Hello");
- p.setId("Patient/" + methodName);
-
- Bundle request = new Bundle();
- request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName);
-
- try {
- ourSystemDao.transaction(request);
- fail();
- } catch (ResourceNotFoundException e) {
- assertThat(e.getMessage(), containsString("resource with match URL \"Patient?"));
- }
- }
-
- @Test
- public void testTransactionDeleteByResourceId() {
- String methodName = "testTransactionDeleteByResourceId";
-
- Patient p1 = new Patient();
- p1.addIdentifier().setSystem("urn:system").setValue(methodName);
- IdDt id1 = ourPatientDao.create(p1).getId();
- ourLog.info("Created patient, got it: {}", id1);
-
- Patient p2 = new Patient();
- p2.addIdentifier().setSystem("urn:system").setValue(methodName);
- p2.setId("Patient/" + methodName);
- IdDt id2 = ourPatientDao.create(p2).getId();
- ourLog.info("Created patient, got it: {}", id2);
-
- Bundle request = new Bundle();
-
- request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient/" + id1.getIdPart());
- request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient/" + id2.getIdPart());
-
- ourPatientDao.read(id1.toVersionless());
- ourPatientDao.read(id2.toVersionless());
-
- Bundle resp = ourSystemDao.transaction(request);
-
- assertEquals(3, resp.getEntry().size());
- assertEquals("204", resp.getEntry().get(1).getTransactionResponse().getStatus());
- assertEquals("204", resp.getEntry().get(2).getTransactionResponse().getStatus());
-
- try {
- ourPatientDao.read(id1.toVersionless());
- fail();
- } catch (ResourceGoneException e) {
- // good
- }
-
- try {
- ourPatientDao.read(id2.toVersionless());
- fail();
- } catch (ResourceGoneException e) {
- // good
- }
-
- }
-
- @Test
- public void testTransactionDeleteMatchUrlWithZeroMatch() {
- String methodName = "testTransactionDeleteMatchUrlWithZeroMatch";
-
- Bundle request = new Bundle();
- request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName);
-
- try {
- ourSystemDao.transaction(request);
- fail();
- } catch (ResourceNotFoundException e) {
- assertThat(e.getMessage(), containsString("resource matching URL \"Patient?"));
- }
- }
-
- @Test
- public void testTransactionDeleteNoMatchUrl() {
- String methodName = "testTransactionDeleteNoMatchUrl";
-
- Patient p = new Patient();
- p.addIdentifier().setSystem("urn:system").setValue(methodName);
- p.setId("Patient/" + methodName);
- IdDt id = ourPatientDao.create(p).getId();
- ourLog.info("Created patient, got it: {}", id);
-
- Bundle request = new Bundle();
- request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName);
-
- Bundle res = ourSystemDao.transaction(request);
- assertEquals(2, res.getEntry().size());
-
- assertEquals(Constants.STATUS_HTTP_204_NO_CONTENT + "", res.getEntry().get(1).getTransactionResponse().getStatus());
-
- try {
- ourPatientDao.read(id.toVersionless());
- fail();
- } catch (ResourceGoneException e) {
- // ok
- }
- }
-
- @Test(expected = InvalidRequestException.class)
- public void testTransactionFailsWithDuplicateIds() {
- Bundle request = new Bundle();
-
- Patient patient1 = new Patient();
- patient1.setId(new IdDt("Patient/testTransactionFailsWithDusplicateIds"));
- patient1.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP01");
- request.addEntry().setResource(patient1).getTransaction().setMethod(HTTPVerbEnum.POST);
-
- Patient patient2 = new Patient();
- patient2.setId(new IdDt("Patient/testTransactionFailsWithDusplicateIds"));
- patient2.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP02");
- request.addEntry().setResource(patient2).getTransaction().setMethod(HTTPVerbEnum.POST);
-
- ourSystemDao.transaction(request);
- }
-
- @Test
- public void testTransactionUpdateMatchUrlWithOneMatch() {
- String methodName = "testTransactionUpdateMatchUrlWithOneMatch";
- Bundle request = new Bundle();
-
- Patient p = new Patient();
- p.addIdentifier().setSystem("urn:system").setValue(methodName);
- IdDt id = ourPatientDao.create(p).getId();
- ourLog.info("Created patient, got it: {}", id);
-
- p = new Patient();
- p.addIdentifier().setSystem("urn:system").setValue(methodName);
- p.addName().addFamily("Hello");
- p.setId("Patient/" + methodName);
- request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.PUT).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName);
-
- Observation o = new Observation();
- o.getName().setText("Some Observation");
- o.getSubject().setReference("Patient/" + methodName);
- request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST);
-
- Bundle resp = ourSystemDao.transaction(request);
- assertEquals(3, resp.getEntry().size());
-
- Entry nextEntry = resp.getEntry().get(1);
- assertEquals("200", nextEntry.getTransactionResponse().getStatus());
- assertThat(nextEntry.getTransactionResponse().getLocation(), not(containsString("test")));
- assertEquals(id.toVersionless(), p.getId().toVersionless());
- assertNotEquals(id, p.getId());
- assertThat(p.getId().toString(), endsWith("/_history/2"));
-
- nextEntry = resp.getEntry().get(1);
- assertEquals(""+Constants.STATUS_HTTP_200_OK, nextEntry.getTransactionResponse().getStatus());
- assertThat(nextEntry.getTransactionResponse().getLocation(), not(emptyString()));
-
- nextEntry = resp.getEntry().get(2);
- o = ourObservationDao.read(new IdDt(nextEntry.getTransactionResponse().getLocation()));
- assertEquals(id.toVersionless(), o.getSubject().getReference());
-
- }
-
- @Test
- public void testTransactionUpdateMatchUrlWithTwoMatch() {
- String methodName = "testTransactionUpdateMatchUrlWithTwoMatch";
- Bundle request = new Bundle();
-
- Patient p = new Patient();
- p.addIdentifier().setSystem("urn:system").setValue(methodName);
- IdDt id = ourPatientDao.create(p).getId();
- ourLog.info("Created patient, got it: {}", id);
-
- p = new Patient();
- p.addIdentifier().setSystem("urn:system").setValue(methodName);
- id = ourPatientDao.create(p).getId();
- ourLog.info("Created patient, got it: {}", id);
-
- p = new Patient();
- p.addIdentifier().setSystem("urn:system").setValue(methodName);
- p.addName().addFamily("Hello");
- p.setId("Patient/" + methodName);
- request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.PUT).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName);
-
- Observation o = new Observation();
- o.getName().setText("Some Observation");
- o.getSubject().setReference("Patient/" + methodName);
- request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST);
-
- try {
- ourSystemDao.transaction(request);
- fail();
- } catch (PreconditionFailedException e) {
- assertThat(e.getMessage(), containsString("with match URL \"Patient"));
- }
- }
-
- @Test
- public void testTransactionUpdateMatchUrlWithZeroMatch() {
- String methodName = "testTransactionUpdateMatchUrlWithZeroMatch";
- Bundle request = new Bundle();
-
- Patient p = new Patient();
- p.addName().addFamily("Hello");
- IdDt id = ourPatientDao.create(p).getId();
-
- p = new Patient();
- p.addIdentifier().setSystem("urn:system").setValue(methodName);
- p.addName().addFamily("Hello");
- p.setId(id);
- request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.PUT).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName);
-
- Observation o = new Observation();
- o.getName().setText("Some Observation");
- o.getSubject().setReference(id);
- request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST);
-
- Bundle resp = ourSystemDao.transaction(request);
- assertEquals(3, resp.getEntry().size());
-
- Entry nextEntry = resp.getEntry().get(1);
- assertEquals(Constants.STATUS_HTTP_201_CREATED + "", nextEntry.getTransactionResponse().getStatus());
-
- assertThat(nextEntry.getTransactionResponse().getLocation(), not(containsString("test")));
- assertNotEquals(id.toVersionless(), new IdDt(nextEntry.getTransactionResponse().getLocation()).toVersionless());
-
- assertThat(nextEntry.getTransactionResponse().getLocation(), endsWith("/_history/1"));
-
- nextEntry = resp.getEntry().get(1);
- assertEquals(""+Constants.STATUS_HTTP_201_CREATED, nextEntry.getTransactionResponse().getStatus());
-
- nextEntry = resp.getEntry().get(2);
- o = ourObservationDao.read(new IdDt(nextEntry.getTransactionResponse().getLocation()));
- assertEquals(id.toVersionless(), o.getSubject().getReference());
-
- }
-
-
- @Test
- public void testTransactionUpdateNoMatchUrl() {
- String methodName = "testTransactionUpdateNoMatchUrl";
- Bundle request = new Bundle();
-
- Patient p = new Patient();
- p.addIdentifier().setSystem("urn:system").setValue(methodName);
- p.setId("Patient/" + methodName);
- IdDt id = ourPatientDao.create(p).getId();
- ourLog.info("Created patient, got it: {}", id);
-
- p = new Patient();
- p.addIdentifier().setSystem("urn:system").setValue(methodName);
- p.addName().addFamily("Hello");
- p.setId("Patient/" + methodName);
- request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.PUT).setUrl("Patient/"+ id.getIdPart());
-
- Observation o = new Observation();
- o.getName().setText("Some Observation");
- o.getSubject().setReference("Patient/" + methodName);
- request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST);
-
- Bundle resp = ourSystemDao.transaction(request);
- assertEquals(3, resp.getEntry().size());
-
- Entry nextEntry = resp.getEntry().get(1);
- assertEquals("200", nextEntry.getTransactionResponse().getStatus());
-
- assertThat(nextEntry.getTransactionResponse().getLocation(), (containsString("test")));
- assertEquals(id.toVersionless(), new IdDt(nextEntry.getTransactionResponse().getLocation()).toVersionless());
- assertNotEquals(id, new IdDt(nextEntry.getTransactionResponse().getLocation()));
- assertThat(nextEntry.getTransactionResponse().getLocation(), endsWith("/_history/2"));
-
- nextEntry = resp.getEntry().get(2);
- assertEquals(""+Constants.STATUS_HTTP_201_CREATED, nextEntry.getTransactionResponse().getStatus());
-
- o = ourObservationDao.read(new IdDt(resp.getEntry().get(2).getTransactionResponse().getLocation()));
- assertEquals(id.toVersionless(), o.getSubject().getReference());
-
- }
-
- //
- //
- // /**
- // * Issue #55
- // */
- // @Test
- // public void testTransactionWithCidIds() throws Exception {
- // Bundle request = new Bundle();
- //
- // Patient p1 = new Patient();
- // p1.setId("cid:patient1");
- // p1.addIdentifier().setSystem("system").setValue("testTransactionWithCidIds01");
- // res.add(p1);
- //
- // Observation o1 = new Observation();
- // o1.setId("cid:observation1");
- // o1.getIdentifier().setSystem("system").setValue("testTransactionWithCidIds02");
- // o1.setSubject(new ResourceReferenceDt("Patient/cid:patient1"));
- // res.add(o1);
- //
- // Observation o2 = new Observation();
- // o2.setId("cid:observation2");
- // o2.getIdentifier().setSystem("system").setValue("testTransactionWithCidIds03");
- // o2.setSubject(new ResourceReferenceDt("Patient/cid:patient1"));
- // res.add(o2);
- //
- // ourSystemDao.transaction(res);
- //
- // assertTrue(p1.getId().getValue(), p1.getId().getIdPart().matches("^[0-9]+$"));
- // assertTrue(o1.getId().getValue(), o1.getId().getIdPart().matches("^[0-9]+$"));
- // assertTrue(o2.getId().getValue(), o2.getId().getIdPart().matches("^[0-9]+$"));
- //
- // assertThat(o1.getSubject().getReference().getValue(), endsWith("Patient/" + p1.getId().getIdPart()));
- // assertThat(o2.getSubject().getReference().getValue(), endsWith("Patient/" + p1.getId().getIdPart()));
- //
- // }
- //
- // @Test
- // public void testTransactionWithDelete() throws Exception {
- // Bundle request = new Bundle();
- //
- // /*
- // * Create 3
- // */
- //
- // List res;
- // res = new ArrayList();
- //
- // Patient p1 = new Patient();
- // p1.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete");
- // res.add(p1);
- //
- // Patient p2 = new Patient();
- // p2.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete");
- // res.add(p2);
- //
- // Patient p3 = new Patient();
- // p3.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete");
- // res.add(p3);
- //
- // ourSystemDao.transaction(res);
- //
- // /*
- // * Verify
- // */
- //
- // IBundleProvider results = ourPatientDao.search(Patient.SP_IDENTIFIER, new TokenParam("urn:system",
- // "testTransactionWithDelete"));
- // assertEquals(3, results.size());
- //
- // /*
- // * Now delete 2
- // */
- //
- // request = new Bundle();
- // res = new ArrayList();
- // List existing = results.getResources(0, 3);
- //
- // p1 = new Patient();
- // p1.setId(existing.get(0).getId());
- // ResourceMetadataKeyEnum.DELETED_AT.put(p1, InstantDt.withCurrentTime());
- // res.add(p1);
- //
- // p2 = new Patient();
- // p2.setId(existing.get(1).getId());
- // ResourceMetadataKeyEnum.DELETED_AT.put(p2, InstantDt.withCurrentTime());
- // res.add(p2);
- //
- // ourSystemDao.transaction(res);
- //
- // /*
- // * Verify
- // */
- //
- // IBundleProvider results2 = ourPatientDao.search(Patient.SP_IDENTIFIER, new TokenParam("urn:system",
- // "testTransactionWithDelete"));
- // assertEquals(1, results2.size());
- // List existing2 = results2.getResources(0, 1);
- // assertEquals(existing2.get(0).getId(), existing.get(2).getId());
- //
- // }
-
- @AfterClass
- public static void afterClass() {
- ourCtx.close();
- }
-
- @SuppressWarnings("unchecked")
- @BeforeClass
- public static void beforeClass() {
- ourCtx = new ClassPathXmlApplicationContext("hapi-fhir-server-resourceproviders-dstu2.xml", "fhir-jpabase-spring-test-config.xml");
- ourFhirContext = ourCtx.getBean(FhirContext.class);
- assertEquals(FhirVersionEnum.DSTU2, ourFhirContext.getVersion().getVersion());
- ourPatientDao = ourCtx.getBean("myPatientDaoDstu2", IFhirResourceDao.class);
- ourObservationDao = ourCtx.getBean("myObservationDaoDstu2", IFhirResourceDao.class);
- ourSystemDao = ourCtx.getBean("mySystemDaoDstu2", IFhirSystemDao.class);
- }
+ private static ClassPathXmlApplicationContext ourCtx;
+ private static FhirContext ourFhirContext;
+ private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(FhirSystemDaoDstu2Test.class);
+ private static IFhirResourceDao ourPatientDao;
+ private static IFhirSystemDao ourSystemDao;
+ private static IFhirResourceDao ourObservationDao;
+
+ @Test
+ public void testTransactionCreateMatchUrlWithOneMatch() {
+ String methodName = "testTransactionCreateMatchUrlWithOneMatch";
+ Bundle request = new Bundle();
+
+ Patient p = new Patient();
+ p.addIdentifier().setSystem("urn:system").setValue(methodName);
+ p.setId("Patient/" + methodName);
+ IdDt id = ourPatientDao.create(p).getId();
+ ourLog.info("Created patient, got it: {}", id);
+
+ p = new Patient();
+ p.addIdentifier().setSystem("urn:system").setValue(methodName);
+ p.addName().addFamily("Hello");
+ p.setId("Patient/" + methodName);
+ request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.POST).setIfNoneExist("Patient?identifier=urn%3Asystem%7C" + methodName);
+
+ Observation o = new Observation();
+ o.getName().setText("Some Observation");
+ o.getSubject().setReference("Patient/" + methodName);
+ request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST);
+
+ Bundle resp = ourSystemDao.transaction(request);
+ assertEquals(3, resp.getEntry().size());
+
+ Entry respEntry = resp.getEntry().get(1);
+ assertEquals(Constants.STATUS_HTTP_200_OK + "", respEntry.getTransactionResponse().getStatus());
+ assertThat(respEntry.getTransactionResponse().getLocation(), endsWith("Patient/" + id.getIdPart() + "/_history/1"));
+ assertEquals("1", respEntry.getTransactionResponse().getEtag().get(0).getValue());
+
+ respEntry = resp.getEntry().get(2);
+ assertEquals(Constants.STATUS_HTTP_201_CREATED + "", respEntry.getTransactionResponse().getStatus());
+ assertThat(respEntry.getTransactionResponse().getLocation(), containsString("Observation/"));
+ assertThat(respEntry.getTransactionResponse().getLocation(), endsWith("/_history/1"));
+ assertEquals("1", respEntry.getTransactionResponse().getEtag().get(0).getValue());
+
+ o = (Observation) ourObservationDao.read(new IdDt(respEntry.getTransactionResponse().getLocationElement()));
+ assertEquals(id.toVersionless(), o.getSubject().getReference());
+ assertEquals("1", o.getId().getVersionIdPart());
+
+ }
+
+
+ @Test
+ public void testTransactionReadAndSearch() {
+ String methodName = "testTransactionReadAndSearch";
+
+ Patient p = new Patient();
+ p.addIdentifier().setSystem("urn:system").setValue(methodName);
+ p.setId("Patient/" + methodName);
+ IdDt idv1 = ourPatientDao.create(p).getId();
+ ourLog.info("Created patient, got id: {}", idv1);
+
+ p = new Patient();
+ p.addIdentifier().setSystem("urn:system").setValue(methodName);
+ p.addName().addFamily("Family Name");
+ p.setId("Patient/" + methodName);
+ IdDt idv2 = ourPatientDao.update(p).getId();
+ ourLog.info("Updated patient, got id: {}", idv2);
+
+ Bundle request = new Bundle();
+ request.addEntry().getTransaction().setMethod(HTTPVerbEnum.GET).setUrl(idv1.toUnqualifiedVersionless().getValue());
+ request.addEntry().getTransaction().setMethod(HTTPVerbEnum.GET).setUrl(idv1.toUnqualified().getValue());
+ request.addEntry().getTransaction().setMethod(HTTPVerbEnum.GET).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName);
+
+ Bundle resp = ourSystemDao.transaction(request);
+
+ assertEquals(4, resp.getEntry().size());
+
+ Entry nextEntry;
+
+ nextEntry = resp.getEntry().get(1);
+ assertEquals(Patient.class, nextEntry.getResource().getClass());
+ assertEquals(idv2.toUnqualified(), nextEntry.getResource().getId().toUnqualified());
+
+ nextEntry = resp.getEntry().get(2);
+ assertEquals(Patient.class, nextEntry.getResource().getClass());
+ assertEquals(idv1.toUnqualified(), nextEntry.getResource().getId().toUnqualified());
+
+ nextEntry = resp.getEntry().get(3);
+ assertEquals(Bundle.class, nextEntry.getResource().getClass());
+
+ Bundle respBundle = (Bundle) nextEntry.getResource();
+ assertEquals(1, respBundle.getTotal().intValue());
+ }
+
+
+ @Test
+ public void testTransactionCreateMatchUrlWithTwoMatch() {
+ String methodName = "testTransactionCreateMatchUrlWithTwoMatch";
+
+ Patient p = new Patient();
+ p.addIdentifier().setSystem("urn:system").setValue(methodName);
+ IdDt id = ourPatientDao.create(p).getId();
+ ourLog.info("Created patient, got it: {}", id);
+
+ p = new Patient();
+ p.addIdentifier().setSystem("urn:system").setValue(methodName);
+ id = ourPatientDao.create(p).getId();
+ ourLog.info("Created patient, got it: {}", id);
+
+ Bundle request = new Bundle();
+ p = new Patient();
+ p.addIdentifier().setSystem("urn:system").setValue(methodName);
+ p.addName().addFamily("Hello");
+ p.setId("Patient/" + methodName);
+ request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.POST).setIfNoneExist("Patient?identifier=urn%3Asystem%7C" + methodName);
+
+ Observation o = new Observation();
+ o.getName().setText("Some Observation");
+ o.getSubject().setReference("Patient/" + methodName);
+ request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST);
+
+ try {
+ ourSystemDao.transaction(request);
+ fail();
+ } catch (PreconditionFailedException e) {
+ assertThat(e.getMessage(), containsString("with match URL \"Patient"));
+ }
+ }
+
+ @Test
+ public void testTransactionCreateMatchUrlWithZeroMatch() {
+ String methodName = "testTransactionCreateMatchUrlWithZeroMatch";
+ Bundle request = new Bundle();
+
+ Patient p = new Patient();
+ p.addIdentifier().setSystem("urn:system").setValue(methodName);
+ p.addName().addFamily("Hello");
+ p.setId("Patient/" + methodName);
+ request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.POST).setIfNoneExist("Patient?identifier=urn%3Asystem%7C" + methodName);
+
+ Observation o = new Observation();
+ o.getName().setText("Some Observation");
+ o.getSubject().setReference("Patient/" + methodName);
+ request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST);
+
+ Bundle resp = ourSystemDao.transaction(request);
+ assertEquals(3, resp.getEntry().size());
+
+ Entry respEntry = resp.getEntry().get(1);
+ assertEquals(Constants.STATUS_HTTP_201_CREATED + "", respEntry.getTransactionResponse().getStatus());
+ String patientId = respEntry.getTransactionResponse().getLocation();
+ assertThat(patientId, not(endsWith("Patient/" + methodName + "/_history/1")));
+ assertThat(patientId, (endsWith("/_history/1")));
+ assertThat(patientId, (containsString("Patient/")));
+ assertEquals("1", respEntry.getTransactionResponse().getEtag().get(0).getValue());
+
+ respEntry = resp.getEntry().get(2);
+ assertEquals(Constants.STATUS_HTTP_201_CREATED + "", respEntry.getTransactionResponse().getStatus());
+ assertThat(respEntry.getTransactionResponse().getLocation(), containsString("Observation/"));
+ assertThat(respEntry.getTransactionResponse().getLocation(), endsWith("/_history/1"));
+ assertEquals("1", respEntry.getTransactionResponse().getEtag().get(0).getValue());
+
+ o = (Observation) ourObservationDao.read(new IdDt(respEntry.getTransactionResponse().getLocationElement()));
+ assertEquals(new IdDt(patientId).toUnqualifiedVersionless(), o.getSubject().getReference());
+ }
+
+ @Test
+ public void testTransactionCreateNoMatchUrl() {
+ String methodName = "testTransactionCreateNoMatchUrl";
+ Bundle request = new Bundle();
+
+ Patient p = new Patient();
+ p.addIdentifier().setSystem("urn:system").setValue(methodName);
+ p.setId("Patient/" + methodName);
+ request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.POST).setIfNoneExist("Patient?identifier=urn%3Asystem%7C" + methodName);
+
+ Bundle resp = ourSystemDao.transaction(request);
+ assertEquals(2, resp.getEntry().size());
+
+ Entry respEntry = resp.getEntry().get(1);
+ assertEquals(Constants.STATUS_HTTP_201_CREATED + "", respEntry.getTransactionResponse().getStatus());
+ String patientId = respEntry.getTransactionResponse().getLocation();
+ assertThat(patientId, not(containsString("test")));
+ }
+
+ @Test
+ public void testTransactionDeleteMatchUrlWithOneMatch() {
+ String methodName = "testTransactionDeleteMatchUrlWithOneMatch";
+
+ Patient p = new Patient();
+ p.addIdentifier().setSystem("urn:system").setValue(methodName);
+ IdDt id = ourPatientDao.create(p).getId();
+ ourLog.info("Created patient, got it: {}", id);
+
+ Bundle request = new Bundle();
+ request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName);
+
+ Bundle resp = ourSystemDao.transaction(request);
+ assertEquals(2, resp.getEntry().size());
+
+ Entry nextEntry = resp.getEntry().get(1);
+ assertEquals(Constants.STATUS_HTTP_204_NO_CONTENT + "", nextEntry.getTransactionResponse().getStatus());
+
+ try {
+ ourPatientDao.read(id.toVersionless());
+ fail();
+ } catch (ResourceGoneException e) {
+ // ok
+ }
+
+ try {
+ ourPatientDao.read(new IdDt("Patient/" + methodName));
+ fail();
+ } catch (ResourceNotFoundException e) {
+ // ok
+ }
+
+ IBundleProvider history = ourPatientDao.history(id, null);
+ assertEquals(2, history.size());
+
+ assertNotNull(ResourceMetadataKeyEnum.DELETED_AT.get(history.getResources(0, 0).get(0)));
+ assertNotNull(ResourceMetadataKeyEnum.DELETED_AT.get(history.getResources(0, 0).get(0)).getValue());
+ assertNull(ResourceMetadataKeyEnum.DELETED_AT.get(history.getResources(1, 1).get(0)));
+
+ }
+
+ @Test
+ public void testTransactionDeleteMatchUrlWithTwoMatch() {
+ String methodName = "testTransactionDeleteMatchUrlWithTwoMatch";
+
+ Patient p = new Patient();
+ p.addIdentifier().setSystem("urn:system").setValue(methodName);
+ IdDt id = ourPatientDao.create(p).getId();
+ ourLog.info("Created patient, got it: {}", id);
+
+ p = new Patient();
+ p.addIdentifier().setSystem("urn:system").setValue(methodName);
+ id = ourPatientDao.create(p).getId();
+ ourLog.info("Created patient, got it: {}", id);
+
+ p = new Patient();
+ p.addIdentifier().setSystem("urn:system").setValue(methodName);
+ p.addName().addFamily("Hello");
+ p.setId("Patient/" + methodName);
+
+ Bundle request = new Bundle();
+ request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName);
+
+ try {
+ ourSystemDao.transaction(request);
+ fail();
+ } catch (ResourceNotFoundException e) {
+ assertThat(e.getMessage(), containsString("resource with match URL \"Patient?"));
+ }
+ }
+
+ @Test
+ public void testTransactionDeleteByResourceId() {
+ String methodName = "testTransactionDeleteByResourceId";
+
+ Patient p1 = new Patient();
+ p1.addIdentifier().setSystem("urn:system").setValue(methodName);
+ IdDt id1 = ourPatientDao.create(p1).getId();
+ ourLog.info("Created patient, got it: {}", id1);
+
+ Patient p2 = new Patient();
+ p2.addIdentifier().setSystem("urn:system").setValue(methodName);
+ p2.setId("Patient/" + methodName);
+ IdDt id2 = ourPatientDao.create(p2).getId();
+ ourLog.info("Created patient, got it: {}", id2);
+
+ Bundle request = new Bundle();
+
+ request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient/" + id1.getIdPart());
+ request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient/" + id2.getIdPart());
+
+ ourPatientDao.read(id1.toVersionless());
+ ourPatientDao.read(id2.toVersionless());
+
+ Bundle resp = ourSystemDao.transaction(request);
+
+ assertEquals(3, resp.getEntry().size());
+ assertEquals("204", resp.getEntry().get(1).getTransactionResponse().getStatus());
+ assertEquals("204", resp.getEntry().get(2).getTransactionResponse().getStatus());
+
+ try {
+ ourPatientDao.read(id1.toVersionless());
+ fail();
+ } catch (ResourceGoneException e) {
+ // good
+ }
+
+ try {
+ ourPatientDao.read(id2.toVersionless());
+ fail();
+ } catch (ResourceGoneException e) {
+ // good
+ }
+
+ }
+
+ @Test
+ public void testTransactionDeleteMatchUrlWithZeroMatch() {
+ String methodName = "testTransactionDeleteMatchUrlWithZeroMatch";
+
+ Bundle request = new Bundle();
+ request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName);
+
+ try {
+ ourSystemDao.transaction(request);
+ fail();
+ } catch (ResourceNotFoundException e) {
+ assertThat(e.getMessage(), containsString("resource matching URL \"Patient?"));
+ }
+ }
+
+ @Test
+ public void testTransactionDeleteNoMatchUrl() {
+ String methodName = "testTransactionDeleteNoMatchUrl";
+
+ Patient p = new Patient();
+ p.addIdentifier().setSystem("urn:system").setValue(methodName);
+ p.setId("Patient/" + methodName);
+ IdDt id = ourPatientDao.create(p).getId();
+ ourLog.info("Created patient, got it: {}", id);
+
+ Bundle request = new Bundle();
+ request.addEntry().getTransaction().setMethod(HTTPVerbEnum.DELETE).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName);
+
+ Bundle res = ourSystemDao.transaction(request);
+ assertEquals(2, res.getEntry().size());
+
+ assertEquals(Constants.STATUS_HTTP_204_NO_CONTENT + "", res.getEntry().get(1).getTransactionResponse().getStatus());
+
+ try {
+ ourPatientDao.read(id.toVersionless());
+ fail();
+ } catch (ResourceGoneException e) {
+ // ok
+ }
+ }
+
+ @Test(expected = InvalidRequestException.class)
+ public void testTransactionFailsWithDuplicateIds() {
+ Bundle request = new Bundle();
+
+ Patient patient1 = new Patient();
+ patient1.setId(new IdDt("Patient/testTransactionFailsWithDusplicateIds"));
+ patient1.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP01");
+ request.addEntry().setResource(patient1).getTransaction().setMethod(HTTPVerbEnum.POST);
+
+ Patient patient2 = new Patient();
+ patient2.setId(new IdDt("Patient/testTransactionFailsWithDusplicateIds"));
+ patient2.addIdentifier().setSystem("urn:system").setValue("testPersistWithSimpleLinkP02");
+ request.addEntry().setResource(patient2).getTransaction().setMethod(HTTPVerbEnum.POST);
+
+ ourSystemDao.transaction(request);
+ }
+
+ @Test
+ public void testTransactionUpdateMatchUrlWithOneMatch() {
+ String methodName = "testTransactionUpdateMatchUrlWithOneMatch";
+ Bundle request = new Bundle();
+
+ Patient p = new Patient();
+ p.addIdentifier().setSystem("urn:system").setValue(methodName);
+ IdDt id = ourPatientDao.create(p).getId();
+ ourLog.info("Created patient, got it: {}", id);
+
+ p = new Patient();
+ p.addIdentifier().setSystem("urn:system").setValue(methodName);
+ p.addName().addFamily("Hello");
+ p.setId("Patient/" + methodName);
+ request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.PUT).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName);
+
+ Observation o = new Observation();
+ o.getName().setText("Some Observation");
+ o.getSubject().setReference("Patient/" + methodName);
+ request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST);
+
+ Bundle resp = ourSystemDao.transaction(request);
+ assertEquals(3, resp.getEntry().size());
+
+ Entry nextEntry = resp.getEntry().get(1);
+ assertEquals("200", nextEntry.getTransactionResponse().getStatus());
+ assertThat(nextEntry.getTransactionResponse().getLocation(), not(containsString("test")));
+ assertEquals(id.toVersionless(), p.getId().toVersionless());
+ assertNotEquals(id, p.getId());
+ assertThat(p.getId().toString(), endsWith("/_history/2"));
+
+ nextEntry = resp.getEntry().get(1);
+ assertEquals("" + Constants.STATUS_HTTP_200_OK, nextEntry.getTransactionResponse().getStatus());
+ assertThat(nextEntry.getTransactionResponse().getLocation(), not(emptyString()));
+
+ nextEntry = resp.getEntry().get(2);
+ o = ourObservationDao.read(new IdDt(nextEntry.getTransactionResponse().getLocation()));
+ assertEquals(id.toVersionless(), o.getSubject().getReference());
+
+ }
+
+ @Test
+ public void testTransactionUpdateMatchUrlWithTwoMatch() {
+ String methodName = "testTransactionUpdateMatchUrlWithTwoMatch";
+ Bundle request = new Bundle();
+
+ Patient p = new Patient();
+ p.addIdentifier().setSystem("urn:system").setValue(methodName);
+ IdDt id = ourPatientDao.create(p).getId();
+ ourLog.info("Created patient, got it: {}", id);
+
+ p = new Patient();
+ p.addIdentifier().setSystem("urn:system").setValue(methodName);
+ id = ourPatientDao.create(p).getId();
+ ourLog.info("Created patient, got it: {}", id);
+
+ p = new Patient();
+ p.addIdentifier().setSystem("urn:system").setValue(methodName);
+ p.addName().addFamily("Hello");
+ p.setId("Patient/" + methodName);
+ request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.PUT).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName);
+
+ Observation o = new Observation();
+ o.getName().setText("Some Observation");
+ o.getSubject().setReference("Patient/" + methodName);
+ request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST);
+
+ try {
+ ourSystemDao.transaction(request);
+ fail();
+ } catch (PreconditionFailedException e) {
+ assertThat(e.getMessage(), containsString("with match URL \"Patient"));
+ }
+ }
+
+ @Test
+ public void testTransactionUpdateMatchUrlWithZeroMatch() {
+ String methodName = "testTransactionUpdateMatchUrlWithZeroMatch";
+ Bundle request = new Bundle();
+
+ Patient p = new Patient();
+ p.addName().addFamily("Hello");
+ IdDt id = ourPatientDao.create(p).getId();
+
+ p = new Patient();
+ p.addIdentifier().setSystem("urn:system").setValue(methodName);
+ p.addName().addFamily("Hello");
+ p.setId(id);
+ request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.PUT).setUrl("Patient?identifier=urn%3Asystem%7C" + methodName);
+
+ Observation o = new Observation();
+ o.getName().setText("Some Observation");
+ o.getSubject().setReference(id);
+ request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST);
+
+ Bundle resp = ourSystemDao.transaction(request);
+ assertEquals(3, resp.getEntry().size());
+
+ Entry nextEntry = resp.getEntry().get(1);
+ assertEquals(Constants.STATUS_HTTP_201_CREATED + "", nextEntry.getTransactionResponse().getStatus());
+
+ assertThat(nextEntry.getTransactionResponse().getLocation(), not(containsString("test")));
+ assertNotEquals(id.toVersionless(), new IdDt(nextEntry.getTransactionResponse().getLocation()).toVersionless());
+
+ assertThat(nextEntry.getTransactionResponse().getLocation(), endsWith("/_history/1"));
+
+ nextEntry = resp.getEntry().get(1);
+ assertEquals("" + Constants.STATUS_HTTP_201_CREATED, nextEntry.getTransactionResponse().getStatus());
+
+ nextEntry = resp.getEntry().get(2);
+ o = ourObservationDao.read(new IdDt(nextEntry.getTransactionResponse().getLocation()));
+ assertEquals(id.toVersionless(), o.getSubject().getReference());
+
+ }
+
+
+ @Test
+ public void testTransactionUpdateNoMatchUrl() {
+ String methodName = "testTransactionUpdateNoMatchUrl";
+ Bundle request = new Bundle();
+
+ Patient p = new Patient();
+ p.addIdentifier().setSystem("urn:system").setValue(methodName);
+ p.setId("Patient/" + methodName);
+ IdDt id = ourPatientDao.create(p).getId();
+ ourLog.info("Created patient, got it: {}", id);
+
+ p = new Patient();
+ p.addIdentifier().setSystem("urn:system").setValue(methodName);
+ p.addName().addFamily("Hello");
+ p.setId("Patient/" + methodName);
+ request.addEntry().setResource(p).getTransaction().setMethod(HTTPVerbEnum.PUT).setUrl("Patient/" + id.getIdPart());
+
+ Observation o = new Observation();
+ o.getName().setText("Some Observation");
+ o.getSubject().setReference("Patient/" + methodName);
+ request.addEntry().setResource(o).getTransaction().setMethod(HTTPVerbEnum.POST);
+
+ Bundle resp = ourSystemDao.transaction(request);
+ assertEquals(3, resp.getEntry().size());
+
+ Entry nextEntry = resp.getEntry().get(1);
+ assertEquals("200", nextEntry.getTransactionResponse().getStatus());
+
+ assertThat(nextEntry.getTransactionResponse().getLocation(), (containsString("test")));
+ assertEquals(id.toVersionless(), new IdDt(nextEntry.getTransactionResponse().getLocation()).toVersionless());
+ assertNotEquals(id, new IdDt(nextEntry.getTransactionResponse().getLocation()));
+ assertThat(nextEntry.getTransactionResponse().getLocation(), endsWith("/_history/2"));
+
+ nextEntry = resp.getEntry().get(2);
+ assertEquals("" + Constants.STATUS_HTTP_201_CREATED, nextEntry.getTransactionResponse().getStatus());
+
+ o = ourObservationDao.read(new IdDt(resp.getEntry().get(2).getTransactionResponse().getLocation()));
+ assertEquals(id.toVersionless(), o.getSubject().getReference());
+
+ }
+
+ //
+ //
+ // /**
+ // * Issue #55
+ // */
+ // @Test
+ // public void testTransactionWithCidIds() throws Exception {
+ // Bundle request = new Bundle();
+ //
+ // Patient p1 = new Patient();
+ // p1.setId("cid:patient1");
+ // p1.addIdentifier().setSystem("system").setValue("testTransactionWithCidIds01");
+ // res.add(p1);
+ //
+ // Observation o1 = new Observation();
+ // o1.setId("cid:observation1");
+ // o1.getIdentifier().setSystem("system").setValue("testTransactionWithCidIds02");
+ // o1.setSubject(new ResourceReferenceDt("Patient/cid:patient1"));
+ // res.add(o1);
+ //
+ // Observation o2 = new Observation();
+ // o2.setId("cid:observation2");
+ // o2.getIdentifier().setSystem("system").setValue("testTransactionWithCidIds03");
+ // o2.setSubject(new ResourceReferenceDt("Patient/cid:patient1"));
+ // res.add(o2);
+ //
+ // ourSystemDao.transaction(res);
+ //
+ // assertTrue(p1.getId().getValue(), p1.getId().getIdPart().matches("^[0-9]+$"));
+ // assertTrue(o1.getId().getValue(), o1.getId().getIdPart().matches("^[0-9]+$"));
+ // assertTrue(o2.getId().getValue(), o2.getId().getIdPart().matches("^[0-9]+$"));
+ //
+ // assertThat(o1.getSubject().getReference().getValue(), endsWith("Patient/" + p1.getId().getIdPart()));
+ // assertThat(o2.getSubject().getReference().getValue(), endsWith("Patient/" + p1.getId().getIdPart()));
+ //
+ // }
+ //
+ // @Test
+ // public void testTransactionWithDelete() throws Exception {
+ // Bundle request = new Bundle();
+ //
+ // /*
+ // * Create 3
+ // */
+ //
+ // List res;
+ // res = new ArrayList();
+ //
+ // Patient p1 = new Patient();
+ // p1.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete");
+ // res.add(p1);
+ //
+ // Patient p2 = new Patient();
+ // p2.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete");
+ // res.add(p2);
+ //
+ // Patient p3 = new Patient();
+ // p3.addIdentifier().setSystem("urn:system").setValue("testTransactionWithDelete");
+ // res.add(p3);
+ //
+ // ourSystemDao.transaction(res);
+ //
+ // /*
+ // * Verify
+ // */
+ //
+ // IBundleProvider results = ourPatientDao.search(Patient.SP_IDENTIFIER, new TokenParam("urn:system",
+ // "testTransactionWithDelete"));
+ // assertEquals(3, results.size());
+ //
+ // /*
+ // * Now delete 2
+ // */
+ //
+ // request = new Bundle();
+ // res = new ArrayList();
+ // List existing = results.getResources(0, 3);
+ //
+ // p1 = new Patient();
+ // p1.setId(existing.get(0).getId());
+ // ResourceMetadataKeyEnum.DELETED_AT.put(p1, InstantDt.withCurrentTime());
+ // res.add(p1);
+ //
+ // p2 = new Patient();
+ // p2.setId(existing.get(1).getId());
+ // ResourceMetadataKeyEnum.DELETED_AT.put(p2, InstantDt.withCurrentTime());
+ // res.add(p2);
+ //
+ // ourSystemDao.transaction(res);
+ //
+ // /*
+ // * Verify
+ // */
+ //
+ // IBundleProvider results2 = ourPatientDao.search(Patient.SP_IDENTIFIER, new TokenParam("urn:system",
+ // "testTransactionWithDelete"));
+ // assertEquals(1, results2.size());
+ // List existing2 = results2.getResources(0, 1);
+ // assertEquals(existing2.get(0).getId(), existing.get(2).getId());
+ //
+ // }
+
+ @AfterClass
+ public static void afterClass() {
+ ourCtx.close();
+ }
+
+ @SuppressWarnings("unchecked")
+ @BeforeClass
+ public static void beforeClass() {
+ ourCtx = new ClassPathXmlApplicationContext("hapi-fhir-server-resourceproviders-dstu2.xml", "fhir-jpabase-spring-test-config.xml");
+ ourFhirContext = ourCtx.getBean(FhirContext.class);
+ assertEquals(FhirVersionEnum.DSTU2, ourFhirContext.getVersion().getVersion());
+ ourPatientDao = ourCtx.getBean("myPatientDaoDstu2", IFhirResourceDao.class);
+ ourObservationDao = ourCtx.getBean("myObservationDaoDstu2", IFhirResourceDao.class);
+ ourSystemDao = ourCtx.getBean("mySystemDaoDstu2", IFhirSystemDao.class);
+ }
}
diff --git a/hapi-fhir-jpaserver-base/src/test/resources/bundle-dstu1.xml b/hapi-fhir-jpaserver-base/src/test/resources/bundle-dstu1.xml
index c8c8106e0c4..218e9a4c322 100644
--- a/hapi-fhir-jpaserver-base/src/test/resources/bundle-dstu1.xml
+++ b/hapi-fhir-jpaserver-base/src/test/resources/bundle-dstu1.xml
@@ -1,158 +1,184 @@
- Search results for resource type Patient
- urn:uuid:d05b8832-2ec2-4df1-9a8f-905ba57823
-
-
-
-
-
- 2015-02-21T17:08:03Z
- 303
-
- Patient "74635" Version "2"
- http://fhir.healthintersections.com.au/open/Patient/74635
-
- 2015-01-29T13:54:03Z
-
- Anonymous (24.130.25.156)
-
- 2015-02-21T17:08:03Z
-
-
-
-
-
-
- Generated Narrative
-
-
- identifier: ??
-
- name: Eve Everywoman
-
- telecom: ph: 555-555-2003(work)
-
- gender: Female
- (Details : {http://hl7.org/fhir/v3/AdministrativeGender code "F" := "Female", given as "Female"})
-
Name
Peter James Chalmers ("Jim")
Address
+ 534 Erewhon, Pleasantville, Orange County, 3999
Contacts
Home: unknown. Work: (03)
+ 5555 6473
…
+
+
diff --git a/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java b/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java
index e271fca91e4..bd3a2a0640f 100644
--- a/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java
+++ b/hapi-fhir-structures-dstu/src/main/java/ca/uhn/fhir/model/dstu/FhirDstu1.java
@@ -377,4 +377,5 @@ public class FhirDstu1 implements IFhirVersion {
return ContainedDt.class;
}
+
}
diff --git a/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java b/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java
index 9a924807c49..127c3b3a077 100644
--- a/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java
+++ b/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java
@@ -99,7 +99,7 @@ public class JsonParserTest {
assertThat(out, containsString("hello"));
}
-
+
@Test
public void testEncodeAndParseExtensions() throws Exception {
@@ -113,11 +113,11 @@ public class JsonParserTest {
ExtensionDt parent = new ExtensionDt().setUrl("http://example.com#parent");
patient.addUndeclaredExtension(parent);
- ExtensionDt child1 = new ExtensionDt().setUrl( "http://example.com#child").setValue( new StringDt("value1"));
+ ExtensionDt child1 = new ExtensionDt().setUrl("http://example.com#child").setValue(new StringDt("value1"));
parent.addUndeclaredExtension(child1);
- ExtensionDt child2 = new ExtensionDt().setUrl( "http://example.com#child").setValue( new StringDt("value2"));
+ ExtensionDt child2 = new ExtensionDt().setUrl("http://example.com#child").setValue(new StringDt("value2"));
parent.addUndeclaredExtension(child2);
-
+
ExtensionDt modExt = new ExtensionDt();
modExt.setUrl("http://example.com/extensions#modext");
modExt.setValue(new DateDt("1995-01-02"));
@@ -141,74 +141,74 @@ public class JsonParserTest {
ourLog.info(output);
String enc = ourCtx.newJsonParser().encodeResourceToString(patient);
- assertThat(enc, org.hamcrest.Matchers.stringContainsInOrder("{\"resourceType\":\"Patient\",",
- "\"extension\":[{\"url\":\"http://example.com/extensions#someext\",\"valueDateTime\":\"2011-01-02T11:13:15\"}",
+ assertThat(enc, org.hamcrest.Matchers.stringContainsInOrder("{\"resourceType\":\"Patient\",",
+ "\"extension\":[{\"url\":\"http://example.com/extensions#someext\",\"valueDateTime\":\"2011-01-02T11:13:15\"}",
"{\"url\":\"http://example.com#parent\",\"extension\":[{\"url\":\"http://example.com#child\",\"valueString\":\"value1\"},{\"url\":\"http://example.com#child\",\"valueString\":\"value2\"}]}"
- ));
- assertThat(enc, org.hamcrest.Matchers.stringContainsInOrder("\"modifierExtension\":[" +
- "{" +
- "\"url\":\"http://example.com/extensions#modext\"," +
- "\"valueDate\":\"1995-01-02\"" +
- "}" +
+ ));
+ assertThat(enc, org.hamcrest.Matchers.stringContainsInOrder("\"modifierExtension\":[" +
+ "{" +
+ "\"url\":\"http://example.com/extensions#modext\"," +
+ "\"valueDate\":\"1995-01-02\"" +
+ "}" +
"],"));
- assertThat(enc, containsString("\"_given\":[" +
- "{" +
- "\"extension\":[" +
- "{" +
- "\"url\":\"http://examples.com#givenext\"," +
- "\"valueString\":\"given\"" +
- "}" +
- "]" +
- "}," +
- "{" +
- "\"extension\":[" +
- "{" +
- "\"url\":\"http://examples.com#givenext_parent\"," +
- "\"extension\":[" +
- "{" +
- "\"url\":\"http://examples.com#givenext_child\"," +
- "\"valueString\":\"CHILD\"" +
- "}" +
- "]" +
- "}" +
- "]" +
+ assertThat(enc, containsString("\"_given\":[" +
+ "{" +
+ "\"extension\":[" +
+ "{" +
+ "\"url\":\"http://examples.com#givenext\"," +
+ "\"valueString\":\"given\"" +
+ "}" +
+ "]" +
+ "}," +
+ "{" +
+ "\"extension\":[" +
+ "{" +
+ "\"url\":\"http://examples.com#givenext_parent\"," +
+ "\"extension\":[" +
+ "{" +
+ "\"url\":\"http://examples.com#givenext_child\"," +
+ "\"valueString\":\"CHILD\"" +
+ "}" +
+ "]" +
+ "}" +
+ "]" +
"}"));
/*
* Now parse this back
*/
-
- Patient parsed =ourCtx.newJsonParser().parseResource(Patient.class, enc);
+
+ Patient parsed = ourCtx.newJsonParser().parseResource(Patient.class, enc);
ext = parsed.getUndeclaredExtensions().get(0);
assertEquals("http://example.com/extensions#someext", ext.getUrl());
- assertEquals("2011-01-02T11:13:15", ((DateTimeDt)ext.getValue()).getValueAsString());
+ assertEquals("2011-01-02T11:13:15", ((DateTimeDt) ext.getValue()).getValueAsString());
parent = patient.getUndeclaredExtensions().get(1);
assertEquals("http://example.com#parent", parent.getUrl());
assertNull(parent.getValue());
child1 = parent.getExtension().get(0);
- assertEquals( "http://example.com#child", child1.getUrl());
- assertEquals("value1", ((StringDt)child1.getValue()).getValueAsString());
+ assertEquals("http://example.com#child", child1.getUrl());
+ assertEquals("value1", ((StringDt) child1.getValue()).getValueAsString());
child2 = parent.getExtension().get(1);
- assertEquals( "http://example.com#child", child2.getUrl());
- assertEquals("value2", ((StringDt)child2.getValue()).getValueAsString());
+ assertEquals("http://example.com#child", child2.getUrl());
+ assertEquals("value2", ((StringDt) child2.getValue()).getValueAsString());
modExt = parsed.getUndeclaredModifierExtensions().get(0);
assertEquals("http://example.com/extensions#modext", modExt.getUrl());
- assertEquals("1995-01-02", ((DateDt)modExt.getValue()).getValueAsString());
+ assertEquals("1995-01-02", ((DateDt) modExt.getValue()).getValueAsString());
name = parsed.getName().get(0);
ext2 = name.getGiven().get(0).getUndeclaredExtensions().get(0);
assertEquals("http://examples.com#givenext", ext2.getUrl());
- assertEquals("given", ((StringDt)ext2.getValue()).getValueAsString());
+ assertEquals("given", ((StringDt) ext2.getValue()).getValueAsString());
given2ext = name.getGiven().get(1).getUndeclaredExtensions().get(0);
assertEquals("http://examples.com#givenext_parent", given2ext.getUrl());
assertNull(given2ext.getValue());
ExtensionDt given2ext2 = given2ext.getExtension().get(0);
assertEquals("http://examples.com#givenext_child", given2ext2.getUrl());
- assertEquals("CHILD", ((StringDt)given2ext2.getValue()).getValue());
+ assertEquals("CHILD", ((StringDt) given2ext2.getValue()).getValue());
}
diff --git a/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java b/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java
index 5e154491072..9592db55a38 100644
--- a/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java
+++ b/hapi-fhir-structures-dstu/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java
@@ -152,7 +152,7 @@ public class XmlParserTest {
}
-
+
@Test
public void testEncodeAndParseExtensions() throws Exception {
@@ -166,11 +166,11 @@ public class XmlParserTest {
ExtensionDt parent = new ExtensionDt().setUrl("http://example.com#parent");
patient.addUndeclaredExtension(parent);
- ExtensionDt child1 = new ExtensionDt().setUrl( "http://example.com#child").setValue( new StringDt("value1"));
+ ExtensionDt child1 = new ExtensionDt().setUrl("http://example.com#child").setValue(new StringDt("value1"));
parent.addUndeclaredExtension(child1);
- ExtensionDt child2 = new ExtensionDt().setUrl( "http://example.com#child").setValue( new StringDt("value2"));
+ ExtensionDt child2 = new ExtensionDt().setUrl("http://example.com#child").setValue(new StringDt("value2"));
parent.addUndeclaredExtension(child2);
-
+
ExtensionDt modExt = new ExtensionDt();
modExt.setUrl("http://example.com/extensions#modext");
modExt.setValue(new DateDt("1995-01-02"));
@@ -205,42 +205,42 @@ public class XmlParserTest {
/*
* Now parse this back
*/
-
- Patient parsed =ourCtx.newXmlParser().parseResource(Patient.class, enc);
+
+ Patient parsed = ourCtx.newXmlParser().parseResource(Patient.class, enc);
ext = parsed.getUndeclaredExtensions().get(0);
assertEquals("http://example.com/extensions#someext", ext.getUrl());
- assertEquals("2011-01-02T11:13:15", ((DateTimeDt)ext.getValue()).getValueAsString());
+ assertEquals("2011-01-02T11:13:15", ((DateTimeDt) ext.getValue()).getValueAsString());
parent = patient.getUndeclaredExtensions().get(1);
assertEquals("http://example.com#parent", parent.getUrl());
assertNull(parent.getValue());
child1 = parent.getExtension().get(0);
- assertEquals( "http://example.com#child", child1.getUrl());
- assertEquals("value1", ((StringDt)child1.getValue()).getValueAsString());
+ assertEquals("http://example.com#child", child1.getUrl());
+ assertEquals("value1", ((StringDt) child1.getValue()).getValueAsString());
child2 = parent.getExtension().get(1);
- assertEquals( "http://example.com#child", child2.getUrl());
- assertEquals("value2", ((StringDt)child2.getValue()).getValueAsString());
+ assertEquals("http://example.com#child", child2.getUrl());
+ assertEquals("value2", ((StringDt) child2.getValue()).getValueAsString());
modExt = parsed.getUndeclaredModifierExtensions().get(0);
assertEquals("http://example.com/extensions#modext", modExt.getUrl());
- assertEquals("1995-01-02", ((DateDt)modExt.getValue()).getValueAsString());
+ assertEquals("1995-01-02", ((DateDt) modExt.getValue()).getValueAsString());
name = parsed.getName().get(0);
ext2 = name.getGiven().get(0).getUndeclaredExtensions().get(0);
assertEquals("http://examples.com#givenext", ext2.getUrl());
- assertEquals("given", ((StringDt)ext2.getValue()).getValueAsString());
+ assertEquals("given", ((StringDt) ext2.getValue()).getValueAsString());
given2ext = name.getGiven().get(1).getUndeclaredExtensions().get(0);
assertEquals("http://examples.com#givenext_parent", given2ext.getUrl());
assertNull(given2ext.getValue());
ExtensionDt given2ext2 = given2ext.getExtension().get(0);
assertEquals("http://examples.com#givenext_child", given2ext2.getUrl());
- assertEquals("CHILD", ((StringDt)given2ext2.getValue()).getValue());
+ assertEquals("CHILD", ((StringDt) given2ext2.getValue()).getValue());
}
-
+
@Test
public void testEncodeBundle() throws InterruptedException {
Bundle b = new Bundle();
diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java
index e41c511eddc..f15a264bf73 100644
--- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java
+++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/JsonParserTest.java
@@ -82,11 +82,11 @@ public class JsonParserTest {
ExtensionDt parent = new ExtensionDt().setUrl("http://example.com#parent");
patient.addUndeclaredExtension(parent);
- ExtensionDt child1 = new ExtensionDt().setUrl( "http://example.com#child").setValue( new StringDt("value1"));
+ ExtensionDt child1 = new ExtensionDt().setUrl("http://example.com#child").setValue(new StringDt("value1"));
parent.addUndeclaredExtension(child1);
- ExtensionDt child2 = new ExtensionDt().setUrl( "http://example.com#child").setValue( new StringDt("value2"));
+ ExtensionDt child2 = new ExtensionDt().setUrl("http://example.com#child").setValue(new StringDt("value2"));
parent.addUndeclaredExtension(child2);
-
+
ExtensionDt modExt = new ExtensionDt();
modExt.setUrl("http://example.com/extensions#modext");
modExt.setValue(new DateDt("1995-01-02"));
@@ -110,74 +110,74 @@ public class JsonParserTest {
ourLog.info(output);
String enc = ourCtx.newJsonParser().encodeResourceToString(patient);
- assertThat(enc, Matchers.stringContainsInOrder("{\"resourceType\":\"Patient\",",
- "\"extension\":[{\"url\":\"http://example.com/extensions#someext\",\"valueDateTime\":\"2011-01-02T11:13:15\"}",
+ assertThat(enc, Matchers.stringContainsInOrder("{\"resourceType\":\"Patient\",",
+ "\"extension\":[{\"url\":\"http://example.com/extensions#someext\",\"valueDateTime\":\"2011-01-02T11:13:15\"}",
"{\"url\":\"http://example.com#parent\",\"extension\":[{\"url\":\"http://example.com#child\",\"valueString\":\"value1\"},{\"url\":\"http://example.com#child\",\"valueString\":\"value2\"}]}"
- ));
- assertThat(enc, Matchers.stringContainsInOrder("\"modifierExtension\":[" +
- "{" +
- "\"url\":\"http://example.com/extensions#modext\"," +
- "\"valueDate\":\"1995-01-02\"" +
- "}" +
+ ));
+ assertThat(enc, Matchers.stringContainsInOrder("\"modifierExtension\":[" +
+ "{" +
+ "\"url\":\"http://example.com/extensions#modext\"," +
+ "\"valueDate\":\"1995-01-02\"" +
+ "}" +
"],"));
- assertThat(enc, containsString("\"_given\":[" +
- "{" +
- "\"extension\":[" +
- "{" +
- "\"url\":\"http://examples.com#givenext\"," +
- "\"valueString\":\"given\"" +
- "}" +
- "]" +
- "}," +
- "{" +
- "\"extension\":[" +
- "{" +
- "\"url\":\"http://examples.com#givenext_parent\"," +
- "\"extension\":[" +
- "{" +
- "\"url\":\"http://examples.com#givenext_child\"," +
- "\"valueString\":\"CHILD\"" +
- "}" +
- "]" +
- "}" +
- "]" +
+ assertThat(enc, containsString("\"_given\":[" +
+ "{" +
+ "\"extension\":[" +
+ "{" +
+ "\"url\":\"http://examples.com#givenext\"," +
+ "\"valueString\":\"given\"" +
+ "}" +
+ "]" +
+ "}," +
+ "{" +
+ "\"extension\":[" +
+ "{" +
+ "\"url\":\"http://examples.com#givenext_parent\"," +
+ "\"extension\":[" +
+ "{" +
+ "\"url\":\"http://examples.com#givenext_child\"," +
+ "\"valueString\":\"CHILD\"" +
+ "}" +
+ "]" +
+ "}" +
+ "]" +
"}"));
/*
* Now parse this back
*/
-
- Patient parsed =ourCtx.newJsonParser().parseResource(Patient.class, enc);
+
+ Patient parsed = ourCtx.newJsonParser().parseResource(Patient.class, enc);
ext = parsed.getUndeclaredExtensions().get(0);
assertEquals("http://example.com/extensions#someext", ext.getUrl());
- assertEquals("2011-01-02T11:13:15", ((DateTimeDt)ext.getValue()).getValueAsString());
+ assertEquals("2011-01-02T11:13:15", ((DateTimeDt) ext.getValue()).getValueAsString());
parent = patient.getUndeclaredExtensions().get(1);
assertEquals("http://example.com#parent", parent.getUrl());
assertNull(parent.getValue());
child1 = parent.getExtension().get(0);
- assertEquals( "http://example.com#child", child1.getUrl());
- assertEquals("value1", ((StringDt)child1.getValue()).getValueAsString());
+ assertEquals("http://example.com#child", child1.getUrl());
+ assertEquals("value1", ((StringDt) child1.getValue()).getValueAsString());
child2 = parent.getExtension().get(1);
- assertEquals( "http://example.com#child", child2.getUrl());
- assertEquals("value2", ((StringDt)child2.getValue()).getValueAsString());
+ assertEquals("http://example.com#child", child2.getUrl());
+ assertEquals("value2", ((StringDt) child2.getValue()).getValueAsString());
modExt = parsed.getUndeclaredModifierExtensions().get(0);
assertEquals("http://example.com/extensions#modext", modExt.getUrl());
- assertEquals("1995-01-02", ((DateDt)modExt.getValue()).getValueAsString());
+ assertEquals("1995-01-02", ((DateDt) modExt.getValue()).getValueAsString());
name = parsed.getName().get(0);
ext2 = name.getGiven().get(0).getUndeclaredExtensions().get(0);
assertEquals("http://examples.com#givenext", ext2.getUrl());
- assertEquals("given", ((StringDt)ext2.getValue()).getValueAsString());
+ assertEquals("given", ((StringDt) ext2.getValue()).getValueAsString());
given2ext = name.getGiven().get(1).getUndeclaredExtensions().get(0);
assertEquals("http://examples.com#givenext_parent", given2ext.getUrl());
assertNull(given2ext.getValue());
ExtensionDt given2ext2 = given2ext.getExtension().get(0);
assertEquals("http://examples.com#givenext_child", given2ext2.getUrl());
- assertEquals("CHILD", ((StringDt)given2ext2.getValue()).getValue());
+ assertEquals("CHILD", ((StringDt) given2ext2.getValue()).getValue());
}
diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java
index f93e9f862c4..8bd31a79eef 100644
--- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java
+++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/parser/XmlParserTest.java
@@ -287,7 +287,7 @@ public class XmlParserTest {
parsed = parser.parseResource(Composition.class, string);
assertEquals(2, parsed.getContained().getContainedResources().size());
}
-
+
@Test
public void testEncodeAndParseExtensions() throws Exception {
@@ -301,11 +301,11 @@ public class XmlParserTest {
ExtensionDt parent = new ExtensionDt().setUrl("http://example.com#parent");
patient.addUndeclaredExtension(parent);
- ExtensionDt child1 = new ExtensionDt().setUrl( "http://example.com#child").setValue( new StringDt("value1"));
+ ExtensionDt child1 = new ExtensionDt().setUrl("http://example.com#child").setValue(new StringDt("value1"));
parent.addUndeclaredExtension(child1);
- ExtensionDt child2 = new ExtensionDt().setUrl( "http://example.com#child").setValue( new StringDt("value2"));
+ ExtensionDt child2 = new ExtensionDt().setUrl("http://example.com#child").setValue(new StringDt("value2"));
parent.addUndeclaredExtension(child2);
-
+
ExtensionDt modExt = new ExtensionDt();
modExt.setUrl("http://example.com/extensions#modext");
modExt.setValue(new DateDt("1995-01-02"));
@@ -340,38 +340,38 @@ public class XmlParserTest {
/*
* Now parse this back
*/
-
- Patient parsed =ourCtx.newXmlParser().parseResource(Patient.class, enc);
+
+ Patient parsed = ourCtx.newXmlParser().parseResource(Patient.class, enc);
ext = parsed.getUndeclaredExtensions().get(0);
assertEquals("http://example.com/extensions#someext", ext.getUrl());
- assertEquals("2011-01-02T11:13:15", ((DateTimeDt)ext.getValue()).getValueAsString());
+ assertEquals("2011-01-02T11:13:15", ((DateTimeDt) ext.getValue()).getValueAsString());
parent = patient.getUndeclaredExtensions().get(1);
assertEquals("http://example.com#parent", parent.getUrl());
assertNull(parent.getValue());
child1 = parent.getExtension().get(0);
- assertEquals( "http://example.com#child", child1.getUrl());
- assertEquals("value1", ((StringDt)child1.getValue()).getValueAsString());
+ assertEquals("http://example.com#child", child1.getUrl());
+ assertEquals("value1", ((StringDt) child1.getValue()).getValueAsString());
child2 = parent.getExtension().get(1);
- assertEquals( "http://example.com#child", child2.getUrl());
- assertEquals("value2", ((StringDt)child2.getValue()).getValueAsString());
+ assertEquals("http://example.com#child", child2.getUrl());
+ assertEquals("value2", ((StringDt) child2.getValue()).getValueAsString());
modExt = parsed.getUndeclaredModifierExtensions().get(0);
assertEquals("http://example.com/extensions#modext", modExt.getUrl());
- assertEquals("1995-01-02", ((DateDt)modExt.getValue()).getValueAsString());
+ assertEquals("1995-01-02", ((DateDt) modExt.getValue()).getValueAsString());
name = parsed.getName().get(0);
ext2 = name.getGiven().get(0).getUndeclaredExtensions().get(0);
assertEquals("http://examples.com#givenext", ext2.getUrl());
- assertEquals("given", ((StringDt)ext2.getValue()).getValueAsString());
+ assertEquals("given", ((StringDt) ext2.getValue()).getValueAsString());
given2ext = name.getGiven().get(1).getUndeclaredExtensions().get(0);
assertEquals("http://examples.com#givenext_parent", given2ext.getUrl());
assertNull(given2ext.getValue());
ExtensionDt given2ext2 = given2ext.getExtension().get(0);
assertEquals("http://examples.com#givenext_child", given2ext2.getUrl());
- assertEquals("CHILD", ((StringDt)given2ext2.getValue()).getValue());
+ assertEquals("CHILD", ((StringDt) given2ext2.getValue()).getValue());
}
diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/client/GenericClientTestDstu2.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/client/GenericClientTestDstu2.java
index 7851bbdb3f9..fe208635a73 100644
--- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/client/GenericClientTestDstu2.java
+++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/client/GenericClientTestDstu2.java
@@ -33,180 +33,180 @@ import ca.uhn.fhir.rest.server.Constants;
import ca.uhn.fhir.rest.server.EncodingEnum;
public class GenericClientTestDstu2 {
- private static FhirContext ourCtx;
- private HttpClient myHttpClient;
- private HttpResponse myHttpResponse;
+ private static FhirContext ourCtx;
+ private HttpClient myHttpClient;
+ private HttpResponse myHttpResponse;
- @BeforeClass
- public static void beforeClass() {
- ourCtx = FhirContext.forDstu2();
- }
+ @BeforeClass
+ public static void beforeClass() {
+ ourCtx = FhirContext.forDstu2();
+ }
-
- @Before
- public void before() {
- myHttpClient = mock(HttpClient.class, new ReturnsDeepStubs());
- ourCtx.getRestfulClientFactory().setHttpClient(myHttpClient);
- ourCtx.getRestfulClientFactory().setServerValidationModeEnum(ServerValidationModeEnum.NEVER);
- myHttpResponse = mock(HttpResponse.class, new ReturnsDeepStubs());
- }
-
- @Test
- public void testSearchByString() throws Exception {
- String msg = "{\"resourceType\":\"Bundle\",\"id\":null,\"base\":\"http://localhost:57931/fhir/contextDev\",\"total\":1,\"link\":[{\"relation\":\"self\",\"url\":\"http://localhost:57931/fhir/contextDev/Patient?identifier=urn%3AMultiFhirVersionTest%7CtestSubmitPatient01&_format=json\"}],\"entry\":[{\"resource\":{\"resourceType\":\"Patient\",\"id\":\"1\",\"meta\":{\"versionId\":\"1\",\"lastUpdated\":\"2014-12-20T18:41:29.706-05:00\"},\"identifier\":[{\"system\":\"urn:MultiFhirVersionTest\",\"value\":\"testSubmitPatient01\"}]}}]}";
+ @Before
+ public void before() {
+ myHttpClient = mock(HttpClient.class, new ReturnsDeepStubs());
+ ourCtx.getRestfulClientFactory().setHttpClient(myHttpClient);
+ ourCtx.getRestfulClientFactory().setServerValidationModeEnum(ServerValidationModeEnum.NEVER);
+ myHttpResponse = mock(HttpResponse.class, new ReturnsDeepStubs());
+ }
- ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class);
- when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse);
- when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), 200, "OK"));
- when(myHttpResponse.getEntity().getContentType()).thenReturn(new BasicHeader("content-type", Constants.CT_FHIR_JSON + "; charset=UTF-8"));
- when(myHttpResponse.getEntity().getContent()).thenReturn(new ReaderInputStream(new StringReader(msg), Charset.forName("UTF-8")));
- IGenericClient client = ourCtx.newRestfulGenericClient("http://example.com/fhir");
+ @Test
+ public void testSearchByString() throws Exception {
+ String msg = "{\"resourceType\":\"Bundle\",\"id\":null,\"base\":\"http://localhost:57931/fhir/contextDev\",\"total\":1,\"link\":[{\"relation\":\"self\",\"url\":\"http://localhost:57931/fhir/contextDev/Patient?identifier=urn%3AMultiFhirVersionTest%7CtestSubmitPatient01&_format=json\"}],\"entry\":[{\"resource\":{\"resourceType\":\"Patient\",\"id\":\"1\",\"meta\":{\"versionId\":\"1\",\"lastUpdated\":\"2014-12-20T18:41:29.706-05:00\"},\"identifier\":[{\"system\":\"urn:MultiFhirVersionTest\",\"value\":\"testSubmitPatient01\"}]}}]}";
- //@formatter:off
- Bundle response = client.search()
- .forResource("Patient")
- .where(Patient.NAME.matches().value("james"))
- .execute();
- //@formatter:on
+ ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class);
+ when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse);
+ when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), 200, "OK"));
+ when(myHttpResponse.getEntity().getContentType()).thenReturn(new BasicHeader("content-type", Constants.CT_FHIR_JSON + "; charset=UTF-8"));
+ when(myHttpResponse.getEntity().getContent()).thenReturn(new ReaderInputStream(new StringReader(msg), Charset.forName("UTF-8")));
- assertEquals("http://example.com/fhir/Patient?name=james", capt.getValue().getURI().toString());
- assertEquals(Patient.class, response.getEntries().get(0).getResource().getClass());
+ IGenericClient client = ourCtx.newRestfulGenericClient("http://example.com/fhir");
- }
+ //@formatter:off
+ Bundle response = client.search()
+ .forResource("Patient")
+ .where(Patient.NAME.matches().value("james"))
+ .execute();
+ //@formatter:on
- @Test
- public void testDeleteConditional() throws Exception {
- ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class);
- when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse);
- when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), Constants.STATUS_HTTP_204_NO_CONTENT, ""));
+ assertEquals("http://example.com/fhir/Patient?name=james", capt.getValue().getURI().toString());
+ assertEquals(Patient.class, response.getEntries().get(0).getResource().getClass());
+
+ }
+
+ @Test
+ public void testDeleteConditional() throws Exception {
+ ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class);
+ when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse);
+ when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), Constants.STATUS_HTTP_204_NO_CONTENT, ""));
// when(myHttpResponse.getEntity().getContentType()).thenReturn(new BasicHeader("content-type", Constants.CT_TEXT + "; charset=UTF-8"));
- when(myHttpResponse.getEntity().getContent()).then(new Answer() {
- @Override
- public ReaderInputStream answer(InvocationOnMock theInvocation) throws Throwable {
- return new ReaderInputStream(new StringReader(""), Charset.forName("UTF-8"));
- }
- });
+ when(myHttpResponse.getEntity().getContent()).then(new Answer() {
+ @Override
+ public ReaderInputStream answer(InvocationOnMock theInvocation) throws Throwable {
+ return new ReaderInputStream(new StringReader(""), Charset.forName("UTF-8"));
+ }
+ });
- IGenericClient client = ourCtx.newRestfulGenericClient("http://example.com/fhir");
+ IGenericClient client = ourCtx.newRestfulGenericClient("http://example.com/fhir");
- int idx = 0;
-
- client.delete().resourceById(new IdDt("Patient/123")).execute();
- assertEquals("DELETE", capt.getAllValues().get(idx).getMethod());
- assertEquals("http://example.com/fhir/Patient/123", capt.getAllValues().get(idx).getURI().toString());
- idx++;
-
- client.delete().resourceConditionalByUrl("Patient?name=foo").execute();
- assertEquals("DELETE", capt.getAllValues().get(idx).getMethod());
- assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getURI().toString());
- idx++;
+ int idx = 0;
- client.delete().resourceConditionalByType("Patient").where(Patient.NAME.matches().value("foo")).execute();
- assertEquals("DELETE", capt.getAllValues().get(idx).getMethod());
- assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getURI().toString());
- idx++;
+ client.delete().resourceById(new IdDt("Patient/123")).execute();
+ assertEquals("DELETE", capt.getAllValues().get(idx).getMethod());
+ assertEquals("http://example.com/fhir/Patient/123", capt.getAllValues().get(idx).getURI().toString());
+ idx++;
- }
+ client.delete().resourceConditionalByUrl("Patient?name=foo").execute();
+ assertEquals("DELETE", capt.getAllValues().get(idx).getMethod());
+ assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getURI().toString());
+ idx++;
- @Test
- public void testCreateConditional() throws Exception {
- ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class);
- when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse);
- when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), Constants.STATUS_HTTP_204_NO_CONTENT, ""));
- when(myHttpResponse.getEntity().getContent()).then(new Answer() {
- @Override
- public ReaderInputStream answer(InvocationOnMock theInvocation) throws Throwable {
- return new ReaderInputStream(new StringReader(""), Charset.forName("UTF-8"));
- }
- });
+ client.delete().resourceConditionalByType("Patient").where(Patient.NAME.matches().value("foo")).execute();
+ assertEquals("DELETE", capt.getAllValues().get(idx).getMethod());
+ assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getURI().toString());
+ idx++;
- IGenericClient client = ourCtx.newRestfulGenericClient("http://example.com/fhir");
+ }
- int idx = 0;
-
- Patient p = new Patient();
- p.addName().addFamily("FOOFAMILY");
-
- client.create().resource(p).conditionalByUrl("Patient?name=foo").execute();
- assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length);
- assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue());
- assertThat(extractBody(capt, idx), containsString(""));
- assertEquals("http://example.com/fhir/Patient", capt.getAllValues().get(idx).getURI().toString());
- assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_IF_NONE_EXIST).getValue());
- assertEquals("POST", capt.getAllValues().get(idx).getRequestLine().getMethod());
- idx++;
+ @Test
+ public void testCreateConditional() throws Exception {
+ ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class);
+ when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse);
+ when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), Constants.STATUS_HTTP_204_NO_CONTENT, ""));
+ when(myHttpResponse.getEntity().getContent()).then(new Answer() {
+ @Override
+ public ReaderInputStream answer(InvocationOnMock theInvocation) throws Throwable {
+ return new ReaderInputStream(new StringReader(""), Charset.forName("UTF-8"));
+ }
+ });
- client.create().resource(p).conditional().where(Patient.NAME.matches().value("foo")).execute();
- assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length);
- assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue());
- assertThat(extractBody(capt, idx), containsString(""));
- assertEquals("http://example.com/fhir/Patient", capt.getAllValues().get(idx).getURI().toString());
- assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_IF_NONE_EXIST).getValue());
- assertEquals("POST", capt.getAllValues().get(idx).getRequestLine().getMethod());
- idx++;
+ IGenericClient client = ourCtx.newRestfulGenericClient("http://example.com/fhir");
- }
+ int idx = 0;
+
+ Patient p = new Patient();
+ p.addName().addFamily("FOOFAMILY");
+
+ client.create().resource(p).conditionalByUrl("Patient?name=foo").execute();
+ assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length);
+ assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue());
+ assertThat(extractBody(capt, idx), containsString(""));
+ assertEquals("http://example.com/fhir/Patient", capt.getAllValues().get(idx).getURI().toString());
+ assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_IF_NONE_EXIST).getValue());
+ assertEquals("POST", capt.getAllValues().get(idx).getRequestLine().getMethod());
+ idx++;
+
+ client.create().resource(p).conditional().where(Patient.NAME.matches().value("foo")).execute();
+ assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length);
+ assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue());
+ assertThat(extractBody(capt, idx), containsString(""));
+ assertEquals("http://example.com/fhir/Patient", capt.getAllValues().get(idx).getURI().toString());
+ assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_IF_NONE_EXIST).getValue());
+ assertEquals("POST", capt.getAllValues().get(idx).getRequestLine().getMethod());
+ idx++;
+
+ }
- @Test
- public void testUpdateConditional() throws Exception {
- ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class);
- when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse);
- when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), Constants.STATUS_HTTP_204_NO_CONTENT, ""));
- when(myHttpResponse.getEntity().getContent()).then(new Answer() {
- @Override
- public ReaderInputStream answer(InvocationOnMock theInvocation) throws Throwable {
- return new ReaderInputStream(new StringReader(""), Charset.forName("UTF-8"));
- }
- });
+ @Test
+ public void testUpdateConditional() throws Exception {
+ ArgumentCaptor capt = ArgumentCaptor.forClass(HttpUriRequest.class);
+ when(myHttpClient.execute(capt.capture())).thenReturn(myHttpResponse);
+ when(myHttpResponse.getStatusLine()).thenReturn(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), Constants.STATUS_HTTP_204_NO_CONTENT, ""));
+ when(myHttpResponse.getEntity().getContent()).then(new Answer() {
+ @Override
+ public ReaderInputStream answer(InvocationOnMock theInvocation) throws Throwable {
+ return new ReaderInputStream(new StringReader(""), Charset.forName("UTF-8"));
+ }
+ });
- IGenericClient client = ourCtx.newRestfulGenericClient("http://example.com/fhir");
+ IGenericClient client = ourCtx.newRestfulGenericClient("http://example.com/fhir");
- int idx = 0;
-
- Patient p = new Patient();
- p.addName().addFamily("FOOFAMILY");
-
- client.update().resource(p).conditionalByUrl("Patient?name=foo").execute();
- assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length);
- assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue());
- assertThat(extractBody(capt, idx), containsString(""));
- assertEquals("PUT", capt.getAllValues().get(idx).getRequestLine().getMethod());
- assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getURI().toString());
- idx++;
+ int idx = 0;
- client.update().resource(ourCtx.newXmlParser().encodeResourceToString(p)).conditionalByUrl("Patient?name=foo").execute();
- assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length);
- assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue());
- assertThat(extractBody(capt, idx), containsString(""));
- assertEquals("PUT", capt.getAllValues().get(idx).getRequestLine().getMethod());
- assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getURI().toString());
- idx++;
+ Patient p = new Patient();
+ p.addName().addFamily("FOOFAMILY");
- client.update().resource(p).conditional().where(Patient.NAME.matches().value("foo")).and(Patient.ADDRESS.matches().value("AAA|BBB")).execute();
- assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length);
- assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue());
- assertThat(extractBody(capt, idx), containsString(""));
- assertEquals("PUT", capt.getAllValues().get(idx).getRequestLine().getMethod());
- assertEquals("http://example.com/fhir/Patient?name=foo&address=AAA%5C%7CBBB", capt.getAllValues().get(idx).getURI().toString());
- idx++;
+ client.update().resource(p).conditionalByUrl("Patient?name=foo").execute();
+ assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length);
+ assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue());
+ assertThat(extractBody(capt, idx), containsString(""));
+ assertEquals("PUT", capt.getAllValues().get(idx).getRequestLine().getMethod());
+ assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getURI().toString());
+ idx++;
- client.update().resource(ourCtx.newXmlParser().encodeResourceToString(p)).conditional().where(Patient.NAME.matches().value("foo")).and(Patient.ADDRESS.matches().value("AAA|BBB")).execute();
- assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length);
- assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue());
- assertThat(extractBody(capt, idx), containsString(""));
- assertEquals("PUT", capt.getAllValues().get(idx).getRequestLine().getMethod());
- assertEquals("http://example.com/fhir/Patient?name=foo&address=AAA%5C%7CBBB", capt.getAllValues().get(idx).getURI().toString());
- idx++;
+ client.update().resource(ourCtx.newXmlParser().encodeResourceToString(p)).conditionalByUrl("Patient?name=foo").execute();
+ assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length);
+ assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue());
+ assertThat(extractBody(capt, idx), containsString(""));
+ assertEquals("PUT", capt.getAllValues().get(idx).getRequestLine().getMethod());
+ assertEquals("http://example.com/fhir/Patient?name=foo", capt.getAllValues().get(idx).getURI().toString());
+ idx++;
- }
+ client.update().resource(p).conditional().where(Patient.NAME.matches().value("foo")).and(Patient.ADDRESS.matches().value("AAA|BBB")).execute();
+ assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length);
+ assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue());
+ assertThat(extractBody(capt, idx), containsString(""));
+ assertEquals("PUT", capt.getAllValues().get(idx).getRequestLine().getMethod());
+ assertEquals("http://example.com/fhir/Patient?name=foo&address=AAA%5C%7CBBB", capt.getAllValues().get(idx).getURI().toString());
+ idx++;
- private String extractBody(ArgumentCaptor capt, int count) throws IOException {
- String body = IOUtils.toString(((HttpEntityEnclosingRequestBase) capt.getAllValues().get(count)).getEntity().getContent(), "UTF-8");
- return body;
- }
+ client.update().resource(ourCtx.newXmlParser().encodeResourceToString(p)).conditional().where(Patient.NAME.matches().value("foo")).and(Patient.ADDRESS.matches().value("AAA|BBB")).execute();
+ assertEquals(1, capt.getAllValues().get(idx).getHeaders(Constants.HEADER_CONTENT_TYPE).length);
+ assertEquals(EncodingEnum.XML.getResourceContentType() + Constants.HEADER_SUFFIX_CT_UTF_8, capt.getAllValues().get(idx).getFirstHeader(Constants.HEADER_CONTENT_TYPE).getValue());
+ assertThat(extractBody(capt, idx), containsString(""));
+ assertEquals("PUT", capt.getAllValues().get(idx).getRequestLine().getMethod());
+ assertEquals("http://example.com/fhir/Patient?name=foo&address=AAA%5C%7CBBB", capt.getAllValues().get(idx).getURI().toString());
+ idx++;
+
+ }
+
+ private String extractBody(ArgumentCaptor capt, int count) throws IOException {
+ String body = IOUtils.toString(((HttpEntityEnclosingRequestBase) capt.getAllValues().get(count)).getEntity().getContent(), "UTF-8");
+ return body;
+ }
}
diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/UpdateConditionalTest.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/UpdateConditionalTest.java
index bdf667faa0f..6ad5f41ad10 100644
--- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/UpdateConditionalTest.java
+++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/UpdateConditionalTest.java
@@ -41,93 +41,92 @@ import ca.uhn.fhir.util.PortUtil;
* Created by dsotnikov on 2/25/2014.
*/
public class UpdateConditionalTest {
- private static CloseableHttpClient ourClient;
- private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(UpdateConditionalTest.class);
- private static int ourPort;
- private static Server ourServer;
+ private static CloseableHttpClient ourClient;
+ private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(UpdateConditionalTest.class);
+ private static int ourPort;
+ private static Server ourServer;
- @Test
- public void testUpdate() throws Exception {
+ @Test
+ public void testUpdate() throws Exception {
- Patient patient = new Patient();
- patient.addIdentifier().setValue("002");
+ Patient patient = new Patient();
+ patient.addIdentifier().setValue("002");
- HttpPut httpPost = new HttpPut("http://localhost:" + ourPort + "/Patient/001");
- httpPost.setEntity(new StringEntity(new FhirContext().newXmlParser().encodeResourceToString(patient), ContentType.create(Constants.CT_FHIR_XML, "UTF-8")));
+ HttpPut httpPost = new HttpPut("http://localhost:" + ourPort + "/Patient/001");
+ httpPost.setEntity(new StringEntity(new FhirContext().newXmlParser().encodeResourceToString(patient), ContentType.create(Constants.CT_FHIR_XML, "UTF-8")));
- HttpResponse status = ourClient.execute(httpPost);
+ HttpResponse status = ourClient.execute(httpPost);
- String responseContent = IOUtils.toString(status.getEntity().getContent());
- IOUtils.closeQuietly(status.getEntity().getContent());
+ String responseContent = IOUtils.toString(status.getEntity().getContent());
+ IOUtils.closeQuietly(status.getEntity().getContent());
- ourLog.info("Response was:\n{}", responseContent);
+ ourLog.info("Response was:\n{}", responseContent);
- OperationOutcome oo = new FhirContext().newXmlParser().parseResource(OperationOutcome.class, responseContent);
- assertEquals("OODETAILS", oo.getIssueFirstRep().getDetails());
+ OperationOutcome oo = new FhirContext().newXmlParser().parseResource(OperationOutcome.class, responseContent);
+ assertEquals("OODETAILS", oo.getIssueFirstRep().getDetails());
- assertEquals(200, status.getStatusLine().getStatusCode());
- assertEquals("http://localhost:" + ourPort + "/Patient/001/_history/002", status.getFirstHeader("location").getValue());
- assertEquals("http://localhost:" + ourPort + "/Patient/001/_history/002", status.getFirstHeader("content-location").getValue());
+ assertEquals(200, status.getStatusLine().getStatusCode());
+ assertEquals("http://localhost:" + ourPort + "/Patient/001/_history/002", status.getFirstHeader("location").getValue());
+ assertEquals("http://localhost:" + ourPort + "/Patient/001/_history/002", status.getFirstHeader("content-location").getValue());
- }
-
-
-
- @AfterClass
- public static void afterClass() throws Exception {
- ourServer.stop();
- }
+ }
- @BeforeClass
- public static void beforeClass() throws Exception {
- ourPort = PortUtil.findFreePort();
- ourServer = new Server(ourPort);
- PatientProvider patientProvider = new PatientProvider();
+ @AfterClass
+ public static void afterClass() throws Exception {
+ ourServer.stop();
+ }
- ServletHandler proxyHandler = new ServletHandler();
- RestfulServer servlet = new RestfulServer();
- servlet.setResourceProviders(patientProvider);
- ServletHolder servletHolder = new ServletHolder(servlet);
- proxyHandler.addServletWithMapping(servletHolder, "/*");
- ourServer.setHandler(proxyHandler);
- ourServer.start();
+ @BeforeClass
+ public static void beforeClass() throws Exception {
+ ourPort = PortUtil.findFreePort();
+ ourServer = new Server(ourPort);
- PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(5000, TimeUnit.MILLISECONDS);
- HttpClientBuilder builder = HttpClientBuilder.create();
- builder.setConnectionManager(connectionManager);
- ourClient = builder.build();
+ PatientProvider patientProvider = new PatientProvider();
- }
+ ServletHandler proxyHandler = new ServletHandler();
+ RestfulServer servlet = new RestfulServer();
+ servlet.setResourceProviders(patientProvider);
+ ServletHolder servletHolder = new ServletHolder(servlet);
+ proxyHandler.addServletWithMapping(servletHolder, "/*");
+ ourServer.setHandler(proxyHandler);
+ ourServer.start();
- private static String ourLastConditionalUrl;
-
-
- @Before
- public void before() {
- ourLastConditionalUrl=null;
- }
-
- public static class PatientProvider implements IResourceProvider {
+ PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(5000, TimeUnit.MILLISECONDS);
+ HttpClientBuilder builder = HttpClientBuilder.create();
+ builder.setConnectionManager(connectionManager);
+ ourClient = builder.build();
- @Override
- public Class extends IResource> getResourceType() {
- return Patient.class;
- }
+ }
-
- @Update()
- public MethodOutcome updatePatient(@IdParam IdDt theId, @ResourceParam Patient thePatient) {
- IdDt id = theId.withVersion(thePatient.getIdentifierFirstRep().getValue());
- OperationOutcome oo = new OperationOutcome();
- oo.addIssue().setDetails("OODETAILS");
- if (theId.getValueAsString().contains("CREATE")) {
- return new MethodOutcome(id,oo, true);
- }
-
- return new MethodOutcome(id,oo);
- }
+ private static String ourLastConditionalUrl;
- }
+
+ @Before
+ public void before() {
+ ourLastConditionalUrl = null;
+ }
+
+ public static class PatientProvider implements IResourceProvider {
+
+ @Override
+ public Class extends IResource> getResourceType() {
+ return Patient.class;
+ }
+
+
+ @Update()
+ public MethodOutcome updatePatient(@IdParam IdDt theId, @ResourceParam Patient thePatient) {
+ IdDt id = theId.withVersion(thePatient.getIdentifierFirstRep().getValue());
+ OperationOutcome oo = new OperationOutcome();
+ oo.addIssue().setDetails("OODETAILS");
+ if (theId.getValueAsString().contains("CREATE")) {
+ return new MethodOutcome(id, oo, true);
+ }
+
+ return new MethodOutcome(id, oo);
+ }
+
+ }
}
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Address.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Address.java
index 2e95f7f14fe..1b631e860ed 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Address.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Address.java
@@ -146,57 +146,57 @@ public class Address extends Type implements ICompositeType {
/**
* The purpose of this address.
*/
- @Child(name="use", type={CodeType.class}, order=0, min=0, max=1)
+ @Child(name = "use", type = {CodeType.class}, order = 0, min = 0, max = 1)
@Description(shortDefinition="home | work | temp | old - purpose of this address", formalDefinition="The purpose of this address." )
protected Enumeration use;
/**
* A full text representation of the address.
*/
- @Child(name="text", type={StringType.class}, order=1, min=0, max=1)
+ @Child(name = "text", type = {StringType.class}, order = 1, min = 0, max = 1)
@Description(shortDefinition="Text representation of the address", formalDefinition="A full text representation of the address." )
protected StringType text;
/**
- * This component contains the house number, apartment number, street name, street direction,
+ * This component contains the house number, apartment number, street name, street direction,
P.O. Box number, delivery hints, and similar address information.
*/
- @Child(name="line", type={StringType.class}, order=2, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "line", type = {StringType.class}, order = 2, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Street name, number, direction & P.O. Box etc", formalDefinition="This component contains the house number, apartment number, street name, street direction, \nP.O. Box number, delivery hints, and similar address information." )
protected List line;
/**
* The name of the city, town, village or other community or delivery center.
*/
- @Child(name="city", type={StringType.class}, order=3, min=0, max=1)
+ @Child(name = "city", type = {StringType.class}, order = 3, min = 0, max = 1)
@Description(shortDefinition="Name of city, town etc.", formalDefinition="The name of the city, town, village or other community or delivery center." )
protected StringType city;
/**
* Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes).
*/
- @Child(name="state", type={StringType.class}, order=4, min=0, max=1)
+ @Child(name = "state", type = {StringType.class}, order = 4, min = 0, max = 1)
@Description(shortDefinition="Sub-unit of country (abreviations ok)", formalDefinition="Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes)." )
protected StringType state;
/**
* A postal code designating a region defined by the postal service.
*/
- @Child(name="postalCode", type={StringType.class}, order=5, min=0, max=1)
+ @Child(name = "postalCode", type = {StringType.class}, order = 5, min = 0, max = 1)
@Description(shortDefinition="Postal code for area", formalDefinition="A postal code designating a region defined by the postal service." )
protected StringType postalCode;
/**
* Country - a nation as commonly understood or generally accepted.
*/
- @Child(name="country", type={StringType.class}, order=6, min=0, max=1)
+ @Child(name = "country", type = {StringType.class}, order = 6, min = 0, max = 1)
@Description(shortDefinition="Country (can be ISO 3166 3 letter code)", formalDefinition="Country - a nation as commonly understood or generally accepted." )
protected StringType country;
/**
* Time period when address was/is in use.
*/
- @Child(name="period", type={Period.class}, order=7, min=0, max=1)
+ @Child(name = "period", type = {Period.class}, order = 7, min = 0, max = 1)
@Description(shortDefinition="Time period when address was/is in use", formalDefinition="Time period when address was/is in use." )
protected Period period;
@@ -305,7 +305,7 @@ P.O. Box number, delivery hints, and similar address information.
}
/**
- * @return {@link #line} (This component contains the house number, apartment number, street name, street direction,
+ * @return {@link #line} (This component contains the house number, apartment number, street name, street direction,
P.O. Box number, delivery hints, and similar address information.)
*/
public List getLine() {
@@ -324,7 +324,7 @@ P.O. Box number, delivery hints, and similar address information.)
}
/**
- * @return {@link #line} (This component contains the house number, apartment number, street name, street direction,
+ * @return {@link #line} (This component contains the house number, apartment number, street name, street direction,
P.O. Box number, delivery hints, and similar address information.)
*/
// syntactic sugar
@@ -337,7 +337,7 @@ P.O. Box number, delivery hints, and similar address information.)
}
/**
- * @param value {@link #line} (This component contains the house number, apartment number, street name, street direction,
+ * @param value {@link #line} (This component contains the house number, apartment number, street name, street direction,
P.O. Box number, delivery hints, and similar address information.)
*/
public Address addLine(String value) { //1
@@ -350,7 +350,7 @@ P.O. Box number, delivery hints, and similar address information.)
}
/**
- * @param value {@link #line} (This component contains the house number, apartment number, street name, street direction,
+ * @param value {@link #line} (This component contains the house number, apartment number, street name, street direction,
P.O. Box number, delivery hints, and similar address information.)
*/
public boolean hasLine(String value) {
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Alert.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Alert.java
index 0583487b9b3..52ce1c943fc 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Alert.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Alert.java
@@ -134,28 +134,28 @@ public class Alert extends DomainResource {
/**
* Identifier assigned to the alert for external use (outside the FHIR environment).
*/
- @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Business identifier", formalDefinition="Identifier assigned to the alert for external use (outside the FHIR environment)." )
protected List identifier;
/**
* Allows an alert to be divided into different categories like clinical, administrative etc.
*/
- @Child(name="category", type={CodeableConcept.class}, order=1, min=0, max=1)
+ @Child(name = "category", type = {CodeableConcept.class}, order = 1, min = 0, max = 1)
@Description(shortDefinition="Clinical, administrative, etc.", formalDefinition="Allows an alert to be divided into different categories like clinical, administrative etc." )
protected CodeableConcept category;
/**
* Supports basic workflow.
*/
- @Child(name="status", type={CodeType.class}, order=2, min=1, max=1)
+ @Child(name = "status", type = {CodeType.class}, order = 2, min = 1, max = 1)
@Description(shortDefinition="active | inactive | entered-in-error", formalDefinition="Supports basic workflow." )
protected Enumeration status;
/**
* The person who this alert concerns.
*/
- @Child(name="subject", type={Patient.class}, order=3, min=1, max=1)
+ @Child(name = "subject", type = {Patient.class}, order = 3, min = 1, max = 1)
@Description(shortDefinition="Who is alert about?", formalDefinition="The person who this alert concerns." )
protected Reference subject;
@@ -167,7 +167,7 @@ public class Alert extends DomainResource {
/**
* The person or device that created the alert.
*/
- @Child(name="author", type={Practitioner.class, Patient.class, Device.class}, order=4, min=0, max=1)
+ @Child(name = "author", type = {Practitioner.class, Patient.class, Device.class}, order = 4, min = 0, max = 1)
@Description(shortDefinition="Alert creator", formalDefinition="The person or device that created the alert." )
protected Reference author;
@@ -179,17 +179,17 @@ public class Alert extends DomainResource {
/**
* The coded value or textual component of the alert to display to the user.
*/
- @Child(name="note", type={CodeableConcept.class}, order=5, min=1, max=1)
- @Description(shortDefinition="Partially deaf, Requires easy open caps, No permanent address, etc.", formalDefinition="The coded value or textual component of the alert to display to the user." )
+ @Child(name = "note", type = {CodeableConcept.class}, order = 5, min = 1, max = 1)
+ @Description(shortDefinition = "Partially deaf, Requires easy open caps, No permanent address, etc.", formalDefinition = "The coded value or textual component of the alert to display to the user.")
protected CodeableConcept note;
- private static final long serialVersionUID = -1519932996L;
+ private static final long serialVersionUID = -1519932996L;
public Alert() {
super();
}
- public Alert(Enumeration status, Reference subject, CodeableConcept note) {
+ public Alert(Enumeration status, Reference subject, CodeableConcept note) {
super();
this.status = status;
this.subject = subject;
@@ -467,7 +467,7 @@ public class Alert extends DomainResource {
@SearchParamDefinition(name="subject", path="Alert.subject", description="The identity of a subject to list alerts for", type="reference" )
public static final String SP_SUBJECT = "subject";
- @SearchParamDefinition(name="patient", path="Alert.subject", description="The identity of a subject to list alerts for", type="reference" )
+ @SearchParamDefinition(name = "patient", path = "Alert.subject", description = "The identity of a subject to list alerts for", type = "reference")
public static final String SP_PATIENT = "patient";
}
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/AllergyIntolerance.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/AllergyIntolerance.java
index 516f79d891c..7654f4424ec 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/AllergyIntolerance.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/AllergyIntolerance.java
@@ -1049,21 +1049,21 @@ public class AllergyIntolerance extends DomainResource {
/**
* This records identifiers associated with this allergy/intolerance concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).
*/
- @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="External Ids for this item", formalDefinition="This records identifiers associated with this allergy/intolerance concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." )
protected List identifier;
/**
* Date when the sensitivity was recorded.
*/
- @Child(name="recordedDate", type={DateTimeType.class}, order=1, min=0, max=1)
+ @Child(name = "recordedDate", type = {DateTimeType.class}, order = 1, min = 0, max = 1)
@Description(shortDefinition="When recorded", formalDefinition="Date when the sensitivity was recorded." )
protected DateTimeType recordedDate;
/**
* Indicates who has responsibility for the record.
*/
- @Child(name="recorder", type={Practitioner.class, Patient.class}, order=2, min=0, max=1)
+ @Child(name = "recorder", type = {Practitioner.class, Patient.class}, order = 2, min = 0, max = 1)
@Description(shortDefinition="Who recorded the sensitivity", formalDefinition="Indicates who has responsibility for the record." )
protected Reference recorder;
@@ -1075,7 +1075,7 @@ public class AllergyIntolerance extends DomainResource {
/**
* The patient who has the allergy or intolerance.
*/
- @Child(name="subject", type={Patient.class}, order=3, min=1, max=1)
+ @Child(name = "subject", type = {Patient.class}, order = 3, min = 1, max = 1)
@Description(shortDefinition="Who the sensitivity is for", formalDefinition="The patient who has the allergy or intolerance." )
protected Reference subject;
@@ -1087,56 +1087,56 @@ public class AllergyIntolerance extends DomainResource {
/**
* Identification of a substance, or a class of substances, that is considered to be responsible for the Adverse reaction risk.
*/
- @Child(name="substance", type={CodeableConcept.class}, order=4, min=1, max=1)
+ @Child(name = "substance", type = {CodeableConcept.class}, order = 4, min = 1, max = 1)
@Description(shortDefinition="Substance, (or class) considered to be responsible for risk", formalDefinition="Identification of a substance, or a class of substances, that is considered to be responsible for the Adverse reaction risk." )
protected CodeableConcept substance;
/**
* Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance.
*/
- @Child(name="status", type={CodeType.class}, order=5, min=0, max=1)
+ @Child(name = "status", type = {CodeType.class}, order = 5, min = 0, max = 1)
@Description(shortDefinition="unconfirmed | confirmed | resolved | refuted", formalDefinition="Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified Substance." )
protected Enumeration status;
/**
* Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance.
*/
- @Child(name="criticality", type={CodeType.class}, order=6, min=0, max=1)
+ @Child(name = "criticality", type = {CodeType.class}, order = 6, min = 0, max = 1)
@Description(shortDefinition="low | high | unassessible - Estimated potential clinical harm", formalDefinition="Estimate of the potential clinical harm, or seriousness, of the reaction to the identified Substance." )
protected Enumeration criticality;
/**
* Identification of the underlying physiological mechanism for the Reaction Risk.
*/
- @Child(name="type", type={CodeType.class}, order=7, min=0, max=1)
+ @Child(name = "type", type = {CodeType.class}, order = 7, min = 0, max = 1)
@Description(shortDefinition="immune | non-immune - Underlying mechanism (if known)", formalDefinition="Identification of the underlying physiological mechanism for the Reaction Risk." )
protected Enumeration type;
/**
* Category of the identified Substance.
*/
- @Child(name="category", type={CodeType.class}, order=8, min=0, max=1)
+ @Child(name = "category", type = {CodeType.class}, order = 8, min = 0, max = 1)
@Description(shortDefinition="food | medication | environment - Category of Substance", formalDefinition="Category of the identified Substance." )
protected Enumeration category;
/**
* Represents the date and/or time of the last known occurence of a reaction event.
*/
- @Child(name="lastOccurence", type={DateTimeType.class}, order=9, min=0, max=1)
+ @Child(name = "lastOccurence", type = {DateTimeType.class}, order = 9, min = 0, max = 1)
@Description(shortDefinition="Date(/time) of last known occurence of a reaction", formalDefinition="Represents the date and/or time of the last known occurence of a reaction event." )
protected DateTimeType lastOccurence;
/**
* Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.
*/
- @Child(name="comment", type={StringType.class}, order=10, min=0, max=1)
+ @Child(name = "comment", type = {StringType.class}, order = 10, min = 0, max = 1)
@Description(shortDefinition="Additional text not captured in other fields", formalDefinition="Additional narrative about the propensity for the Adverse Reaction, not captured in other fields." )
protected StringType comment;
/**
* Details about each Adverse Reaction Event linked to exposure to the identified Substance.
*/
- @Child(name="event", type={}, order=11, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "event", type = {}, order = 11, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Adverse Reaction Events linked to exposure to substance", formalDefinition="Details about each Adverse Reaction Event linked to exposure to the identified Substance." )
protected List event;
@@ -1751,34 +1751,34 @@ public class AllergyIntolerance extends DomainResource {
public static final String SP_SEVERITY = "severity";
@SearchParamDefinition(name="date", path="AllergyIntolerance.recordedDate", description="When recorded", type="date" )
public static final String SP_DATE = "date";
- @SearchParamDefinition(name="identifier", path="AllergyIntolerance.identifier", description="External Ids for this item", type="token" )
- public static final String SP_IDENTIFIER = "identifier";
- @SearchParamDefinition(name="manifestation", path="AllergyIntolerance.event.manifestation", description="Clinical symptoms/signs associated with the Event", type="token" )
- public static final String SP_MANIFESTATION = "manifestation";
- @SearchParamDefinition(name="recorder", path="AllergyIntolerance.recorder", description="Who recorded the sensitivity", type="reference" )
- public static final String SP_RECORDER = "recorder";
- @SearchParamDefinition(name="subject", path="AllergyIntolerance.subject", description="Who the sensitivity is for", type="reference" )
- public static final String SP_SUBJECT = "subject";
+ @SearchParamDefinition(name = "identifier", path = "AllergyIntolerance.identifier", description = "External Ids for this item", type = "token")
+ public static final String SP_IDENTIFIER = "identifier";
+ @SearchParamDefinition(name = "manifestation", path = "AllergyIntolerance.event.manifestation", description = "Clinical symptoms/signs associated with the Event", type = "token")
+ public static final String SP_MANIFESTATION = "manifestation";
+ @SearchParamDefinition(name = "recorder", path = "AllergyIntolerance.recorder", description = "Who recorded the sensitivity", type = "reference")
+ public static final String SP_RECORDER = "recorder";
+ @SearchParamDefinition(name = "subject", path = "AllergyIntolerance.subject", description = "Who the sensitivity is for", type = "reference")
+ public static final String SP_SUBJECT = "subject";
@SearchParamDefinition(name="substance", path="AllergyIntolerance.substance|AllergyIntolerance.event.substance", description="Substance, (or class) considered to be responsible for risk", type="token" )
public static final String SP_SUBSTANCE = "substance";
@SearchParamDefinition(name="criticality", path="AllergyIntolerance.criticality", description="low | high | unassessible - Estimated potential clinical harm", type="token" )
public static final String SP_CRITICALITY = "criticality";
- @SearchParamDefinition(name="type", path="AllergyIntolerance.type", description="immune | non-immune - Underlying mechanism (if known)", type="token" )
- public static final String SP_TYPE = "type";
- @SearchParamDefinition(name="onset", path="AllergyIntolerance.event.onset", description="Date(/time) when manifestations showed", type="date" )
- public static final String SP_ONSET = "onset";
+ @SearchParamDefinition(name = "type", path = "AllergyIntolerance.type", description = "immune | non-immune - Underlying mechanism (if known)", type = "token")
+ public static final String SP_TYPE = "type";
+ @SearchParamDefinition(name = "onset", path = "AllergyIntolerance.event.onset", description = "Date(/time) when manifestations showed", type = "date")
+ public static final String SP_ONSET = "onset";
@SearchParamDefinition(name="duration", path="AllergyIntolerance.event.duration", description="How long Manifestations persisted", type="quantity" )
public static final String SP_DURATION = "duration";
@SearchParamDefinition(name="route", path="AllergyIntolerance.event.exposureRoute", description="How the subject was exposed to the substance", type="token" )
public static final String SP_ROUTE = "route";
- @SearchParamDefinition(name="patient", path="AllergyIntolerance.subject", description="Who the sensitivity is for", type="reference" )
- public static final String SP_PATIENT = "patient";
- @SearchParamDefinition(name="category", path="AllergyIntolerance.category", description="food | medication | environment - Category of Substance", type="token" )
- public static final String SP_CATEGORY = "category";
- @SearchParamDefinition(name="last-date", path="AllergyIntolerance.lastOccurence", description="Date(/time) of last known occurence of a reaction", type="date" )
- public static final String SP_LASTDATE = "last-date";
- @SearchParamDefinition(name="status", path="AllergyIntolerance.status", description="unconfirmed | confirmed | resolved | refuted", type="token" )
- public static final String SP_STATUS = "status";
+ @SearchParamDefinition(name = "patient", path = "AllergyIntolerance.subject", description = "Who the sensitivity is for", type = "reference")
+ public static final String SP_PATIENT = "patient";
+ @SearchParamDefinition(name = "category", path = "AllergyIntolerance.category", description = "food | medication | environment - Category of Substance", type = "token")
+ public static final String SP_CATEGORY = "category";
+ @SearchParamDefinition(name = "last-date", path = "AllergyIntolerance.lastOccurence", description = "Date(/time) of last known occurence of a reaction", type = "date")
+ public static final String SP_LASTDATE = "last-date";
+ @SearchParamDefinition(name = "status", path = "AllergyIntolerance.status", description = "unconfirmed | confirmed | resolved | refuted", type = "token")
+ public static final String SP_STATUS = "status";
}
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Appointment.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Appointment.java
index 16799d49428..19c245521e9 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Appointment.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Appointment.java
@@ -649,63 +649,63 @@ public class Appointment extends DomainResource {
/**
* This records identifiers associated with this appointment concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).
*/
- @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="External Ids for this item", formalDefinition="This records identifiers associated with this appointment concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." )
protected List identifier;
/**
* The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority) (Need to change back to CodeableConcept).
*/
- @Child(name="priority", type={IntegerType.class}, order=1, min=0, max=1)
+ @Child(name = "priority", type = {IntegerType.class}, order = 1, min = 0, max = 1)
@Description(shortDefinition="The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority) (Need to change back to CodeableConcept)", formalDefinition="The priority of the appointment. Can be used to make informed decisions if needing to re-prioritize appointments. (The iCal Standard specifies 0 as undefined, 1 as highest, 9 as lowest priority) (Need to change back to CodeableConcept)." )
protected IntegerType priority;
/**
* The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status.
*/
- @Child(name="status", type={CodeType.class}, order=2, min=1, max=1)
+ @Child(name = "status", type = {CodeType.class}, order = 2, min = 1, max = 1)
@Description(shortDefinition="pending | booked | arrived | fulfilled | cancelled | noshow", formalDefinition="The overall status of the Appointment. Each of the participants has their own participation status which indicates their involvement in the process, however this status indicates the shared status." )
protected Enumeration status;
/**
* The type of appointments that is being booked (ideally this would be an identifiable service - which is at a location, rather than the location itself).
*/
- @Child(name="type", type={CodeableConcept.class}, order=3, min=0, max=1)
+ @Child(name = "type", type = {CodeableConcept.class}, order = 3, min = 0, max = 1)
@Description(shortDefinition="The type of appointments that is being booked (ideally this would be an identifiable service - which is at a location, rather than the location itself)", formalDefinition="The type of appointments that is being booked (ideally this would be an identifiable service - which is at a location, rather than the location itself)." )
protected CodeableConcept type;
/**
* The reason that this appointment is being scheduled, this is more clinical than administrative.
*/
- @Child(name="reason", type={CodeableConcept.class}, order=4, min=0, max=1)
+ @Child(name = "reason", type = {CodeableConcept.class}, order = 4, min = 0, max = 1)
@Description(shortDefinition="The reason that this appointment is being scheduled, this is more clinical than administrative", formalDefinition="The reason that this appointment is being scheduled, this is more clinical than administrative." )
protected CodeableConcept reason;
/**
* The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field.
*/
- @Child(name="description", type={StringType.class}, order=5, min=0, max=1)
+ @Child(name = "description", type = {StringType.class}, order = 5, min = 0, max = 1)
@Description(shortDefinition="The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field", formalDefinition="The brief description of the appointment as would be shown on a subject line in a meeting request, or appointment list. Detailed or expanded information should be put in the comment field." )
protected StringType description;
/**
* Date/Time that the appointment is to take place.
*/
- @Child(name="start", type={InstantType.class}, order=6, min=1, max=1)
+ @Child(name = "start", type = {InstantType.class}, order = 6, min = 1, max = 1)
@Description(shortDefinition="Date/Time that the appointment is to take place", formalDefinition="Date/Time that the appointment is to take place." )
protected InstantType start;
/**
* Date/Time that the appointment is to conclude.
*/
- @Child(name="end", type={InstantType.class}, order=7, min=1, max=1)
+ @Child(name = "end", type = {InstantType.class}, order = 7, min = 1, max = 1)
@Description(shortDefinition="Date/Time that the appointment is to conclude", formalDefinition="Date/Time that the appointment is to conclude." )
protected InstantType end;
/**
* The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot.
*/
- @Child(name="slot", type={Slot.class}, order=8, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "slot", type = {Slot.class}, order = 8, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot", formalDefinition="The slot that this appointment is filling. If provided then the schedule will not be provided as slots are not recursive, and the start/end values MUST be the same as from the slot." )
protected List slot;
/**
@@ -717,7 +717,7 @@ public class Appointment extends DomainResource {
/**
* The primary location that this appointment is to take place.
*/
- @Child(name="location", type={Location.class}, order=9, min=0, max=1)
+ @Child(name = "location", type = {Location.class}, order = 9, min = 0, max = 1)
@Description(shortDefinition="The primary location that this appointment is to take place", formalDefinition="The primary location that this appointment is to take place." )
protected Reference location;
@@ -729,14 +729,14 @@ public class Appointment extends DomainResource {
/**
* Additional comments about the appointment.
*/
- @Child(name="comment", type={StringType.class}, order=10, min=0, max=1)
+ @Child(name = "comment", type = {StringType.class}, order = 10, min = 0, max = 1)
@Description(shortDefinition="Additional comments about the appointment", formalDefinition="Additional comments about the appointment." )
protected StringType comment;
/**
* An Order that lead to the creation of this appointment.
*/
- @Child(name="order", type={Order.class}, order=11, min=0, max=1)
+ @Child(name = "order", type = {Order.class}, order = 11, min = 0, max = 1)
@Description(shortDefinition="An Order that lead to the creation of this appointment", formalDefinition="An Order that lead to the creation of this appointment." )
protected Reference order;
@@ -748,14 +748,14 @@ public class Appointment extends DomainResource {
/**
* List of participants involved in the appointment.
*/
- @Child(name="participant", type={}, order=12, min=1, max=Child.MAX_UNLIMITED)
+ @Child(name = "participant", type = {}, order = 12, min = 1, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="List of participants involved in the appointment", formalDefinition="List of participants involved in the appointment." )
protected List participant;
/**
* Who recorded the appointment.
*/
- @Child(name="lastModifiedBy", type={Practitioner.class, Patient.class, RelatedPerson.class}, order=13, min=0, max=1)
+ @Child(name = "lastModifiedBy", type = {Practitioner.class, Patient.class, RelatedPerson.class}, order = 13, min = 0, max = 1)
@Description(shortDefinition="Who recorded the appointment", formalDefinition="Who recorded the appointment." )
protected Reference lastModifiedBy;
@@ -767,7 +767,7 @@ public class Appointment extends DomainResource {
/**
* Date when the appointment was recorded.
*/
- @Child(name="lastModified", type={DateTimeType.class}, order=14, min=0, max=1)
+ @Child(name = "lastModified", type = {DateTimeType.class}, order = 14, min = 0, max = 1)
@Description(shortDefinition="Date when the appointment was recorded", formalDefinition="Date when the appointment was recorded." )
protected DateTimeType lastModified;
@@ -1494,10 +1494,10 @@ public class Appointment extends DomainResource {
return ResourceType.Appointment;
}
- @SearchParamDefinition(name="date", path="Appointment.start", description="Appointment date/time.", type="date" )
- public static final String SP_DATE = "date";
- @SearchParamDefinition(name="actor", path="Appointment.participant.actor", description="Any one of the individuals participating in the appointment", type="reference" )
- public static final String SP_ACTOR = "actor";
+ @SearchParamDefinition(name = "date", path = "Appointment.start", description = "Appointment date/time.", type = "date")
+ public static final String SP_DATE = "date";
+ @SearchParamDefinition(name = "actor", path = "Appointment.participant.actor", description = "Any one of the individuals participating in the appointment", type = "reference")
+ public static final String SP_ACTOR = "actor";
@SearchParamDefinition(name="partstatus", path="Appointment.participant.status", description="The Participation status of the subject, or other participant on the appointment", type="token" )
public static final String SP_PARTSTATUS = "partstatus";
@SearchParamDefinition(name="patient", path="Appointment.participant.actor", description="One of the individuals of the appointment is this patient", type="reference" )
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/AppointmentResponse.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/AppointmentResponse.java
index 49ffec5ac3e..6f6ccdbed96 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/AppointmentResponse.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/AppointmentResponse.java
@@ -176,14 +176,14 @@ public class AppointmentResponse extends DomainResource {
/**
* This records identifiers associated with this appointment concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).
*/
- @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="External Ids for this item", formalDefinition="This records identifiers associated with this appointment concern that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." )
protected List identifier;
/**
* Parent appointment that this response is replying to.
*/
- @Child(name="appointment", type={Appointment.class}, order=1, min=1, max=1)
+ @Child(name = "appointment", type = {Appointment.class}, order = 1, min = 1, max = 1)
@Description(shortDefinition="Parent appointment that this response is replying to", formalDefinition="Parent appointment that this response is replying to." )
protected Reference appointment;
@@ -195,14 +195,14 @@ public class AppointmentResponse extends DomainResource {
/**
* Role of participant in the appointment.
*/
- @Child(name="participantType", type={CodeableConcept.class}, order=2, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "participantType", type = {CodeableConcept.class}, order = 2, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Role of participant in the appointment", formalDefinition="Role of participant in the appointment." )
protected List participantType;
/**
* A Person of device that is participating in the appointment, usually Practitioner, Patient, RelatedPerson or Device.
*/
- @Child(name="individual", type={}, order=3, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "individual", type = {}, order = 3, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="A Person of device that is participating in the appointment, usually Practitioner, Patient, RelatedPerson or Device", formalDefinition="A Person of device that is participating in the appointment, usually Practitioner, Patient, RelatedPerson or Device." )
protected List individual;
/**
@@ -214,35 +214,35 @@ public class AppointmentResponse extends DomainResource {
/**
* Participation status of the Patient.
*/
- @Child(name="participantStatus", type={CodeType.class}, order=4, min=1, max=1)
+ @Child(name = "participantStatus", type = {CodeType.class}, order = 4, min = 1, max = 1)
@Description(shortDefinition="accepted | declined | tentative | in-process | completed | needs-action", formalDefinition="Participation status of the Patient." )
protected Enumeration participantStatus;
/**
* Additional comments about the appointment.
*/
- @Child(name="comment", type={StringType.class}, order=5, min=0, max=1)
+ @Child(name = "comment", type = {StringType.class}, order = 5, min = 0, max = 1)
@Description(shortDefinition="Additional comments about the appointment", formalDefinition="Additional comments about the appointment." )
protected StringType comment;
/**
* Date/Time that the appointment is to take place.
*/
- @Child(name="start", type={InstantType.class}, order=6, min=0, max=1)
+ @Child(name = "start", type = {InstantType.class}, order = 6, min = 0, max = 1)
@Description(shortDefinition="Date/Time that the appointment is to take place", formalDefinition="Date/Time that the appointment is to take place." )
protected InstantType start;
/**
* Date/Time that the appointment is to conclude.
*/
- @Child(name="end", type={InstantType.class}, order=7, min=0, max=1)
+ @Child(name = "end", type = {InstantType.class}, order = 7, min = 0, max = 1)
@Description(shortDefinition="Date/Time that the appointment is to conclude", formalDefinition="Date/Time that the appointment is to conclude." )
protected InstantType end;
/**
* Who recorded the appointment response.
*/
- @Child(name="lastModifiedBy", type={Practitioner.class, Patient.class, RelatedPerson.class}, order=8, min=0, max=1)
+ @Child(name = "lastModifiedBy", type = {Practitioner.class, Patient.class, RelatedPerson.class}, order = 8, min = 0, max = 1)
@Description(shortDefinition="Who recorded the appointment response", formalDefinition="Who recorded the appointment response." )
protected Reference lastModifiedBy;
@@ -254,7 +254,7 @@ public class AppointmentResponse extends DomainResource {
/**
* Date when the response was recorded or last updated.
*/
- @Child(name="lastModified", type={DateTimeType.class}, order=9, min=0, max=1)
+ @Child(name = "lastModified", type = {DateTimeType.class}, order = 9, min = 0, max = 1)
@Description(shortDefinition="Date when the response was recorded or last updated", formalDefinition="Date when the response was recorded or last updated." )
protected DateTimeType lastModified;
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Attachment.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Attachment.java
index 493c048e6a9..f2a69f544a6 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Attachment.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Attachment.java
@@ -41,54 +41,54 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef;
* For referring to data content defined in other formats.
*/
@DatatypeDef(name="Attachment")
-public class Attachment extends Type implements ICompositeType {
+public class Attachment extends Type implements ICompositeType {
/**
* Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.
*/
- @Child(name="contentType", type={CodeType.class}, order=0, min=0, max=1)
+ @Child(name = "contentType", type = {CodeType.class}, order = 0, min = 0, max = 1)
@Description(shortDefinition="Mime type of the content, with charset etc.", formalDefinition="Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate." )
protected CodeType contentType;
/**
* The human language of the content. The value can be any valid value according to BCP 47.
*/
- @Child(name="language", type={CodeType.class}, order=1, min=0, max=1)
+ @Child(name = "language", type = {CodeType.class}, order = 1, min = 0, max = 1)
@Description(shortDefinition="Human language of the content (BCP-47)", formalDefinition="The human language of the content. The value can be any valid value according to BCP 47." )
protected CodeType language;
/**
* The actual data of the attachment - a sequence of bytes. In XML, represented using base64.
*/
- @Child(name="data", type={Base64BinaryType.class}, order=2, min=0, max=1)
+ @Child(name = "data", type = {Base64BinaryType.class}, order = 2, min = 0, max = 1)
@Description(shortDefinition="Data inline, base64ed", formalDefinition="The actual data of the attachment - a sequence of bytes. In XML, represented using base64." )
protected Base64BinaryType data;
/**
* An alternative location where the data can be accessed.
*/
- @Child(name="url", type={UriType.class}, order=3, min=0, max=1)
+ @Child(name = "url", type = {UriType.class}, order = 3, min = 0, max = 1)
@Description(shortDefinition="Uri where the data can be found", formalDefinition="An alternative location where the data can be accessed." )
protected UriType url;
/**
* The number of bytes of data that make up this attachment.
*/
- @Child(name="size", type={IntegerType.class}, order=4, min=0, max=1)
+ @Child(name = "size", type = {IntegerType.class}, order = 4, min = 0, max = 1)
@Description(shortDefinition="Number of bytes of content (if url provided)", formalDefinition="The number of bytes of data that make up this attachment." )
protected IntegerType size;
/**
* The calculated hash of the data using SHA-1. Represented using base64.
*/
- @Child(name="hash", type={Base64BinaryType.class}, order=5, min=0, max=1)
+ @Child(name = "hash", type = {Base64BinaryType.class}, order = 5, min = 0, max = 1)
@Description(shortDefinition="Hash of the data (sha-1, base64ed )", formalDefinition="The calculated hash of the data using SHA-1. Represented using base64." )
protected Base64BinaryType hash;
/**
* A label or set of text to display in place of the data.
*/
- @Child(name="title", type={StringType.class}, order=6, min=0, max=1)
+ @Child(name = "title", type = {StringType.class}, order = 6, min = 0, max = 1)
@Description(shortDefinition="Label to display in place of the data", formalDefinition="A label or set of text to display in place of the data." )
protected StringType title;
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BackboneElement.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BackboneElement.java
index 8558a11dcc6..a2a98a3300b 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BackboneElement.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BackboneElement.java
@@ -48,7 +48,7 @@ public abstract class BackboneElement extends Element implements IBackboneElemen
/**
* May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.
*/
- @Child(name="modifierExtension", type={Extension.class}, order=0, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "modifierExtension", type = {Extension.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Extensions that cannot be ignored", formalDefinition="May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions." )
protected List modifierExtension;
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Basic.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Basic.java
index ff748c0b33f..3c6f127f1e8 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Basic.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Basic.java
@@ -47,21 +47,21 @@ public class Basic extends DomainResource {
/**
* Identifier assigned to the resource for business purposes, outside the context of FHIR.
*/
- @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Business identifier", formalDefinition="Identifier assigned to the resource for business purposes, outside the context of FHIR." )
protected List identifier;
/**
* Identifies the 'type' of resource - equivalent to the resource name for other resources.
*/
- @Child(name="code", type={CodeableConcept.class}, order=1, min=1, max=1)
+ @Child(name = "code", type = {CodeableConcept.class}, order = 1, min = 1, max = 1)
@Description(shortDefinition="Kind of Resource", formalDefinition="Identifies the 'type' of resource - equivalent to the resource name for other resources." )
protected CodeableConcept code;
/**
* Identifies the patient, practitioner, device or any other resource that is the "focus" of this resoruce.
*/
- @Child(name="subject", type={}, order=2, min=0, max=1)
+ @Child(name = "subject", type = {}, order = 2, min = 0, max = 1)
@Description(shortDefinition="Identifies the", formalDefinition="Identifies the patient, practitioner, device or any other resource that is the 'focus' of this resoruce." )
protected Reference subject;
@@ -73,7 +73,7 @@ public class Basic extends DomainResource {
/**
* Indicates who was responsible for creating the resource instance.
*/
- @Child(name="author", type={Practitioner.class, Patient.class, RelatedPerson.class}, order=3, min=0, max=1)
+ @Child(name = "author", type = {Practitioner.class, Patient.class, RelatedPerson.class}, order = 3, min = 0, max = 1)
@Description(shortDefinition="Who created", formalDefinition="Indicates who was responsible for creating the resource instance." )
protected Reference author;
@@ -85,7 +85,7 @@ public class Basic extends DomainResource {
/**
* Identifies when the resource was first created.
*/
- @Child(name="created", type={DateType.class}, order=4, min=0, max=1)
+ @Child(name = "created", type = {DateType.class}, order = 4, min = 0, max = 1)
@Description(shortDefinition="When created", formalDefinition="Identifies when the resource was first created." )
protected DateType created;
@@ -343,12 +343,12 @@ public class Basic extends DomainResource {
@SearchParamDefinition(name="code", path="Basic.code", description="Kind of Resource", type="token" )
public static final String SP_CODE = "code";
- @SearchParamDefinition(name="subject", path="Basic.subject", description="Identifies the", type="reference" )
- public static final String SP_SUBJECT = "subject";
- @SearchParamDefinition(name="created", path="Basic.created", description="When created", type="date" )
- public static final String SP_CREATED = "created";
- @SearchParamDefinition(name="patient", path="Basic.subject", description="Identifies the", type="reference" )
- public static final String SP_PATIENT = "patient";
+ @SearchParamDefinition(name = "subject", path = "Basic.subject", description = "Identifies the", type = "reference")
+ public static final String SP_SUBJECT = "subject";
+ @SearchParamDefinition(name = "created", path = "Basic.created", description = "When created", type = "date")
+ public static final String SP_CREATED = "created";
+ @SearchParamDefinition(name = "patient", path = "Basic.subject", description = "Identifies the", type = "reference")
+ public static final String SP_PATIENT = "patient";
}
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Binary.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Binary.java
index 96beb3cd92d..718db72ffc7 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Binary.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Binary.java
@@ -48,14 +48,14 @@ public class Binary extends Resource {
/**
* MimeType of the binary content represented as a standard MimeType (BCP 13).
*/
- @Child(name="contentType", type={CodeType.class}, order=0, min=1, max=1)
+ @Child(name = "contentType", type = {CodeType.class}, order = 0, min = 1, max = 1)
@Description(shortDefinition="MimeType of the binary content", formalDefinition="MimeType of the binary content represented as a standard MimeType (BCP 13)." )
protected CodeType contentType;
/**
* The actual content, base64 encoded.
*/
- @Child(name="content", type={Base64BinaryType.class}, order=1, min=1, max=1)
+ @Child(name = "content", type = {Base64BinaryType.class}, order = 1, min = 1, max = 1)
@Description(shortDefinition="The actual content", formalDefinition="The actual content, base64 encoded." )
protected Base64BinaryType content;
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BodySite.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BodySite.java
index 8ef8942ce7e..e62560b9073 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BodySite.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/BodySite.java
@@ -393,35 +393,35 @@ public class BodySite extends DomainResource {
/**
* Identifier for this instance of the anatomical location.
*/
- @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Bodysite identifier", formalDefinition="Identifier for this instance of the anatomical location." )
protected List identifier;
/**
* The Specific and identified anatomical location.
*/
- @Child(name="specificLocation", type={}, order=1, min=0, max=1)
+ @Child(name = "specificLocation", type = {}, order = 1, min = 0, max = 1)
@Description(shortDefinition="Specific anatomical location", formalDefinition="The Specific and identified anatomical location." )
protected BodySiteSpecificLocationComponent specificLocation;
/**
* Qualifiers to identify non-specific location eg 5cm (distance) inferior (aspect) to the tibial tuberosity (landmark). There may be more than one relative location required to provide a cross reference.
*/
- @Child(name="relativeLocation", type={}, order=2, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "relativeLocation", type = {}, order = 2, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Relative anatomical location(s)", formalDefinition="Qualifiers to identify non-specific location eg 5cm (distance) inferior (aspect) to the tibial tuberosity (landmark). There may be more than one relative location required to provide a cross reference." )
protected List relativeLocation;
/**
* Description of anatomical location.
*/
- @Child(name="description", type={StringType.class}, order=3, min=0, max=1)
+ @Child(name = "description", type = {StringType.class}, order = 3, min = 0, max = 1)
@Description(shortDefinition="The Description of anatomical location", formalDefinition="Description of anatomical location." )
protected StringType description;
/**
* Image or images used to identify a location.
*/
- @Child(name="image", type={Attachment.class}, order=4, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "image", type = {Attachment.class}, order = 4, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Attached images", formalDefinition="Image or images used to identify a location." )
protected List image;
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Bundle.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Bundle.java
index 3cce37099d8..bf527090803 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Bundle.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Bundle.java
@@ -947,7 +947,7 @@ public class Bundle extends Resource implements IBaseBundle {
/**
* Only perform the operation if the last updated date matches. For more information, see the API section "Managing Resource Contention".
*/
- @Child(name="ifModifiedSince", type={InstantType.class}, order=5, min=0, max=1)
+ @Child(name = "ifModifiedSince", type = {InstantType.class}, order = 5, min = 0, max = 1)
@Description(shortDefinition="For managing update contention", formalDefinition="Only perform the operation if the last updated date matches. For more information, see the API section 'Managing Resource Contention'." )
protected InstantType ifModifiedSince;
@@ -1166,7 +1166,7 @@ public class Bundle extends Resource implements IBaseBundle {
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create BundleEntryTransactionComponent.ifModifiedSince");
else if (Configuration.doAutoCreate())
- this.ifModifiedSince = new InstantType(); // bb
+ this.ifModifiedSince = new InstantType(); // bb
return this.ifModifiedSince;
}
@@ -1196,12 +1196,12 @@ public class Bundle extends Resource implements IBaseBundle {
/**
* @param value Only perform the operation if the last updated date matches. For more information, see the API section "Managing Resource Contention".
*/
- public BundleEntryTransactionComponent setIfModifiedSince(Date value) {
- if (value == null)
+ public BundleEntryTransactionComponent setIfModifiedSince(Date value) {
+ if (value == null)
this.ifModifiedSince = null;
else {
if (this.ifModifiedSince == null)
- this.ifModifiedSince = new InstantType();
+ this.ifModifiedSince = new InstantType();
this.ifModifiedSince.setValue(value);
}
return this;
@@ -1262,7 +1262,7 @@ public class Bundle extends Resource implements IBaseBundle {
childrenList.add(new Property("url", "uri", "A search URL for this resource that specifies how the resource is matched to an existing resource when processing a transaction (see transaction documentation).", 0, java.lang.Integer.MAX_VALUE, url));
childrenList.add(new Property("ifNoneMatch", "string", "If the ETag values match, return a 304 Not modified status. See the read/vread interaction documentation.", 0, java.lang.Integer.MAX_VALUE, ifNoneMatch));
childrenList.add(new Property("ifMatch", "string", "Only perform the operation if the Etag value matches. For more information, see the API section 'Managing Resource Contention'.", 0, java.lang.Integer.MAX_VALUE, ifMatch));
- childrenList.add(new Property("ifModifiedSince", "instant", "Only perform the operation if the last updated date matches. For more information, see the API section 'Managing Resource Contention'.", 0, java.lang.Integer.MAX_VALUE, ifModifiedSince));
+ childrenList.add(new Property("ifModifiedSince", "instant", "Only perform the operation if the last updated date matches. For more information, see the API section 'Managing Resource Contention'.", 0, java.lang.Integer.MAX_VALUE, ifModifiedSince));
childrenList.add(new Property("ifNoneExist", "string", "Instruct the server not to perform the create if a specified resource already exists. For further information, see 'Conditional Create'.", 0, java.lang.Integer.MAX_VALUE, ifNoneExist));
}
@@ -1330,15 +1330,15 @@ public class Bundle extends Resource implements IBaseBundle {
/**
* The etag for the resource, it the operation for the entry produced a versioned resource.
*/
- @Child(name="etag", type={StringType.class}, order=3, min=0, max=1)
+ @Child(name = "etag", type = {StringType.class}, order = 3, min = 0, max = 1)
@Description(shortDefinition="The etag for the resource (if relevant)", formalDefinition="The etag for the resource, it the operation for the entry produced a versioned resource." )
protected StringType etag;
/**
* The date/time that the resource was modified on the server.
*/
- @Child(name="lastModified", type={InstantType.class}, order=4, min=0, max=1)
- @Description(shortDefinition="Server's date time modified", formalDefinition="The date/time that the resource was modified on the server." )
+ @Child(name = "lastModified", type = {InstantType.class}, order = 4, min = 0, max = 1)
+ @Description(shortDefinition = "Server's date time modified", formalDefinition = "The date/time that the resource was modified on the server.")
protected InstantType lastModified;
private static final long serialVersionUID = -1526413234L;
@@ -1451,97 +1451,97 @@ public class Bundle extends Resource implements IBaseBundle {
*/
public StringType getEtagElement() {
if (this.etag == null)
- if (Configuration.errorOnAutoCreate())
- throw new Error("Attempt to auto-create BundleEntryTransactionResponseComponent.etag");
- else if (Configuration.doAutoCreate())
- this.etag = new StringType(); // bb
+ if (Configuration.errorOnAutoCreate())
+ throw new Error("Attempt to auto-create BundleEntryTransactionResponseComponent.etag");
+ else if (Configuration.doAutoCreate())
+ this.etag = new StringType(); // bb
return this.etag;
}
- public boolean hasEtagElement() {
- return this.etag != null && !this.etag.isEmpty();
+ public boolean hasEtagElement() {
+ return this.etag != null && !this.etag.isEmpty();
}
- public boolean hasEtag() {
- return this.etag != null && !this.etag.isEmpty();
+ public boolean hasEtag() {
+ return this.etag != null && !this.etag.isEmpty();
}
/**
* @param value {@link #etag} (The etag for the resource, it the operation for the entry produced a versioned resource.). This is the underlying object with id, value and extensions. The accessor "getEtag" gives direct access to the value
*/
- public BundleEntryTransactionResponseComponent setEtagElement(StringType value) {
- this.etag = value;
- return this;
+ public BundleEntryTransactionResponseComponent setEtagElement(StringType value) {
+ this.etag = value;
+ return this;
}
/**
* @return The etag for the resource, it the operation for the entry produced a versioned resource.
*/
- public String getEtag() {
- return this.etag == null ? null : this.etag.getValue();
+ public String getEtag() {
+ return this.etag == null ? null : this.etag.getValue();
}
/**
* @param value The etag for the resource, it the operation for the entry produced a versioned resource.
*/
- public BundleEntryTransactionResponseComponent setEtag(String value) {
- if (Utilities.noString(value))
- this.etag = null;
- else {
- if (this.etag == null)
- this.etag = new StringType();
- this.etag.setValue(value);
- }
+ public BundleEntryTransactionResponseComponent setEtag(String value) {
+ if (Utilities.noString(value))
+ this.etag = null;
+ else {
+ if (this.etag == null)
+ this.etag = new StringType();
+ this.etag.setValue(value);
+ }
return this;
}
/**
* @return {@link #lastModified} (The date/time that the resource was modified on the server.). This is the underlying object with id, value and extensions. The accessor "getLastModified" gives direct access to the value
*/
- public InstantType getLastModifiedElement() {
- if (this.lastModified == null)
- if (Configuration.errorOnAutoCreate())
- throw new Error("Attempt to auto-create BundleEntryTransactionResponseComponent.lastModified");
- else if (Configuration.doAutoCreate())
- this.lastModified = new InstantType(); // bb
- return this.lastModified;
+ public InstantType getLastModifiedElement() {
+ if (this.lastModified == null)
+ if (Configuration.errorOnAutoCreate())
+ throw new Error("Attempt to auto-create BundleEntryTransactionResponseComponent.lastModified");
+ else if (Configuration.doAutoCreate())
+ this.lastModified = new InstantType(); // bb
+ return this.lastModified;
}
- public boolean hasLastModifiedElement() {
- return this.lastModified != null && !this.lastModified.isEmpty();
+ public boolean hasLastModifiedElement() {
+ return this.lastModified != null && !this.lastModified.isEmpty();
}
- public boolean hasLastModified() {
- return this.lastModified != null && !this.lastModified.isEmpty();
+ public boolean hasLastModified() {
+ return this.lastModified != null && !this.lastModified.isEmpty();
}
/**
* @param value {@link #lastModified} (The date/time that the resource was modified on the server.). This is the underlying object with id, value and extensions. The accessor "getLastModified" gives direct access to the value
*/
- public BundleEntryTransactionResponseComponent setLastModifiedElement(InstantType value) {
- this.lastModified = value;
- return this;
+ public BundleEntryTransactionResponseComponent setLastModifiedElement(InstantType value) {
+ this.lastModified = value;
+ return this;
}
/**
* @return The date/time that the resource was modified on the server.
*/
- public Date getLastModified() {
- return this.lastModified == null ? null : this.lastModified.getValue();
+ public Date getLastModified() {
+ return this.lastModified == null ? null : this.lastModified.getValue();
}
/**
* @param value The date/time that the resource was modified on the server.
*/
- public BundleEntryTransactionResponseComponent setLastModified(Date value) {
- if (value == null)
- this.lastModified = null;
- else {
- if (this.lastModified == null)
- this.lastModified = new InstantType();
- this.lastModified.setValue(value);
- }
- return this;
+ public BundleEntryTransactionResponseComponent setLastModified(Date value) {
+ if (value == null)
+ this.lastModified = null;
+ else {
+ if (this.lastModified == null)
+ this.lastModified = new InstantType();
+ this.lastModified.setValue(value);
+ }
+ return this;
}
protected void listChildren(List childrenList) {
@@ -1549,7 +1549,7 @@ public class Bundle extends Resource implements IBaseBundle {
childrenList.add(new Property("status", "string", "The status code returned by processing this entry.", 0, java.lang.Integer.MAX_VALUE, status));
childrenList.add(new Property("location", "uri", "The location header created by processing this operation.", 0, java.lang.Integer.MAX_VALUE, location));
childrenList.add(new Property("etag", "string", "The etag for the resource, it the operation for the entry produced a versioned resource.", 0, java.lang.Integer.MAX_VALUE, etag));
- childrenList.add(new Property("lastModified", "instant", "The date/time that the resource was modified on the server.", 0, java.lang.Integer.MAX_VALUE, lastModified));
+ childrenList.add(new Property("lastModified", "instant", "The date/time that the resource was modified on the server.", 0, java.lang.Integer.MAX_VALUE, lastModified));
}
public BundleEntryTransactionResponseComponent copy() {
@@ -1557,8 +1557,8 @@ public class Bundle extends Resource implements IBaseBundle {
copyValues(dst);
dst.status = status == null ? null : status.copy();
dst.location = location == null ? null : location.copy();
- dst.etag = etag == null ? null : etag.copy();
- dst.lastModified = lastModified == null ? null : lastModified.copy();
+ dst.etag = etag == null ? null : etag.copy();
+ dst.lastModified = lastModified == null ? null : lastModified.copy();
return dst;
}
@@ -1570,7 +1570,7 @@ public class Bundle extends Resource implements IBaseBundle {
return false;
BundleEntryTransactionResponseComponent o = (BundleEntryTransactionResponseComponent) other;
return compareDeep(status, o.status, true) && compareDeep(location, o.location, true) && compareDeep(etag, o.etag, true)
- && compareDeep(lastModified, o.lastModified, true);
+ && compareDeep(lastModified, o.lastModified, true);
}
@Override
@@ -1581,12 +1581,12 @@ public class Bundle extends Resource implements IBaseBundle {
return false;
BundleEntryTransactionResponseComponent o = (BundleEntryTransactionResponseComponent) other;
return compareValues(status, o.status, true) && compareValues(location, o.location, true) && compareValues(etag, o.etag, true)
- && compareValues(lastModified, o.lastModified, true);
+ && compareValues(lastModified, o.lastModified, true);
}
public boolean isEmpty() {
return super.isEmpty() && (status == null || status.isEmpty()) && (location == null || location.isEmpty())
- && (etag == null || etag.isEmpty()) && (lastModified == null || lastModified.isEmpty());
+ && (etag == null || etag.isEmpty()) && (lastModified == null || lastModified.isEmpty());
}
}
@@ -1594,42 +1594,42 @@ public class Bundle extends Resource implements IBaseBundle {
/**
* Indicates the purpose of this bundle- how it was intended to be used.
*/
- @Child(name="type", type={CodeType.class}, order=0, min=1, max=1)
+ @Child(name = "type", type = {CodeType.class}, order = 0, min = 1, max = 1)
@Description(shortDefinition="document | message | transaction | transaction-response | history | searchset | collection", formalDefinition="Indicates the purpose of this bundle- how it was intended to be used." )
protected Enumeration type;
/**
* The base URL for the service that provided these resources. All relative URLs are relative to this one (equivalent to xml:base).
*/
- @Child(name="base", type={UriType.class}, order=1, min=0, max=1)
+ @Child(name = "base", type = {UriType.class}, order = 1, min = 0, max = 1)
@Description(shortDefinition="Stated Base URL", formalDefinition="The base URL for the service that provided these resources. All relative URLs are relative to this one (equivalent to xml:base)." )
protected UriType base;
/**
* If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle).
*/
- @Child(name="total", type={IntegerType.class}, order=2, min=0, max=1)
+ @Child(name = "total", type = {IntegerType.class}, order = 2, min = 0, max = 1)
@Description(shortDefinition="If search, the total number of matches", formalDefinition="If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle)." )
protected IntegerType total;
/**
* A series of links that provide context to this bundle.
*/
- @Child(name="link", type={}, order=3, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "link", type = {}, order = 3, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Links related to this Bundle", formalDefinition="A series of links that provide context to this bundle." )
protected List link;
/**
* An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only).
*/
- @Child(name="entry", type={}, order=4, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "entry", type = {}, order = 4, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Entry in the bundle - will have a resource, or information", formalDefinition="An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only)." )
protected List entry;
/**
* XML Digital Signature - base64 encoded.
*/
- @Child(name="signature", type={Base64BinaryType.class}, order=5, min=0, max=1)
+ @Child(name = "signature", type = {Base64BinaryType.class}, order = 5, min = 0, max = 1)
@Description(shortDefinition="XML Digital Signature (base64 encoded)", formalDefinition="XML Digital Signature - base64 encoded." )
protected Base64BinaryType signature;
@@ -1964,8 +1964,8 @@ public class Bundle extends Resource implements IBaseBundle {
public static final String SP_COMPOSITION = "composition";
@SearchParamDefinition(name="type", path="Bundle.type", description="document | message | transaction | transaction-response | history | searchset | collection", type="token" )
public static final String SP_TYPE = "type";
- @SearchParamDefinition(name="message", path="", description="The first resource in the bundle, if the bundle type is 'message' - this is a message header, and this parameter provides access to search it's contents", type="reference" )
- public static final String SP_MESSAGE = "message";
+ @SearchParamDefinition(name = "message", path = "", description = "The first resource in the bundle, if the bundle type is 'message' - this is a message header, and this parameter provides access to search it's contents", type = "reference")
+ public static final String SP_MESSAGE = "message";
}
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CarePlan.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CarePlan.java
index 9e0c4a4d794..003df978e4f 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CarePlan.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CarePlan.java
@@ -1855,14 +1855,14 @@ public class CarePlan extends DomainResource {
/**
* This records identifiers associated with this care plan that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).
*/
- @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="External Ids for this plan", formalDefinition="This records identifiers associated with this care plan that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." )
protected List identifier;
/**
* Identifies the patient/subject whose intended care is described by the plan.
*/
- @Child(name="patient", type={Patient.class}, order=1, min=0, max=1)
+ @Child(name = "patient", type = {Patient.class}, order = 1, min = 0, max = 1)
@Description(shortDefinition="Who care plan is for", formalDefinition="Identifies the patient/subject whose intended care is described by the plan." )
protected Reference patient;
@@ -1874,28 +1874,28 @@ public class CarePlan extends DomainResource {
/**
* Indicates whether the plan is currently being acted upon, represents future intentions or is now just historical record.
*/
- @Child(name="status", type={CodeType.class}, order=2, min=1, max=1)
+ @Child(name = "status", type = {CodeType.class}, order = 2, min = 1, max = 1)
@Description(shortDefinition="planned | active | completed", formalDefinition="Indicates whether the plan is currently being acted upon, represents future intentions or is now just historical record." )
protected Enumeration status;
/**
* Indicates when the plan did (or is intended to) come into effect and end.
*/
- @Child(name="period", type={Period.class}, order=3, min=0, max=1)
+ @Child(name = "period", type = {Period.class}, order = 3, min = 0, max = 1)
@Description(shortDefinition="Time period plan covers", formalDefinition="Indicates when the plan did (or is intended to) come into effect and end." )
protected Period period;
/**
* Identifies the most recent date on which the plan has been revised.
*/
- @Child(name="modified", type={DateTimeType.class}, order=4, min=0, max=1)
+ @Child(name = "modified", type = {DateTimeType.class}, order = 4, min = 0, max = 1)
@Description(shortDefinition="When last updated", formalDefinition="Identifies the most recent date on which the plan has been revised." )
protected DateTimeType modified;
/**
* Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.
*/
- @Child(name="concern", type={Condition.class}, order=5, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "concern", type = {Condition.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Health issues this plan addresses", formalDefinition="Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan." )
protected List concern;
/**
@@ -1907,28 +1907,28 @@ public class CarePlan extends DomainResource {
/**
* Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.
*/
- @Child(name="participant", type={}, order=6, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "participant", type = {}, order = 6, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Who's involved in plan?", formalDefinition="Identifies all people and organizations who are expected to be involved in the care envisioned by this plan." )
protected List participant;
/**
* Describes the intended objective(s) of carrying out the Care Plan.
*/
- @Child(name="goal", type={}, order=7, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "goal", type = {}, order = 7, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Desired outcome of plan", formalDefinition="Describes the intended objective(s) of carrying out the Care Plan." )
protected List goal;
/**
* 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.
*/
- @Child(name="activity", type={}, order=8, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "activity", type = {}, order = 8, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Action to occur as part of plan", formalDefinition="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." )
protected List activity;
/**
* General notes about the care plan not covered elsewhere.
*/
- @Child(name="notes", type={StringType.class}, order=9, min=0, max=1)
+ @Child(name = "notes", type = {StringType.class}, order = 9, min = 0, max = 1)
@Description(shortDefinition="Comments about the plan", formalDefinition="General notes about the care plan not covered elsewhere." )
protected StringType notes;
@@ -2416,18 +2416,18 @@ public class CarePlan extends DomainResource {
return ResourceType.CarePlan;
}
- @SearchParamDefinition(name="date", path="CarePlan.period", description="Time period plan covers", type="date" )
- public static final String SP_DATE = "date";
+ @SearchParamDefinition(name = "date", path = "CarePlan.period", description = "Time period plan covers", type = "date")
+ public static final String SP_DATE = "date";
@SearchParamDefinition(name="activitycode", path="CarePlan.activity.simple.code", description="Detail type of activity", type="token" )
public static final String SP_ACTIVITYCODE = "activitycode";
@SearchParamDefinition(name="activitydate", path="CarePlan.activity.simple.scheduled[x]", description="Specified date occurs within period specified by CarePlan.activity.timingSchedule", type="date" )
public static final String SP_ACTIVITYDATE = "activitydate";
- @SearchParamDefinition(name="activitydetail", path="CarePlan.activity.detail", description="Activity details defined in specific resource", type="reference" )
- public static final String SP_ACTIVITYDETAIL = "activitydetail";
- @SearchParamDefinition(name="condition", path="CarePlan.concern", description="Health issues this plan addresses", type="reference" )
- public static final String SP_CONDITION = "condition";
- @SearchParamDefinition(name="patient", path="CarePlan.patient", description="Who care plan is for", type="reference" )
- public static final String SP_PATIENT = "patient";
+ @SearchParamDefinition(name = "activitydetail", path = "CarePlan.activity.detail", description = "Activity details defined in specific resource", type = "reference")
+ public static final String SP_ACTIVITYDETAIL = "activitydetail";
+ @SearchParamDefinition(name = "condition", path = "CarePlan.concern", description = "Health issues this plan addresses", type = "reference")
+ public static final String SP_CONDITION = "condition";
+ @SearchParamDefinition(name = "patient", path = "CarePlan.patient", description = "Who care plan is for", type = "reference")
+ public static final String SP_PATIENT = "patient";
@SearchParamDefinition(name="participant", path="CarePlan.participant.member", description="Who is involved", type="reference" )
public static final String SP_PARTICIPANT = "participant";
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CarePlan2.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CarePlan2.java
index 2f67449bc2d..7addcd6ea0f 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CarePlan2.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CarePlan2.java
@@ -270,14 +270,14 @@ public class CarePlan2 extends DomainResource {
/**
* This records identifiers associated with this care plan that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).
*/
- @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="External Ids for this plan", formalDefinition="This records identifiers associated with this care plan that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." )
protected List identifier;
/**
* Identifies the patient/subject whose intended care is described by the plan.
*/
- @Child(name="patient", type={Patient.class}, order=1, min=0, max=1)
+ @Child(name = "patient", type = {Patient.class}, order = 1, min = 0, max = 1)
@Description(shortDefinition="Who care plan is for", formalDefinition="Identifies the patient/subject whose intended care is described by the plan." )
protected Reference patient;
@@ -289,28 +289,28 @@ public class CarePlan2 extends DomainResource {
/**
* Indicates whether the plan is currently being acted upon, represents future intentions or is now just historical record.
*/
- @Child(name="status", type={CodeType.class}, order=2, min=1, max=1)
+ @Child(name = "status", type = {CodeType.class}, order = 2, min = 1, max = 1)
@Description(shortDefinition="planned | active | completed", formalDefinition="Indicates whether the plan is currently being acted upon, represents future intentions or is now just historical record." )
protected Enumeration status;
/**
* Indicates when the plan did (or is intended to) come into effect and end.
*/
- @Child(name="period", type={Period.class}, order=3, min=0, max=1)
+ @Child(name = "period", type = {Period.class}, order = 3, min = 0, max = 1)
@Description(shortDefinition="Time period plan covers", formalDefinition="Indicates when the plan did (or is intended to) come into effect and end." )
protected Period period;
/**
* Identifies the most recent date on which the plan has been revised.
*/
- @Child(name="modified", type={DateTimeType.class}, order=4, min=0, max=1)
+ @Child(name = "modified", type = {DateTimeType.class}, order = 4, min = 0, max = 1)
@Description(shortDefinition="When last updated", formalDefinition="Identifies the most recent date on which the plan has been revised." )
protected DateTimeType modified;
/**
* Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan.
*/
- @Child(name="concern", type={Condition.class}, order=5, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "concern", type = {Condition.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Health issues this plan addresses", formalDefinition="Identifies the conditions/problems/concerns/diagnoses/etc. whose management and/or mitigation are handled by this plan." )
protected List concern;
/**
@@ -322,21 +322,21 @@ public class CarePlan2 extends DomainResource {
/**
* Identifies all people and organizations who are expected to be involved in the care envisioned by this plan.
*/
- @Child(name="participant", type={}, order=6, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "participant", type = {}, order = 6, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Who's involved in plan?", formalDefinition="Identifies all people and organizations who are expected to be involved in the care envisioned by this plan." )
protected List participant;
/**
* General notes about the care plan not covered elsewhere.
*/
- @Child(name="notes", type={StringType.class}, order=7, min=0, max=1)
+ @Child(name = "notes", type = {StringType.class}, order = 7, min = 0, max = 1)
@Description(shortDefinition="Comments about the plan", formalDefinition="General notes about the care plan not covered elsewhere." )
protected StringType notes;
/**
* Describes the intended objective(s) of carrying out the Care Plan.
*/
- @Child(name="goal", type={Goal.class}, order=8, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "goal", type = {Goal.class}, order = 8, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="CarePlan Goal", formalDefinition="Describes the intended objective(s) of carrying out the Care Plan." )
protected List goal;
/**
@@ -348,7 +348,7 @@ public class CarePlan2 extends DomainResource {
/**
* Identifies an action that is planned to happen as part of the careplan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc.
*/
- @Child(name="activity", type={ProcedureRequest.class, MedicationPrescription.class, DiagnosticOrder.class, ReferralRequest.class, CommunicationRequest.class, NutritionOrder.class}, order=9, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "activity", type = {ProcedureRequest.class, MedicationPrescription.class, DiagnosticOrder.class, ReferralRequest.class, CommunicationRequest.class, NutritionOrder.class}, order = 9, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="CarePlan Activity", formalDefinition="Identifies an action that is planned to happen as part of the careplan. For example, a medication to be used, lab tests to perform, self-monitoring, education, etc." )
protected List activity;
/**
@@ -871,11 +871,11 @@ public class CarePlan2 extends DomainResource {
return ResourceType.CarePlan2;
}
- @SearchParamDefinition(name="date", path="CarePlan2.period", description="Time period plan covers", type="date" )
+ @SearchParamDefinition(name = "date", path = "CarePlan2.period", description = "Time period plan covers", type = "date")
public static final String SP_DATE = "date";
@SearchParamDefinition(name="condition", path="CarePlan2.concern", description="Health issues this plan addresses", type="reference" )
public static final String SP_CONDITION = "condition";
- @SearchParamDefinition(name="patient", path="CarePlan2.patient", description="Who care plan is for", type="reference" )
+ @SearchParamDefinition(name = "patient", path = "CarePlan2.patient", description = "Who care plan is for", type = "reference")
public static final String SP_PATIENT = "patient";
@SearchParamDefinition(name="participant", path="CarePlan2.participant.member", description="Who is involved", type="reference" )
public static final String SP_PARTICIPANT = "participant";
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClaimResponse.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClaimResponse.java
index 9c83c26786f..28b71852adc 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClaimResponse.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClaimResponse.java
@@ -2536,14 +2536,14 @@ public class ClaimResponse extends DomainResource {
/**
* The Response Business Identifier.
*/
- @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Response number", formalDefinition="The Response Business Identifier." )
protected List identifier;
/**
* Original request resource referrence.
*/
- @Child(name="request", type={OralHealthClaim.class, PharmacyClaim.class, VisionClaim.class, ProfessionalClaim.class, InstitutionalClaim.class}, order=1, min=0, max=1)
+ @Child(name = "request", type = {OralHealthClaim.class, PharmacyClaim.class, VisionClaim.class, ProfessionalClaim.class, InstitutionalClaim.class}, order = 1, min = 0, max = 1)
@Description(shortDefinition="Id of resource triggering adjudication", formalDefinition="Original request resource referrence." )
protected Reference request;
@@ -2555,28 +2555,28 @@ public class ClaimResponse extends DomainResource {
/**
* The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources.
*/
- @Child(name="ruleset", type={Coding.class}, order=2, min=0, max=1)
+ @Child(name = "ruleset", type = {Coding.class}, order = 2, min = 0, max = 1)
@Description(shortDefinition="Resource version", formalDefinition="The version of the style of resource contents. This should be mapped to the allowable profiles for this and supporting resources." )
protected Coding ruleset;
/**
* The style (standard) and version of the original material which was converted into this resource.
*/
- @Child(name="originalRuleset", type={Coding.class}, order=3, min=0, max=1)
+ @Child(name = "originalRuleset", type = {Coding.class}, order = 3, min = 0, max = 1)
@Description(shortDefinition="Original version", formalDefinition="The style (standard) and version of the original material which was converted into this resource." )
protected Coding originalRuleset;
/**
* The date when the enclosed suite of services were performed or completed.
*/
- @Child(name="created", type={DateTimeType.class}, order=4, min=0, max=1)
+ @Child(name = "created", type = {DateTimeType.class}, order = 4, min = 0, max = 1)
@Description(shortDefinition="Creation date", formalDefinition="The date when the enclosed suite of services were performed or completed." )
protected DateTimeType created;
/**
* The Insurer who produced this adjudicated response.
*/
- @Child(name="organization", type={Organization.class}, order=5, min=0, max=1)
+ @Child(name = "organization", type = {Organization.class}, order = 5, min = 0, max = 1)
@Description(shortDefinition="Insurer", formalDefinition="The Insurer who produced this adjudicated response." )
protected Reference organization;
@@ -2588,7 +2588,7 @@ public class ClaimResponse extends DomainResource {
/**
* The practitioner who is responsible for the services rendered to the patient.
*/
- @Child(name="requestProvider", type={Practitioner.class}, order=6, min=0, max=1)
+ @Child(name = "requestProvider", type = {Practitioner.class}, order = 6, min = 0, max = 1)
@Description(shortDefinition="Responsible practitioner", formalDefinition="The practitioner who is responsible for the services rendered to the patient." )
protected Reference requestProvider;
@@ -2600,7 +2600,7 @@ public class ClaimResponse extends DomainResource {
/**
* The organization which is responsible for the services rendered to the patient.
*/
- @Child(name="requestOrganization", type={Organization.class}, order=7, min=0, max=1)
+ @Child(name = "requestOrganization", type = {Organization.class}, order = 7, min = 0, max = 1)
@Description(shortDefinition="Responsible organization", formalDefinition="The organization which is responsible for the services rendered to the patient." )
protected Reference requestOrganization;
@@ -2612,119 +2612,119 @@ public class ClaimResponse extends DomainResource {
/**
* Transaction status: error, complete.
*/
- @Child(name="outcome", type={CodeType.class}, order=8, min=0, max=1)
+ @Child(name = "outcome", type = {CodeType.class}, order = 8, min = 0, max = 1)
@Description(shortDefinition="complete | error", formalDefinition="Transaction status: error, complete." )
protected Enumeration outcome;
/**
* A description of the status of the adjudication.
*/
- @Child(name="disposition", type={StringType.class}, order=9, min=0, max=1)
+ @Child(name = "disposition", type = {StringType.class}, order = 9, min = 0, max = 1)
@Description(shortDefinition="Disposition Message", formalDefinition="A description of the status of the adjudication." )
protected StringType disposition;
/**
* Party to be reimbursed: Subscriber, provider, other.
*/
- @Child(name="payeeType", type={Coding.class}, order=10, min=0, max=1)
+ @Child(name = "payeeType", type = {Coding.class}, order = 10, min = 0, max = 1)
@Description(shortDefinition="Party to be paid any benefits payable", formalDefinition="Party to be reimbursed: Subscriber, provider, other." )
protected Coding payeeType;
/**
* The first tier service adjudications for submitted services.
*/
- @Child(name="item", type={}, order=11, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "item", type = {}, order = 11, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Line items", formalDefinition="The first tier service adjudications for submitted services." )
protected List item;
/**
* The first tier service adjudications for payor added services.
*/
- @Child(name="additem", type={}, order=12, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "additem", type = {}, order = 12, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Insurer added line items", formalDefinition="The first tier service adjudications for payor added services." )
protected List additem;
/**
* Mutually exclusive with Services Provided (Item).
*/
- @Child(name="error", type={}, order=13, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "error", type = {}, order = 13, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Processing errors", formalDefinition="Mutually exclusive with Services Provided (Item)." )
protected List error;
/**
* The total cost of the services reported.
*/
- @Child(name="totalCost", type={Money.class}, order=14, min=0, max=1)
+ @Child(name = "totalCost", type = {Money.class}, order = 14, min = 0, max = 1)
@Description(shortDefinition="Total Cost of service from the Claim", formalDefinition="The total cost of the services reported." )
protected Money totalCost;
/**
* The amount of deductable applied which was not allocated to any particular service line.
*/
- @Child(name="unallocDeductable", type={Money.class}, order=15, min=0, max=1)
+ @Child(name = "unallocDeductable", type = {Money.class}, order = 15, min = 0, max = 1)
@Description(shortDefinition="Unallocated deductable", formalDefinition="The amount of deductable applied which was not allocated to any particular service line." )
protected Money unallocDeductable;
/**
* Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductable).
*/
- @Child(name="totalBenefit", type={Money.class}, order=16, min=0, max=1)
+ @Child(name = "totalBenefit", type = {Money.class}, order = 16, min = 0, max = 1)
@Description(shortDefinition="Total benefit payable for the Claim", formalDefinition="Total amount of benefit payable (Equal to sum of the Benefit amounts from all detail lines and additions less the Unallocated Deductable)." )
protected Money totalBenefit;
/**
* Adjustment to the payment of this transaction which is not related to adjudication of this transaction.
*/
- @Child(name="paymentAdjustment", type={Money.class}, order=17, min=0, max=1)
+ @Child(name = "paymentAdjustment", type = {Money.class}, order = 17, min = 0, max = 1)
@Description(shortDefinition="Payment adjustment for non-Claim issues", formalDefinition="Adjustment to the payment of this transaction which is not related to adjudication of this transaction." )
protected Money paymentAdjustment;
/**
* Reason for the payment adjustment.
*/
- @Child(name="paymentAdjustmentReason", type={Coding.class}, order=18, min=0, max=1)
+ @Child(name = "paymentAdjustmentReason", type = {Coding.class}, order = 18, min = 0, max = 1)
@Description(shortDefinition="Reason for Payment adjustment", formalDefinition="Reason for the payment adjustment." )
protected Coding paymentAdjustmentReason;
/**
* Estimated payment data.
*/
- @Child(name="paymentDate", type={DateType.class}, order=19, min=0, max=1)
+ @Child(name = "paymentDate", type = {DateType.class}, order = 19, min = 0, max = 1)
@Description(shortDefinition="Expected data of Payment", formalDefinition="Estimated payment data." )
protected DateType paymentDate;
/**
* Payable less any payment adjustment.
*/
- @Child(name="paymentAmount", type={Money.class}, order=20, min=0, max=1)
+ @Child(name = "paymentAmount", type = {Money.class}, order = 20, min = 0, max = 1)
@Description(shortDefinition="Payment amount", formalDefinition="Payable less any payment adjustment." )
protected Money paymentAmount;
/**
* Payment identifer.
*/
- @Child(name="paymentRef", type={Identifier.class}, order=21, min=0, max=1)
+ @Child(name = "paymentRef", type = {Identifier.class}, order = 21, min = 0, max = 1)
@Description(shortDefinition="Payment identifier", formalDefinition="Payment identifer." )
protected Identifier paymentRef;
/**
* Status of funds reservation (For provider, for Patient, None).
*/
- @Child(name="reserved", type={Coding.class}, order=22, min=0, max=1)
+ @Child(name = "reserved", type = {Coding.class}, order = 22, min = 0, max = 1)
@Description(shortDefinition="Funds reserved status", formalDefinition="Status of funds reservation (For provider, for Patient, None)." )
protected Coding reserved;
/**
* The form to be used for printing the content.
*/
- @Child(name="form", type={Coding.class}, order=23, min=0, max=1)
+ @Child(name = "form", type = {Coding.class}, order = 23, min = 0, max = 1)
@Description(shortDefinition="Printed Form Identifier", formalDefinition="The form to be used for printing the content." )
protected Coding form;
/**
* Note text.
*/
- @Child(name="note", type={}, order=24, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "note", type = {}, order = 24, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Processing notes", formalDefinition="Note text." )
protected List note;
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClinicalAssessment.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClinicalAssessment.java
index 2ccfc334015..de77414476f 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClinicalAssessment.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ClinicalAssessment.java
@@ -470,7 +470,7 @@ public class ClinicalAssessment extends DomainResource {
/**
* The patient being asssesed.
*/
- @Child(name="patient", type={Patient.class}, order=0, min=1, max=1)
+ @Child(name = "patient", type = {Patient.class}, order = 0, min = 1, max = 1)
@Description(shortDefinition="The patient being asssesed", formalDefinition="The patient being asssesed." )
protected Reference patient;
@@ -482,7 +482,7 @@ public class ClinicalAssessment extends DomainResource {
/**
* The clinicial performing the assessment.
*/
- @Child(name="assessor", type={Practitioner.class}, order=1, min=1, max=1)
+ @Child(name = "assessor", type = {Practitioner.class}, order = 1, min = 1, max = 1)
@Description(shortDefinition="The clinicial performing the assessment", formalDefinition="The clinicial performing the assessment." )
protected Reference assessor;
@@ -494,21 +494,21 @@ public class ClinicalAssessment extends DomainResource {
/**
* The point in time at which the assessment was concluded (not when it was recorded).
*/
- @Child(name="date", type={DateTimeType.class}, order=2, min=1, max=1)
+ @Child(name = "date", type = {DateTimeType.class}, order = 2, min = 1, max = 1)
@Description(shortDefinition="When the assessment occurred", formalDefinition="The point in time at which the assessment was concluded (not when it was recorded)." )
protected DateTimeType date;
/**
* A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it.
*/
- @Child(name="description", type={StringType.class}, order=3, min=0, max=1)
+ @Child(name = "description", type = {StringType.class}, order = 3, min = 0, max = 1)
@Description(shortDefinition="Why/how the assessment was performed", formalDefinition="A summary of the context and/or cause of the assessment - why / where was it peformed, and what patient events/sstatus prompted it." )
protected StringType description;
/**
* A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes.
*/
- @Child(name="previous", type={ClinicalAssessment.class}, order=4, min=0, max=1)
+ @Child(name = "previous", type = {ClinicalAssessment.class}, order = 4, min = 0, max = 1)
@Description(shortDefinition="Reference to last assessment", formalDefinition="A reference to the last assesment that was conducted bon this patient. Assessments are often/usually ongoing in nature; a care provider (practitioner or team) will make new assessments on an ongoing basis as new data arises or the patient's conditions changes." )
protected Reference previous;
@@ -520,7 +520,7 @@ public class ClinicalAssessment extends DomainResource {
/**
* This a list of the general problems/conditions for a patient.
*/
- @Child(name="problem", type={Condition.class, AllergyIntolerance.class}, order=5, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "problem", type = {Condition.class, AllergyIntolerance.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="General assessment of patient state", formalDefinition="This a list of the general problems/conditions for a patient." )
protected List problem;
/**
@@ -532,7 +532,7 @@ public class ClinicalAssessment extends DomainResource {
/**
* A reference to a specific care plan that prompted this assessment. The care plan provides further context for the assessment.
*/
- @Child(name="careplan", type={CarePlan.class}, order=6, min=0, max=1)
+ @Child(name = "careplan", type = {CarePlan.class}, order = 6, min = 0, max = 1)
@Description(shortDefinition="A specific careplan that prompted this assessment", formalDefinition="A reference to a specific care plan that prompted this assessment. The care plan provides further context for the assessment." )
protected Reference careplan;
@@ -544,7 +544,7 @@ public class ClinicalAssessment extends DomainResource {
/**
* A reference to a specific care plan that prompted this assessment. The referral request may provide further context for the assessment.
*/
- @Child(name="referral", type={ReferralRequest.class}, order=7, min=0, max=1)
+ @Child(name = "referral", type = {ReferralRequest.class}, order = 7, min = 0, max = 1)
@Description(shortDefinition="A specific referral that lead to this assessment", formalDefinition="A reference to a specific care plan that prompted this assessment. The referral request may provide further context for the assessment." )
protected Reference referral;
@@ -556,56 +556,56 @@ public class ClinicalAssessment extends DomainResource {
/**
* One or more sets of investigations (signs, symptions, etc). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes.
*/
- @Child(name="investigations", type={}, order=8, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "investigations", type = {}, order = 8, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="One or more sets of investigations (signs, symptions, etc)", formalDefinition="One or more sets of investigations (signs, symptions, etc). The actual grouping of investigations vary greatly depending on the type and context of the assessment. These investigations may include data generated during the assessment process, or data previously generated and recorded that is pertinent to the outcomes." )
protected List investigations;
/**
* Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis.
*/
- @Child(name="protocol", type={UriType.class}, order=9, min=0, max=1)
+ @Child(name = "protocol", type = {UriType.class}, order = 9, min = 0, max = 1)
@Description(shortDefinition="Clinical Protocol followed", formalDefinition="Reference to a specific published clinical protocol that was followed during this assessment, and/or that provides evidence in support of the diagnosis." )
protected UriType protocol;
/**
* A text summary of the investigations and the diagnosis.
*/
- @Child(name="summary", type={StringType.class}, order=10, min=0, max=1)
+ @Child(name = "summary", type = {StringType.class}, order = 10, min = 0, max = 1)
@Description(shortDefinition="Summary of the assessment", formalDefinition="A text summary of the investigations and the diagnosis." )
protected StringType summary;
/**
* An specific diagnosis that was considered likely or relevant to ongoing treatment.
*/
- @Child(name="diagnosis", type={}, order=11, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "diagnosis", type = {}, order = 11, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Possible or likely diagnosis", formalDefinition="An specific diagnosis that was considered likely or relevant to ongoing treatment." )
protected List diagnosis;
/**
* Diagnoses/conditions resolved since the last assessment.
*/
- @Child(name="resolved", type={CodeableConcept.class}, order=12, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "resolved", type = {CodeableConcept.class}, order = 12, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Diagnosies/conditions resolved since previous assessment", formalDefinition="Diagnoses/conditions resolved since the last assessment." )
protected List resolved;
/**
* Diagnosis considered not possible.
*/
- @Child(name="ruledOut", type={}, order=13, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "ruledOut", type = {}, order = 13, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Diagnosis considered not possible", formalDefinition="Diagnosis considered not possible." )
protected List ruledOut;
/**
* Estimate of likely outcome.
*/
- @Child(name="prognosis", type={StringType.class}, order=14, min=0, max=1)
+ @Child(name = "prognosis", type = {StringType.class}, order = 14, min = 0, max = 1)
@Description(shortDefinition="Estimate of likely outcome", formalDefinition="Estimate of likely outcome." )
protected StringType prognosis;
/**
* Plan of action after assessment.
*/
- @Child(name="plan", type={CarePlan.class}, order=15, min=0, max=1)
+ @Child(name = "plan", type = {CarePlan.class}, order = 15, min = 0, max = 1)
@Description(shortDefinition="Plan of action after assessment", formalDefinition="Plan of action after assessment." )
protected Reference plan;
@@ -617,7 +617,7 @@ public class ClinicalAssessment extends DomainResource {
/**
* Actions taken during assessment.
*/
- @Child(name="action", type={ReferralRequest.class, ProcedureRequest.class, Procedure.class, MedicationPrescription.class, DiagnosticOrder.class, NutritionOrder.class, Supply.class, Appointment.class}, order=16, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "action", type = {ReferralRequest.class, ProcedureRequest.class, Procedure.class, MedicationPrescription.class, DiagnosticOrder.class, NutritionOrder.class, Supply.class, Appointment.class}, order = 16, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Actions taken during assessment", formalDefinition="Actions taken during assessment." )
protected List action;
/**
@@ -1457,29 +1457,29 @@ public class ClinicalAssessment extends DomainResource {
@SearchParamDefinition(name="date", path="ClinicalAssessment.date", description="When the assessment occurred", type="date" )
public static final String SP_DATE = "date";
- @SearchParamDefinition(name="previous", path="ClinicalAssessment.previous", description="Reference to last assessment", type="reference" )
+ @SearchParamDefinition(name = "previous", path = "ClinicalAssessment.previous", description = "Reference to last assessment", type = "reference")
public static final String SP_PREVIOUS = "previous";
- @SearchParamDefinition(name="assessor", path="ClinicalAssessment.assessor", description="The clinicial performing the assessment", type="reference" )
+ @SearchParamDefinition(name = "assessor", path = "ClinicalAssessment.assessor", description = "The clinicial performing the assessment", type = "reference")
public static final String SP_ASSESSOR = "assessor";
@SearchParamDefinition(name="careplan", path="ClinicalAssessment.careplan", description="A specific careplan that prompted this assessment", type="reference" )
public static final String SP_CAREPLAN = "careplan";
- @SearchParamDefinition(name="diagnosis", path="ClinicalAssessment.diagnosis.item", description="Specific text or code for diagnosis", type="token" )
+ @SearchParamDefinition(name = "diagnosis", path = "ClinicalAssessment.diagnosis.item", description = "Specific text or code for diagnosis", type = "token")
public static final String SP_DIAGNOSIS = "diagnosis";
@SearchParamDefinition(name="ruledout", path="ClinicalAssessment.ruledOut.item", description="Specific text of code for diagnosis", type="token" )
public static final String SP_RULEDOUT = "ruledout";
- @SearchParamDefinition(name="problem", path="ClinicalAssessment.problem", description="General assessment of patient state", type="reference" )
+ @SearchParamDefinition(name = "problem", path = "ClinicalAssessment.problem", description = "General assessment of patient state", type = "reference")
public static final String SP_PROBLEM = "problem";
- @SearchParamDefinition(name="referral", path="ClinicalAssessment.referral", description="A specific referral that lead to this assessment", type="reference" )
+ @SearchParamDefinition(name = "referral", path = "ClinicalAssessment.referral", description = "A specific referral that lead to this assessment", type = "reference")
public static final String SP_REFERRAL = "referral";
@SearchParamDefinition(name="patient", path="ClinicalAssessment.patient", description="The patient being asssesed", type="reference" )
public static final String SP_PATIENT = "patient";
@SearchParamDefinition(name="investigation", path="ClinicalAssessment.investigations.item", description="Record of a specific investigation", type="reference" )
public static final String SP_INVESTIGATION = "investigation";
- @SearchParamDefinition(name="action", path="ClinicalAssessment.action", description="Actions taken during assessment", type="reference" )
+ @SearchParamDefinition(name = "action", path = "ClinicalAssessment.action", description = "Actions taken during assessment", type = "reference")
public static final String SP_ACTION = "action";
- @SearchParamDefinition(name="plan", path="ClinicalAssessment.plan", description="Plan of action after assessment", type="reference" )
+ @SearchParamDefinition(name = "plan", path = "ClinicalAssessment.plan", description = "Plan of action after assessment", type = "reference")
public static final String SP_PLAN = "plan";
- @SearchParamDefinition(name="resolved", path="ClinicalAssessment.resolved", description="Diagnosies/conditions resolved since previous assessment", type="token" )
+ @SearchParamDefinition(name = "resolved", path = "ClinicalAssessment.resolved", description = "Diagnosies/conditions resolved since previous assessment", type = "token")
public static final String SP_RESOLVED = "resolved";
}
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CodeType.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CodeType.java
index 3e11dcd1144..14322f56ad6 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CodeType.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CodeType.java
@@ -35,7 +35,7 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef;
/**
* Primitive type "code" in FHIR, when not bound to an enumerated list of codes
*/
-@DatatypeDef(name="code")
+@DatatypeDef(name = "code")
public class CodeType extends PrimitiveType implements Comparable {
private static final long serialVersionUID = 3L;
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CodeableConcept.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CodeableConcept.java
index 4a205bf6450..41cceda235e 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CodeableConcept.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CodeableConcept.java
@@ -41,19 +41,19 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef;
* A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text.
*/
@DatatypeDef(name="CodeableConcept")
-public class CodeableConcept extends Type implements ICompositeType {
+public class CodeableConcept extends Type implements ICompositeType {
/**
* A reference to a code defined by a terminology system.
*/
- @Child(name="coding", type={Coding.class}, order=0, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "coding", type = {Coding.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Code defined by a terminology system", formalDefinition="A reference to a code defined by a terminology system." )
protected List coding;
/**
* A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.
*/
- @Child(name="text", type={StringType.class}, order=1, min=0, max=1)
+ @Child(name = "text", type = {StringType.class}, order = 1, min = 0, max = 1)
@Description(shortDefinition="Plain text representation of the concept", formalDefinition="A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user." )
protected StringType text;
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Coding.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Coding.java
index 6361030272a..5001695b79f 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Coding.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Coding.java
@@ -47,42 +47,42 @@ public class Coding extends Type implements ICoding, ICompositeType {
/**
* The identification of the code system that defines the meaning of the symbol in the code.
*/
- @Child(name="system", type={UriType.class}, order=0, min=0, max=1)
+ @Child(name = "system", type = {UriType.class}, order = 0, min = 0, max = 1)
@Description(shortDefinition="Identity of the terminology system", formalDefinition="The identification of the code system that defines the meaning of the symbol in the code." )
protected UriType system;
/**
* The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged.
*/
- @Child(name="version", type={StringType.class}, order=1, min=0, max=1)
+ @Child(name = "version", type = {StringType.class}, order = 1, min = 0, max = 1)
@Description(shortDefinition="Version of the system - if relevant", formalDefinition="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and when the meaning is not guaranteed to be consistent, the version SHOULD be exchanged." )
protected StringType version;
/**
* A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).
*/
- @Child(name="code", type={CodeType.class}, order=2, min=0, max=1)
+ @Child(name = "code", type = {CodeType.class}, order = 2, min = 0, max = 1)
@Description(shortDefinition="Symbol in syntax defined by the system", formalDefinition="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)." )
protected CodeType code;
/**
* A representation of the meaning of the code in the system, following the rules of the system.
*/
- @Child(name="display", type={StringType.class}, order=3, min=0, max=1)
+ @Child(name = "display", type = {StringType.class}, order = 3, min = 0, max = 1)
@Description(shortDefinition="Representation defined by the system", formalDefinition="A representation of the meaning of the code in the system, following the rules of the system." )
protected StringType display;
/**
* Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays).
*/
- @Child(name="primary", type={BooleanType.class}, order=4, min=0, max=1)
+ @Child(name = "primary", type = {BooleanType.class}, order = 4, min = 0, max = 1)
@Description(shortDefinition="If this code was chosen directly by the user", formalDefinition="Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays)." )
protected BooleanType primary;
/**
* The set of possible coded values this coding was chosen from or constrained by.
*/
- @Child(name="valueSet", type={ValueSet.class}, order=5, min=0, max=1)
+ @Child(name = "valueSet", type = {ValueSet.class}, order = 5, min = 0, max = 1)
@Description(shortDefinition="Set this coding was chosen from", formalDefinition="The set of possible coded values this coding was chosen from or constrained by." )
protected Reference valueSet;
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Communication.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Communication.java
index 98017f6b27f..24f7e319466 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Communication.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Communication.java
@@ -266,21 +266,21 @@ public class Communication extends DomainResource {
/**
* Identifiers associated with this Communication that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).
*/
- @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Unique identifier", formalDefinition="Identifiers associated with this Communication that are defined by business processes and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." )
protected List identifier;
/**
* The type of message such as alert, notification, reminder, instruction, etc.
*/
- @Child(name="category", type={CodeableConcept.class}, order=1, min=0, max=1)
+ @Child(name = "category", type = {CodeableConcept.class}, order = 1, min = 0, max = 1)
@Description(shortDefinition="Message category", formalDefinition="The type of message such as alert, notification, reminder, instruction, etc." )
protected CodeableConcept category;
/**
* The entity (e.g., person, organization, clinical information system, or device) which is the source of the communication.
*/
- @Child(name="sender", type={Patient.class, Practitioner.class, Device.class, RelatedPerson.class, Organization.class}, order=2, min=0, max=1)
+ @Child(name = "sender", type = {Patient.class, Practitioner.class, Device.class, RelatedPerson.class, Organization.class}, order = 2, min = 0, max = 1)
@Description(shortDefinition="Message sender", formalDefinition="The entity (e.g., person, organization, clinical information system, or device) which is the source of the communication." )
protected Reference sender;
@@ -292,7 +292,7 @@ public class Communication extends DomainResource {
/**
* The entity (e.g., person, organization, clinical information system, or device) which is the target of the communication.
*/
- @Child(name="recipient", type={Patient.class, Device.class, RelatedPerson.class, Practitioner.class}, order=3, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "recipient", type = {Patient.class, Device.class, RelatedPerson.class, Practitioner.class}, order = 3, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Message recipient", formalDefinition="The entity (e.g., person, organization, clinical information system, or device) which is the target of the communication." )
protected List recipient;
/**
@@ -304,28 +304,28 @@ public class Communication extends DomainResource {
/**
* Text, attachment(s), or resource(s) to be communicated to the recipient.
*/
- @Child(name="payload", type={}, order=4, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "payload", type = {}, order = 4, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Message payload", formalDefinition="Text, attachment(s), or resource(s) to be communicated to the recipient." )
protected List payload;
/**
* The communication medium, e.g., email, fax.
*/
- @Child(name="medium", type={CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "medium", type = {CodeableConcept.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Communication medium", formalDefinition="The communication medium, e.g., email, fax." )
protected List medium;
/**
* The status of the transmission.
*/
- @Child(name="status", type={CodeType.class}, order=6, min=0, max=1)
+ @Child(name = "status", type = {CodeType.class}, order = 6, min = 0, max = 1)
@Description(shortDefinition="in-progress | completed | suspended | rejected | failed", formalDefinition="The status of the transmission." )
protected Enumeration status;
/**
* The encounter within which the communication was sent.
*/
- @Child(name="encounter", type={Encounter.class}, order=7, min=0, max=1)
+ @Child(name = "encounter", type = {Encounter.class}, order = 7, min = 0, max = 1)
@Description(shortDefinition="Encounter leading to message", formalDefinition="The encounter within which the communication was sent." )
protected Reference encounter;
@@ -337,28 +337,28 @@ public class Communication extends DomainResource {
/**
* The time when this communication was sent.
*/
- @Child(name="sent", type={DateTimeType.class}, order=8, min=0, max=1)
+ @Child(name = "sent", type = {DateTimeType.class}, order = 8, min = 0, max = 1)
@Description(shortDefinition="When sent", formalDefinition="The time when this communication was sent." )
protected DateTimeType sent;
/**
* The time when this communication arrived at the destination.
*/
- @Child(name="received", type={DateTimeType.class}, order=9, min=0, max=1)
+ @Child(name = "received", type = {DateTimeType.class}, order = 9, min = 0, max = 1)
@Description(shortDefinition="When received", formalDefinition="The time when this communication arrived at the destination." )
protected DateTimeType received;
/**
* The reason or justification for the communication.
*/
- @Child(name="reason", type={CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "reason", type = {CodeableConcept.class}, order = 10, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Indication for message", formalDefinition="The reason or justification for the communication." )
protected List reason;
/**
* The patient who is the focus of this communication.
*/
- @Child(name="subject", type={Patient.class}, order=11, min=0, max=1)
+ @Child(name = "subject", type = {Patient.class}, order = 11, min = 0, max = 1)
@Description(shortDefinition="Focus of message", formalDefinition="The patient who is the focus of this communication." )
protected Reference subject;
@@ -926,27 +926,27 @@ public class Communication extends DomainResource {
return ResourceType.Communication;
}
- @SearchParamDefinition(name="identifier", path="Communication.identifier", description="Unique identifier", type="token" )
+ @SearchParamDefinition(name = "identifier", path = "Communication.identifier", description = "Unique identifier", type = "token")
public static final String SP_IDENTIFIER = "identifier";
@SearchParamDefinition(name="sender", path="Communication.sender", description="Message sender", type="reference" )
public static final String SP_SENDER = "sender";
@SearchParamDefinition(name="subject", path="Communication.subject", description="Focus of message", type="reference" )
public static final String SP_SUBJECT = "subject";
- @SearchParamDefinition(name="patient", path="Communication.subject", description="Focus of message", type="reference" )
+ @SearchParamDefinition(name = "patient", path = "Communication.subject", description = "Focus of message", type = "reference")
public static final String SP_PATIENT = "patient";
- @SearchParamDefinition(name="recipient", path="Communication.recipient", description="Message recipient", type="reference" )
+ @SearchParamDefinition(name = "recipient", path = "Communication.recipient", description = "Message recipient", type = "reference")
public static final String SP_RECIPIENT = "recipient";
@SearchParamDefinition(name="received", path="Communication.received", description="When received", type="date" )
public static final String SP_RECEIVED = "received";
@SearchParamDefinition(name="medium", path="Communication.medium", description="Communication medium", type="token" )
public static final String SP_MEDIUM = "medium";
- @SearchParamDefinition(name="encounter", path="Communication.encounter", description="Encounter leading to message", type="reference" )
+ @SearchParamDefinition(name = "encounter", path = "Communication.encounter", description = "Encounter leading to message", type = "reference")
public static final String SP_ENCOUNTER = "encounter";
- @SearchParamDefinition(name="category", path="Communication.category", description="Message category", type="token" )
+ @SearchParamDefinition(name = "category", path = "Communication.category", description = "Message category", type = "token")
public static final String SP_CATEGORY = "category";
- @SearchParamDefinition(name="sent", path="Communication.sent", description="When sent", type="date" )
+ @SearchParamDefinition(name = "sent", path = "Communication.sent", description = "When sent", type = "date")
public static final String SP_SENT = "sent";
- @SearchParamDefinition(name="status", path="Communication.status", description="in-progress | completed | suspended | rejected | failed", type="token" )
+ @SearchParamDefinition(name = "status", path = "Communication.status", description = "in-progress | completed | suspended | rejected | failed", type = "token")
public static final String SP_STATUS = "status";
}
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CommunicationRequest.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CommunicationRequest.java
index 1cc6f06f053..91e68443758 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CommunicationRequest.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/CommunicationRequest.java
@@ -336,21 +336,21 @@ public class CommunicationRequest extends DomainResource {
/**
* A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be auto-generated, if needed, by CDS system. Does not need to be the actual ID of the source system.
*/
- @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Unique identifier", formalDefinition="A unique ID of this request for reference purposes. It must be provided if user wants it returned as part of any output, otherwise it will be auto-generated, if needed, by CDS system. Does not need to be the actual ID of the source system." )
protected List identifier;
/**
* The type of message such as alert, notification, reminder, instruction, etc.
*/
- @Child(name="category", type={CodeableConcept.class}, order=1, min=0, max=1)
+ @Child(name = "category", type = {CodeableConcept.class}, order = 1, min = 0, max = 1)
@Description(shortDefinition="Message category", formalDefinition="The type of message such as alert, notification, reminder, instruction, etc." )
protected CodeableConcept category;
/**
* The entity (e.g., person, organization, clinical information system, or device) which is the source of the communication.
*/
- @Child(name="sender", type={Patient.class, Practitioner.class, Device.class, RelatedPerson.class, Organization.class}, order=2, min=0, max=1)
+ @Child(name = "sender", type = {Patient.class, Practitioner.class, Device.class, RelatedPerson.class, Organization.class}, order = 2, min = 0, max = 1)
@Description(shortDefinition="Message sender", formalDefinition="The entity (e.g., person, organization, clinical information system, or device) which is the source of the communication." )
protected Reference sender;
@@ -362,7 +362,7 @@ public class CommunicationRequest extends DomainResource {
/**
* The entity (e.g., person, organization, clinical information system, or device) which is the intended target of the communication.
*/
- @Child(name="recipient", type={Patient.class, Device.class, RelatedPerson.class, Practitioner.class}, order=3, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "recipient", type = {Patient.class, Device.class, RelatedPerson.class, Practitioner.class}, order = 3, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Message recipient", formalDefinition="The entity (e.g., person, organization, clinical information system, or device) which is the intended target of the communication." )
protected List recipient;
/**
@@ -374,21 +374,21 @@ public class CommunicationRequest extends DomainResource {
/**
* Text, attachment(s), or resource(s) to be communicated to the recipient.
*/
- @Child(name="payload", type={}, order=4, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "payload", type = {}, order = 4, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Message payload", formalDefinition="Text, attachment(s), or resource(s) to be communicated to the recipient." )
protected List payload;
/**
* The communication medium, e.g., email, fax.
*/
- @Child(name="medium", type={CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "medium", type = {CodeableConcept.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Communication medium", formalDefinition="The communication medium, e.g., email, fax." )
protected List medium;
/**
* The responsible person who authorizes this order, e.g., physician. This may be different than the author of the order statement, e.g., clerk, who may have entered the statement into the order entry application.
*/
- @Child(name="requester", type={Practitioner.class, Patient.class, RelatedPerson.class}, order=6, min=0, max=1)
+ @Child(name = "requester", type = {Practitioner.class, Patient.class, RelatedPerson.class}, order = 6, min = 0, max = 1)
@Description(shortDefinition="Requester of communication", formalDefinition="The responsible person who authorizes this order, e.g., physician. This may be different than the author of the order statement, e.g., clerk, who may have entered the statement into the order entry application." )
protected Reference requester;
@@ -400,14 +400,14 @@ public class CommunicationRequest extends DomainResource {
/**
* The status of the proposal or order.
*/
- @Child(name="status", type={CodeType.class}, order=7, min=0, max=1)
+ @Child(name = "status", type = {CodeType.class}, order = 7, min = 0, max = 1)
@Description(shortDefinition="proposed | planned | requested | received | accepted | in-progress | completed | suspended | rejected | failed", formalDefinition="The status of the proposal or order." )
protected Enumeration status;
/**
* The encounter within which the communication request was created.
*/
- @Child(name="encounter", type={Encounter.class}, order=8, min=0, max=1)
+ @Child(name = "encounter", type = {Encounter.class}, order = 8, min = 0, max = 1)
@Description(shortDefinition="Encounter leading to message", formalDefinition="The encounter within which the communication request was created." )
protected Reference encounter;
@@ -419,28 +419,28 @@ public class CommunicationRequest extends DomainResource {
/**
* The time when this communication is to occur.
*/
- @Child(name="scheduledTime", type={DateTimeType.class}, order=9, min=0, max=1)
+ @Child(name = "scheduledTime", type = {DateTimeType.class}, order = 9, min = 0, max = 1)
@Description(shortDefinition="When scheduled", formalDefinition="The time when this communication is to occur." )
protected DateTimeType scheduledTime;
/**
* The reason or justification for the communication request.
*/
- @Child(name="reason", type={CodeableConcept.class}, order=10, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "reason", type = {CodeableConcept.class}, order = 10, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Indication for message", formalDefinition="The reason or justification for the communication request." )
protected List reason;
/**
* The time when the request was made.
*/
- @Child(name="orderedOn", type={DateTimeType.class}, order=11, min=0, max=1)
+ @Child(name = "orderedOn", type = {DateTimeType.class}, order = 11, min = 0, max = 1)
@Description(shortDefinition="When ordered or proposed", formalDefinition="The time when the request was made." )
protected DateTimeType orderedOn;
/**
* The patient who is the focus of this communication request.
*/
- @Child(name="subject", type={Patient.class}, order=12, min=0, max=1)
+ @Child(name = "subject", type = {Patient.class}, order = 12, min = 0, max = 1)
@Description(shortDefinition="Focus of message", formalDefinition="The patient who is the focus of this communication request." )
protected Reference subject;
@@ -452,7 +452,7 @@ public class CommunicationRequest extends DomainResource {
/**
* Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine.
*/
- @Child(name="priority", type={CodeableConcept.class}, order=13, min=0, max=1)
+ @Child(name = "priority", type = {CodeableConcept.class}, order = 13, min = 0, max = 1)
@Description(shortDefinition="Message urgency", formalDefinition="Characterizes how quickly the proposed act must be initiated. Includes concepts such as stat, urgent, routine." )
protected CodeableConcept priority;
@@ -1087,27 +1087,27 @@ public class CommunicationRequest extends DomainResource {
public static final String SP_REQUESTER = "requester";
@SearchParamDefinition(name="identifier", path="CommunicationRequest.identifier", description="Unique identifier", type="token" )
public static final String SP_IDENTIFIER = "identifier";
- @SearchParamDefinition(name="ordered", path="CommunicationRequest.orderedOn", description="When ordered or proposed", type="date" )
+ @SearchParamDefinition(name = "ordered", path = "CommunicationRequest.orderedOn", description = "When ordered or proposed", type = "date")
public static final String SP_ORDERED = "ordered";
- @SearchParamDefinition(name="subject", path="CommunicationRequest.subject", description="Focus of message", type="reference" )
+ @SearchParamDefinition(name = "subject", path = "CommunicationRequest.subject", description = "Focus of message", type = "reference")
public static final String SP_SUBJECT = "subject";
@SearchParamDefinition(name="medium", path="CommunicationRequest.medium", description="Communication medium", type="token" )
public static final String SP_MEDIUM = "medium";
- @SearchParamDefinition(name="encounter", path="CommunicationRequest.encounter", description="Encounter leading to message", type="reference" )
+ @SearchParamDefinition(name = "encounter", path = "CommunicationRequest.encounter", description = "Encounter leading to message", type = "reference")
public static final String SP_ENCOUNTER = "encounter";
- @SearchParamDefinition(name="priority", path="CommunicationRequest.priority", description="Message urgency", type="token" )
+ @SearchParamDefinition(name = "priority", path = "CommunicationRequest.priority", description = "Message urgency", type = "token")
public static final String SP_PRIORITY = "priority";
- @SearchParamDefinition(name="sender", path="CommunicationRequest.sender", description="Message sender", type="reference" )
+ @SearchParamDefinition(name = "sender", path = "CommunicationRequest.sender", description = "Message sender", type = "reference")
public static final String SP_SENDER = "sender";
- @SearchParamDefinition(name="patient", path="CommunicationRequest.subject", description="Focus of message", type="reference" )
+ @SearchParamDefinition(name = "patient", path = "CommunicationRequest.subject", description = "Focus of message", type = "reference")
public static final String SP_PATIENT = "patient";
@SearchParamDefinition(name="recipient", path="CommunicationRequest.recipient", description="Message recipient", type="reference" )
public static final String SP_RECIPIENT = "recipient";
- @SearchParamDefinition(name="time", path="CommunicationRequest.scheduledTime", description="When scheduled", type="date" )
+ @SearchParamDefinition(name = "time", path = "CommunicationRequest.scheduledTime", description = "When scheduled", type = "date")
public static final String SP_TIME = "time";
- @SearchParamDefinition(name="category", path="CommunicationRequest.category", description="Message category", type="token" )
+ @SearchParamDefinition(name = "category", path = "CommunicationRequest.category", description = "Message category", type = "token")
public static final String SP_CATEGORY = "category";
- @SearchParamDefinition(name="status", path="CommunicationRequest.status", description="proposed | planned | requested | received | accepted | in-progress | completed | suspended | rejected | failed", type="token" )
+ @SearchParamDefinition(name = "status", path = "CommunicationRequest.status", description = "proposed | planned | requested | received | accepted | in-progress | completed | suspended | rejected | failed", type = "token")
public static final String SP_STATUS = "status";
}
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Composition.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Composition.java
index 8460ee13cfb..6ec043207e8 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Composition.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Composition.java
@@ -898,56 +898,56 @@ public class Composition extends DomainResource {
/**
* Logical Identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time.
*/
- @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=1)
+ @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = 1)
@Description(shortDefinition="Logical identifier of composition (version-independent)", formalDefinition="Logical Identifier for the composition, assigned when created. This identifier stays constant as the composition is changed over time." )
protected Identifier identifier;
/**
* The composition editing time, when the composition was last logically changed by the author.
*/
- @Child(name="date", type={DateTimeType.class}, order=1, min=1, max=1)
+ @Child(name = "date", type = {DateTimeType.class}, order = 1, min = 1, max = 1)
@Description(shortDefinition="Composition editing time", formalDefinition="The composition editing time, when the composition was last logically changed by the author." )
protected DateTimeType date;
/**
* Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition.
*/
- @Child(name="type", type={CodeableConcept.class}, order=2, min=1, max=1)
+ @Child(name = "type", type = {CodeableConcept.class}, order = 2, min = 1, max = 1)
@Description(shortDefinition="Kind of composition (LOINC if possible)", formalDefinition="Specifies the particular kind of composition (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the composition." )
protected CodeableConcept type;
/**
* A categorization for the type of the composition. This may be implied by or derived from the code specified in the Composition Type.
*/
- @Child(name="class_", type={CodeableConcept.class}, order=3, min=0, max=1)
+ @Child(name = "class_", type = {CodeableConcept.class}, order = 3, min = 0, max = 1)
@Description(shortDefinition="Categorization of Composition", formalDefinition="A categorization for the type of the composition. This may be implied by or derived from the code specified in the Composition Type." )
protected CodeableConcept class_;
/**
* Official human-readable label for the composition.
*/
- @Child(name="title", type={StringType.class}, order=4, min=0, max=1)
+ @Child(name = "title", type = {StringType.class}, order = 4, min = 0, max = 1)
@Description(shortDefinition="Human Readable name/title", formalDefinition="Official human-readable label for the composition." )
protected StringType title;
/**
* The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document.
*/
- @Child(name="status", type={CodeType.class}, order=5, min=1, max=1)
+ @Child(name = "status", type = {CodeType.class}, order = 5, min = 1, max = 1)
@Description(shortDefinition="preliminary | final | appended | amended | entered-in-error", formalDefinition="The workflow/clinical status of this composition. The status is a marker for the clinical standing of the document." )
protected Enumeration status;
/**
* The code specifying the level of confidentiality of the Composition.
*/
- @Child(name="confidentiality", type={Coding.class}, order=6, min=1, max=1)
+ @Child(name = "confidentiality", type = {Coding.class}, order = 6, min = 1, max = 1)
@Description(shortDefinition="As defined by affinity domain", formalDefinition="The code specifying the level of confidentiality of the Composition." )
protected Coding confidentiality;
/**
* Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (I.e. machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure).
*/
- @Child(name="subject", type={Patient.class, Practitioner.class, Group.class, Device.class, Location.class}, order=7, min=1, max=1)
+ @Child(name = "subject", type = {Patient.class, Practitioner.class, Group.class, Device.class, Location.class}, order = 7, min = 1, max = 1)
@Description(shortDefinition="Who and/or what the composition is about", formalDefinition="Who or what the composition is about. The composition can be about a person, (patient or healthcare practitioner), a device (I.e. machine) or even a group of subjects (such as a document about a herd of livestock, or a set of patients that share a common exposure)." )
protected Reference subject;
@@ -959,7 +959,7 @@ public class Composition extends DomainResource {
/**
* Identifies who is responsible for the information in the composition. (Not necessarily who typed it in.).
*/
- @Child(name="author", type={Practitioner.class, Device.class, Patient.class, RelatedPerson.class}, order=8, min=1, max=Child.MAX_UNLIMITED)
+ @Child(name = "author", type = {Practitioner.class, Device.class, Patient.class, RelatedPerson.class}, order = 8, min = 1, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Who and/or what authored the composition", formalDefinition="Identifies who is responsible for the information in the composition. (Not necessarily who typed it in.)." )
protected List author;
/**
@@ -971,14 +971,14 @@ public class Composition extends DomainResource {
/**
* A participant who has attested to the accuracy of the composition/document.
*/
- @Child(name="attester", type={}, order=9, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "attester", type = {}, order = 9, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Attests to accuracy of composition", formalDefinition="A participant who has attested to the accuracy of the composition/document." )
protected List attester;
/**
* Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information.
*/
- @Child(name="custodian", type={Organization.class}, order=10, min=0, max=1)
+ @Child(name = "custodian", type = {Organization.class}, order = 10, min = 0, max = 1)
@Description(shortDefinition="Org which maintains the composition", formalDefinition="Identifies the organization or group who is responsible for ongoing maintenance of and access to the composition/document information." )
protected Reference custodian;
@@ -990,14 +990,14 @@ public class Composition extends DomainResource {
/**
* The clinical service, such as a colonoscopy or an appendectomy, being documented.
*/
- @Child(name="event", type={}, order=11, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "event", type = {}, order = 11, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="The clinical service(s) being documented", formalDefinition="The clinical service, such as a colonoscopy or an appendectomy, being documented." )
protected List event;
/**
* Describes the clinical encounter or type of care this documentation is associated with.
*/
- @Child(name="encounter", type={Encounter.class}, order=12, min=0, max=1)
+ @Child(name = "encounter", type = {Encounter.class}, order = 12, min = 0, max = 1)
@Description(shortDefinition="Context of the conposition", formalDefinition="Describes the clinical encounter or type of care this documentation is associated with." )
protected Reference encounter;
@@ -1009,7 +1009,7 @@ public class Composition extends DomainResource {
/**
* The root of the sections that make up the composition.
*/
- @Child(name="section", type={}, order=13, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "section", type = {}, order = 13, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Composition is broken into sections", formalDefinition="The root of the sections that make up the composition." )
protected List section;
@@ -1619,34 +1619,34 @@ public class Composition extends DomainResource {
@SearchParamDefinition(name="date", path="Composition.date", description="Composition editing time", type="date" )
public static final String SP_DATE = "date";
- @SearchParamDefinition(name="identifier", path="Composition.identifier", description="Logical identifier of composition (version-independent)", type="token" )
- public static final String SP_IDENTIFIER = "identifier";
- @SearchParamDefinition(name="period", path="Composition.event.period", description="The period covered by the documentation", type="date" )
- public static final String SP_PERIOD = "period";
- @SearchParamDefinition(name="subject", path="Composition.subject", description="Who and/or what the composition is about", type="reference" )
- public static final String SP_SUBJECT = "subject";
+ @SearchParamDefinition(name = "identifier", path = "Composition.identifier", description = "Logical identifier of composition (version-independent)", type = "token")
+ public static final String SP_IDENTIFIER = "identifier";
+ @SearchParamDefinition(name = "period", path = "Composition.event.period", description = "The period covered by the documentation", type = "date")
+ public static final String SP_PERIOD = "period";
+ @SearchParamDefinition(name = "subject", path = "Composition.subject", description = "Who and/or what the composition is about", type = "reference")
+ public static final String SP_SUBJECT = "subject";
@SearchParamDefinition(name="author", path="Composition.author", description="Who and/or what authored the composition", type="reference" )
public static final String SP_AUTHOR = "author";
- @SearchParamDefinition(name="confidentiality", path="Composition.confidentiality", description="As defined by affinity domain", type="token" )
- public static final String SP_CONFIDENTIALITY = "confidentiality";
- @SearchParamDefinition(name="section-code", path="Composition.section.code", description="Classification of section (recommended)", type="token" )
- public static final String SP_SECTIONCODE = "section-code";
- @SearchParamDefinition(name="section", path="Composition.section.content", description="The Content of the section", type="reference" )
- public static final String SP_SECTION = "section";
- @SearchParamDefinition(name="type", path="Composition.type", description="Kind of composition (LOINC if possible)", type="token" )
- public static final String SP_TYPE = "type";
+ @SearchParamDefinition(name = "confidentiality", path = "Composition.confidentiality", description = "As defined by affinity domain", type = "token")
+ public static final String SP_CONFIDENTIALITY = "confidentiality";
+ @SearchParamDefinition(name = "section-code", path = "Composition.section.code", description = "Classification of section (recommended)", type = "token")
+ public static final String SP_SECTIONCODE = "section-code";
+ @SearchParamDefinition(name = "section", path = "Composition.section.content", description = "The Content of the section", type = "reference")
+ public static final String SP_SECTION = "section";
+ @SearchParamDefinition(name = "type", path = "Composition.type", description = "Kind of composition (LOINC if possible)", type = "token")
+ public static final String SP_TYPE = "type";
@SearchParamDefinition(name="title", path="Composition.title", description="Human Readable name/title", type="string" )
public static final String SP_TITLE = "title";
@SearchParamDefinition(name="attester", path="Composition.attester.party", description="Who attested the composition", type="reference" )
public static final String SP_ATTESTER = "attester";
- @SearchParamDefinition(name="patient", path="Composition.subject", description="Who and/or what the composition is about", type="reference" )
- public static final String SP_PATIENT = "patient";
+ @SearchParamDefinition(name = "patient", path = "Composition.subject", description = "Who and/or what the composition is about", type = "reference")
+ public static final String SP_PATIENT = "patient";
@SearchParamDefinition(name="context", path="Composition.event.code", description="Code(s) that apply to the event being documented", type="token" )
public static final String SP_CONTEXT = "context";
- @SearchParamDefinition(name="class", path="Composition.class", description="Categorization of Composition", type="token" )
- public static final String SP_CLASS = "class";
- @SearchParamDefinition(name="status", path="Composition.status", description="preliminary | final | appended | amended | entered-in-error", type="token" )
- public static final String SP_STATUS = "status";
+ @SearchParamDefinition(name = "class", path = "Composition.class", description = "Categorization of Composition", type = "token")
+ public static final String SP_CLASS = "class";
+ @SearchParamDefinition(name = "status", path = "Composition.status", description = "preliminary | final | appended | amended | entered-in-error", type = "token")
+ public static final String SP_STATUS = "status";
}
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ConceptMap.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ConceptMap.java
index 99ab342b186..e14985dc0f1 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ConceptMap.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ConceptMap.java
@@ -1092,91 +1092,91 @@ public class ConceptMap extends DomainResource {
/**
* The identifier that is used to identify this concept map when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI).
*/
- @Child(name="identifier", type={StringType.class}, order=0, min=0, max=1)
+ @Child(name = "identifier", type = {StringType.class}, order = 0, min = 0, max = 1)
@Description(shortDefinition="Logical id to reference this concept map", formalDefinition="The identifier that is used to identify this concept map when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI)." )
protected StringType identifier;
/**
* The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.
*/
- @Child(name="version", type={StringType.class}, order=1, min=0, max=1)
+ @Child(name = "version", type = {StringType.class}, order = 1, min = 0, max = 1)
@Description(shortDefinition="Logical id for this version of the concept map", formalDefinition="The identifier that is used to identify this version of the concept map when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp." )
protected StringType version;
/**
* A free text natural language name describing the concept map.
*/
- @Child(name="name", type={StringType.class}, order=2, min=0, max=1)
+ @Child(name = "name", type = {StringType.class}, order = 2, min = 0, max = 1)
@Description(shortDefinition="Informal name for this concept map", formalDefinition="A free text natural language name describing the concept map." )
protected StringType name;
/**
* The name of the individual or organization that published the concept map.
*/
- @Child(name="publisher", type={StringType.class}, order=3, min=0, max=1)
+ @Child(name = "publisher", type = {StringType.class}, order = 3, min = 0, max = 1)
@Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the concept map." )
protected StringType publisher;
/**
* Contacts of the publisher to assist a user in finding and communicating with the publisher.
*/
- @Child(name="telecom", type={ContactPoint.class}, order=4, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "telecom", type = {ContactPoint.class}, order = 4, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Contact information of the publisher", formalDefinition="Contacts of the publisher to assist a user in finding and communicating with the publisher." )
protected List telecom;
/**
* A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc.
*/
- @Child(name="description", type={StringType.class}, order=5, min=0, max=1)
+ @Child(name = "description", type = {StringType.class}, order = 5, min = 0, max = 1)
@Description(shortDefinition="Human language description of the concept map", formalDefinition="A free text natural language description of the use of the concept map - reason for definition, conditions of use, etc." )
protected StringType description;
/**
* A copyright statement relating to the concept map and/or its contents.
*/
- @Child(name="copyright", type={StringType.class}, order=6, min=0, max=1)
+ @Child(name = "copyright", type = {StringType.class}, order = 6, min = 0, max = 1)
@Description(shortDefinition="About the concept map or its content", formalDefinition="A copyright statement relating to the concept map and/or its contents." )
protected StringType copyright;
/**
* The status of the concept map.
*/
- @Child(name="status", type={CodeType.class}, order=7, min=1, max=1)
+ @Child(name = "status", type = {CodeType.class}, order = 7, min = 1, max = 1)
@Description(shortDefinition="draft | active | retired", formalDefinition="The status of the concept map." )
protected Enumeration status;
/**
* This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
*/
- @Child(name="experimental", type={BooleanType.class}, order=8, min=0, max=1)
+ @Child(name = "experimental", type = {BooleanType.class}, order = 8, min = 0, max = 1)
@Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This ConceptMap was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." )
protected BooleanType experimental;
/**
* The date that the concept map status was last changed.
*/
- @Child(name="date", type={DateTimeType.class}, order=9, min=0, max=1)
+ @Child(name = "date", type = {DateTimeType.class}, order = 9, min = 0, max = 1)
@Description(shortDefinition="Date for given status", formalDefinition="The date that the concept map status was last changed." )
protected DateTimeType date;
/**
* The source value set that specifies the concepts that are being mapped.
*/
- @Child(name="source", type={UriType.class, ValueSet.class, Profile.class}, order=10, min=1, max=1)
+ @Child(name = "source", type = {UriType.class, ValueSet.class, Profile.class}, order = 10, min = 1, max = 1)
@Description(shortDefinition="Identifies the source of the concepts which are being mapped", formalDefinition="The source value set that specifies the concepts that are being mapped." )
protected Type source;
/**
* The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made.
*/
- @Child(name="target", type={UriType.class, ValueSet.class, Profile.class}, order=11, min=1, max=1)
+ @Child(name = "target", type = {UriType.class, ValueSet.class, Profile.class}, order = 11, min = 1, max = 1)
@Description(shortDefinition="Provides context to the mappings", formalDefinition="The target value set provides context to the mappings. Note that the mapping is made between concepts, not between value sets, but the value set provides important context about how the concept mapping choices are made." )
protected Type target;
/**
* Mappings for an individual concept in the source to one or more concepts in the target.
*/
- @Child(name="element", type={}, order=12, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "element", type = {}, order = 12, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Mappings for a concept from the source set", formalDefinition="Mappings for an individual concept in the source to one or more concepts in the target." )
protected List element;
@@ -1849,30 +1849,30 @@ public class ConceptMap extends DomainResource {
return ResourceType.ConceptMap;
}
- @SearchParamDefinition(name="date", path="ConceptMap.date", description="The concept map publication date", type="date" )
- public static final String SP_DATE = "date";
- @SearchParamDefinition(name="identifier", path="ConceptMap.identifier", description="The identifier of the concept map", type="token" )
- public static final String SP_IDENTIFIER = "identifier";
+ @SearchParamDefinition(name = "date", path = "ConceptMap.date", description = "The concept map publication date", type = "date")
+ public static final String SP_DATE = "date";
+ @SearchParamDefinition(name = "identifier", path = "ConceptMap.identifier", description = "The identifier of the concept map", type = "token")
+ public static final String SP_IDENTIFIER = "identifier";
@SearchParamDefinition(name="product", path="ConceptMap.element.map.product.element", description="Reference to element/field/valueset mapping depends on", type="token" )
public static final String SP_PRODUCT = "product";
@SearchParamDefinition(name="system", path="ConceptMap.element.map.codeSystem", description="The system for any destination concepts mapped by this map", type="token" )
public static final String SP_SYSTEM = "system";
- @SearchParamDefinition(name="dependson", path="ConceptMap.element.dependsOn.element", description="Reference to element/field/valueset mapping depends on", type="token" )
- public static final String SP_DEPENDSON = "dependson";
+ @SearchParamDefinition(name = "dependson", path = "ConceptMap.element.dependsOn.element", description = "Reference to element/field/valueset mapping depends on", type = "token")
+ public static final String SP_DEPENDSON = "dependson";
@SearchParamDefinition(name="name", path="ConceptMap.name", description="Name of the concept map", type="string" )
public static final String SP_NAME = "name";
@SearchParamDefinition(name="publisher", path="ConceptMap.publisher", description="Name of the publisher of the concept map", type="string" )
public static final String SP_PUBLISHER = "publisher";
- @SearchParamDefinition(name="description", path="ConceptMap.description", description="Text search in the description of the concept map", type="string" )
- public static final String SP_DESCRIPTION = "description";
- @SearchParamDefinition(name="source", path="ConceptMap.source[x]", description="The system for any concepts mapped by this concept map", type="reference" )
- public static final String SP_SOURCE = "source";
+ @SearchParamDefinition(name = "description", path = "ConceptMap.description", description = "Text search in the description of the concept map", type = "string")
+ public static final String SP_DESCRIPTION = "description";
+ @SearchParamDefinition(name = "source", path = "ConceptMap.source[x]", description = "The system for any concepts mapped by this concept map", type = "reference")
+ public static final String SP_SOURCE = "source";
@SearchParamDefinition(name="version", path="ConceptMap.version", description="The version identifier of the concept map", type="token" )
public static final String SP_VERSION = "version";
- @SearchParamDefinition(name="status", path="ConceptMap.status", description="Status of the concept map", type="token" )
- public static final String SP_STATUS = "status";
- @SearchParamDefinition(name="target", path="ConceptMap.target[x]", description="Provides context to the mappings", type="reference" )
- public static final String SP_TARGET = "target";
+ @SearchParamDefinition(name = "status", path = "ConceptMap.status", description = "Status of the concept map", type = "token")
+ public static final String SP_STATUS = "status";
+ @SearchParamDefinition(name = "target", path = "ConceptMap.target[x]", description = "Provides context to the mappings", type = "reference")
+ public static final String SP_TARGET = "target";
}
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Condition.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Condition.java
index 6d6ab86331e..da9c9a247dc 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Condition.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Condition.java
@@ -818,14 +818,14 @@ public class Condition extends DomainResource {
/**
* This records identifiers associated with this condition that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation).
*/
- @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="External Ids for this condition", formalDefinition="This records identifiers associated with this condition that are defined by business processed and/ or used to refer to it when a direct URL reference to the resource itself is not appropriate (e.g. in CDA documents, or in written / printed documentation)." )
protected List identifier;
/**
* Indicates the patient who the condition record is associated with.
*/
- @Child(name="subject", type={Patient.class}, order=1, min=1, max=1)
+ @Child(name = "subject", type = {Patient.class}, order = 1, min = 1, max = 1)
@Description(shortDefinition="Who has the condition?", formalDefinition="Indicates the patient who the condition record is associated with." )
protected Reference subject;
@@ -837,7 +837,7 @@ public class Condition extends DomainResource {
/**
* Encounter during which the condition was first asserted.
*/
- @Child(name="encounter", type={Encounter.class}, order=2, min=0, max=1)
+ @Child(name = "encounter", type = {Encounter.class}, order = 2, min = 0, max = 1)
@Description(shortDefinition="Encounter when condition first asserted", formalDefinition="Encounter during which the condition was first asserted." )
protected Reference encounter;
@@ -849,7 +849,7 @@ public class Condition extends DomainResource {
/**
* Person who takes responsibility for asserting the existence of the condition as part of the electronic record.
*/
- @Child(name="asserter", type={Practitioner.class, Patient.class}, order=3, min=0, max=1)
+ @Child(name = "asserter", type = {Practitioner.class, Patient.class}, order = 3, min = 0, max = 1)
@Description(shortDefinition="Person who asserts this condition", formalDefinition="Person who takes responsibility for asserting the existence of the condition as part of the electronic record." )
protected Reference asserter;
@@ -861,98 +861,98 @@ public class Condition extends DomainResource {
/**
* Estimated or actual date the condition/problem/diagnosis was first detected/suspected.
*/
- @Child(name="dateAsserted", type={DateType.class}, order=4, min=0, max=1)
+ @Child(name = "dateAsserted", type = {DateType.class}, order = 4, min = 0, max = 1)
@Description(shortDefinition="When first detected/suspected/entered", formalDefinition="Estimated or actual date the condition/problem/diagnosis was first detected/suspected." )
protected DateType dateAsserted;
/**
* Identification of the condition, problem or diagnosis.
*/
- @Child(name="code", type={CodeableConcept.class}, order=5, min=1, max=1)
+ @Child(name = "code", type = {CodeableConcept.class}, order = 5, min = 1, max = 1)
@Description(shortDefinition="Identification of the condition, problem or diagnosis", formalDefinition="Identification of the condition, problem or diagnosis." )
protected CodeableConcept code;
/**
* A category assigned to the condition. E.g. complaint | symptom | finding | diagnosis.
*/
- @Child(name="category", type={CodeableConcept.class}, order=6, min=0, max=1)
+ @Child(name = "category", type = {CodeableConcept.class}, order = 6, min = 0, max = 1)
@Description(shortDefinition="E.g. complaint | symptom | finding | diagnosis", formalDefinition="A category assigned to the condition. E.g. complaint | symptom | finding | diagnosis." )
protected CodeableConcept category;
/**
* The clinical status of the condition.
*/
- @Child(name="status", type={CodeType.class}, order=7, min=1, max=1)
+ @Child(name = "status", type = {CodeType.class}, order = 7, min = 1, max = 1)
@Description(shortDefinition="provisional | working | confirmed | refuted", formalDefinition="The clinical status of the condition." )
protected Enumeration status;
/**
* The degree of confidence that this condition is correct.
*/
- @Child(name="certainty", type={CodeableConcept.class}, order=8, min=0, max=1)
+ @Child(name = "certainty", type = {CodeableConcept.class}, order = 8, min = 0, max = 1)
@Description(shortDefinition="Degree of confidence", formalDefinition="The degree of confidence that this condition is correct." )
protected CodeableConcept certainty;
/**
* A subjective assessment of the severity of the condition as evaluated by the clinician.
*/
- @Child(name="severity", type={CodeableConcept.class}, order=9, min=0, max=1)
+ @Child(name = "severity", type = {CodeableConcept.class}, order = 9, min = 0, max = 1)
@Description(shortDefinition="Subjective severity of condition", formalDefinition="A subjective assessment of the severity of the condition as evaluated by the clinician." )
protected CodeableConcept severity;
/**
* Estimated or actual date or date-time the condition began, in the opinion of the clinician.
*/
- @Child(name="onset", type={DateTimeType.class, Age.class}, order=10, min=0, max=1)
+ @Child(name = "onset", type = {DateTimeType.class, Age.class}, order = 10, min = 0, max = 1)
@Description(shortDefinition="Estimated or actual date, date-time, or age", formalDefinition="Estimated or actual date or date-time the condition began, in the opinion of the clinician." )
protected Type onset;
/**
* The date or estimated date that the condition resolved or went into remission. This is called "abatement" because of the many overloaded connotations associated with "remission" or "resolution" - Conditions are never really resolved, but they can abate.
*/
- @Child(name="abatement", type={DateType.class, Age.class, BooleanType.class}, order=11, min=0, max=1)
+ @Child(name = "abatement", type = {DateType.class, Age.class, BooleanType.class}, order = 11, min = 0, max = 1)
@Description(shortDefinition="If/when in resolution/remission", formalDefinition="The date or estimated date that the condition resolved or went into remission. This is called 'abatement' because of the many overloaded connotations associated with 'remission' or 'resolution' - Conditions are never really resolved, but they can abate." )
protected Type abatement;
/**
* Clinical stage or grade of a condition. May include formal severity assessments.
*/
- @Child(name="stage", type={}, order=12, min=0, max=1)
+ @Child(name = "stage", type = {}, order = 12, min = 0, max = 1)
@Description(shortDefinition="Stage/grade, usually assessed formally", formalDefinition="Clinical stage or grade of a condition. May include formal severity assessments." )
protected ConditionStageComponent stage;
/**
* Supporting Evidence / manifestations that are the basis on which this condition is suspected or confirmed.
*/
- @Child(name="evidence", type={}, order=13, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "evidence", type = {}, order = 13, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Supporting evidence", formalDefinition="Supporting Evidence / manifestations that are the basis on which this condition is suspected or confirmed." )
protected List evidence;
/**
* The anatomical location where this condition manifests itself.
*/
- @Child(name="location", type={}, order=14, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "location", type = {}, order = 14, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Anatomical location, if relevant", formalDefinition="The anatomical location where this condition manifests itself." )
protected List location;
/**
* Further conditions, problems, diagnoses, procedures or events or the substance that caused/triggered this Condition.
*/
- @Child(name="dueTo", type={}, order=15, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "dueTo", type = {}, order = 15, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Causes for this Condition", formalDefinition="Further conditions, problems, diagnoses, procedures or events or the substance that caused/triggered this Condition." )
protected List dueTo;
/**
* Further conditions, problems, diagnoses, procedures or events or the substance that preceded this Condition.
*/
- @Child(name="occurredFollowing", type={}, order=16, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "occurredFollowing", type = {}, order = 16, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Precedent for this Condition", formalDefinition="Further conditions, problems, diagnoses, procedures or events or the substance that preceded this Condition." )
protected List occurredFollowing;
/**
* Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis.
*/
- @Child(name="notes", type={StringType.class}, order=17, min=0, max=1)
+ @Child(name = "notes", type = {StringType.class}, order = 17, min = 0, max = 1)
@Description(shortDefinition="Additional information about the Condition", formalDefinition="Additional information about the Condition. This is a general notes/comments entry for description of the Condition, its diagnosis and prognosis." )
protected StringType notes;
@@ -1709,35 +1709,35 @@ public class Condition extends DomainResource {
public static final String SP_SEVERITY = "severity";
@SearchParamDefinition(name="code", path="Condition.code", description="Code for the condition", type="token" )
public static final String SP_CODE = "code";
- @SearchParamDefinition(name="evidence", path="Condition.evidence.code", description="Manifestation/symptom", type="token" )
+ @SearchParamDefinition(name = "evidence", path = "Condition.evidence.code", description = "Manifestation/symptom", type = "token")
public static final String SP_EVIDENCE = "evidence";
@SearchParamDefinition(name="date-asserted", path="Condition.dateAsserted", description="When first detected/suspected/entered", type="date" )
public static final String SP_DATEASSERTED = "date-asserted";
- @SearchParamDefinition(name="subject", path="Condition.subject", description="Who has the condition?", type="reference" )
+ @SearchParamDefinition(name = "subject", path = "Condition.subject", description = "Who has the condition?", type = "reference")
public static final String SP_SUBJECT = "subject";
- @SearchParamDefinition(name="dueto-item", path="Condition.dueTo.target", description="Relationship target resource", type="reference" )
+ @SearchParamDefinition(name = "dueto-item", path = "Condition.dueTo.target", description = "Relationship target resource", type = "reference")
public static final String SP_DUETOITEM = "dueto-item";
- @SearchParamDefinition(name="encounter", path="Condition.encounter", description="Encounter when condition first asserted", type="reference" )
+ @SearchParamDefinition(name = "encounter", path = "Condition.encounter", description = "Encounter when condition first asserted", type = "reference")
public static final String SP_ENCOUNTER = "encounter";
- @SearchParamDefinition(name="onset", path="Condition.onset[x]", description="When the Condition started (if started on a date)", type="date" )
+ @SearchParamDefinition(name = "onset", path = "Condition.onset[x]", description = "When the Condition started (if started on a date)", type = "date")
public static final String SP_ONSET = "onset";
- @SearchParamDefinition(name="asserter", path="Condition.asserter", description="Person who asserts this condition", type="reference" )
+ @SearchParamDefinition(name = "asserter", path = "Condition.asserter", description = "Person who asserts this condition", type = "reference")
public static final String SP_ASSERTER = "asserter";
@SearchParamDefinition(name="stage", path="Condition.stage.summary", description="Simple summary (disease specific)", type="token" )
public static final String SP_STAGE = "stage";
- @SearchParamDefinition(name="following-item", path="Condition.occurredFollowing.target", description="Relationship target resource", type="reference" )
+ @SearchParamDefinition(name = "following-item", path = "Condition.occurredFollowing.target", description = "Relationship target resource", type = "reference")
public static final String SP_FOLLOWINGITEM = "following-item";
@SearchParamDefinition(name="patient", path="Condition.subject", description="Who has the condition?", type="reference" )
public static final String SP_PATIENT = "patient";
- @SearchParamDefinition(name="dueto-code", path="Condition.dueTo.codeableConcept", description="Relationship target by means of a predefined code", type="token" )
+ @SearchParamDefinition(name = "dueto-code", path = "Condition.dueTo.codeableConcept", description = "Relationship target by means of a predefined code", type = "token")
public static final String SP_DUETOCODE = "dueto-code";
- @SearchParamDefinition(name="location", path="Condition.location.code", description="Location - may include laterality", type="token" )
+ @SearchParamDefinition(name = "location", path = "Condition.location.code", description = "Location - may include laterality", type = "token")
public static final String SP_LOCATION = "location";
- @SearchParamDefinition(name="category", path="Condition.category", description="The category of the condition", type="token" )
+ @SearchParamDefinition(name = "category", path = "Condition.category", description = "The category of the condition", type = "token")
public static final String SP_CATEGORY = "category";
- @SearchParamDefinition(name="following-code", path="Condition.occurredFollowing.codeableConcept", description="Relationship target by means of a predefined code", type="token" )
+ @SearchParamDefinition(name = "following-code", path = "Condition.occurredFollowing.codeableConcept", description = "Relationship target by means of a predefined code", type = "token")
public static final String SP_FOLLOWINGCODE = "following-code";
- @SearchParamDefinition(name="status", path="Condition.status", description="The status of the condition", type="token" )
+ @SearchParamDefinition(name = "status", path = "Condition.status", description = "The status of the condition", type = "token")
public static final String SP_STATUS = "status";
}
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Conformance.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Conformance.java
index 9f857e107e8..86997a8702c 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Conformance.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Conformance.java
@@ -169,15 +169,19 @@ public class Conformance extends DomainResource {
}
public String getDefinition() {
switch (this) {
- case CLIENT: return "The application acts as a client for this resource.";
- case SERVER: return "The application acts as a server for this resource.";
+ case CLIENT:
+ return "The application acts as a client for this resource.";
+ case SERVER:
+ return "The application acts as a server for this resource.";
default: return "?";
}
}
public String getDisplay() {
switch (this) {
- case CLIENT: return "Client";
- case SERVER: return "Server";
+ case CLIENT:
+ return "Client";
+ case SERVER:
+ return "Server";
default: return "?";
}
}
@@ -4621,105 +4625,105 @@ public class Conformance extends DomainResource {
/**
* The identifier that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI).
*/
- @Child(name="identifier", type={StringType.class}, order=0, min=0, max=1)
+ @Child(name = "identifier", type = {StringType.class}, order = 0, min = 0, max = 1)
@Description(shortDefinition="Logical id to reference this statement", formalDefinition="The identifier that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI)." )
protected StringType identifier;
/**
* The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp.
*/
- @Child(name="version", type={StringType.class}, order=1, min=0, max=1)
+ @Child(name = "version", type = {StringType.class}, order = 1, min = 0, max = 1)
@Description(shortDefinition="Logical id for this version of the statement", formalDefinition="The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp." )
protected StringType version;
/**
* A free text natural language name identifying the conformance statement.
*/
- @Child(name="name", type={StringType.class}, order=2, min=0, max=1)
+ @Child(name = "name", type = {StringType.class}, order = 2, min = 0, max = 1)
@Description(shortDefinition="Informal name for this conformance statement", formalDefinition="A free text natural language name identifying the conformance statement." )
protected StringType name;
/**
* Name of Organization publishing this conformance statement.
*/
- @Child(name="publisher", type={StringType.class}, order=3, min=1, max=1)
+ @Child(name = "publisher", type = {StringType.class}, order = 3, min = 1, max = 1)
@Description(shortDefinition="Publishing Organization", formalDefinition="Name of Organization publishing this conformance statement." )
protected StringType publisher;
/**
* Contacts for Organization relevant to this conformance statement. The contacts may be a website, email, phone numbers, etc.
*/
- @Child(name="telecom", type={ContactPoint.class}, order=4, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "telecom", type = {ContactPoint.class}, order = 4, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Contacts for Organization", formalDefinition="Contacts for Organization relevant to this conformance statement. The contacts may be a website, email, phone numbers, etc." )
protected List telecom;
/**
* A free text natural language description of the conformance statement and its use. Typically, this is used when the profile describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP.
*/
- @Child(name="description", type={StringType.class}, order=5, min=0, max=1)
+ @Child(name = "description", type = {StringType.class}, order = 5, min = 0, max = 1)
@Description(shortDefinition="Human description of the conformance statement", formalDefinition="A free text natural language description of the conformance statement and its use. Typically, this is used when the profile describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP." )
protected StringType description;
/**
* The status of this conformance statement.
*/
- @Child(name="status", type={CodeType.class}, order=6, min=0, max=1)
+ @Child(name = "status", type = {CodeType.class}, order = 6, min = 0, max = 1)
@Description(shortDefinition="draft | active | retired", formalDefinition="The status of this conformance statement." )
protected Enumeration status;
/**
* A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.
*/
- @Child(name="experimental", type={BooleanType.class}, order=7, min=0, max=1)
+ @Child(name = "experimental", type = {BooleanType.class}, order = 7, min = 0, max = 1)
@Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." )
protected BooleanType experimental;
/**
* The date (and optionally time) when the conformance statement was published.
*/
- @Child(name="date", type={DateTimeType.class}, order=8, min=1, max=1)
+ @Child(name = "date", type = {DateTimeType.class}, order = 8, min = 1, max = 1)
@Description(shortDefinition="Publication Date(/time)", formalDefinition="The date (and optionally time) when the conformance statement was published." )
protected DateTimeType date;
/**
* 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.
*/
- @Child(name="software", type={}, order=9, min=0, max=1)
+ @Child(name = "software", type = {}, order = 9, min = 0, max = 1)
@Description(shortDefinition="Software that is covered by this conformance statement", formalDefinition="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." )
protected ConformanceSoftwareComponent software;
/**
* 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.
*/
- @Child(name="implementation", type={}, order=10, min=0, max=1)
+ @Child(name = "implementation", type = {}, order = 10, min = 0, max = 1)
@Description(shortDefinition="If this describes a specific instance", formalDefinition="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." )
protected ConformanceImplementationComponent implementation;
/**
* The version of the FHIR specification on which this conformance statement is based.
*/
- @Child(name="fhirVersion", type={IdType.class}, order=11, min=1, max=1)
+ @Child(name = "fhirVersion", type = {IdType.class}, order = 11, min = 1, max = 1)
@Description(shortDefinition="FHIR Version", formalDefinition="The version of the FHIR specification on which this conformance statement is based." )
protected IdType fhirVersion;
/**
* A flag that indicates whether the application accepts unknown elements as part of a resource.
*/
- @Child(name="acceptUnknown", type={BooleanType.class}, order=12, min=1, max=1)
+ @Child(name = "acceptUnknown", type = {BooleanType.class}, order = 12, min = 1, max = 1)
@Description(shortDefinition="True if application accepts unknown elements", formalDefinition="A flag that indicates whether the application accepts unknown elements as part of a resource." )
protected BooleanType acceptUnknown;
/**
* A list of the formats supported by this implementation.
*/
- @Child(name="format", type={CodeType.class}, order=13, min=1, max=Child.MAX_UNLIMITED)
+ @Child(name = "format", type = {CodeType.class}, order = 13, min = 1, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="formats supported (xml | json | mime type)", formalDefinition="A list of the formats supported by this implementation." )
protected List format;
/**
* A list of profiles supported by the system. For a server, "supported by the system" means the system hosts/produces a set of resources, conformant to a particular profile, and allows its clients to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile.
*/
- @Child(name="profile", type={Profile.class}, order=14, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "profile", type = {Profile.class}, order = 14, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Profiles supported by the system", formalDefinition="A list of profiles supported by the system. For a server, 'supported by the system' means the system hosts/produces a set of resources, conformant to a particular profile, and allows its clients to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile." )
protected List profile;
/**
@@ -4731,21 +4735,21 @@ public class Conformance extends DomainResource {
/**
* A definition of the restful capabilities of the solution, if any.
*/
- @Child(name="rest", type={}, order=15, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "rest", type = {}, order = 15, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="If the endpoint is a RESTful one", formalDefinition="A definition of the restful capabilities of the solution, if any." )
protected List rest;
/**
* A description of the messaging capabilities of the solution.
*/
- @Child(name="messaging", type={}, order=16, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "messaging", type = {}, order = 16, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="If messaging is supported", formalDefinition="A description of the messaging capabilities of the solution." )
protected List messaging;
/**
* A document definition.
*/
- @Child(name="document", type={}, order=17, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "document", type = {}, order = 17, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Document definition", formalDefinition="A document definition." )
protected List document;
@@ -5625,38 +5629,38 @@ public class Conformance extends DomainResource {
return ResourceType.Conformance;
}
- @SearchParamDefinition(name="date", path="Conformance.date", description="The conformance statement publication date", type="date" )
- public static final String SP_DATE = "date";
- @SearchParamDefinition(name="identifier", path="Conformance.identifier", description="The identifier of the conformance statement", type="token" )
- public static final String SP_IDENTIFIER = "identifier";
- @SearchParamDefinition(name="software", path="Conformance.software.name", description="Part of a the name of a software application", type="string" )
- public static final String SP_SOFTWARE = "software";
+ @SearchParamDefinition(name = "date", path = "Conformance.date", description = "The conformance statement publication date", type = "date")
+ public static final String SP_DATE = "date";
+ @SearchParamDefinition(name = "identifier", path = "Conformance.identifier", description = "The identifier of the conformance statement", type = "token")
+ public static final String SP_IDENTIFIER = "identifier";
+ @SearchParamDefinition(name = "software", path = "Conformance.software.name", description = "Part of a the name of a software application", type = "string")
+ public static final String SP_SOFTWARE = "software";
@SearchParamDefinition(name="resource", path="Conformance.rest.resource.type", description="Name of a resource mentioned in a conformance statement", type="token" )
public static final String SP_RESOURCE = "resource";
- @SearchParamDefinition(name="profile", path="Conformance.rest.resource.profile", description="A profile id invoked in a conformance statement", type="reference" )
- public static final String SP_PROFILE = "profile";
+ @SearchParamDefinition(name = "profile", path = "Conformance.rest.resource.profile", description = "A profile id invoked in a conformance statement", type = "reference")
+ public static final String SP_PROFILE = "profile";
@SearchParamDefinition(name="format", path="Conformance.format", description="formats supported (xml | json | mime type)", type="token" )
public static final String SP_FORMAT = "format";
- @SearchParamDefinition(name="description", path="Conformance.description", description="Text search in the description of the conformance statement", type="string" )
- public static final String SP_DESCRIPTION = "description";
- @SearchParamDefinition(name="fhirversion", path="Conformance.version", description="The version of FHIR", type="token" )
- public static final String SP_FHIRVERSION = "fhirversion";
+ @SearchParamDefinition(name = "description", path = "Conformance.description", description = "Text search in the description of the conformance statement", type = "string")
+ public static final String SP_DESCRIPTION = "description";
+ @SearchParamDefinition(name = "fhirversion", path = "Conformance.version", description = "The version of FHIR", type = "token")
+ public static final String SP_FHIRVERSION = "fhirversion";
@SearchParamDefinition(name="version", path="Conformance.version", description="The version identifier of the conformance statement", type="token" )
public static final String SP_VERSION = "version";
- @SearchParamDefinition(name="supported-profile", path="Conformance.profile", description="Profiles supported by the system", type="reference" )
- public static final String SP_SUPPORTEDPROFILE = "supported-profile";
+ @SearchParamDefinition(name = "supported-profile", path = "Conformance.profile", description = "Profiles supported by the system", type = "reference")
+ public static final String SP_SUPPORTEDPROFILE = "supported-profile";
@SearchParamDefinition(name="mode", path="Conformance.rest.mode", description="Mode - restful (server/client) or messaging (sender/receiver)", type="token" )
public static final String SP_MODE = "mode";
- @SearchParamDefinition(name="security", path="Conformance.rest.security", description="Information about security of implementation", type="token" )
- public static final String SP_SECURITY = "security";
+ @SearchParamDefinition(name = "security", path = "Conformance.rest.security", description = "Information about security of implementation", type = "token")
+ public static final String SP_SECURITY = "security";
@SearchParamDefinition(name="name", path="Conformance.name", description="Name of the conformance statement", type="string" )
public static final String SP_NAME = "name";
- @SearchParamDefinition(name="publisher", path="Conformance.publisher", description="Name of the publisher of the conformance statement", type="string" )
- public static final String SP_PUBLISHER = "publisher";
- @SearchParamDefinition(name="event", path="Conformance.messaging.event.code", description="Event code in a conformance statement", type="token" )
- public static final String SP_EVENT = "event";
- @SearchParamDefinition(name="status", path="Conformance.status", description="The current status of the conformance statement", type="token" )
- public static final String SP_STATUS = "status";
+ @SearchParamDefinition(name = "publisher", path = "Conformance.publisher", description = "Name of the publisher of the conformance statement", type = "string")
+ public static final String SP_PUBLISHER = "publisher";
+ @SearchParamDefinition(name = "event", path = "Conformance.messaging.event.code", description = "Event code in a conformance statement", type = "token")
+ public static final String SP_EVENT = "event";
+ @SearchParamDefinition(name = "status", path = "Conformance.status", description = "The current status of the conformance statement", type = "token")
+ public static final String SP_STATUS = "status";
}
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Constants.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Constants.java
index b99b1af2756..1838393b536 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Constants.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Constants.java
@@ -35,6 +35,6 @@ package org.hl7.fhir.instance.model;
public class Constants {
public final static String VERSION = "0.4.0";
- public final static String REVISION = "4117";
- public final static String DATE = "Wed Feb 18 12:09:23 EST 2015";
+ public final static String REVISION = "4117";
+ public final static String DATE = "Wed Feb 18 12:09:23 EST 2015";
}
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ContactPoint.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ContactPoint.java
index 91571b84f9c..e8fabd25cec 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ContactPoint.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/ContactPoint.java
@@ -41,7 +41,7 @@ import org.hl7.fhir.instance.model.annotations.DatatypeDef;
* Details for All kinds of technology mediated contact points for a person or organization, including telephone, email, etc.
*/
@DatatypeDef(name="ContactPoint")
-public class ContactPoint extends Type implements ICompositeType {
+public class ContactPoint extends Type implements ICompositeType {
public enum ContactPointSystem {
/**
@@ -260,28 +260,28 @@ public class ContactPoint extends Type implements ICompositeType {
/**
* Telecommunications form for contact point - what communications system is required to make use of the contact.
*/
- @Child(name="system", type={CodeType.class}, order=0, min=0, max=1)
+ @Child(name = "system", type = {CodeType.class}, order = 0, min = 0, max = 1)
@Description(shortDefinition="phone | fax | email | url", formalDefinition="Telecommunications form for contact point - what communications system is required to make use of the contact." )
protected Enumeration system;
/**
* The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address).
*/
- @Child(name="value", type={StringType.class}, order=1, min=0, max=1)
+ @Child(name = "value", type = {StringType.class}, order = 1, min = 0, max = 1)
@Description(shortDefinition="The actual contact point details", formalDefinition="The actual contact point details, in a form that is meaningful to the designated communication system (i.e. phone number or email address)." )
protected StringType value;
/**
* Identifies the purpose for the contact point.
*/
- @Child(name="use", type={CodeType.class}, order=2, min=0, max=1)
+ @Child(name = "use", type = {CodeType.class}, order = 2, min = 0, max = 1)
@Description(shortDefinition="home | work | temp | old | mobile - purpose of this contact point", formalDefinition="Identifies the purpose for the contact point." )
protected Enumeration use;
/**
* Time period when the contact point was/is in use.
*/
- @Child(name="period", type={Period.class}, order=3, min=0, max=1)
+ @Child(name = "period", type = {Period.class}, order = 3, min = 0, max = 1)
@Description(shortDefinition="Time period when the contact point was/is in use", formalDefinition="Time period when the contact point was/is in use." )
protected Period period;
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Contract.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Contract.java
index 9a666f4160b..731baca1a56 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Contract.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Contract.java
@@ -765,14 +765,14 @@ public class Contract extends DomainResource {
/**
* Unique Id for this contract.
*/
- @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Contract identifier", formalDefinition="Unique Id for this contract." )
protected List identifier;
/**
* Who and/or what this is about: typically Patient, Organization, property.
*/
- @Child(name="subject", type={}, order=1, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "subject", type = {}, order = 1, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Subject", formalDefinition="Who and/or what this is about: typically Patient, Organization, property." )
protected List subject;
/**
@@ -784,7 +784,7 @@ public class Contract extends DomainResource {
/**
* A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc.
*/
- @Child(name="authority", type={Organization.class}, order=2, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "authority", type = {Organization.class}, order = 2, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Authority", formalDefinition="A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action. Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, etc." )
protected List authority;
/**
@@ -796,7 +796,7 @@ public class Contract extends DomainResource {
/**
* A Location includes both incidental locations (a place which is used for healthcare without prior designation or authorization) and dedicated, formally appointed locations.
*/
- @Child(name="domain", type={Location.class}, order=3, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "domain", type = {Location.class}, order = 3, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Domain", formalDefinition="A Location includes both incidental locations (a place which is used for healthcare without prior designation or authorization) and dedicated, formally appointed locations." )
protected List domain;
/**
@@ -808,70 +808,70 @@ public class Contract extends DomainResource {
/**
* Type of contract (Privacy-Security, Agreement, Insurance).
*/
- @Child(name="type", type={CodeableConcept.class}, order=4, min=0, max=1)
+ @Child(name = "type", type = {CodeableConcept.class}, order = 4, min = 0, max = 1)
@Description(shortDefinition="Type of contract", formalDefinition="Type of contract (Privacy-Security, Agreement, Insurance)." )
protected CodeableConcept type;
/**
* More specific type of contract (Privacy, Disclosure-Authorization, Advanced-Directive, DNR, Authorization-to-Treat).
*/
- @Child(name="subtype", type={CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "subtype", type = {CodeableConcept.class}, order = 5, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Subtype of contract", formalDefinition="More specific type of contract (Privacy, Disclosure-Authorization, Advanced-Directive, DNR, Authorization-to-Treat)." )
protected List subtype;
/**
* When this was issued.
*/
- @Child(name="issued", type={DateTimeType.class}, order=6, min=0, max=1)
+ @Child(name = "issued", type = {DateTimeType.class}, order = 6, min = 0, max = 1)
@Description(shortDefinition="When this was issued", formalDefinition="When this was issued." )
protected DateTimeType issued;
/**
* Relevant time/time-period when applicable.
*/
- @Child(name="applies", type={Period.class}, order=7, min=0, max=1)
+ @Child(name = "applies", type = {Period.class}, order = 7, min = 0, max = 1)
@Description(shortDefinition="Effective time", formalDefinition="Relevant time/time-period when applicable." )
protected Period applies;
/**
* The number of repetitions of a service or product.
*/
- @Child(name="quantity", type={Quantity.class}, order=8, min=0, max=1)
+ @Child(name = "quantity", type = {Quantity.class}, order = 8, min = 0, max = 1)
@Description(shortDefinition="Count of Products or Services", formalDefinition="The number of repetitions of a service or product." )
protected Quantity quantity;
/**
* The unit price product.
*/
- @Child(name="unitPrice", type={Money.class}, order=9, min=0, max=1)
+ @Child(name = "unitPrice", type = {Money.class}, order = 9, min = 0, max = 1)
@Description(shortDefinition="Fee, charge or cost per point", formalDefinition="The unit price product." )
protected Money unitPrice;
/**
* A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount.
*/
- @Child(name="factor", type={DecimalType.class}, order=10, min=0, max=1)
+ @Child(name = "factor", type = {DecimalType.class}, order = 10, min = 0, max = 1)
@Description(shortDefinition="Price scaling factor", formalDefinition="A real number that represents a multiplier used in determining the overall value of services delivered and/or goods received. The concept of a Factor allows for a discount or surcharge multiplier to be applied to a monetary amount." )
protected DecimalType factor;
/**
* An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point.
*/
- @Child(name="points", type={DecimalType.class}, order=11, min=0, max=1)
+ @Child(name = "points", type = {DecimalType.class}, order = 11, min = 0, max = 1)
@Description(shortDefinition="Difficulty scaling factor", formalDefinition="An amount that expresses the weighting (based on difficulty, cost and/or resource intensiveness) associated with the good or service delivered. The concept of Points allows for assignment of point values for services and/or goods, such that a monetary amount can be assigned to each point." )
protected DecimalType points;
/**
* The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied.
*/
- @Child(name="net", type={Money.class}, order=12, min=0, max=1)
+ @Child(name = "net", type = {Money.class}, order = 12, min = 0, max = 1)
@Description(shortDefinition="Total item cost", formalDefinition="The quantity times the unit price for an additional service or product or charge. For example, the formula: unit Quantity * unit Price (Cost per Point) * factor Number * points = net Amount. Quantity, factor and points are assumed to be 1 if not supplied." )
protected Money net;
/**
* Contract author or responsible party.
*/
- @Child(name="author", type={Practitioner.class, RelatedPerson.class, Organization.class}, order=13, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "author", type = {Practitioner.class, RelatedPerson.class, Organization.class}, order = 13, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Contract author or responsible party", formalDefinition="Contract author or responsible party." )
protected List author;
/**
@@ -883,7 +883,7 @@ public class Contract extends DomainResource {
/**
* First Party to the contract, may be the party who confers or delegates the rights defined in the contract.
*/
- @Child(name="grantor", type={Practitioner.class, RelatedPerson.class, Organization.class, Patient.class}, order=14, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "grantor", type = {Practitioner.class, RelatedPerson.class, Organization.class, Patient.class}, order = 14, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="First Party or delegator", formalDefinition="First Party to the contract, may be the party who confers or delegates the rights defined in the contract." )
protected List grantor;
/**
@@ -895,7 +895,7 @@ public class Contract extends DomainResource {
/**
* The Second party to the contract, may be the party who accepts obligations or be that to which rights are delegated.
*/
- @Child(name="grantee", type={Practitioner.class, RelatedPerson.class, Organization.class, Patient.class}, order=15, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "grantee", type = {Practitioner.class, RelatedPerson.class, Organization.class, Patient.class}, order = 15, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Second Party or delegatee", formalDefinition="The Second party to the contract, may be the party who accepts obligations or be that to which rights are delegated." )
protected List grantee;
/**
@@ -907,7 +907,7 @@ public class Contract extends DomainResource {
/**
* Who witnesses the contract.
*/
- @Child(name="witness", type={Practitioner.class, RelatedPerson.class, Patient.class}, order=16, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "witness", type = {Practitioner.class, RelatedPerson.class, Patient.class}, order = 16, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Witness to the contract", formalDefinition="Who witnesses the contract." )
protected List witness;
/**
@@ -919,7 +919,7 @@ public class Contract extends DomainResource {
/**
* First Party to the contract, may be the party who confers or delegates the rights defined in the contract.
*/
- @Child(name="executor", type={Practitioner.class, RelatedPerson.class, Organization.class, Patient.class}, order=17, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "executor", type = {Practitioner.class, RelatedPerson.class, Organization.class, Patient.class}, order = 17, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Trustee", formalDefinition="First Party to the contract, may be the party who confers or delegates the rights defined in the contract." )
protected List executor;
/**
@@ -931,7 +931,7 @@ public class Contract extends DomainResource {
/**
* First Party to the contract, may be the party who confers or delegates the rights defined in the contract.
*/
- @Child(name="notary", type={Practitioner.class, RelatedPerson.class, Organization.class, Patient.class}, order=18, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "notary", type = {Practitioner.class, RelatedPerson.class, Organization.class, Patient.class}, order = 18, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Notary Public", formalDefinition="First Party to the contract, may be the party who confers or delegates the rights defined in the contract." )
protected List notary;
/**
@@ -943,70 +943,70 @@ public class Contract extends DomainResource {
/**
* List or contract signatures.
*/
- @Child(name="signer", type={}, order=19, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "signer", type = {}, order = 19, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Signer", formalDefinition="List or contract signatures." )
protected List signer;
/**
* The itemized terms of the contract. The legal clause or conditions of the Contract that requires or prevents either one or both parties to perform a particular requirement by some specified time.
*/
- @Child(name="term", type={}, order=20, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "term", type = {}, order = 20, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="The terms of the Contract", formalDefinition="The itemized terms of the contract. The legal clause or conditions of the Contract that requires or prevents either one or both parties to perform a particular requirement by some specified time." )
protected List term;
/**
* Legally binding contract.
*/
- @Child(name="binding", type={Attachment.class}, order=21, min=0, max=1)
+ @Child(name = "binding", type = {Attachment.class}, order = 21, min = 0, max = 1)
@Description(shortDefinition="Binding Contract", formalDefinition="Legally binding contract." )
protected Attachment binding;
/**
* Relevant time/time-period when applicable.
*/
- @Child(name="bindingDateTime", type={DateTimeType.class}, order=22, min=0, max=1)
+ @Child(name = "bindingDateTime", type = {DateTimeType.class}, order = 22, min = 0, max = 1)
@Description(shortDefinition="Binding Contract effective time", formalDefinition="Relevant time/time-period when applicable." )
protected DateTimeType bindingDateTime;
/**
* Friendly Human readable form (might be a reference to the UI used to capture the contract).
*/
- @Child(name="friendly", type={Attachment.class}, order=23, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "friendly", type = {Attachment.class}, order = 23, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Human readable contract text", formalDefinition="Friendly Human readable form (might be a reference to the UI used to capture the contract)." )
protected List friendly;
/**
* Relevant time/time-period when applicable.
*/
- @Child(name="friendlyDateTime", type={DateTimeType.class}, order=24, min=0, max=1)
+ @Child(name = "friendlyDateTime", type = {DateTimeType.class}, order = 24, min = 0, max = 1)
@Description(shortDefinition="Human readable contract text effective time", formalDefinition="Relevant time/time-period when applicable." )
protected DateTimeType friendlyDateTime;
/**
* Legal text in Human readable form.
*/
- @Child(name="legal", type={Attachment.class}, order=25, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "legal", type = {Attachment.class}, order = 25, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Legal contract text", formalDefinition="Legal text in Human readable form." )
protected List legal;
/**
* Relevant time/time-period when applicable.
*/
- @Child(name="legalDateTime", type={DateTimeType.class}, order=26, min=0, max=1)
+ @Child(name = "legalDateTime", type = {DateTimeType.class}, order = 26, min = 0, max = 1)
@Description(shortDefinition="Legal contract text date time", formalDefinition="Relevant time/time-period when applicable." )
protected DateTimeType legalDateTime;
/**
* Computable Policy rules (e.g. XACML, DKAL, SecPal).
*/
- @Child(name="rule", type={Attachment.class}, order=27, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "rule", type = {Attachment.class}, order = 27, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Computable contract text", formalDefinition="Computable Policy rules (e.g. XACML, DKAL, SecPal)." )
protected List rule;
/**
* Relevant time/time-period when applicable.
*/
- @Child(name="ruleDateTime", type={DateTimeType.class}, order=28, min=0, max=1)
+ @Child(name = "ruleDateTime", type = {DateTimeType.class}, order = 28, min = 0, max = 1)
@Description(shortDefinition="Computable contract text effect time", formalDefinition="Relevant time/time-period when applicable." )
protected DateTimeType ruleDateTime;
@@ -2279,8 +2279,8 @@ public class Contract extends DomainResource {
@SearchParamDefinition(name="subject", path="Contract.subject", description="The identity of the target of the contract", type="reference" )
public static final String SP_SUBJECT = "subject";
- @SearchParamDefinition(name="patient", path="Contract.subject", description="The identity of the target of the contract (if a patient)", type="reference" )
- public static final String SP_PATIENT = "patient";
+ @SearchParamDefinition(name = "patient", path = "Contract.subject", description = "The identity of the target of the contract (if a patient)", type = "reference")
+ public static final String SP_PATIENT = "patient";
}
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Contraindication.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Contraindication.java
index dab774fee1b..33fe7c57768 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Contraindication.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Contraindication.java
@@ -248,7 +248,7 @@ public class Contraindication extends DomainResource {
/**
* Indicates the patient whose record the contraindication is associated with.
*/
- @Child(name="patient", type={Patient.class}, order=0, min=0, max=1)
+ @Child(name = "patient", type = {Patient.class}, order = 0, min = 0, max = 1)
@Description(shortDefinition="Associated patient", formalDefinition="Indicates the patient whose record the contraindication is associated with." )
protected Reference patient;
@@ -260,21 +260,21 @@ public class Contraindication extends DomainResource {
/**
* Identifies the general type of issue identified.
*/
- @Child(name="category", type={CodeableConcept.class}, order=1, min=0, max=1)
+ @Child(name = "category", type = {CodeableConcept.class}, order = 1, min = 0, max = 1)
@Description(shortDefinition="E.g. Drug-drug, duplicate therapy, etc.", formalDefinition="Identifies the general type of issue identified." )
protected CodeableConcept category;
/**
* Indicates the degree of importance associated with the identified issue based on the potential impact on the patient.
*/
- @Child(name="severity", type={CodeType.class}, order=2, min=0, max=1)
+ @Child(name = "severity", type = {CodeType.class}, order = 2, min = 0, max = 1)
@Description(shortDefinition="high | medium | low", formalDefinition="Indicates the degree of importance associated with the identified issue based on the potential impact on the patient." )
protected CodeType severity;
/**
* Indicates the resource representing the current activity or proposed activity that.
*/
- @Child(name="implicated", type={}, order=3, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "implicated", type = {}, order = 3, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Problem resource", formalDefinition="Indicates the resource representing the current activity or proposed activity that." )
protected List implicated;
/**
@@ -286,21 +286,21 @@ public class Contraindication extends DomainResource {
/**
* A textual explanation of the contraindication.
*/
- @Child(name="detail", type={StringType.class}, order=4, min=0, max=1)
+ @Child(name = "detail", type = {StringType.class}, order = 4, min = 0, max = 1)
@Description(shortDefinition="Description and context", formalDefinition="A textual explanation of the contraindication." )
protected StringType detail;
/**
* The date or date-time when the contraindication was initially identified.
*/
- @Child(name="date", type={DateTimeType.class}, order=5, min=0, max=1)
+ @Child(name = "date", type = {DateTimeType.class}, order = 5, min = 0, max = 1)
@Description(shortDefinition="When identified", formalDefinition="The date or date-time when the contraindication was initially identified." )
protected DateTimeType date;
/**
* Identifies the provider or software that identified the.
*/
- @Child(name="author", type={Practitioner.class, Device.class}, order=6, min=0, max=1)
+ @Child(name = "author", type = {Practitioner.class, Device.class}, order = 6, min = 0, max = 1)
@Description(shortDefinition="Who found issue?", formalDefinition="Identifies the provider or software that identified the." )
protected Reference author;
@@ -312,21 +312,21 @@ public class Contraindication extends DomainResource {
/**
* Business identifier associated with the contraindication record.
*/
- @Child(name="identifier", type={Identifier.class}, order=7, min=0, max=1)
+ @Child(name = "identifier", type = {Identifier.class}, order = 7, min = 0, max = 1)
@Description(shortDefinition="Unique id for the contraindication", formalDefinition="Business identifier associated with the contraindication record." )
protected Identifier identifier;
/**
* The literature, knowledge-base or similar reference that describes the propensity for the contraindication identified.
*/
- @Child(name="reference", type={UriType.class}, order=8, min=0, max=1)
+ @Child(name = "reference", type = {UriType.class}, order = 8, min = 0, max = 1)
@Description(shortDefinition="Authority for issue", formalDefinition="The literature, knowledge-base or similar reference that describes the propensity for the contraindication identified." )
protected UriType reference;
/**
* Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the contraindicaiton from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action.
*/
- @Child(name="mitigation", type={}, order=9, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "mitigation", type = {}, order = 9, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Step taken to address", formalDefinition="Indicates an action that has been taken or is committed to to reduce or eliminate the likelihood of the risk identified by the contraindicaiton from manifesting. Can also reflect an observation of known mitigating factors that may reduce/eliminate the need for any action." )
protected List mitigation;
@@ -815,11 +815,11 @@ public class Contraindication extends DomainResource {
public static final String SP_DATE = "date";
@SearchParamDefinition(name="identifier", path="Contraindication.identifier", description="Unique id for the contraindication", type="token" )
public static final String SP_IDENTIFIER = "identifier";
- @SearchParamDefinition(name="patient", path="Contraindication.patient", description="Associated patient", type="reference" )
+ @SearchParamDefinition(name = "patient", path = "Contraindication.patient", description = "Associated patient", type = "reference")
public static final String SP_PATIENT = "patient";
- @SearchParamDefinition(name="implicated", path="Contraindication.implicated", description="Problem resource", type="reference" )
+ @SearchParamDefinition(name = "implicated", path = "Contraindication.implicated", description = "Problem resource", type = "reference")
public static final String SP_IMPLICATED = "implicated";
- @SearchParamDefinition(name="category", path="Contraindication.category", description="E.g. Drug-drug, duplicate therapy, etc.", type="token" )
+ @SearchParamDefinition(name = "category", path = "Contraindication.category", description = "E.g. Drug-drug, duplicate therapy, etc.", type = "token")
public static final String SP_CATEGORY = "category";
}
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Coverage.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Coverage.java
index e4b428ffe38..86505890b3a 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Coverage.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/Coverage.java
@@ -48,7 +48,7 @@ public class Coverage extends DomainResource {
/**
* The program or plan underwriter or payor.
*/
- @Child(name="issuer", type={Organization.class}, order=0, min=0, max=1)
+ @Child(name = "issuer", type = {Organization.class}, order = 0, min = 0, max = 1)
@Description(shortDefinition="An identifier for the plan issuer", formalDefinition="The program or plan underwriter or payor." )
protected Reference issuer;
@@ -60,63 +60,63 @@ public class Coverage extends DomainResource {
/**
* Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force.
*/
- @Child(name="period", type={Period.class}, order=1, min=0, max=1)
+ @Child(name = "period", type = {Period.class}, order = 1, min = 0, max = 1)
@Description(shortDefinition="Coverage start and end dates", formalDefinition="Time period during which the coverage is in force. A missing start date indicates the start date isn't known, a missing end date means the coverage is continuing to be in force." )
protected Period period;
/**
* The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health.
*/
- @Child(name="type", type={Coding.class}, order=2, min=0, max=1)
+ @Child(name = "type", type = {Coding.class}, order = 2, min = 0, max = 1)
@Description(shortDefinition="Type of coverage", formalDefinition="The type of coverage: social program, medical plan, accident coverage (workers compensation, auto), group health." )
protected Coding type;
/**
* The main (and possibly only) identifier for the coverage - often referred to as a Subscriber Id, Certificate number or Personal Health Number or Case ID.
*/
- @Child(name="identifier", type={Identifier.class}, order=3, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "identifier", type = {Identifier.class}, order = 3, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="The primary coverage ID", formalDefinition="The main (and possibly only) identifier for the coverage - often referred to as a Subscriber Id, Certificate number or Personal Health Number or Case ID." )
protected List identifier;
/**
* Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.
*/
- @Child(name="group", type={StringType.class}, order=4, min=0, max=1)
+ @Child(name = "group", type = {StringType.class}, order = 4, min = 0, max = 1)
@Description(shortDefinition="An identifier for the group", formalDefinition="Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID." )
protected StringType group;
/**
* Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID.
*/
- @Child(name="plan", type={StringType.class}, order=5, min=0, max=1)
+ @Child(name = "plan", type = {StringType.class}, order = 5, min = 0, max = 1)
@Description(shortDefinition="An identifier for the plan", formalDefinition="Identifies a style or collective of coverage issues by the underwriter, for example may be used to identify a class of coverage or employer group. May also be referred to as a Policy or Group ID." )
protected StringType plan;
/**
* Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID.
*/
- @Child(name="subplan", type={StringType.class}, order=6, min=0, max=1)
+ @Child(name = "subplan", type = {StringType.class}, order = 6, min = 0, max = 1)
@Description(shortDefinition="An identifier for the subsection of the plan", formalDefinition="Identifies a sub-style or sub-collective of coverage issues by the underwriter, for example may be used to identify a specific employer group within a class of employers. May be referred to as a Section or Division ID." )
protected StringType subplan;
/**
* A unique identifier for a dependent under the coverage.
*/
- @Child(name="dependent", type={IntegerType.class}, order=7, min=0, max=1)
+ @Child(name = "dependent", type = {IntegerType.class}, order = 7, min = 0, max = 1)
@Description(shortDefinition="The dependent number", formalDefinition="A unique identifier for a dependent under the coverage." )
protected IntegerType dependent;
/**
* An optional counter for a particular instance of the identified coverage which increments upon each renewal.
*/
- @Child(name="sequence", type={IntegerType.class}, order=8, min=0, max=1)
+ @Child(name = "sequence", type = {IntegerType.class}, order = 8, min = 0, max = 1)
@Description(shortDefinition="The plan instance or sequence counter", formalDefinition="An optional counter for a particular instance of the identified coverage which increments upon each renewal." )
protected IntegerType sequence;
/**
* The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due.
*/
- @Child(name="subscriber", type={Patient.class}, order=9, min=0, max=1)
+ @Child(name = "subscriber", type = {Patient.class}, order = 9, min = 0, max = 1)
@Description(shortDefinition="Plan holder information", formalDefinition="The party who 'owns' the insurance contractual relationship to the policy or to whom the benefit of the policy is due." )
protected Reference subscriber;
@@ -128,14 +128,14 @@ public class Coverage extends DomainResource {
/**
* The identifier for a community of providers.
*/
- @Child(name="network", type={Identifier.class}, order=10, min=0, max=1)
+ @Child(name = "network", type = {Identifier.class}, order = 10, min = 0, max = 1)
@Description(shortDefinition="Insurer network", formalDefinition="The identifier for a community of providers." )
protected Identifier network;
/**
* The policy(s) which constitute this insurance coverage.
*/
- @Child(name="contract", type={Contract.class}, order=11, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "contract", type = {Contract.class}, order = 11, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Contract details", formalDefinition="The policy(s) which constitute this insurance coverage." )
protected List contract;
/**
@@ -712,20 +712,20 @@ public class Coverage extends DomainResource {
return ResourceType.Coverage;
}
- @SearchParamDefinition(name="identifier", path="Coverage.identifier", description="The primary identifier of the insured", type="token" )
- public static final String SP_IDENTIFIER = "identifier";
+ @SearchParamDefinition(name = "identifier", path = "Coverage.identifier", description = "The primary identifier of the insured", type = "token")
+ public static final String SP_IDENTIFIER = "identifier";
@SearchParamDefinition(name="sequence", path="Coverage.sequence", description="Sequence number", type="token" )
public static final String SP_SEQUENCE = "sequence";
- @SearchParamDefinition(name="subplan", path="Coverage.subplan", description="Sub-plan identifier", type="token" )
- public static final String SP_SUBPLAN = "subplan";
- @SearchParamDefinition(name="type", path="Coverage.type", description="The kind of coverage", type="token" )
- public static final String SP_TYPE = "type";
- @SearchParamDefinition(name="plan", path="Coverage.plan", description="A plan or policy identifier", type="token" )
- public static final String SP_PLAN = "plan";
+ @SearchParamDefinition(name = "subplan", path = "Coverage.subplan", description = "Sub-plan identifier", type = "token")
+ public static final String SP_SUBPLAN = "subplan";
+ @SearchParamDefinition(name = "type", path = "Coverage.type", description = "The kind of coverage", type = "token")
+ public static final String SP_TYPE = "type";
+ @SearchParamDefinition(name = "plan", path = "Coverage.plan", description = "A plan or policy identifier", type = "token")
+ public static final String SP_PLAN = "plan";
@SearchParamDefinition(name="dependent", path="Coverage.dependent", description="Dependent number", type="token" )
public static final String SP_DEPENDENT = "dependent";
- @SearchParamDefinition(name="issuer", path="Coverage.issuer", description="The identity of the insurer", type="reference" )
- public static final String SP_ISSUER = "issuer";
+ @SearchParamDefinition(name = "issuer", path = "Coverage.issuer", description = "The identity of the insurer", type = "reference")
+ public static final String SP_ISSUER = "issuer";
@SearchParamDefinition(name="group", path="Coverage.group", description="Group identifier", type="token" )
public static final String SP_GROUP = "group";
diff --git a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DataElement.java b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DataElement.java
index 8f299c5b446..08a4c90ce5e 100644
--- a/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DataElement.java
+++ b/hapi-fhir-structures-hl7org-dstu2/src/main/java/org/hl7/fhir/instance/model/DataElement.java
@@ -964,154 +964,154 @@ public class DataElement extends DomainResource {
/**
* The identifier that is used to identify this data element when it is referenced in a Profile, Questionnaire or an instance.
*/
- @Child(name="identifier", type={Identifier.class}, order=0, min=0, max=1)
+ @Child(name = "identifier", type = {Identifier.class}, order = 0, min = 0, max = 1)
@Description(shortDefinition="Logical id to reference this data element", formalDefinition="The identifier that is used to identify this data element when it is referenced in a Profile, Questionnaire or an instance." )
protected Identifier identifier;
/**
* The identifier that is used to identify this version of the data element when it is referenced in a Profile, Questionnaire or instance. This is an arbitrary value managed by the definition author manually.
*/
- @Child(name="version", type={StringType.class}, order=1, min=0, max=1)
+ @Child(name = "version", type = {StringType.class}, order = 1, min = 0, max = 1)
@Description(shortDefinition="Logical id for this version of the data element", formalDefinition="The identifier that is used to identify this version of the data element when it is referenced in a Profile, Questionnaire or instance. This is an arbitrary value managed by the definition author manually." )
protected StringType version;
/**
* Details of the individual or organization who accepts responsibility for publishing the data element.
*/
- @Child(name="publisher", type={StringType.class}, order=2, min=0, max=1)
+ @Child(name = "publisher", type = {StringType.class}, order = 2, min = 0, max = 1)
@Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="Details of the individual or organization who accepts responsibility for publishing the data element." )
protected StringType publisher;
/**
* Contact details to assist a user in finding and communicating with the publisher.
*/
- @Child(name="telecom", type={ContactPoint.class}, order=3, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "telecom", type = {ContactPoint.class}, order = 3, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Contact information of the publisher", formalDefinition="Contact details to assist a user in finding and communicating with the publisher." )
protected List telecom;
/**
* The status of the data element.
*/
- @Child(name="status", type={CodeType.class}, order=4, min=1, max=1)
+ @Child(name = "status", type = {CodeType.class}, order = 4, min = 1, max = 1)
@Description(shortDefinition="draft | active | retired", formalDefinition="The status of the data element." )
protected Enumeration status;
/**
* The date that the status for this business version of the data element became effective. (I.e. Date the draft was created, date element became active or date element became retired).
*/
- @Child(name="date", type={DateTimeType.class}, order=5, min=0, max=1)
+ @Child(name = "date", type = {DateTimeType.class}, order = 5, min = 0, max = 1)
@Description(shortDefinition="Date for this version of the data element", formalDefinition="The date that the status for this business version of the data element became effective. (I.e. Date the draft was created, date element became active or date element became retired)." )
protected DateTimeType date;
/**
* The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used.
*/
- @Child(name="name", type={StringType.class}, order=6, min=0, max=1)
+ @Child(name = "name", type = {StringType.class}, order = 6, min = 0, max = 1)
@Description(shortDefinition="Descriptive label for this element definition", formalDefinition="The term used by humans to refer to the data element. Should ideally be unique within the context in which the data element is expected to be used." )
protected StringType name;
/**
* A set of terms from external terminologies that may be used to assist with indexing and searching of data element definitions.
*/
- @Child(name="category", type={CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "category", type = {CodeableConcept.class}, order = 7, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Assist with indexing and finding", formalDefinition="A set of terms from external terminologies that may be used to assist with indexing and searching of data element definitions." )
protected List category;
/**
* Identifies how precise the data element is in its definition.
*/
- @Child(name="granularity", type={CodeType.class}, order=8, min=0, max=1)
+ @Child(name = "granularity", type = {CodeType.class}, order = 8, min = 0, max = 1)
@Description(shortDefinition="comparable | fully-specified | equivalent | convertable | scaleable | flexible", formalDefinition="Identifies how precise the data element is in its definition." )
protected Enumeration granularity;
/**
* A code that provides the meaning for a data element according to a particular terminology.
*/
- @Child(name="code", type={Coding.class}, order=9, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "code", type = {Coding.class}, order = 9, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Identifying concept", formalDefinition="A code that provides the meaning for a data element according to a particular terminology." )
protected List code;
/**
* The default/suggested phrasing to use when prompting a human to capture the data element in question form (e.g. In a survey).
*/
- @Child(name="question", type={StringType.class}, order=10, min=0, max=1)
+ @Child(name = "question", type = {StringType.class}, order = 10, min = 0, max = 1)
@Description(shortDefinition="Prompt for element phrased as question", formalDefinition="The default/suggested phrasing to use when prompting a human to capture the data element in question form (e.g. In a survey)." )
protected StringType question;
/**
* The text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form.
*/
- @Child(name="label", type={StringType.class}, order=11, min=0, max=1)
+ @Child(name = "label", type = {StringType.class}, order = 11, min = 0, max = 1)
@Description(shortDefinition="Name for element to display with or prompt for element", formalDefinition="The text to display beside the element indicating its meaning or to use to prompt for the element in a user display or form." )
protected StringType label;
/**
* Provides a complete explanation of the meaning of the data element for human readability.
*/
- @Child(name="definition", type={StringType.class}, order=12, min=0, max=1)
+ @Child(name = "definition", type = {StringType.class}, order = 12, min = 0, max = 1)
@Description(shortDefinition="Definition/description as narrative text", formalDefinition="Provides a complete explanation of the meaning of the data element for human readability." )
protected StringType definition;
/**
* Comments about the use of the element, including notes about how to use the data properly, exceptions to proper use, etc.
*/
- @Child(name="comments", type={StringType.class}, order=13, min=0, max=1)
+ @Child(name = "comments", type = {StringType.class}, order = 13, min = 0, max = 1)
@Description(shortDefinition="Comments about the use of this element", formalDefinition="Comments about the use of the element, including notes about how to use the data properly, exceptions to proper use, etc." )
protected StringType comments;
/**
* Explains why this element is needed and why it's been constrained as it has.
*/
- @Child(name="requirements", type={StringType.class}, order=14, min=0, max=1)
+ @Child(name = "requirements", type = {StringType.class}, order = 14, min = 0, max = 1)
@Description(shortDefinition="Why is this needed?", formalDefinition="Explains why this element is needed and why it's been constrained as it has." )
protected StringType requirements;
/**
* Identifies additional names by which this element might also be known.
*/
- @Child(name="synonym", type={StringType.class}, order=15, min=0, max=Child.MAX_UNLIMITED)
+ @Child(name = "synonym", type = {StringType.class}, order = 15, min = 0, max = Child.MAX_UNLIMITED)
@Description(shortDefinition="Other names", formalDefinition="Identifies additional names by which this element might also be known." )
protected List