diff --git a/TODO.txt b/TODO.txt
index f0746b792d9..7584c61d846 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -4,4 +4,5 @@
* Fix XML encoder to not encode empty elements
* Add SimpleSetters for all primitive datatypes
* Implement and add Simple Getters in a similar way to simple setters
+ * Add support for modifierExtensions
*
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java
index 9ae79a32324..b0086be93c7 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/context/FhirContext.java
@@ -10,6 +10,7 @@ import ca.uhn.fhir.model.api.IElement;
import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.parser.IParser;
import ca.uhn.fhir.parser.XmlParser;
+import ca.uhn.fhir.rest.client.IRestfulClientFactory;
import ca.uhn.fhir.rest.client.RestfulClientFactory;
public class FhirContext {
@@ -37,10 +38,6 @@ public class FhirContext {
return myClassToElementDefinition;
}
- public Maptrue
if all content in this superclass instance is empty per the semantics of
+ * {@link #isEmpty()}.
+ */
+ protected boolean isBaseEmpty() {
+ if (myUndeclaredExtensions != null) {
+ for (UndeclaredExtension next : myUndeclaredExtensions) {
+ if (!next.isEmpty()) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BasePrimitive.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BasePrimitive.java
new file mode 100644
index 00000000000..cc5409277ad
--- /dev/null
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/BasePrimitive.java
@@ -0,0 +1,11 @@
+package ca.uhn.fhir.model.api;
+
+
+public abstract class BasePrimitivetrue
+ * if all content in this superclass instance is empty per the semantics of {@link #isEmpty()}.
+ */
+ @Override
+ protected boolean isBaseEmpty() {
+ return super.isBaseEmpty() && ElementUtil.isEmpty(myLanguage, myText);
+ }
+
+
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Bundle.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Bundle.java
index c1ac1241b45..3b5c67c9aed 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Bundle.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/api/Bundle.java
@@ -6,9 +6,15 @@ import java.util.List;
import ca.uhn.fhir.model.primitive.InstantDt;
import ca.uhn.fhir.model.primitive.IntegerDt;
import ca.uhn.fhir.model.primitive.StringDt;
+import ca.uhn.fhir.util.ElementUtil;
public class Bundle extends BaseBundle implements IElement {
-
+
+ //@formatter:off
+ /* ****************************************************
+ * NB: add any new fields to the isEmpty() method!!!
+ *****************************************************/
+ //@formatter:on
private List
* Definition: @@ -146,6 +155,7 @@ public class AddressDt extends BaseElement implements ICompositeDatatype { public void setText( String theString) { myText = new StringDt(theString); } + /** * Gets the value(s) for line (Street name, number, direction & P.O. Box etc ). @@ -178,8 +188,23 @@ P.O. Box number, delivery hints, and similar address information myLine = theValue; } + /** + * Adds and returns a new value for line (Street name, number, direction & P.O. Box etc ) + * + *
+ * Definition: + * This component contains the house number, apartment number, street name, street direction, +P.O. Box number, delivery hints, and similar address information + *
+ */ + public StringDt addLine() { + StringDt newType = new StringDt(); + getLine().add(newType); + return newType; + } + /** - * Sets the value(s) for line (Street name, number, direction & P.O. Box etc ) + * Adds a new value for line (Street name, number, direction & P.O. Box etc ) * ** Definition: @@ -193,6 +218,7 @@ P.O. Box number, delivery hints, and similar address information } myLine.add(new StringDt(theString)); } + /** * Gets the value(s) for city (Name of city, town etc.). @@ -223,8 +249,9 @@ P.O. Box number, delivery hints, and similar address information myCity = theValue; } + /** - * Sets the value(s) for city (Name of city, town etc.) + * Sets the value for city (Name of city, town etc.) * *
* Definition: @@ -234,6 +261,7 @@ P.O. Box number, delivery hints, and similar address information public void setCity( String theString) { myCity = new StringDt(theString); } + /** * Gets the value(s) for state (Sub-unit of country (abreviations ok)). @@ -264,8 +292,9 @@ P.O. Box number, delivery hints, and similar address information myState = theValue; } + /** - * Sets the value(s) for state (Sub-unit of country (abreviations ok)) + * Sets the value for state (Sub-unit of country (abreviations ok)) * *
* Definition: @@ -275,6 +304,7 @@ P.O. Box number, delivery hints, and similar address information public void setState( String theString) { myState = new StringDt(theString); } + /** * Gets the value(s) for zip (Postal code for area). @@ -305,8 +335,9 @@ P.O. Box number, delivery hints, and similar address information myZip = theValue; } + /** - * Sets the value(s) for zip (Postal code for area) + * Sets the value for zip (Postal code for area) * *
* Definition: @@ -316,6 +347,7 @@ P.O. Box number, delivery hints, and similar address information public void setZip( String theString) { myZip = new StringDt(theString); } + /** * Gets the value(s) for country (Country (can be ISO 3166 3 letter code)). @@ -346,8 +378,9 @@ P.O. Box number, delivery hints, and similar address information myCountry = theValue; } + /** - * Sets the value(s) for country (Country (can be ISO 3166 3 letter code)) + * Sets the value for country (Country (can be ISO 3166 3 letter code)) * *
* Definition: @@ -357,6 +390,7 @@ P.O. Box number, delivery hints, and similar address information public void setCountry( String theString) { myCountry = new StringDt(theString); } + /** * Gets the value(s) for period (Time period when address was/is in use). @@ -387,6 +421,7 @@ P.O. Box number, delivery hints, and similar address information myPeriod = theValue; } + diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/AttachmentDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/AttachmentDt.java index d4053f1b40a..ee233260aa2 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/AttachmentDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/AttachmentDt.java @@ -38,7 +38,8 @@ import ca.uhn.fhir.model.dstu.resource.*; *
*/ @DatatypeDef(name="Attachment") -public class AttachmentDt extends BaseElement implements ICompositeDatatype { +public class AttachmentDt extends BaseElement implements ICompositeDatatype { + @Child(name="contentType", type=CodeDt.class, order=0, min=1, max=1) private CodeDt myContentType; @@ -61,6 +62,12 @@ public class AttachmentDt extends BaseElement implements ICompositeDatatype { @Child(name="title", type=StringDt.class, order=6, min=0, max=1) private StringDt myTitle; + + @Override + public boolean isEmpty() { + return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myContentType, myLanguage, myData, myUrl, mySize, myHash, myTitle); + } + /** * Gets the value(s) for contentType (Mime type of the content, with charset etc.). * creating it if it does @@ -90,6 +97,7 @@ public class AttachmentDt extends BaseElement implements ICompositeDatatype { myContentType = theValue; } + /** * Gets the value(s) for language (Human language of the content (BCP-47)). @@ -120,6 +128,7 @@ public class AttachmentDt extends BaseElement implements ICompositeDatatype { myLanguage = theValue; } + /** * Gets the value(s) for data (Data inline, base64ed). @@ -150,7 +159,20 @@ public class AttachmentDt extends BaseElement implements ICompositeDatatype { myData = theValue; } - + + /** + * Sets the value for data (Data inline, base64ed) + * + *+ * Definition: + * The actual data of the attachment - a sequence of bytes. In XML, represented using base64 + *
+ */ + public void setData( byte[] theBytes) { + myData = new Base64BinaryDt(theBytes); + } + + /** * Gets the value(s) for url (Uri where the data can be found). * creating it if it does @@ -180,8 +202,9 @@ public class AttachmentDt extends BaseElement implements ICompositeDatatype { myUrl = theValue; } + /** - * Sets the value(s) for url (Uri where the data can be found) + * Sets the value for url (Uri where the data can be found) * ** Definition: @@ -191,6 +214,7 @@ public class AttachmentDt extends BaseElement implements ICompositeDatatype { public void setUrl( String theUri) { myUrl = new UriDt(theUri); } + /** * Gets the value(s) for size (Number of bytes of content (if url provided)). @@ -221,7 +245,20 @@ public class AttachmentDt extends BaseElement implements ICompositeDatatype { mySize = theValue; } - + + /** + * Sets the value for size (Number of bytes of content (if url provided)) + * + *
+ * Definition: + * The number of bytes of data that make up this attachment. + *
+ */ + public void setSize( Integer theInteger) { + mySize = new IntegerDt(theInteger); + } + + /** * Gets the value(s) for hash (Hash of the data (sha-1, base64ed )). * creating it if it does @@ -251,7 +288,20 @@ public class AttachmentDt extends BaseElement implements ICompositeDatatype { myHash = theValue; } - + + /** + * Sets the value for hash (Hash of the data (sha-1, base64ed )) + * + *+ * Definition: + * The calculated hash of the data using SHA-1. Represented using base64 + *
+ */ + public void setHash( byte[] theBytes) { + myHash = new Base64BinaryDt(theBytes); + } + + /** * Gets the value(s) for title (Label to display in place of the data). * creating it if it does @@ -281,8 +331,9 @@ public class AttachmentDt extends BaseElement implements ICompositeDatatype { myTitle = theValue; } + /** - * Sets the value(s) for title (Label to display in place of the data) + * Sets the value for title (Label to display in place of the data) * ** Definition: @@ -292,6 +343,7 @@ public class AttachmentDt extends BaseElement implements ICompositeDatatype { public void setTitle( String theString) { myTitle = new StringDt(theString); } + diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/CodeableConceptDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/CodeableConceptDt.java index d2d9bc0008d..2cab9dcd44a 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/CodeableConceptDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/CodeableConceptDt.java @@ -38,7 +38,8 @@ import ca.uhn.fhir.model.dstu.resource.*; *
*/ @DatatypeDef(name="CodeableConcept") -public class CodeableConceptDt extends BaseElement implements ICompositeDatatype { +public class CodeableConceptDt extends BaseElement implements ICompositeDatatype { + @Child(name="coding", type=CodingDt.class, order=0, min=0, max=Child.MAX_UNLIMITED) private List+ * Definition: + * A reference to a code defined by a terminology system + *
+ */ + public CodingDt addCoding() { + CodingDt newType = new CodingDt(); + getCoding().add(newType); + return newType; + } + /** * Gets the value(s) for text (Plain text representation of the concept). @@ -105,8 +126,9 @@ public class CodeableConceptDt extends BaseElement implements ICompositeDatatype myText = theValue; } + /** - * Sets the value(s) for text (Plain text representation of the concept) + * Sets the value for text (Plain text representation of the concept) * ** Definition: @@ -116,6 +138,7 @@ public class CodeableConceptDt extends BaseElement implements ICompositeDatatype public void setText( String theString) { myText = new StringDt(theString); } + diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/CodingDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/CodingDt.java index a5a1076a88c..4bca31d2e8c 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/CodingDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/CodingDt.java @@ -38,7 +38,8 @@ import ca.uhn.fhir.model.dstu.resource.*; *
*/ @DatatypeDef(name="Coding") -public class CodingDt extends BaseElement implements ICompositeDatatype { +public class CodingDt extends BaseElement implements ICompositeDatatype { + @Child(name="system", type=UriDt.class, order=0, min=0, max=1) private UriDt mySystem; @@ -61,6 +62,12 @@ public class CodingDt extends BaseElement implements ICompositeDatatype { }) private ResourceReference myValueSet; + + @Override + public boolean isEmpty() { + return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( mySystem, myVersion, myCode, myDisplay, myPrimary, myValueSet); + } + /** * Gets the value(s) for system (Identity of the terminology system ). * creating it if it does @@ -90,8 +97,9 @@ public class CodingDt extends BaseElement implements ICompositeDatatype { mySystem = theValue; } + /** - * Sets the value(s) for system (Identity of the terminology system ) + * Sets the value for system (Identity of the terminology system ) * ** Definition: @@ -101,6 +109,7 @@ public class CodingDt extends BaseElement implements ICompositeDatatype { public void setSystem( String theUri) { mySystem = new UriDt(theUri); } + /** * Gets the value(s) for version (Version of the system - if relevant). @@ -131,8 +140,9 @@ public class CodingDt extends BaseElement implements ICompositeDatatype { myVersion = theValue; } + /** - * Sets the value(s) for version (Version of the system - if relevant) + * Sets the value for version (Version of the system - if relevant) * *
* Definition: @@ -142,6 +152,7 @@ public class CodingDt extends BaseElement implements ICompositeDatatype { public void setVersion( String theString) { myVersion = new StringDt(theString); } + /** * Gets the value(s) for code (Symbol in syntax defined by the system). @@ -172,6 +183,7 @@ public class CodingDt extends BaseElement implements ICompositeDatatype { myCode = theValue; } + /** * Gets the value(s) for display (Representation defined by the system). @@ -202,8 +214,9 @@ public class CodingDt extends BaseElement implements ICompositeDatatype { myDisplay = theValue; } + /** - * Sets the value(s) for display (Representation defined by the system) + * Sets the value for display (Representation defined by the system) * *
* Definition: @@ -213,6 +226,7 @@ public class CodingDt extends BaseElement implements ICompositeDatatype { public void setDisplay( String theString) { myDisplay = new StringDt(theString); } + /** * Gets the value(s) for primary (If this code was chosen directly by the user). @@ -243,7 +257,20 @@ public class CodingDt extends BaseElement implements ICompositeDatatype { myPrimary = theValue; } - + + /** + * Sets the value for primary (If this code was chosen directly by the user) + * + *
+ * Definition: + * Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays) + *
+ */ + public void setPrimary( Boolean theBoolean) { + myPrimary = new BooleanDt(theBoolean); + } + + /** * Gets the value(s) for valueSet (Set this coding was chosen from). * creating it if it does @@ -273,6 +300,7 @@ public class CodingDt extends BaseElement implements ICompositeDatatype { myValueSet = theValue; } + diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ContactDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ContactDt.java index f4e88dca2bc..2999d648c49 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ContactDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ContactDt.java @@ -38,7 +38,8 @@ import ca.uhn.fhir.model.dstu.resource.*; * */ @DatatypeDef(name="Contact") -public class ContactDt extends BaseElement implements ICompositeDatatype { +public class ContactDt extends BaseElement implements ICompositeDatatype { + @Child(name="system", type=CodeDt.class, order=0, min=0, max=1) private BoundCodeDt* Definition: @@ -134,6 +143,7 @@ public class ContactDt extends BaseElement implements ICompositeDatatype { public void setValue( String theString) { myValue = new StringDt(theString); } + /** * Gets the value(s) for use (home | work | temp | old | mobile - purpose of this address). @@ -164,6 +174,7 @@ public class ContactDt extends BaseElement implements ICompositeDatatype { myUse = theValue; } + /** * Sets the value(s) for use (home | work | temp | old | mobile - purpose of this address) * @@ -206,6 +217,7 @@ public class ContactDt extends BaseElement implements ICompositeDatatype { myPeriod = theValue; } + diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/HumanNameDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/HumanNameDt.java index 355300cd4b6..2f84d0bcf76 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/HumanNameDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/HumanNameDt.java @@ -38,7 +38,8 @@ import ca.uhn.fhir.model.dstu.resource.*; *
*/ @DatatypeDef(name="HumanName") -public class HumanNameDt extends BaseElement implements ICompositeDatatype { +public class HumanNameDt extends BaseElement implements ICompositeDatatype { + @Child(name="use", type=CodeDt.class, order=0, min=0, max=1) private BoundCodeDt* Definition: @@ -143,6 +152,7 @@ public class HumanNameDt extends BaseElement implements ICompositeDatatype { public void setText( String theString) { myText = new StringDt(theString); } + /** * Gets the value(s) for family (Family name (often called 'Surname')). @@ -173,8 +183,22 @@ public class HumanNameDt extends BaseElement implements ICompositeDatatype { myFamily = theValue; } + /** + * Adds and returns a new value for family (Family name (often called 'Surname')) + * + *
+ * Definition: + * The part of a name that links to the genealogy. In some cultures (e.g. Eritrea) the family name of a son is the first name of his father. + *
+ */ + public StringDt addFamily() { + StringDt newType = new StringDt(); + getFamily().add(newType); + return newType; + } + /** - * Sets the value(s) for family (Family name (often called 'Surname')) + * Adds a new value for family (Family name (often called 'Surname')) * ** Definition: @@ -187,6 +211,7 @@ public class HumanNameDt extends BaseElement implements ICompositeDatatype { } myFamily.add(new StringDt(theString)); } + /** * Gets the value(s) for given (Given names (not always 'first'). Includes middle names). @@ -217,8 +242,22 @@ public class HumanNameDt extends BaseElement implements ICompositeDatatype { myGiven = theValue; } + /** + * Adds and returns a new value for given (Given names (not always 'first'). Includes middle names) + * + *
+ * Definition: + * Given name + *
+ */ + public StringDt addGiven() { + StringDt newType = new StringDt(); + getGiven().add(newType); + return newType; + } + /** - * Sets the value(s) for given (Given names (not always 'first'). Includes middle names) + * Adds a new value for given (Given names (not always 'first'). Includes middle names) * ** Definition: @@ -231,6 +270,7 @@ public class HumanNameDt extends BaseElement implements ICompositeDatatype { } myGiven.add(new StringDt(theString)); } + /** * Gets the value(s) for prefix (Parts that come before the name). @@ -261,8 +301,22 @@ public class HumanNameDt extends BaseElement implements ICompositeDatatype { myPrefix = theValue; } + /** + * Adds and returns a new value for prefix (Parts that come before the name) + * + *
+ * Definition: + * Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the start of the name + *
+ */ + public StringDt addPrefix() { + StringDt newType = new StringDt(); + getPrefix().add(newType); + return newType; + } + /** - * Sets the value(s) for prefix (Parts that come before the name) + * Adds a new value for prefix (Parts that come before the name) * ** Definition: @@ -275,6 +329,7 @@ public class HumanNameDt extends BaseElement implements ICompositeDatatype { } myPrefix.add(new StringDt(theString)); } + /** * Gets the value(s) for suffix (Parts that come after the name). @@ -305,8 +360,22 @@ public class HumanNameDt extends BaseElement implements ICompositeDatatype { mySuffix = theValue; } + /** + * Adds and returns a new value for suffix (Parts that come after the name) + * + *
+ * Definition: + * Part of the name that is acquired as a title due to academic, legal, employment or nobility status, etc. and that appears at the end of the name + *
+ */ + public StringDt addSuffix() { + StringDt newType = new StringDt(); + getSuffix().add(newType); + return newType; + } + /** - * Sets the value(s) for suffix (Parts that come after the name) + * Adds a new value for suffix (Parts that come after the name) * ** Definition: @@ -319,6 +388,7 @@ public class HumanNameDt extends BaseElement implements ICompositeDatatype { } mySuffix.add(new StringDt(theString)); } + /** * Gets the value(s) for period (Time period when name was/is in use). @@ -349,6 +419,7 @@ public class HumanNameDt extends BaseElement implements ICompositeDatatype { myPeriod = theValue; } + diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/IdentifierDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/IdentifierDt.java index e99bfe0315b..e8f9e699e1e 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/IdentifierDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/IdentifierDt.java @@ -17,7 +17,6 @@ package ca.uhn.fhir.model.dstu.composite; import java.util.*; - import ca.uhn.fhir.model.api.*; import ca.uhn.fhir.model.api.annotation.*; import ca.uhn.fhir.model.primitive.*; @@ -39,7 +38,22 @@ import ca.uhn.fhir.model.dstu.resource.*; *
*/ @DatatypeDef(name="Identifier") -public class IdentifierDt extends BaseElement implements ICompositeDatatype, IQueryParameterType { +public class IdentifierDt extends BaseElement implements ICompositeDatatype , IQueryParameterType { + + /** + * Creates a new identifier + */ + public IdentifierDt() { + // nothing + } + + /** + * Creates a new identifier with the given system and value + */ + public IdentifierDt(String theSystem, String theValue) { + setSystem(theSystem); + setValue(theValue); + } @Child(name="use", type=CodeDt.class, order=0, min=0, max=1) private BoundCodeDt* Definition: @@ -162,6 +169,7 @@ public class IdentifierDt extends BaseElement implements ICompositeDatatype, IQu public void setLabel( String theString) { myLabel = new StringDt(theString); } + /** * Gets the value(s) for system (The namespace for the identifier). @@ -192,8 +200,9 @@ public class IdentifierDt extends BaseElement implements ICompositeDatatype, IQu mySystem = theValue; } + /** - * Sets the value(s) for system (The namespace for the identifier) + * Sets the value for system (The namespace for the identifier) * *
* Definition: @@ -203,6 +212,7 @@ public class IdentifierDt extends BaseElement implements ICompositeDatatype, IQu public void setSystem( String theUri) { mySystem = new UriDt(theUri); } + /** * Gets the value(s) for value (The value that is unique). @@ -233,8 +243,9 @@ public class IdentifierDt extends BaseElement implements ICompositeDatatype, IQu myValue = theValue; } + /** - * Sets the value(s) for value (The value that is unique) + * Sets the value for value (The value that is unique) * *
* Definition: @@ -244,6 +255,7 @@ public class IdentifierDt extends BaseElement implements ICompositeDatatype, IQu public void setValue( String theString) { myValue = new StringDt(theString); } + /** * Gets the value(s) for period (Time period when id is/was valid for use). @@ -274,6 +286,7 @@ public class IdentifierDt extends BaseElement implements ICompositeDatatype, IQu myPeriod = theValue; } + /** * Gets the value(s) for assigner (Organization that issued id (may be just text)). @@ -304,6 +317,7 @@ public class IdentifierDt extends BaseElement implements ICompositeDatatype, IQu myAssigner = theValue; } + /** diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/NarrativeDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/NarrativeDt.java index d633ac9ca57..474577074dc 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/NarrativeDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/NarrativeDt.java @@ -17,6 +17,7 @@ package ca.uhn.fhir.model.dstu.composite; import java.util.*; + import ca.uhn.fhir.model.api.*; import ca.uhn.fhir.model.api.annotation.*; import ca.uhn.fhir.model.primitive.*; @@ -45,6 +46,11 @@ public class NarrativeDt extends BaseElement implements ICompositeDatatype { @Child(name="div", type=XhtmlDt.class, order=1, min=1, max=1) private XhtmlDt myDiv; + @Override + public boolean isEmpty() { + return ca.uhn.fhir.util.ElementUtil.isEmpty( myStatus, myDiv ); + } + /** * Gets the value(s) for status (generated | extensions | additional). * creating it if it does diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/PeriodDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/PeriodDt.java index 7b7a65aa822..a92649361b1 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/PeriodDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/PeriodDt.java @@ -38,7 +38,8 @@ import ca.uhn.fhir.model.dstu.resource.*; *
*/ @DatatypeDef(name="Period") -public class PeriodDt extends BaseElement implements ICompositeDatatype { +public class PeriodDt extends BaseElement implements ICompositeDatatype { + @Child(name="start", type=DateTimeDt.class, order=0, min=0, max=1) private DateTimeDt myStart; @@ -46,6 +47,12 @@ public class PeriodDt extends BaseElement implements ICompositeDatatype { @Child(name="end", type=DateTimeDt.class, order=1, min=0, max=1) private DateTimeDt myEnd; + + @Override + public boolean isEmpty() { + return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myStart, myEnd); + } + /** * Gets the value(s) for start (Starting time with inclusive boundary). * creating it if it does @@ -75,8 +82,9 @@ public class PeriodDt extends BaseElement implements ICompositeDatatype { myStart = theValue; } + /** - * Sets the value(s) for start (Starting time with inclusive boundary) + * Sets the value for start (Starting time with inclusive boundary) * ** Definition: @@ -86,6 +94,19 @@ public class PeriodDt extends BaseElement implements ICompositeDatatype { public void setStartWithSecondsPrecision( Date theDate) { myStart = new DateTimeDt(theDate); } + + /** + * Sets the value for start (Starting time with inclusive boundary) + * + *
+ * Definition: + * The start of the period. The boundary is inclusive. + *
+ */ + public void setStart( Date theDate, TemporalPrecisionEnum thePrecision) { + myStart = new DateTimeDt(theDate, thePrecision); + } + /** * Gets the value(s) for end (End time with inclusive boundary, if not ongoing). @@ -116,8 +137,9 @@ public class PeriodDt extends BaseElement implements ICompositeDatatype { myEnd = theValue; } + /** - * Sets the value(s) for end (End time with inclusive boundary, if not ongoing) + * Sets the value for end (End time with inclusive boundary, if not ongoing) * ** Definition: @@ -127,6 +149,19 @@ public class PeriodDt extends BaseElement implements ICompositeDatatype { public void setEndWithSecondsPrecision( Date theDate) { myEnd = new DateTimeDt(theDate); } + + /** + * Sets the value for end (End time with inclusive boundary, if not ongoing) + * + *
+ * Definition: + * The end of the period. If the end of the period is missing, it means that the period is ongoing + *
+ */ + public void setEnd( Date theDate, TemporalPrecisionEnum thePrecision) { + myEnd = new DateTimeDt(theDate, thePrecision); + } + diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/QuantityDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/QuantityDt.java index 1e4cd757be2..ed3e5609254 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/QuantityDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/QuantityDt.java @@ -38,7 +38,8 @@ import ca.uhn.fhir.model.dstu.resource.*; * */ @DatatypeDef(name="Quantity") -public class QuantityDt extends BaseElement implements ICompositeDatatype { +public class QuantityDt extends BaseElement implements ICompositeDatatype { + @Child(name="value", type=DecimalDt.class, order=0, min=0, max=1) private DecimalDt myValue; @@ -55,6 +56,12 @@ public class QuantityDt extends BaseElement implements ICompositeDatatype { @Child(name="code", type=CodeDt.class, order=4, min=0, max=1) private CodeDt myCode; + + @Override + public boolean isEmpty() { + return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myValue, myComparator, myUnits, mySystem, myCode); + } + /** * Gets the value(s) for value (Numerical value (with implicit precision)). * creating it if it does @@ -84,7 +91,44 @@ public class QuantityDt extends BaseElement implements ICompositeDatatype { myValue = theValue; } - + + /** + * Sets the value for value (Numerical value (with implicit precision)) + * + *+ * Definition: + * The value of the measured amount. The value includes an implicit precision in the presentation of the value + *
+ */ + public void setValue( java.math.BigDecimal theValue) { + myValue = new DecimalDt(theValue); + } + + /** + * Sets the value for value (Numerical value (with implicit precision)) + * + *+ * Definition: + * The value of the measured amount. The value includes an implicit precision in the presentation of the value + *
+ */ + public void setValue( double theValue) { + myValue = new DecimalDt(theValue); + } + + /** + * Sets the value for value (Numerical value (with implicit precision)) + * + *+ * Definition: + * The value of the measured amount. The value includes an implicit precision in the presentation of the value + *
+ */ + public void setValue( long theValue) { + myValue = new DecimalDt(theValue); + } + + /** * Gets the value(s) for comparator (< | <= | >= | > - how to understand the value). * creating it if it does @@ -114,6 +158,7 @@ public class QuantityDt extends BaseElement implements ICompositeDatatype { myComparator = theValue; } + /** * Sets the value(s) for comparator (< | <= | >= | > - how to understand the value) * @@ -156,8 +201,9 @@ public class QuantityDt extends BaseElement implements ICompositeDatatype { myUnits = theValue; } + /** - * Sets the value(s) for units (Unit representation) + * Sets the value for units (Unit representation) * ** Definition: @@ -167,6 +213,7 @@ public class QuantityDt extends BaseElement implements ICompositeDatatype { public void setUnits( String theString) { myUnits = new StringDt(theString); } + /** * Gets the value(s) for system (System that defines coded unit form). @@ -197,8 +244,9 @@ public class QuantityDt extends BaseElement implements ICompositeDatatype { mySystem = theValue; } + /** - * Sets the value(s) for system (System that defines coded unit form) + * Sets the value for system (System that defines coded unit form) * *
* Definition: @@ -208,6 +256,7 @@ public class QuantityDt extends BaseElement implements ICompositeDatatype { public void setSystem( String theUri) { mySystem = new UriDt(theUri); } + /** * Gets the value(s) for code (Coded form of the unit). @@ -238,6 +287,7 @@ public class QuantityDt extends BaseElement implements ICompositeDatatype { myCode = theValue; } + diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/RangeDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/RangeDt.java index a0cd5776f3e..8f0d69b4697 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/RangeDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/RangeDt.java @@ -38,7 +38,8 @@ import ca.uhn.fhir.model.dstu.resource.*; *
*/ @DatatypeDef(name="Range") -public class RangeDt extends BaseElement implements ICompositeDatatype { +public class RangeDt extends BaseElement implements ICompositeDatatype { + @Child(name="low", type=QuantityDt.class, order=0, min=0, max=1) private QuantityDt myLow; @@ -46,6 +47,12 @@ public class RangeDt extends BaseElement implements ICompositeDatatype { @Child(name="high", type=QuantityDt.class, order=1, min=0, max=1) private QuantityDt myHigh; + + @Override + public boolean isEmpty() { + return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myLow, myHigh); + } + /** * Gets the value(s) for low (Low limit ). * creating it if it does @@ -75,6 +82,7 @@ public class RangeDt extends BaseElement implements ICompositeDatatype { myLow = theValue; } + /** * Gets the value(s) for high (High limit ). @@ -105,6 +113,7 @@ public class RangeDt extends BaseElement implements ICompositeDatatype { myHigh = theValue; } + diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/RatioDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/RatioDt.java index 24546cbf89d..7d694718cd6 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/RatioDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/RatioDt.java @@ -38,7 +38,8 @@ import ca.uhn.fhir.model.dstu.resource.*; * */ @DatatypeDef(name="Ratio") -public class RatioDt extends BaseElement implements ICompositeDatatype { +public class RatioDt extends BaseElement implements ICompositeDatatype { + @Child(name="numerator", type=QuantityDt.class, order=0, min=0, max=1) private QuantityDt myNumerator; @@ -46,6 +47,12 @@ public class RatioDt extends BaseElement implements ICompositeDatatype { @Child(name="denominator", type=QuantityDt.class, order=1, min=0, max=1) private QuantityDt myDenominator; + + @Override + public boolean isEmpty() { + return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myNumerator, myDenominator); + } + /** * Gets the value(s) for numerator (Numerator value). * creating it if it does @@ -75,6 +82,7 @@ public class RatioDt extends BaseElement implements ICompositeDatatype { myNumerator = theValue; } + /** * Gets the value(s) for denominator (Denominator value). @@ -105,6 +113,7 @@ public class RatioDt extends BaseElement implements ICompositeDatatype { myDenominator = theValue; } + diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ResourceReferenceDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ResourceReferenceDt.java index 7a5d163e38c..f604f43fa64 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ResourceReferenceDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ResourceReferenceDt.java @@ -38,7 +38,8 @@ import ca.uhn.fhir.model.dstu.resource.*; * */ @DatatypeDef(name="ResourceReference") -public class ResourceReferenceDt extends BaseElement implements ICompositeDatatype { +public class ResourceReferenceDt extends BaseElement implements ICompositeDatatype { + @Child(name="reference", type=StringDt.class, order=0, min=0, max=1) private StringDt myReference; @@ -46,6 +47,12 @@ public class ResourceReferenceDt extends BaseElement implements ICompositeDataty @Child(name="display", type=StringDt.class, order=1, min=0, max=1) private StringDt myDisplay; + + @Override + public boolean isEmpty() { + return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myReference, myDisplay); + } + /** * Gets the value(s) for reference (Relative, internal or absolute URL reference). * creating it if it does @@ -75,8 +82,9 @@ public class ResourceReferenceDt extends BaseElement implements ICompositeDataty myReference = theValue; } + /** - * Sets the value(s) for reference (Relative, internal or absolute URL reference) + * Sets the value for reference (Relative, internal or absolute URL reference) * ** Definition: @@ -86,6 +94,7 @@ public class ResourceReferenceDt extends BaseElement implements ICompositeDataty public void setReference( String theString) { myReference = new StringDt(theString); } + /** * Gets the value(s) for display (Text alternative for the resource). @@ -116,8 +125,9 @@ public class ResourceReferenceDt extends BaseElement implements ICompositeDataty myDisplay = theValue; } + /** - * Sets the value(s) for display (Text alternative for the resource) + * Sets the value for display (Text alternative for the resource) * *
* Definition: @@ -127,6 +137,7 @@ public class ResourceReferenceDt extends BaseElement implements ICompositeDataty public void setDisplay( String theString) { myDisplay = new StringDt(theString); } + diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/SampledDataDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/SampledDataDt.java index 03475f878bf..4bcfe59c33b 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/SampledDataDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/SampledDataDt.java @@ -38,7 +38,8 @@ import ca.uhn.fhir.model.dstu.resource.*; *
*/ @DatatypeDef(name="SampledData") -public class SampledDataDt extends BaseElement implements ICompositeDatatype { +public class SampledDataDt extends BaseElement implements ICompositeDatatype { + @Child(name="origin", type=QuantityDt.class, order=0, min=1, max=1) private QuantityDt myOrigin; @@ -61,6 +62,12 @@ public class SampledDataDt extends BaseElement implements ICompositeDatatype { @Child(name="data", type=StringDt.class, order=6, min=1, max=1) private StringDt myData; + + @Override + public boolean isEmpty() { + return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myOrigin, myPeriod, myFactor, myLowerLimit, myUpperLimit, myDimensions, myData); + } + /** * Gets the value(s) for origin (Zero value and units). * creating it if it does @@ -90,6 +97,7 @@ public class SampledDataDt extends BaseElement implements ICompositeDatatype { myOrigin = theValue; } + /** * Gets the value(s) for period (Number of milliseconds between samples). @@ -120,7 +128,44 @@ public class SampledDataDt extends BaseElement implements ICompositeDatatype { myPeriod = theValue; } - + + /** + * Sets the value for period (Number of milliseconds between samples) + * + *+ * Definition: + * The length of time between sampling times, measured in milliseconds + *
+ */ + public void setPeriod( java.math.BigDecimal theValue) { + myPeriod = new DecimalDt(theValue); + } + + /** + * Sets the value for period (Number of milliseconds between samples) + * + *+ * Definition: + * The length of time between sampling times, measured in milliseconds + *
+ */ + public void setPeriod( double theValue) { + myPeriod = new DecimalDt(theValue); + } + + /** + * Sets the value for period (Number of milliseconds between samples) + * + *+ * Definition: + * The length of time between sampling times, measured in milliseconds + *
+ */ + public void setPeriod( long theValue) { + myPeriod = new DecimalDt(theValue); + } + + /** * Gets the value(s) for factor (Multiply data by this before adding to origin). * creating it if it does @@ -150,7 +195,44 @@ public class SampledDataDt extends BaseElement implements ICompositeDatatype { myFactor = theValue; } - + + /** + * Sets the value for factor (Multiply data by this before adding to origin) + * + *+ * Definition: + * A correction factor that is applied to the sampled data points before they are added to the origin + *
+ */ + public void setFactor( java.math.BigDecimal theValue) { + myFactor = new DecimalDt(theValue); + } + + /** + * Sets the value for factor (Multiply data by this before adding to origin) + * + *+ * Definition: + * A correction factor that is applied to the sampled data points before they are added to the origin + *
+ */ + public void setFactor( double theValue) { + myFactor = new DecimalDt(theValue); + } + + /** + * Sets the value for factor (Multiply data by this before adding to origin) + * + *+ * Definition: + * A correction factor that is applied to the sampled data points before they are added to the origin + *
+ */ + public void setFactor( long theValue) { + myFactor = new DecimalDt(theValue); + } + + /** * Gets the value(s) for lowerLimit (Lower limit of detection). * creating it if it does @@ -180,7 +262,44 @@ public class SampledDataDt extends BaseElement implements ICompositeDatatype { myLowerLimit = theValue; } - + + /** + * Sets the value for lowerLimit (Lower limit of detection) + * + *+ * Definition: + * The lower limit of detection of the measured points. This is needed if any of the data points have the value "L" (lower than detection limit) + *
+ */ + public void setLowerLimit( java.math.BigDecimal theValue) { + myLowerLimit = new DecimalDt(theValue); + } + + /** + * Sets the value for lowerLimit (Lower limit of detection) + * + *+ * Definition: + * The lower limit of detection of the measured points. This is needed if any of the data points have the value "L" (lower than detection limit) + *
+ */ + public void setLowerLimit( double theValue) { + myLowerLimit = new DecimalDt(theValue); + } + + /** + * Sets the value for lowerLimit (Lower limit of detection) + * + *+ * Definition: + * The lower limit of detection of the measured points. This is needed if any of the data points have the value "L" (lower than detection limit) + *
+ */ + public void setLowerLimit( long theValue) { + myLowerLimit = new DecimalDt(theValue); + } + + /** * Gets the value(s) for upperLimit (Upper limit of detection). * creating it if it does @@ -210,7 +329,44 @@ public class SampledDataDt extends BaseElement implements ICompositeDatatype { myUpperLimit = theValue; } - + + /** + * Sets the value for upperLimit (Upper limit of detection) + * + *+ * Definition: + * The upper limit of detection of the measured points. This is needed if any of the data points have the value "U" (higher than detection limit) + *
+ */ + public void setUpperLimit( java.math.BigDecimal theValue) { + myUpperLimit = new DecimalDt(theValue); + } + + /** + * Sets the value for upperLimit (Upper limit of detection) + * + *+ * Definition: + * The upper limit of detection of the measured points. This is needed if any of the data points have the value "U" (higher than detection limit) + *
+ */ + public void setUpperLimit( double theValue) { + myUpperLimit = new DecimalDt(theValue); + } + + /** + * Sets the value for upperLimit (Upper limit of detection) + * + *+ * Definition: + * The upper limit of detection of the measured points. This is needed if any of the data points have the value "U" (higher than detection limit) + *
+ */ + public void setUpperLimit( long theValue) { + myUpperLimit = new DecimalDt(theValue); + } + + /** * Gets the value(s) for dimensions (Number of sample points at each time point). * creating it if it does @@ -240,7 +396,20 @@ public class SampledDataDt extends BaseElement implements ICompositeDatatype { myDimensions = theValue; } - + + /** + * Sets the value for dimensions (Number of sample points at each time point) + * + *+ * Definition: + * The number of sample points at each time point. If this value is greater than one, then the dimensions will be interlaced - all the sample points for a point in time will be recorded at once + *
+ */ + public void setDimensions( Integer theInteger) { + myDimensions = new IntegerDt(theInteger); + } + + /** * Gets the value(s) for data (Decimal values with spaces, or "E" | "U" | "L"). * creating it if it does @@ -270,8 +439,9 @@ public class SampledDataDt extends BaseElement implements ICompositeDatatype { myData = theValue; } + /** - * Sets the value(s) for data (Decimal values with spaces, or "E" | "U" | "L") + * Sets the value for data (Decimal values with spaces, or "E" | "U" | "L") * ** Definition: @@ -281,6 +451,7 @@ public class SampledDataDt extends BaseElement implements ICompositeDatatype { public void setData( String theString) { myData = new StringDt(theString); } + diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ScheduleDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ScheduleDt.java index 68664517c6d..a23bc495c3f 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ScheduleDt.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/composite/ScheduleDt.java @@ -38,7 +38,8 @@ import ca.uhn.fhir.model.dstu.resource.*; *
*/ @DatatypeDef(name="Schedule") -public class ScheduleDt extends BaseElement implements ICompositeDatatype { +public class ScheduleDt extends BaseElement implements ICompositeDatatype { + @Child(name="event", type=PeriodDt.class, order=0, min=0, max=Child.MAX_UNLIMITED) private List+ * Definition: + * Identifies specific time periods when the event should occur + *
+ */ + public PeriodDt addEvent() { + PeriodDt newType = new PeriodDt(); + getEvent().add(newType); + return newType; + } + /** * Gets the value(s) for repeat (Only if there is none or one event). @@ -105,6 +126,7 @@ public class ScheduleDt extends BaseElement implements ICompositeDatatype { myRepeat = theValue; } + /** * Block class for child element: Schedule.repeat (Only if there is none or one event) @@ -135,6 +157,12 @@ public class ScheduleDt extends BaseElement implements ICompositeDatatype { @Child(name="end", type=DateTimeDt.class, order=5, min=0, max=1) private DateTimeDt myEnd; + + @Override + public boolean isEmpty() { + return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myFrequency, myWhen, myDuration, myUnits, myCount, myEnd); + } + /** * Gets the value(s) for frequency (Event occurs frequency times per duration). * creating it if it does @@ -164,7 +192,20 @@ public class ScheduleDt extends BaseElement implements ICompositeDatatype { myFrequency = theValue; } - + + /** + * Sets the value for frequency (Event occurs frequency times per duration) + * + *+ * Definition: + * Indicates how often the event should occur. + *
+ */ + public void setFrequency( Integer theInteger) { + myFrequency = new IntegerDt(theInteger); + } + + /** * Gets the value(s) for when (HS | WAKE | AC | ACM | ACD | ACV | PC | PCM | PCD | PCV - common life events). * creating it if it does @@ -194,6 +235,7 @@ public class ScheduleDt extends BaseElement implements ICompositeDatatype { myWhen = theValue; } + /** * Sets the value(s) for when (HS | WAKE | AC | ACM | ACD | ACV | PC | PCM | PCD | PCV - common life events) * @@ -236,7 +278,44 @@ public class ScheduleDt extends BaseElement implements ICompositeDatatype { myDuration = theValue; } - + + /** + * Sets the value for duration (Repeating or event-related duration) + * + *+ * Definition: + * How long each repetition should last + *
+ */ + public void setDuration( java.math.BigDecimal theValue) { + myDuration = new DecimalDt(theValue); + } + + /** + * Sets the value for duration (Repeating or event-related duration) + * + *+ * Definition: + * How long each repetition should last + *
+ */ + public void setDuration( double theValue) { + myDuration = new DecimalDt(theValue); + } + + /** + * Sets the value for duration (Repeating or event-related duration) + * + *+ * Definition: + * How long each repetition should last + *
+ */ + public void setDuration( long theValue) { + myDuration = new DecimalDt(theValue); + } + + /** * Gets the value(s) for units (s | min | h | d | wk | mo | a - unit of time (UCUM)). * creating it if it does @@ -266,6 +345,7 @@ public class ScheduleDt extends BaseElement implements ICompositeDatatype { myUnits = theValue; } + /** * Sets the value(s) for units (s | min | h | d | wk | mo | a - unit of time (UCUM)) * @@ -308,7 +388,20 @@ public class ScheduleDt extends BaseElement implements ICompositeDatatype { myCount = theValue; } - + + /** + * Sets the value for count (Number of times to repeat) + * + *+ * Definition: + * A total count of the desired number of repetitions + *
+ */ + public void setCount( Integer theInteger) { + myCount = new IntegerDt(theInteger); + } + + /** * Gets the value(s) for end (When to stop repeats). * creating it if it does @@ -338,8 +431,9 @@ public class ScheduleDt extends BaseElement implements ICompositeDatatype { myEnd = theValue; } + /** - * Sets the value(s) for end (When to stop repeats) + * Sets the value for end (When to stop repeats) * ** Definition: @@ -349,6 +443,19 @@ public class ScheduleDt extends BaseElement implements ICompositeDatatype { public void setEndWithSecondsPrecision( Date theDate) { myEnd = new DateTimeDt(theDate); } + + /** + * Sets the value for end (When to stop repeats) + * + *
+ * Definition: + * When to stop repeating the schedule + *
+ */ + public void setEnd( Date theDate, TemporalPrecisionEnum thePrecision) { + myEnd = new DateTimeDt(theDate, thePrecision); + } + } diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Device.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Device.java index f4b8b08f136..8ed69f677dc 100644 --- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Device.java +++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Device.java @@ -169,6 +169,12 @@ public class Device extends BaseResource implements IResource { @Child(name="url", type=UriDt.class, order=12, min=0, max=1) private UriDt myUrl; + + @Override + public boolean isEmpty() { + return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myType, myManufacturer, myModel, myVersion, myExpiry, myUdi, myLotNumber, myOwner, myLocation, myPatient, myContact, myUrl); + } + /** * Gets the value(s) for identifier (Instance id from manufacturer, owner and others). * creating it if it does @@ -198,6 +204,20 @@ public class Device extends BaseResource implements IResource { myIdentifier = theValue; } + /** + * Adds and returns a new value for identifier (Instance id from manufacturer, owner and others) + * + *+ * Definition: + * Identifiers assigned to this device by various organizations. The most likely organizations to assign identifiers are the manufacturer and the owner, though regulatory agencies may also assign an identifier. The identifiers identify the particular device, not the kind of device + *
+ */ + public IdentifierDt addIdentifier() { + IdentifierDt newType = new IdentifierDt(); + getIdentifier().add(newType); + return newType; + } + /** * Gets the value(s) for type (What kind of device this is). @@ -228,6 +248,7 @@ public class Device extends BaseResource implements IResource { myType = theValue; } + /** * Gets the value(s) for manufacturer (Name of device manufacturer). @@ -258,8 +279,9 @@ public class Device extends BaseResource implements IResource { myManufacturer = theValue; } + /** - * Sets the value(s) for manufacturer (Name of device manufacturer) + * Sets the value for manufacturer (Name of device manufacturer) * ** Definition: @@ -269,6 +291,7 @@ public class Device extends BaseResource implements IResource { public void setManufacturer( String theString) { myManufacturer = new StringDt(theString); } + /** * Gets the value(s) for model (Model id assigned by the manufacturer). @@ -299,8 +322,9 @@ public class Device extends BaseResource implements IResource { myModel = theValue; } + /** - * Sets the value(s) for model (Model id assigned by the manufacturer) + * Sets the value for model (Model id assigned by the manufacturer) * *
* Definition: @@ -310,6 +334,7 @@ public class Device extends BaseResource implements IResource { public void setModel( String theString) { myModel = new StringDt(theString); } + /** * Gets the value(s) for version (Version number (i.e. software)). @@ -340,8 +365,9 @@ public class Device extends BaseResource implements IResource { myVersion = theValue; } + /** - * Sets the value(s) for version (Version number (i.e. software)) + * Sets the value for version (Version number (i.e. software)) * *
* Definition: @@ -351,6 +377,7 @@ public class Device extends BaseResource implements IResource { public void setVersion( String theString) { myVersion = new StringDt(theString); } + /** * Gets the value(s) for expiry (Date of expiry of this device (if applicable)). @@ -381,7 +408,32 @@ public class Device extends BaseResource implements IResource { myExpiry = theValue; } - + + /** + * Sets the value for expiry (Date of expiry of this device (if applicable)) + * + *
+ * Definition: + * Date of expiry of this device (if applicable) + *
+ */ + public void setExpiry( Date theDate, TemporalPrecisionEnum thePrecision) { + myExpiry = new DateDt(theDate, thePrecision); + } + + /** + * Sets the value for expiry (Date of expiry of this device (if applicable)) + * + *+ * Definition: + * Date of expiry of this device (if applicable) + *
+ */ + public void setExpiryWithDayPrecision( Date theDate) { + myExpiry = new DateDt(theDate); + } + + /** * Gets the value(s) for udi (FDA Mandated Unique Device Identifier). * creating it if it does @@ -411,8 +463,9 @@ public class Device extends BaseResource implements IResource { myUdi = theValue; } + /** - * Sets the value(s) for udi (FDA Mandated Unique Device Identifier) + * Sets the value for udi (FDA Mandated Unique Device Identifier) * ** Definition: @@ -422,6 +475,7 @@ public class Device extends BaseResource implements IResource { public void setUdi( String theString) { myUdi = new StringDt(theString); } + /** * Gets the value(s) for lotNumber (Lot number of manufacture). @@ -452,8 +506,9 @@ public class Device extends BaseResource implements IResource { myLotNumber = theValue; } + /** - * Sets the value(s) for lotNumber (Lot number of manufacture) + * Sets the value for lotNumber (Lot number of manufacture) * *
* Definition: @@ -463,6 +518,7 @@ public class Device extends BaseResource implements IResource { public void setLotNumber( String theString) { myLotNumber = new StringDt(theString); } + /** * Gets the value(s) for owner (Organization responsible for device). @@ -493,6 +549,7 @@ public class Device extends BaseResource implements IResource { myOwner = theValue; } + /** * Gets the value(s) for location (Where the resource is found). @@ -523,6 +580,7 @@ public class Device extends BaseResource implements IResource { myLocation = theValue; } + /** * Gets the value(s) for patient (If the resource is affixed to a person). @@ -553,6 +611,7 @@ public class Device extends BaseResource implements IResource { myPatient = theValue; } + /** * Gets the value(s) for contact (Details for human/organization for support). @@ -583,6 +642,20 @@ public class Device extends BaseResource implements IResource { myContact = theValue; } + /** + * Adds and returns a new value for contact (Details for human/organization for support) + * + *
+ * Definition: + * Contact details for an organization or a particular human that is responsible for the device + *
+ */ + public ContactDt addContact() { + ContactDt newType = new ContactDt(); + getContact().add(newType); + return newType; + } + /** * Gets the value(s) for url (Network address to contact device). @@ -613,8 +686,9 @@ public class Device extends BaseResource implements IResource { myUrl = theValue; } + /** - * Sets the value(s) for url (Network address to contact device) + * Sets the value for url (Network address to contact device) * *
* Definition:
@@ -624,6 +698,7 @@ public class Device extends BaseResource implements IResource {
public void setUrl( String theUri) {
myUrl = new UriDt(theUri);
}
+
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Group.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Group.java
index df8bdd1d93c..7f8abe8ec9d 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Group.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Group.java
@@ -162,6 +162,12 @@ public class Group extends BaseResource implements IResource {
})
private List
+ * Definition:
+ * If true, indicates that the resource refers to a specific group of real individuals. If false, the group defines a set of intended individuals
+ *
* Definition:
@@ -334,6 +357,7 @@ public class Group extends BaseResource implements IResource {
public void setName( String theString) {
myName = new StringDt(theString);
}
+
/**
* Gets the value(s) for quantity (Number of members).
@@ -364,7 +388,20 @@ public class Group extends BaseResource implements IResource {
myQuantity = theValue;
}
-
+
+ /**
+ * Sets the value for quantity (Number of members)
+ *
+ *
+ * Definition:
+ * A count of the number of resource instances that are part of the group
+ *
+ * Definition:
+ * Identifies the traits shared by members of the group
+ *
+ * Definition:
+ * If true, indicates the characteristic is one that is NOT held by members of the group
+ *
* Definition:
@@ -233,6 +241,7 @@ public class Location extends BaseResource implements IResource {
public void setName( String theString) {
myName = new StringDt(theString);
}
+
/**
* Gets the value(s) for description (Description of the Location, which helps in finding or referencing the place).
@@ -263,8 +272,9 @@ public class Location extends BaseResource implements IResource {
myDescription = theValue;
}
+
/**
- * Sets the value(s) for description (Description of the Location, which helps in finding or referencing the place)
+ * Sets the value for description (Description of the Location, which helps in finding or referencing the place)
*
*
* Definition:
@@ -274,6 +284,7 @@ public class Location extends BaseResource implements IResource {
public void setDescription( String theString) {
myDescription = new StringDt(theString);
}
+
/**
* Gets the value(s) for type (Indicates the type of function performed at the location).
@@ -304,6 +315,7 @@ public class Location extends BaseResource implements IResource {
myType = theValue;
}
+
/**
* Gets the value(s) for telecom (Contact details of the location).
@@ -334,6 +346,20 @@ public class Location extends BaseResource implements IResource {
myTelecom = theValue;
}
+ /**
+ * Adds and returns a new value for telecom (Contact details of the location)
+ *
+ *
+ * Definition:
+ * The contact details of communication devices available at the location. This can include phone numbers, fax numbers, mobile numbers, email addresses and web sites
+ *
+ * Definition:
+ * Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below)
+ *
+ * Definition:
+ * Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below)
+ *
+ * Definition:
+ * Longitude. The value domain and the interpretation are the same as for the text of the longitude element in KML (see notes below)
+ *
+ * Definition:
+ * Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below)
+ *
+ * Definition:
+ * Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below)
+ *
+ * Definition:
+ * Latitude. The value domain and the interpretation are the same as for the text of the latitude element in KML (see notes below)
+ *
+ * Definition:
+ * Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below)
+ *
+ * Definition:
+ * Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below)
+ *
+ * Definition:
+ * Altitude. The value domain and the interpretation are the same as for the text of the altitude element in KML (see notes below)
+ *
* Definition:
@@ -175,6 +182,7 @@ public class Medication extends BaseResource implements IResource {
public void setName( String theString) {
myName = new StringDt(theString);
}
+
/**
* Gets the value(s) for code (Codes that identify this medication).
@@ -205,6 +213,7 @@ public class Medication extends BaseResource implements IResource {
myCode = theValue;
}
+
/**
* Gets the value(s) for isBrand (True if a brand).
@@ -235,7 +244,20 @@ public class Medication extends BaseResource implements IResource {
myIsBrand = theValue;
}
-
+
+ /**
+ * Sets the value for isBrand (True if a brand)
+ *
+ *
+ * Definition:
+ * Set to true if the item is attributable to a specific manufacturer (even if we don't know who that is)
+ *
+ * Definition:
+ * Identifies a particular constituent of interest in the product
+ *
* Definition:
@@ -391,6 +401,7 @@ public class Observation extends BaseResource implements IResource {
public void setComments( String theString) {
myComments = new StringDt(theString);
}
+
/**
* Gets the value(s) for applies[x] (Physiologically Relevant time/time-period for observation).
@@ -418,6 +429,7 @@ public class Observation extends BaseResource implements IResource {
myApplies = theValue;
}
+
/**
* Gets the value(s) for issued (Date/Time this was made available).
@@ -448,7 +460,32 @@ public class Observation extends BaseResource implements IResource {
myIssued = theValue;
}
-
+
+ /**
+ * Sets the value for issued (Date/Time this was made available)
+ *
+ *
+ * Definition:
+ *
+ *
+ * Definition:
+ *
+ *
+ * Definition:
+ * Guidance on how to interpret the value by comparison to a normal or recommended range
+ *
+ * Definition:
+ * Related observations - either components, or previous observations, or statements of derivation
+ *
+ * Definition:
+ * Identifier for the organization that is used to identify the organization across multiple disparate systems
+ *
* Definition:
@@ -214,6 +235,7 @@ public class Organization extends BaseResource implements IResource {
public void setName( String theString) {
myName = new StringDt(theString);
}
+
/**
* Gets the value(s) for type (Kind of organization).
@@ -244,6 +266,7 @@ public class Organization extends BaseResource implements IResource {
myType = theValue;
}
+
/**
* Gets the value(s) for telecom (A contact detail for the organization).
@@ -274,6 +297,20 @@ public class Organization extends BaseResource implements IResource {
myTelecom = theValue;
}
+ /**
+ * Adds and returns a new value for telecom (A contact detail for the organization)
+ *
+ *
+ * Definition:
+ * A contact detail for the organization
+ *
+ * Definition:
+ * An address for the organization
+ *
+ * Definition:
+ *
+ *
+ * Definition:
+ * Whether the organization's record is still in active use
+ *
+ * Definition:
+ * A contact detail (e.g. a telephone number or an email address) by which the party may be contacted.
+ *
+ * Definition:
+ * An identifier that applies to this person as a patient
+ *
+ * Definition:
+ * A name associated with the individual.
+ *
+ * Definition:
+ * A contact detail (e.g. a telephone number or an email address) by which the individual may be contacted.
+ *
* Definition:
@@ -415,6 +465,19 @@ public class Patient extends BaseResource implements IResource {
public void setBirthDateWithSecondsPrecision( Date theDate) {
myBirthDate = new DateTimeDt(theDate);
}
+
+ /**
+ * Sets the value for birthDate (The date and time of birth for the individual)
+ *
+ *
+ * Definition:
+ * The date and time of birth for the individual
+ *
+ * Definition:
+ * Addresses for the individual
+ *
+ * Definition:
+ * Image of the person
+ *
+ * Definition:
+ * A contact party (e.g. guardian, partner, friend) for the patient
+ *
+ * Definition:
+ * Languages which may be used to communicate with the patient about his or her health
+ *
+ * Definition:
+ * Link to another patient resource that concerns the same actual person
+ *
+ * Definition:
+ * Whether this patient record is in active use
+ *
+ * Definition:
+ * The nature of the relationship between the patient and the contact person
+ *
+ * Definition:
+ * A contact detail for the person, e.g. a telephone number or an email address.
+ *
+ * Definition:
+ * An identifier that applies to this person in this role
+ *
+ * Definition:
+ * A contact detail for the practitioner, e.g. a telephone number or an email address.
+ *
* Definition:
@@ -369,6 +407,19 @@ public class Practitioner extends BaseResource implements IResource {
public void setBirthDateWithSecondsPrecision( Date theDate) {
myBirthDate = new DateTimeDt(theDate);
}
+
+ /**
+ * Sets the value for birthDate (The date and time of birth for the practitioner)
+ *
+ *
+ * Definition:
+ * The date and time of birth for the practitioner
+ *
+ * Definition:
+ * Image of the person
+ *
+ * Definition:
+ * Roles which this practitioner is authorized to perform for the organization
+ *
+ * Definition:
+ * Specific specialty of the practitioner
+ *
+ * Definition:
+ *
+ *
+ * Definition:
+ * A language the practitioner is able to use in patient communication
+ *
* Definition:
@@ -239,6 +246,7 @@ public class Profile extends BaseResource implements IResource {
public void setIdentifier( String theString) {
myIdentifier = new StringDt(theString);
}
+
/**
* Gets the value(s) for version (Logical id for this version of the profile).
@@ -269,8 +277,9 @@ public class Profile extends BaseResource implements IResource {
myVersion = theValue;
}
+
/**
- * Sets the value(s) for version (Logical id for this version of the profile)
+ * Sets the value for version (Logical id for this version of the profile)
*
*
* Definition:
@@ -280,6 +289,7 @@ public class Profile extends BaseResource implements IResource {
public void setVersion( String theString) {
myVersion = new StringDt(theString);
}
+
/**
* Gets the value(s) for name (Informal name for this profile).
@@ -310,8 +320,9 @@ public class Profile extends BaseResource implements IResource {
myName = theValue;
}
+
/**
- * Sets the value(s) for name (Informal name for this profile)
+ * Sets the value for name (Informal name for this profile)
*
*
* Definition:
@@ -321,6 +332,7 @@ public class Profile extends BaseResource implements IResource {
public void setName( String theString) {
myName = new StringDt(theString);
}
+
/**
* Gets the value(s) for publisher (Name of the publisher (Organization or individual)).
@@ -351,8 +363,9 @@ public class Profile extends BaseResource implements IResource {
myPublisher = theValue;
}
+
/**
- * Sets the value(s) for publisher (Name of the publisher (Organization or individual))
+ * Sets the value for publisher (Name of the publisher (Organization or individual))
*
*
* Definition:
@@ -362,6 +375,7 @@ public class Profile extends BaseResource implements IResource {
public void setPublisher( String theString) {
myPublisher = new StringDt(theString);
}
+
/**
* Gets the value(s) for telecom (Contact information of the publisher).
@@ -392,6 +406,20 @@ public class Profile extends BaseResource implements IResource {
myTelecom = theValue;
}
+ /**
+ * Adds and returns a new value for telecom (Contact information of the publisher)
+ *
+ *
+ * Definition:
+ * Contact details to assist a user in finding and communicating with the publisher
+ *
* Definition:
@@ -433,6 +462,7 @@ public class Profile extends BaseResource implements IResource {
public void setDescription( String theString) {
myDescription = new StringDt(theString);
}
+
/**
* Gets the value(s) for code (Assist with indexing and finding).
@@ -463,6 +493,20 @@ public class Profile extends BaseResource implements IResource {
myCode = theValue;
}
+ /**
+ * Adds and returns a new value for code (Assist with indexing and finding)
+ *
+ *
+ * Definition:
+ * A set of terms from external terminologies that may be used to assist with indexing and searching of templates.
+ *
+ * Definition:
+ * This profile was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage
+ *
* Definition:
@@ -576,6 +635,19 @@ public class Profile extends BaseResource implements IResource {
public void setDateWithSecondsPrecision( Date theDate) {
myDate = new DateTimeDt(theDate);
}
+
+ /**
+ * Sets the value for date (Date for this version of the profile)
+ *
+ *
+ * Definition:
+ * The date that this version of the profile was published
+ *
* Definition:
@@ -617,6 +690,7 @@ public class Profile extends BaseResource implements IResource {
public void setRequirements( String theString) {
myRequirements = new StringDt(theString);
}
+
/**
* Gets the value(s) for fhirVersion (FHIR Version this profile targets).
@@ -647,8 +721,9 @@ public class Profile extends BaseResource implements IResource {
myFhirVersion = theValue;
}
+
/**
- * Sets the value(s) for fhirVersion (FHIR Version this profile targets)
+ * Sets the value for fhirVersion (FHIR Version this profile targets)
*
*
* Definition:
@@ -658,6 +733,7 @@ public class Profile extends BaseResource implements IResource {
public void setFhirVersion( String theId) {
myFhirVersion = new IdDt(theId);
}
+
/**
* Gets the value(s) for mapping (External specification that the content is mapped to).
@@ -688,6 +764,20 @@ public class Profile extends BaseResource implements IResource {
myMapping = theValue;
}
+ /**
+ * Adds and returns a new value for mapping (External specification that the content is mapped to)
+ *
+ *
+ * Definition:
+ * An external specification that the content is mapped to
+ *
+ * Definition:
+ * A constraint statement about what contents a resource or data type may have
+ *
+ * Definition:
+ * An extension defined as part of the profile
+ *
+ * Definition:
+ * Definition of a named query and its parameters and their meaning
+ *
* Definition:
@@ -842,6 +981,7 @@ public class Profile extends BaseResource implements IResource {
public void setIdentity( String theId) {
myIdentity = new IdDt(theId);
}
+
/**
* Gets the value(s) for uri (Identifies what this mapping refers to).
@@ -872,8 +1012,9 @@ public class Profile extends BaseResource implements IResource {
myUri = theValue;
}
+
/**
- * Sets the value(s) for uri (Identifies what this mapping refers to)
+ * Sets the value for uri (Identifies what this mapping refers to)
*
*
* Definition:
@@ -883,6 +1024,7 @@ public class Profile extends BaseResource implements IResource {
public void setUri( String theUri) {
myUri = new UriDt(theUri);
}
+
/**
* Gets the value(s) for name (Names what this mapping refers to).
@@ -913,8 +1055,9 @@ public class Profile extends BaseResource implements IResource {
myName = theValue;
}
+
/**
- * Sets the value(s) for name (Names what this mapping refers to)
+ * Sets the value for name (Names what this mapping refers to)
*
*
* Definition:
@@ -924,6 +1067,7 @@ public class Profile extends BaseResource implements IResource {
public void setName( String theString) {
myName = new StringDt(theString);
}
+
/**
* Gets the value(s) for comments (Versions, Issues, Scope limitations etc).
@@ -954,8 +1098,9 @@ public class Profile extends BaseResource implements IResource {
myComments = theValue;
}
+
/**
- * Sets the value(s) for comments (Versions, Issues, Scope limitations etc)
+ * Sets the value for comments (Versions, Issues, Scope limitations etc)
*
*
* Definition:
@@ -965,6 +1110,7 @@ public class Profile extends BaseResource implements IResource {
public void setComments( String theString) {
myComments = new StringDt(theString);
}
+
}
@@ -999,6 +1145,12 @@ public class Profile extends BaseResource implements IResource {
@Child(name="searchParam", order=5, min=0, max=Child.MAX_UNLIMITED)
private List
* Definition:
@@ -1081,6 +1235,7 @@ public class Profile extends BaseResource implements IResource {
public void setName( String theString) {
myName = new StringDt(theString);
}
+
/**
* Gets the value(s) for publish (This definition is published (i.e. for validation)).
@@ -1111,7 +1266,20 @@ public class Profile extends BaseResource implements IResource {
myPublish = theValue;
}
-
+
+ /**
+ * Sets the value for publish (This definition is published (i.e. for validation))
+ *
+ *
+ * Definition:
+ * This definition of a profile on a structure is published as a formal statement. Some structural definitions might be defined purely for internal use within the profile, and not intended to be used outside that context
+ *
* Definition:
@@ -1152,6 +1321,7 @@ public class Profile extends BaseResource implements IResource {
public void setPurpose( String theString) {
myPurpose = new StringDt(theString);
}
+
/**
* Gets the value(s) for element (Definition of elements in the resource (if no profile)).
@@ -1182,6 +1352,20 @@ public class Profile extends BaseResource implements IResource {
myElement = theValue;
}
+ /**
+ * Adds and returns a new value for element (Definition of elements in the resource (if no profile))
+ *
+ *
+ * Definition:
+ * Captures constraints on each element within the resource
+ *
+ * Definition:
+ * Additional search parameters for implementations to support and/or make use of
+ *
* Definition:
@@ -1282,6 +1487,7 @@ public class Profile extends BaseResource implements IResource {
public void setPath( String theString) {
myPath = new StringDt(theString);
}
+
/**
* Gets the value(s) for representation (How this element is represented in instances).
@@ -1312,6 +1518,7 @@ public class Profile extends BaseResource implements IResource {
myRepresentation = theValue;
}
+
/**
* Add a value for representation (How this element is represented in instances)
*
@@ -1367,8 +1574,9 @@ public class Profile extends BaseResource implements IResource {
myName = theValue;
}
+
/**
- * Sets the value(s) for name (Name for this particular element definition (reference target))
+ * Sets the value for name (Name for this particular element definition (reference target))
*
*
* Definition:
@@ -1378,6 +1586,7 @@ public class Profile extends BaseResource implements IResource {
public void setName( String theString) {
myName = new StringDt(theString);
}
+
/**
* Gets the value(s) for slicing (This element is sliced - slices follow).
@@ -1408,6 +1617,7 @@ public class Profile extends BaseResource implements IResource {
mySlicing = theValue;
}
+
/**
* Gets the value(s) for definition (More specific definition of the element ).
@@ -1438,6 +1648,7 @@ public class Profile extends BaseResource implements IResource {
myDefinition = theValue;
}
+
}
@@ -1462,6 +1673,12 @@ public class Profile extends BaseResource implements IResource {
@Child(name="rules", type=CodeDt.class, order=2, min=1, max=1)
private BoundCodeDt
* Definition:
@@ -1502,6 +1720,7 @@ public class Profile extends BaseResource implements IResource {
public void setDiscriminator( String theId) {
myDiscriminator = new IdDt(theId);
}
+
/**
* Gets the value(s) for ordered (If elements must be in same order as slices).
@@ -1532,7 +1751,20 @@ public class Profile extends BaseResource implements IResource {
myOrdered = theValue;
}
-
+
+ /**
+ * Sets the value for ordered (If elements must be in same order as slices)
+ *
+ *
+ * Definition:
+ * If the matching elements have to occur in the same order as defined in the profile
+ *
* Definition:
@@ -1684,6 +1924,7 @@ public class Profile extends BaseResource implements IResource {
public void setShort( String theString) {
myShort = new StringDt(theString);
}
+
/**
* Gets the value(s) for formal (Full formal definition in human language).
@@ -1714,8 +1955,9 @@ public class Profile extends BaseResource implements IResource {
myFormal = theValue;
}
+
/**
- * Sets the value(s) for formal (Full formal definition in human language)
+ * Sets the value for formal (Full formal definition in human language)
*
*
* Definition:
@@ -1725,6 +1967,7 @@ public class Profile extends BaseResource implements IResource {
public void setFormal( String theString) {
myFormal = new StringDt(theString);
}
+
/**
* Gets the value(s) for comments (Comments about the use of this element).
@@ -1755,8 +1998,9 @@ public class Profile extends BaseResource implements IResource {
myComments = theValue;
}
+
/**
- * Sets the value(s) for comments (Comments about the use of this element)
+ * Sets the value for comments (Comments about the use of this element)
*
*
* Definition:
@@ -1766,6 +2010,7 @@ public class Profile extends BaseResource implements IResource {
public void setComments( String theString) {
myComments = new StringDt(theString);
}
+
/**
* Gets the value(s) for requirements (Why is this needed?).
@@ -1796,8 +2041,9 @@ public class Profile extends BaseResource implements IResource {
myRequirements = theValue;
}
+
/**
- * Sets the value(s) for requirements (Why is this needed?)
+ * Sets the value for requirements (Why is this needed?)
*
*
* Definition:
@@ -1807,6 +2053,7 @@ public class Profile extends BaseResource implements IResource {
public void setRequirements( String theString) {
myRequirements = new StringDt(theString);
}
+
/**
* Gets the value(s) for synonym (Other names).
@@ -1837,8 +2084,22 @@ public class Profile extends BaseResource implements IResource {
mySynonym = theValue;
}
+ /**
+ * Adds and returns a new value for synonym (Other names)
+ *
+ *
+ * Definition:
+ * Identifies additional names by which this element might also be known
+ *
* Definition:
@@ -1851,6 +2112,7 @@ public class Profile extends BaseResource implements IResource {
}
mySynonym.add(new StringDt(theString));
}
+
/**
* Gets the value(s) for min (Minimum Cardinality).
@@ -1881,7 +2143,20 @@ public class Profile extends BaseResource implements IResource {
myMin = theValue;
}
-
+
+ /**
+ * Sets the value for min (Minimum Cardinality)
+ *
+ *
+ * Definition:
+ * The minimum number of times this element SHALL appear in the instance
+ *
* Definition:
@@ -1922,6 +2198,7 @@ public class Profile extends BaseResource implements IResource {
public void setMax( String theString) {
myMax = new StringDt(theString);
}
+
/**
* Gets the value(s) for type (Data type and Profile for this element).
@@ -1952,6 +2229,20 @@ public class Profile extends BaseResource implements IResource {
myType = theValue;
}
+ /**
+ * Adds and returns a new value for type (Data type and Profile for this element)
+ *
+ *
+ * Definition:
+ * The data type or resource that the value of this element is permitted to be
+ *
* Definition:
@@ -1993,6 +2285,7 @@ public class Profile extends BaseResource implements IResource {
public void setNameReference( String theString) {
myNameReference = new StringDt(theString);
}
+
/**
* Gets the value(s) for value[x] (Fixed value: [as defined for a primitive type]).
@@ -2020,6 +2313,7 @@ public class Profile extends BaseResource implements IResource {
myValue = theValue;
}
+
/**
* Gets the value(s) for example[x] (Example value: [as defined for type]).
@@ -2047,6 +2341,7 @@ public class Profile extends BaseResource implements IResource {
myExample = theValue;
}
+
/**
* Gets the value(s) for maxLength (Length for strings).
@@ -2077,7 +2372,20 @@ public class Profile extends BaseResource implements IResource {
myMaxLength = theValue;
}
-
+
+ /**
+ * Sets the value for maxLength (Length for strings)
+ *
+ *
+ * Definition:
+ * Indicates the shortest length that SHALL be supported by conformant instances without truncation
+ *
+ * Definition:
+ * A reference to an invariant that may make additional statements about the cardinality or value in the instance
+ *
* Definition:
@@ -2121,6 +2443,7 @@ public class Profile extends BaseResource implements IResource {
}
myCondition.add(new IdDt(theId));
}
+
/**
* Gets the value(s) for constraint (Condition that must evaluate to true).
@@ -2151,6 +2474,20 @@ public class Profile extends BaseResource implements IResource {
myConstraint = theValue;
}
+ /**
+ * Adds and returns a new value for constraint (Condition that must evaluate to true)
+ *
+ *
+ * Definition:
+ * Formal constraints such as co-occurrence and other constraints that can be computationally evaluated within the context of the instance
+ *
+ * Definition:
+ * If true, conformant resource authors SHALL be capable of providing a value for the element and resource consumers SHALL be capable of extracting and doing something useful with the data element. If false, the element may be ignored and not supported
+ *
+ * Definition:
+ * If true, the value of this element affects the interpretation of the element or resource that contains it, and the value of the element cannot be ignored. Typically, this is used for status, negation and qualification codes. The effect of this is that the element cannot be ignored by systems: they SHALL either recognize the element and process it, and/or a pre-determination has been made that it is not relevant to their particular system.
+ *
+ * Definition:
+ * Identifies a concept from an external specification that roughly corresponds to this element
+ *
* Definition:
@@ -2377,6 +2763,7 @@ public class Profile extends BaseResource implements IResource {
public void setProfile( String theUri) {
myProfile = new UriDt(theUri);
}
+
/**
* Gets the value(s) for aggregation (contained | referenced | bundled - how aggregated).
@@ -2407,6 +2794,7 @@ public class Profile extends BaseResource implements IResource {
myAggregation = theValue;
}
+
/**
* Add a value for aggregation (contained | referenced | bundled - how aggregated)
*
@@ -2463,6 +2851,12 @@ public class Profile extends BaseResource implements IResource {
@Child(name="xpath", type=StringDt.class, order=4, min=1, max=1)
private StringDt myXpath;
+
+ @Override
+ public boolean isEmpty() {
+ return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myKey, myName, mySeverity, myHuman, myXpath);
+ }
+
/**
* Gets the value(s) for key (Target of 'condition' reference above).
* creating it if it does
@@ -2492,8 +2886,9 @@ public class Profile extends BaseResource implements IResource {
myKey = theValue;
}
+
/**
- * Sets the value(s) for key (Target of 'condition' reference above)
+ * Sets the value for key (Target of 'condition' reference above)
*
*
* Definition:
@@ -2503,6 +2898,7 @@ public class Profile extends BaseResource implements IResource {
public void setKey( String theId) {
myKey = new IdDt(theId);
}
+
/**
* Gets the value(s) for name (Short human label).
@@ -2533,8 +2929,9 @@ public class Profile extends BaseResource implements IResource {
myName = theValue;
}
+
/**
- * Sets the value(s) for name (Short human label)
+ * Sets the value for name (Short human label)
*
*
* Definition:
@@ -2544,6 +2941,7 @@ public class Profile extends BaseResource implements IResource {
public void setName( String theString) {
myName = new StringDt(theString);
}
+
/**
* Gets the value(s) for severity (error | warning).
@@ -2574,6 +2972,7 @@ public class Profile extends BaseResource implements IResource {
mySeverity = theValue;
}
+
/**
* Sets the value(s) for severity (error | warning)
*
@@ -2616,8 +3015,9 @@ public class Profile extends BaseResource implements IResource {
myHuman = theValue;
}
+
/**
- * Sets the value(s) for human (Human description of constraint)
+ * Sets the value for human (Human description of constraint)
*
*
* Definition:
@@ -2627,6 +3027,7 @@ public class Profile extends BaseResource implements IResource {
public void setHuman( String theString) {
myHuman = new StringDt(theString);
}
+
/**
* Gets the value(s) for xpath (XPath expression of constraint).
@@ -2657,8 +3058,9 @@ public class Profile extends BaseResource implements IResource {
myXpath = theValue;
}
+
/**
- * Sets the value(s) for xpath (XPath expression of constraint)
+ * Sets the value for xpath (XPath expression of constraint)
*
*
* Definition:
@@ -2668,6 +3070,7 @@ public class Profile extends BaseResource implements IResource {
public void setXpath( String theString) {
myXpath = new StringDt(theString);
}
+
}
@@ -2702,6 +3105,12 @@ public class Profile extends BaseResource implements IResource {
}))
private IDatatype myReference;
+
+ @Override
+ public boolean isEmpty() {
+ return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myName, myIsExtensible, myConformance, myDescription, myReference);
+ }
+
/**
* Gets the value(s) for name (Descriptive Name).
* creating it if it does
@@ -2731,8 +3140,9 @@ public class Profile extends BaseResource implements IResource {
myName = theValue;
}
+
/**
- * Sets the value(s) for name (Descriptive Name)
+ * Sets the value for name (Descriptive Name)
*
*
* Definition:
@@ -2742,6 +3152,7 @@ public class Profile extends BaseResource implements IResource {
public void setName( String theString) {
myName = new StringDt(theString);
}
+
/**
* Gets the value(s) for isExtensible (Can additional codes be used?).
@@ -2772,7 +3183,20 @@ public class Profile extends BaseResource implements IResource {
myIsExtensible = theValue;
}
-
+
+ /**
+ * Sets the value for isExtensible (Can additional codes be used?)
+ *
+ *
+ * Definition:
+ * If true, then conformant systems may use additional codes or (where the data type permits) text alone to convey concepts not covered by the set of codes identified in the binding. If false, then conformant systems are constrained to the provided codes alone
+ *
* Definition:
@@ -2855,6 +3281,7 @@ public class Profile extends BaseResource implements IResource {
public void setDescription( String theString) {
myDescription = new StringDt(theString);
}
+
/**
* Gets the value(s) for reference[x] (Source of value set).
@@ -2882,6 +3309,7 @@ public class Profile extends BaseResource implements IResource {
myReference = theValue;
}
+
}
@@ -2904,6 +3332,12 @@ public class Profile extends BaseResource implements IResource {
@Child(name="map", type=StringDt.class, order=1, min=1, max=1)
private StringDt myMap;
+
+ @Override
+ public boolean isEmpty() {
+ return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentity, myMap);
+ }
+
/**
* Gets the value(s) for identity (Reference to mapping declaration).
* creating it if it does
@@ -2933,8 +3367,9 @@ public class Profile extends BaseResource implements IResource {
myIdentity = theValue;
}
+
/**
- * Sets the value(s) for identity (Reference to mapping declaration)
+ * Sets the value for identity (Reference to mapping declaration)
*
*
* Definition:
@@ -2944,6 +3379,7 @@ public class Profile extends BaseResource implements IResource {
public void setIdentity( String theId) {
myIdentity = new IdDt(theId);
}
+
/**
* Gets the value(s) for map (Details of the mapping).
@@ -2974,8 +3410,9 @@ public class Profile extends BaseResource implements IResource {
myMap = theValue;
}
+
/**
- * Sets the value(s) for map (Details of the mapping)
+ * Sets the value for map (Details of the mapping)
*
*
* Definition:
@@ -2985,6 +3422,7 @@ public class Profile extends BaseResource implements IResource {
public void setMap( String theString) {
myMap = new StringDt(theString);
}
+
}
@@ -3018,6 +3456,12 @@ public class Profile extends BaseResource implements IResource {
@Child(name="target", type=CodeDt.class, order=4, min=0, max=Child.MAX_UNLIMITED)
private List
* Definition:
@@ -3058,6 +3503,7 @@ public class Profile extends BaseResource implements IResource {
public void setName( String theString) {
myName = new StringDt(theString);
}
+
/**
* Gets the value(s) for type (number | date | string | token | reference | composite | quantity).
@@ -3088,6 +3534,7 @@ public class Profile extends BaseResource implements IResource {
myType = theValue;
}
+
/**
* Sets the value(s) for type (number | date | string | token | reference | composite | quantity)
*
@@ -3130,8 +3577,9 @@ public class Profile extends BaseResource implements IResource {
myDocumentation = theValue;
}
+
/**
- * Sets the value(s) for documentation (Contents and meaning of search parameter)
+ * Sets the value for documentation (Contents and meaning of search parameter)
*
*
* Definition:
@@ -3141,6 +3589,7 @@ public class Profile extends BaseResource implements IResource {
public void setDocumentation( String theString) {
myDocumentation = new StringDt(theString);
}
+
/**
* Gets the value(s) for xpath (XPath that extracts the parameter set).
@@ -3171,8 +3620,9 @@ public class Profile extends BaseResource implements IResource {
myXpath = theValue;
}
+
/**
- * Sets the value(s) for xpath (XPath that extracts the parameter set)
+ * Sets the value for xpath (XPath that extracts the parameter set)
*
*
* Definition:
@@ -3182,6 +3632,7 @@ public class Profile extends BaseResource implements IResource {
public void setXpath( String theString) {
myXpath = new StringDt(theString);
}
+
/**
* Gets the value(s) for target (Types of resource (if a resource reference)).
@@ -3212,6 +3663,7 @@ public class Profile extends BaseResource implements IResource {
myTarget = theValue;
}
+
/**
* Add a value for target (Types of resource (if a resource reference))
*
@@ -3269,6 +3721,12 @@ public class Profile extends BaseResource implements IResource {
@Child(name="definition", type=StructureElementDefinition.class, order=4, min=1, max=1)
private StructureElementDefinition myDefinition;
+
+ @Override
+ public boolean isEmpty() {
+ return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myCode, myDisplay, myContextType, myContext, myDefinition);
+ }
+
/**
* Gets the value(s) for code (Identifies the extension in this profile).
* creating it if it does
@@ -3298,6 +3756,7 @@ public class Profile extends BaseResource implements IResource {
myCode = theValue;
}
+
/**
* Gets the value(s) for display (Use this name when displaying the value).
@@ -3328,8 +3787,9 @@ public class Profile extends BaseResource implements IResource {
myDisplay = theValue;
}
+
/**
- * Sets the value(s) for display (Use this name when displaying the value)
+ * Sets the value for display (Use this name when displaying the value)
*
*
* Definition:
@@ -3339,6 +3799,7 @@ public class Profile extends BaseResource implements IResource {
public void setDisplay( String theString) {
myDisplay = new StringDt(theString);
}
+
/**
* Gets the value(s) for contextType (resource | datatype | mapping | extension).
@@ -3369,6 +3830,7 @@ public class Profile extends BaseResource implements IResource {
myContextType = theValue;
}
+
/**
* Sets the value(s) for contextType (resource | datatype | mapping | extension)
*
@@ -3411,8 +3873,22 @@ public class Profile extends BaseResource implements IResource {
myContext = theValue;
}
+ /**
+ * Adds and returns a new value for context (Where the extension can be used in instances)
+ *
+ *
+ * Definition:
+ * Identifies the types of resource or data type elements to which the extension can be applied
+ *
* Definition:
@@ -3425,6 +3901,7 @@ public class Profile extends BaseResource implements IResource {
}
myContext.add(new StringDt(theString));
}
+
/**
* Gets the value(s) for definition (Definition of the extension and its content).
@@ -3455,6 +3932,7 @@ public class Profile extends BaseResource implements IResource {
myDefinition = theValue;
}
+
}
@@ -3480,6 +3958,12 @@ public class Profile extends BaseResource implements IResource {
@Child(name="parameter", type=StructureSearchParam.class, order=2, min=0, max=Child.MAX_UNLIMITED)
private List
* Definition:
@@ -3520,6 +4005,7 @@ public class Profile extends BaseResource implements IResource {
public void setName( String theString) {
myName = new StringDt(theString);
}
+
/**
* Gets the value(s) for documentation (Describes the named query).
@@ -3550,8 +4036,9 @@ public class Profile extends BaseResource implements IResource {
myDocumentation = theValue;
}
+
/**
- * Sets the value(s) for documentation (Describes the named query)
+ * Sets the value for documentation (Describes the named query)
*
*
* Definition:
@@ -3561,6 +4048,7 @@ public class Profile extends BaseResource implements IResource {
public void setDocumentation( String theString) {
myDocumentation = new StringDt(theString);
}
+
/**
* Gets the value(s) for parameter (Parameter for the named query).
@@ -3591,6 +4079,20 @@ public class Profile extends BaseResource implements IResource {
myParameter = theValue;
}
+ /**
+ * Adds and returns a new value for parameter (Parameter for the named query)
+ *
+ *
+ * Definition:
+ * A parameter of a named query
+ *
+ * Definition:
+ * Id for specimen
+ *
+ * Definition:
+ * Parent specimen from which the focal specimen was a component
+ *
* Definition:
@@ -271,6 +309,19 @@ public class Specimen extends BaseResource implements IResource {
public void setReceivedTimeWithSecondsPrecision( Date theDate) {
myReceivedTime = new DateTimeDt(theDate);
}
+
+ /**
+ * Sets the value for receivedTime (The time when specimen was received for processing)
+ *
+ *
+ * Definition:
+ * Time when specimen was received for processing or testing
+ *
+ * Definition:
+ * Details concerning treatment and processing steps for the specimen
+ *
+ * Definition:
+ * The container holding the specimen. The recursive nature of containers; i.e. blood in tube in tray in rack is not addressed here.
+ *
+ * Definition:
+ * To communicate any details or issues encountered during the specimen collection procedure.
+ *
* Definition:
@@ -566,6 +675,7 @@ public class Specimen extends BaseResource implements IResource {
}
myComment.add(new StringDt(theString));
}
+
/**
* Gets the value(s) for collected[x] (Collection time).
@@ -593,6 +703,7 @@ public class Specimen extends BaseResource implements IResource {
myCollected = theValue;
}
+
/**
* Gets the value(s) for quantity (The quantity of specimen collected).
@@ -623,6 +734,7 @@ public class Specimen extends BaseResource implements IResource {
myQuantity = theValue;
}
+
/**
* Gets the value(s) for method (Technique used to perform collection).
@@ -653,6 +765,7 @@ public class Specimen extends BaseResource implements IResource {
myMethod = theValue;
}
+
/**
* Gets the value(s) for sourceSite (Anatomical collection site).
@@ -683,6 +796,7 @@ public class Specimen extends BaseResource implements IResource {
mySourceSite = theValue;
}
+
}
@@ -711,6 +825,12 @@ public class Specimen extends BaseResource implements IResource {
})
private List
* Definition:
@@ -751,6 +872,7 @@ public class Specimen extends BaseResource implements IResource {
public void setDescription( String theString) {
myDescription = new StringDt(theString);
}
+
/**
* Gets the value(s) for procedure (Indicates the treatment or processing step applied to the specimen).
@@ -781,6 +903,7 @@ public class Specimen extends BaseResource implements IResource {
myProcedure = theValue;
}
+
/**
* Gets the value(s) for additive (Material used in the processing step).
@@ -811,6 +934,7 @@ public class Specimen extends BaseResource implements IResource {
myAdditive = theValue;
}
+
}
@@ -848,6 +972,12 @@ public class Specimen extends BaseResource implements IResource {
})
private ResourceReference myAdditive;
+
+ @Override
+ public boolean isEmpty() {
+ return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myIdentifier, myDescription, myType, myCapacity, mySpecimenQuantity, myAdditive);
+ }
+
/**
* Gets the value(s) for identifier (Id for the container).
* creating it if it does
@@ -877,6 +1007,20 @@ public class Specimen extends BaseResource implements IResource {
myIdentifier = theValue;
}
+ /**
+ * Adds and returns a new value for identifier (Id for the container)
+ *
+ *
+ * Definition:
+ * Id for container. There may be multiple; a manufacturer's bar code, lab assigned identifier, etc. The container ID may differ from the specimen id in some circumstances
+ *
* Definition:
@@ -918,6 +1063,7 @@ public class Specimen extends BaseResource implements IResource {
public void setDescription( String theString) {
myDescription = new StringDt(theString);
}
+
/**
* Gets the value(s) for type (Kind of container directly associated with specimen).
@@ -948,6 +1094,7 @@ public class Specimen extends BaseResource implements IResource {
myType = theValue;
}
+
/**
* Gets the value(s) for capacity (Container volume or size).
@@ -978,6 +1125,7 @@ public class Specimen extends BaseResource implements IResource {
myCapacity = theValue;
}
+
/**
* Gets the value(s) for specimenQuantity (Quantity of specimen within container).
@@ -1008,6 +1156,7 @@ public class Specimen extends BaseResource implements IResource {
mySpecimenQuantity = theValue;
}
+
/**
* Gets the value(s) for additive (Additive associated with container ).
@@ -1038,6 +1187,7 @@ public class Specimen extends BaseResource implements IResource {
myAdditive = theValue;
}
+
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Substance.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Substance.java
index 3a30000677b..fd9f00d2c38 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Substance.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/dstu/resource/Substance.java
@@ -103,6 +103,12 @@ public class Substance extends BaseResource implements IResource {
@Child(name="ingredient", order=3, min=0, max=Child.MAX_UNLIMITED)
private List
* Definition:
@@ -173,6 +181,7 @@ public class Substance extends BaseResource implements IResource {
public void setDescription( String theString) {
myDescription = new StringDt(theString);
}
+
/**
* Gets the value(s) for instance (If this describes a specific package/container of the substance).
@@ -203,6 +212,7 @@ public class Substance extends BaseResource implements IResource {
myInstance = theValue;
}
+
/**
* Gets the value(s) for ingredient (Composition information about the substance).
@@ -233,6 +243,20 @@ public class Substance extends BaseResource implements IResource {
myIngredient = theValue;
}
+ /**
+ * Adds and returns a new value for ingredient (Composition information about the substance)
+ *
+ *
+ * Definition:
+ * A substance can be composed of other substances
+ *
* Definition:
@@ -324,6 +356,19 @@ public class Substance extends BaseResource implements IResource {
public void setExpiryWithSecondsPrecision( Date theDate) {
myExpiry = new DateTimeDt(theDate);
}
+
+ /**
+ * Sets the value for expiry (When no longer valid to use)
+ *
+ *
+ * Definition:
+ * When the substance is no longer valid to use. For some substances, a single arbitrary date is used for expiry.
+ *
* Definition:
@@ -233,6 +240,7 @@ public class ValueSet extends BaseResource implements IResource {
public void setIdentifier( String theString) {
myIdentifier = new StringDt(theString);
}
+
/**
* Gets the value(s) for version (Logical id for this version of the value set).
@@ -263,8 +271,9 @@ public class ValueSet extends BaseResource implements IResource {
myVersion = theValue;
}
+
/**
- * Sets the value(s) for version (Logical id for this version of the value set)
+ * Sets the value for version (Logical id for this version of the value set)
*
*
* Definition:
@@ -274,6 +283,7 @@ public class ValueSet extends BaseResource implements IResource {
public void setVersion( String theString) {
myVersion = new StringDt(theString);
}
+
/**
* Gets the value(s) for name (Informal name for this value set).
@@ -304,8 +314,9 @@ public class ValueSet extends BaseResource implements IResource {
myName = theValue;
}
+
/**
- * Sets the value(s) for name (Informal name for this value set)
+ * Sets the value for name (Informal name for this value set)
*
*
* Definition:
@@ -315,6 +326,7 @@ public class ValueSet extends BaseResource implements IResource {
public void setName( String theString) {
myName = new StringDt(theString);
}
+
/**
* Gets the value(s) for publisher (Name of the publisher (Organization or individual)).
@@ -345,8 +357,9 @@ public class ValueSet extends BaseResource implements IResource {
myPublisher = theValue;
}
+
/**
- * Sets the value(s) for publisher (Name of the publisher (Organization or individual))
+ * Sets the value for publisher (Name of the publisher (Organization or individual))
*
*
* Definition:
@@ -356,6 +369,7 @@ public class ValueSet extends BaseResource implements IResource {
public void setPublisher( String theString) {
myPublisher = new StringDt(theString);
}
+
/**
* Gets the value(s) for telecom (Contact information of the publisher).
@@ -386,6 +400,20 @@ public class ValueSet extends BaseResource implements IResource {
myTelecom = theValue;
}
+ /**
+ * Adds and returns a new value for telecom (Contact information of the publisher)
+ *
+ *
+ * Definition:
+ * Contacts of the publisher to assist a user in finding and communicating with the publisher
+ *
* Definition:
@@ -427,6 +456,7 @@ public class ValueSet extends BaseResource implements IResource {
public void setDescription( String theString) {
myDescription = new StringDt(theString);
}
+
/**
* Gets the value(s) for copyright (About the value set or its content).
@@ -457,8 +487,9 @@ public class ValueSet extends BaseResource implements IResource {
myCopyright = theValue;
}
+
/**
- * Sets the value(s) for copyright (About the value set or its content)
+ * Sets the value for copyright (About the value set or its content)
*
*
* Definition:
@@ -468,6 +499,7 @@ public class ValueSet extends BaseResource implements IResource {
public void setCopyright( String theString) {
myCopyright = new StringDt(theString);
}
+
/**
* Gets the value(s) for status (draft | active | retired
@@ -500,6 +532,7 @@ public class ValueSet extends BaseResource implements IResource {
myStatus = theValue;
}
+
/**
* Sets the value(s) for status (draft | active | retired
)
@@ -543,7 +576,20 @@ public class ValueSet extends BaseResource implements IResource {
myExperimental = theValue;
}
-
+
+ /**
+ * Sets the value for experimental (If for testing purposes, not real usage)
+ *
+ *
+ * Definition:
+ * This valueset was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage
+ *
+ * Definition:
+ * Whether this is intended to be used with an extensible binding or not
+ *
* Definition:
@@ -614,6 +674,19 @@ public class ValueSet extends BaseResource implements IResource {
public void setDateWithSecondsPrecision( Date theDate) {
myDate = new DateTimeDt(theDate);
}
+
+ /**
+ * Sets the value for date (Date for given status)
+ *
+ *
+ * Definition:
+ * The date that the value set status was last changed
+ *
* Definition:
@@ -768,6 +851,7 @@ public class ValueSet extends BaseResource implements IResource {
public void setSystem( String theUri) {
mySystem = new UriDt(theUri);
}
+
/**
* Gets the value(s) for version (Version of this system).
@@ -798,8 +882,9 @@ public class ValueSet extends BaseResource implements IResource {
myVersion = theValue;
}
+
/**
- * Sets the value(s) for version (Version of this system)
+ * Sets the value for version (Version of this system)
*
*
* Definition:
@@ -809,6 +894,7 @@ public class ValueSet extends BaseResource implements IResource {
public void setVersion( String theString) {
myVersion = new StringDt(theString);
}
+
/**
* Gets the value(s) for caseSensitive (If code comparison is case sensitive).
@@ -839,7 +925,20 @@ public class ValueSet extends BaseResource implements IResource {
myCaseSensitive = theValue;
}
-
+
+ /**
+ * Sets the value for caseSensitive (If code comparison is case sensitive)
+ *
+ *
+ * Definition:
+ * If code comparison is case sensitive when codes within this system are compared to each other
+ *
+ * Definition:
+ *
+ *
+ * Definition:
+ * If this code is not for use as a real concept
+ *
* Definition:
@@ -999,6 +1133,7 @@ public class ValueSet extends BaseResource implements IResource {
public void setDisplay( String theString) {
myDisplay = new StringDt(theString);
}
+
/**
* Gets the value(s) for definition (Formal Definition).
@@ -1029,8 +1164,9 @@ public class ValueSet extends BaseResource implements IResource {
myDefinition = theValue;
}
+
/**
- * Sets the value(s) for definition (Formal Definition)
+ * Sets the value for definition (Formal Definition)
*
*
* Definition:
@@ -1040,6 +1176,7 @@ public class ValueSet extends BaseResource implements IResource {
public void setDefinition( String theString) {
myDefinition = new StringDt(theString);
}
+
/**
* Gets the value(s) for concept (Child Concepts (is-a / contains)).
@@ -1070,6 +1207,20 @@ public class ValueSet extends BaseResource implements IResource {
myConcept = theValue;
}
+ /**
+ * Adds and returns a new value for concept (Child Concepts (is-a / contains))
+ *
+ *
+ * Definition:
+ *
+ *
+ * Definition:
+ * Includes the contents of the referenced value set as a part of the contents of this value set
+ *
* Definition:
@@ -1139,6 +1310,7 @@ public class ValueSet extends BaseResource implements IResource {
}
myImport.add(new UriDt(theUri));
}
+
/**
* Gets the value(s) for include (Include one or more codes from a code system).
@@ -1169,6 +1341,20 @@ public class ValueSet extends BaseResource implements IResource {
myInclude = theValue;
}
+ /**
+ * Adds and returns a new value for include (Include one or more codes from a code system)
+ *
+ *
+ * Definition:
+ * Include one or more codes from a code system
+ *
+ * Definition:
+ * Exclude one or more codes from the value set
+ *
* Definition:
@@ -1266,6 +1473,7 @@ public class ValueSet extends BaseResource implements IResource {
public void setSystem( String theUri) {
mySystem = new UriDt(theUri);
}
+
/**
* Gets the value(s) for version (Specific version of the code system referred to).
@@ -1296,8 +1504,9 @@ public class ValueSet extends BaseResource implements IResource {
myVersion = theValue;
}
+
/**
- * Sets the value(s) for version (Specific version of the code system referred to)
+ * Sets the value for version (Specific version of the code system referred to)
*
*
* Definition:
@@ -1307,6 +1516,7 @@ public class ValueSet extends BaseResource implements IResource {
public void setVersion( String theString) {
myVersion = new StringDt(theString);
}
+
/**
* Gets the value(s) for code (Code or concept from system).
@@ -1337,6 +1547,20 @@ public class ValueSet extends BaseResource implements IResource {
myCode = theValue;
}
+ /**
+ * Adds and returns a new value for code (Code or concept from system)
+ *
+ *
+ * Definition:
+ * Specifies a code or concept to be included or excluded. The list of codes is considered ordered, though the order may not have any particular significance
+ *
+ * Definition:
+ * Select concepts by specify a matching criteria based on the properties (including relationships) defined by the system. If multiple filters are specified, they SHALL all be true.
+ *
+ * Definition:
+ *
+ *
+ * Definition:
+ *
+ *
+ * Definition:
+ *
+ *
* Definition:
@@ -1675,6 +1975,7 @@ public class ValueSet extends BaseResource implements IResource {
public void setSystem( String theUri) {
mySystem = new UriDt(theUri);
}
+
/**
* Gets the value(s) for code (Code - if blank, this is not a choosable code).
@@ -1705,6 +2006,7 @@ public class ValueSet extends BaseResource implements IResource {
myCode = theValue;
}
+
/**
* Gets the value(s) for display (User display for the concept).
@@ -1735,8 +2037,9 @@ public class ValueSet extends BaseResource implements IResource {
myDisplay = theValue;
}
+
/**
- * Sets the value(s) for display (User display for the concept)
+ * Sets the value for display (User display for the concept)
*
*
* Definition:
@@ -1746,6 +2049,7 @@ public class ValueSet extends BaseResource implements IResource {
public void setDisplay( String theString) {
myDisplay = new StringDt(theString);
}
+
/**
* Gets the value(s) for contains (Codes contained in this concept).
@@ -1776,6 +2080,20 @@ public class ValueSet extends BaseResource implements IResource {
myContains = theValue;
}
+ /**
+ * Adds and returns a new value for contains (Codes contained in this concept)
+ *
+ *
+ * Definition:
+ *
+ *
+ *
+ */
+ @SimpleSetter
+ public DateDt(@SimpleSetter.Parameter(name = "theDate") Date theDate, @SimpleSetter.Parameter(name = "thePrecision") TemporalPrecisionEnum thePrecision) {
+ setValue(theDate);
+ setPrecision(thePrecision);
+ }
+
@Override
boolean isPrecisionAllowed(TemporalPrecisionEnum thePrecision) {
switch (thePrecision) {
@@ -18,5 +55,4 @@ public class DateDt extends BaseDateTimeDt {
}
}
-
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/DateTimeDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/DateTimeDt.java
index 5a49ed72e8c..93d6ffdb17f 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/DateTimeDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/DateTimeDt.java
@@ -10,19 +10,40 @@ import ca.uhn.fhir.model.api.annotation.SimpleSetter;
public class DateTimeDt extends BaseDateTimeDt {
/**
- * Create a new DateTimeDt
+ * The default precision for this type
+ */
+ public static final TemporalPrecisionEnum DEFAULT_PRECISION = TemporalPrecisionEnum.SECOND;
+
+ /**
+ * Constructor
*/
public DateTimeDt() {
super();
}
+ /**
+ * Constructor which accepts a date value and a precision value. Valid precisions values for this type are:
+ *
+ *
+ */
+ @SimpleSetter
+ public DateTimeDt(@SimpleSetter.Parameter(name = "theDate") Date theDate, @SimpleSetter.Parameter(name = "thePrecision") TemporalPrecisionEnum thePrecision) {
+ setValue(theDate);
+ setPrecision(thePrecision);
+ }
+
/**
* Create a new DateTimeDt
*/
@SimpleSetter(suffix="WithSecondsPrecision")
public DateTimeDt(@SimpleSetter.Parameter(name="theDate") Date theDate) {
setValue(theDate);
- setPrecision(TemporalPrecisionEnum.SECOND);
+ setPrecision(DEFAULT_PRECISION);
}
@Override
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/DecimalDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/DecimalDt.java
index 842c026c803..eb6a14c98b2 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/DecimalDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/DecimalDt.java
@@ -3,15 +3,48 @@ package ca.uhn.fhir.model.primitive;
import java.math.BigDecimal;
import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BasePrimitive;
import ca.uhn.fhir.model.api.IPrimitiveDatatype;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
+import ca.uhn.fhir.model.api.annotation.SimpleSetter;
import ca.uhn.fhir.parser.DataFormatException;
@DatatypeDef(name = "decimal")
-public class DecimalDt extends BaseElement implements IPrimitiveDatatype
+ *
+ */
+ @SimpleSetter
+ public InstantDt(@SimpleSetter.Parameter(name = "theDate") Date theDate, @SimpleSetter.Parameter(name = "thePrecision") TemporalPrecisionEnum thePrecision) {
+ setValue(theDate);
+ setPrecision(thePrecision);
+ }
+
+ /**
+ * Create a new DateTimeDt
+ */
+ @SimpleSetter(suffix="WithMillisPrecision")
+ public InstantDt(@SimpleSetter.Parameter(name="theDate") Date theDate) {
+ setValue(theDate);
+ setPrecision(DEFAULT_PRECISION);
+ }
+
@Override
boolean isPrecisionAllowed(TemporalPrecisionEnum thePrecision) {
switch (thePrecision) {
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IntegerDt.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IntegerDt.java
index e687b7773a5..eb1c1932470 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IntegerDt.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/IntegerDt.java
@@ -1,19 +1,38 @@
package ca.uhn.fhir.model.primitive;
import ca.uhn.fhir.model.api.BaseElement;
+import ca.uhn.fhir.model.api.BasePrimitive;
import ca.uhn.fhir.model.api.IPrimitiveDatatype;
import ca.uhn.fhir.model.api.annotation.DatatypeDef;
+import ca.uhn.fhir.model.api.annotation.SimpleSetter;
import ca.uhn.fhir.parser.DataFormatException;
@DatatypeDef(name="integer")
-public class IntegerDt extends BaseElement implements IPrimitiveDatatype> {
+public class XhtmlDt extends BasePrimitive
> {
private List
null
, which is the default, a new HTTP client with
+ * default settings will be created.
+ *
+ * @param theHttpClient An HTTP client instance to use, or null
+ */
+ public void setHttpClient(HttpClient theHttpClient);
+
+}
\ No newline at end of file
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/RestfulClientFactory.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/RestfulClientFactory.java
index d857bbe3c02..b3193af6288 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/RestfulClientFactory.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/RestfulClientFactory.java
@@ -6,22 +6,18 @@ import java.lang.reflect.Proxy;
import java.util.concurrent.TimeUnit;
import org.apache.http.client.HttpClient;
-import org.apache.http.impl.client.CloseableHttpClient;
-import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
-import org.apache.http.impl.conn.PoolingClientConnectionManager;
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
-import org.apache.http.impl.conn.SchemeRegistryFactory;
import ca.uhn.fhir.context.ConfigurationException;
import ca.uhn.fhir.context.FhirContext;
-import ca.uhn.fhir.model.api.IResource;
import ca.uhn.fhir.rest.client.api.IRestfulClient;
import ca.uhn.fhir.rest.common.BaseMethodBinding;
-public class RestfulClientFactory {
+public class RestfulClientFactory implements IRestfulClientFactory {
private FhirContext myContext;
+ private HttpClient myHttpClient;
/**
* Constructor
@@ -33,6 +29,12 @@ public class RestfulClientFactory {
myContext = theContext;
}
+ @SuppressWarnings("unchecked")
+ private null
, which is the default, a new HTTP client with
+ * default settings will be created.
+ *
+ * @param theHttpClient An HTTP client instance to use, or null
+ */
+ @Override
+ public void setHttpClient(HttpClient theHttpClient) {
+ myHttpClient = theHttpClient;
}
}
diff --git a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/common/BaseMethodBinding.java b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/common/BaseMethodBinding.java
index 33e6b1dc5d4..ae5f4ca659e 100644
--- a/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/common/BaseMethodBinding.java
+++ b/hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/common/BaseMethodBinding.java
@@ -51,7 +51,9 @@ public abstract class BaseMethodBinding {
public static BaseMethodBinding bindMethod(Method theMethod) {
Read read = theMethod.getAnnotation(Read.class);
Search search = theMethod.getAnnotation(Search.class);
- verifyExactlyOneValued(theMethod, read, search);
+ if (!verifyMethodHasZeroOrOneOperationAnnotation(theMethod, read, search)) {
+ return null;
+ }
Class extends IResource> annotatedResourceType;
if (read != null) {
@@ -102,7 +104,7 @@ public abstract class BaseMethodBinding {
// return sm;
}
- public static void verifyExactlyOneValued(Method theNextMethod, Object... theAnnotations) {
+ public static boolean verifyMethodHasZeroOrOneOperationAnnotation(Method theNextMethod, Object... theAnnotations) {
Object obj1 = null;
for (Object object : theAnnotations) {
if (object != null) {
@@ -116,8 +118,10 @@ public abstract class BaseMethodBinding {
}
}
if (obj1 == null) {
- throw new ConfigurationException("Method " + theNextMethod.getName() + " on type '" + theNextMethod.getDeclaringClass().getSimpleName() + " has no FHIR method annotations.");
+ return false;
+// throw new ConfigurationException("Method '" + theNextMethod.getName() + "' on type '" + theNextMethod.getDeclaringClass().getSimpleName() + " has no FHIR method annotations.");
}
+ return true;
}
protected static List