+ * Definition: + * There is a variety of postal address formats defined around the world. This format defines a superset that is the basis for all addresses around the world + *
+ * + *+ * Requirements: + * Need to be able to record postal addresses, along with notes about their use + *
+ */ +@DatatypeDef(name="AddressDt") +public class AddressDt + extends BaseIdentifiableElement implements ICompositeDatatype +{ + + /** + * Constructor + */ + public AddressDt() { + // nothing + } + + + @Child(name="use", type=CodeDt.class, order=0, min=0, max=1) + @Description( + shortDefinition="home | work | temp | old - purpose of this address", + formalDefinition="The purpose of this address" + ) + private BoundCodeDtnull
.
+ *
+ * + * Definition: + * The purpose of this address + *
+ */ + public BoundCodeDt+ * Definition: + * The purpose of this address + *
+ */ + public AddressDt setUse(BoundCodeDt+ * Definition: + * The purpose of this address + *
+ */ + public AddressDt setUse(AddressUseEnum theValue) { + getUse().setValueAsEnum(theValue); + return this; + } + + + /** + * Gets the value(s) for text (Text representation of the address). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * A full text representation of the address + *
+ */ + public StringDt getText() { + if (myText == null) { + myText = new StringDt(); + } + return myText; + } + + /** + * Sets the value(s) for text (Text representation of the address) + * + *+ * Definition: + * A full text representation of the address + *
+ */ + public AddressDt setText(StringDt theValue) { + myText = theValue; + return this; + } + + /** + * Sets the value for text (Text representation of the address) + * + *+ * Definition: + * A full text representation of the address + *
+ */ + public AddressDt setText( String theString) { + myText = new StringDt(theString); + return this; + } + + + /** + * Gets the value(s) for line (Street name, number, direction & P.O. Box etc). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information + *
+ */ + public java.util.List+ * Definition: + * This component contains the house number, apartment number, street name, street direction, P.O. Box number, delivery hints, and similar address information + *
+ */ + public AddressDt setLine(java.util.List+ * 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; + } + + /** + * Gets the first repetition for line (Street name, number, direction & P.O. Box etc), + * creating it if it does not already exist. + * + *+ * 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 getLineFirstRep() { + if (getLine().isEmpty()) { + return addLine(); + } + return getLine().get(0); + } + /** + * Adds 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 + *
+ * + * @return Returns a reference to this object, to allow for simple chaining. + */ + public AddressDt addLine( String theString) { + if (myLine == null) { + myLine = new java.util.ArrayListnull
.
+ *
+ * + * Definition: + * The name of the city, town, village or other community or delivery center. + *
+ */ + public StringDt getCity() { + if (myCity == null) { + myCity = new StringDt(); + } + return myCity; + } + + /** + * Sets the value(s) for city (Name of city, town etc.) + * + *+ * Definition: + * The name of the city, town, village or other community or delivery center. + *
+ */ + public AddressDt setCity(StringDt theValue) { + myCity = theValue; + return this; + } + + /** + * Sets the value for city (Name of city, town etc.) + * + *+ * Definition: + * The name of the city, town, village or other community or delivery center. + *
+ */ + public AddressDt setCity( String theString) { + myCity = new StringDt(theString); + return this; + } + + + /** + * Gets the value(s) for state (Sub-unit of country (abreviations ok)). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes). + *
+ */ + public StringDt getState() { + if (myState == null) { + myState = new StringDt(); + } + return myState; + } + + /** + * Sets the value(s) for state (Sub-unit of country (abreviations ok)) + * + *+ * Definition: + * Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes). + *
+ */ + public AddressDt setState(StringDt theValue) { + myState = theValue; + return this; + } + + /** + * Sets the value for state (Sub-unit of country (abreviations ok)) + * + *+ * Definition: + * Sub-unit of a country with limited sovereignty in a federally organized country. A code may be used if codes are in common use (i.e. US 2 letter state codes). + *
+ */ + public AddressDt setState( String theString) { + myState = new StringDt(theString); + return this; + } + + + /** + * Gets the value(s) for zip (Postal code for area). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * A postal code designating a region defined by the postal service. + *
+ */ + public StringDt getZip() { + if (myZip == null) { + myZip = new StringDt(); + } + return myZip; + } + + /** + * Sets the value(s) for zip (Postal code for area) + * + *+ * Definition: + * A postal code designating a region defined by the postal service. + *
+ */ + public AddressDt setZip(StringDt theValue) { + myZip = theValue; + return this; + } + + /** + * Sets the value for zip (Postal code for area) + * + *+ * Definition: + * A postal code designating a region defined by the postal service. + *
+ */ + public AddressDt setZip( String theString) { + myZip = new StringDt(theString); + return this; + } + + + /** + * Gets the value(s) for country (Country (can be ISO 3166 3 letter code)). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * Country - a nation as commonly understood or generally accepted + *
+ */ + public StringDt getCountry() { + if (myCountry == null) { + myCountry = new StringDt(); + } + return myCountry; + } + + /** + * Sets the value(s) for country (Country (can be ISO 3166 3 letter code)) + * + *+ * Definition: + * Country - a nation as commonly understood or generally accepted + *
+ */ + public AddressDt setCountry(StringDt theValue) { + myCountry = theValue; + return this; + } + + /** + * Sets the value for country (Country (can be ISO 3166 3 letter code)) + * + *+ * Definition: + * Country - a nation as commonly understood or generally accepted + *
+ */ + public AddressDt setCountry( String theString) { + myCountry = new StringDt(theString); + return this; + } + + + /** + * Gets the value(s) for period (Time period when address was/is in use). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * Time period when address was/is in use + *
+ */ + public PeriodDt getPeriod() { + if (myPeriod == null) { + myPeriod = new PeriodDt(); + } + return myPeriod; + } + + /** + * Sets the value(s) for period (Time period when address was/is in use) + * + *+ * Definition: + * Time period when address was/is in use + *
+ */ + public AddressDt setPeriod(PeriodDt theValue) { + myPeriod = theValue; + return this; + } + + + + +} diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/AgeDt.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/AgeDt.java new file mode 100644 index 00000000000..c1942fa57bf --- /dev/null +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/AgeDt.java @@ -0,0 +1,30 @@ +package ca.uhn.fhir.model.dstu.composite; + +import ca.uhn.fhir.model.api.annotation.DatatypeDef; + +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +@DatatypeDef(name="AgeDt") +public class AgeDt extends QuantityDt { + + // TODO: implement restricions + +} diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/AttachmentDt.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/AttachmentDt.java new file mode 100644 index 00000000000..0b5361057f7 --- /dev/null +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/AttachmentDt.java @@ -0,0 +1,450 @@ + + + + + + + + + + + + + + + + +package ca.uhn.fhir.model.dstu.composite; + +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import java.util.List; + +import ca.uhn.fhir.model.api.BaseIdentifiableElement; +import ca.uhn.fhir.model.api.ICompositeDatatype; +import ca.uhn.fhir.model.api.IElement; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; +import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.IntegerDt; +import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; + +/** + * HAPI/FHIR AttachmentDt Datatype + * (Content in a format defined elsewhere) + * + *+ * Definition: + * For referring to data content defined in other formats. + *
+ * + *+ * Requirements: + * Many models need to include data defined in other specifications that is complex and opaque to the healthcare model. This includes documents, media recordings, structured data, etc. + *
+ */ +@DatatypeDef(name="AttachmentDt") +public class AttachmentDt + extends BaseIdentifiableElement implements ICompositeDatatype +{ + + /** + * Constructor + */ + public AttachmentDt() { + // nothing + } + + + @Child(name="contentType", type=CodeDt.class, order=0, min=1, max=1) + @Description( + shortDefinition="Mime type of the content, with charset etc.", + formalDefinition="Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate" + ) + private CodeDt myContentType; + + @Child(name="language", type=CodeDt.class, order=1, min=0, max=1) + @Description( + shortDefinition="Human language of the content (BCP-47)", + formalDefinition="The human language of the content. The value can be any valid value according to BCP 47" + ) + private CodeDt myLanguage; + + @Child(name="data", type=Base64BinaryDt.class, order=2, min=0, max=1) + @Description( + shortDefinition="Data inline, base64ed", + formalDefinition="The actual data of the attachment - a sequence of bytes. In XML, represented using base64" + ) + private Base64BinaryDt myData; + + @Child(name="url", type=UriDt.class, order=3, min=0, max=1) + @Description( + shortDefinition="Uri where the data can be found", + formalDefinition="An alternative location where the data can be accessed" + ) + private UriDt myUrl; + + @Child(name="size", type=IntegerDt.class, order=4, min=0, max=1) + @Description( + shortDefinition="Number of bytes of content (if url provided)", + formalDefinition="The number of bytes of data that make up this attachment." + ) + private IntegerDt mySize; + + @Child(name="hash", type=Base64BinaryDt.class, order=5, min=0, max=1) + @Description( + shortDefinition="Hash of the data (sha-1, base64ed )", + formalDefinition="The calculated hash of the data using SHA-1. Represented using base64" + ) + private Base64BinaryDt myHash; + + @Child(name="title", type=StringDt.class, order=6, min=0, max=1) + @Description( + shortDefinition="Label to display in place of the data", + formalDefinition="A label or set of text to display in place of the data" + ) + private StringDt myTitle; + + + @Override + public boolean isEmpty() { + return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myContentType, myLanguage, myData, myUrl, mySize, myHash, myTitle); + } + + @Override + publicnull
.
+ *
+ * + * Definition: + * Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate + *
+ */ + public CodeDt getContentType() { + if (myContentType == null) { + myContentType = new CodeDt(); + } + return myContentType; + } + + /** + * Sets the value(s) for contentType (Mime type of the content, with charset etc.) + * + *+ * Definition: + * Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate + *
+ */ + public AttachmentDt setContentType(CodeDt theValue) { + myContentType = theValue; + return this; + } + + /** + * Sets the value for contentType (Mime type of the content, with charset etc.) + * + *+ * Definition: + * Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate + *
+ */ + public AttachmentDt setContentType( String theCode) { + myContentType = new CodeDt(theCode); + return this; + } + + + /** + * Gets the value(s) for language (Human language of the content (BCP-47)). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * The human language of the content. The value can be any valid value according to BCP 47 + *
+ */ + public CodeDt getLanguage() { + if (myLanguage == null) { + myLanguage = new CodeDt(); + } + return myLanguage; + } + + /** + * Sets the value(s) for language (Human language of the content (BCP-47)) + * + *+ * Definition: + * The human language of the content. The value can be any valid value according to BCP 47 + *
+ */ + public AttachmentDt setLanguage(CodeDt theValue) { + myLanguage = theValue; + return this; + } + + /** + * Sets the value for language (Human language of the content (BCP-47)) + * + *+ * Definition: + * The human language of the content. The value can be any valid value according to BCP 47 + *
+ */ + public AttachmentDt setLanguage( String theCode) { + myLanguage = new CodeDt(theCode); + return this; + } + + + /** + * Gets the value(s) for data (Data inline, base64ed). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * The actual data of the attachment - a sequence of bytes. In XML, represented using base64 + *
+ */ + public Base64BinaryDt getData() { + if (myData == null) { + myData = new Base64BinaryDt(); + } + return myData; + } + + /** + * Sets the value(s) for data (Data inline, base64ed) + * + *+ * Definition: + * The actual data of the attachment - a sequence of bytes. In XML, represented using base64 + *
+ */ + public AttachmentDt setData(Base64BinaryDt theValue) { + myData = theValue; + return this; + } + + /** + * 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 AttachmentDt setData( byte[] theBytes) { + myData = new Base64BinaryDt(theBytes); + return this; + } + + + /** + * Gets the value(s) for url (Uri where the data can be found). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * An alternative location where the data can be accessed + *
+ */ + public UriDt getUrl() { + if (myUrl == null) { + myUrl = new UriDt(); + } + return myUrl; + } + + /** + * Sets the value(s) for url (Uri where the data can be found) + * + *+ * Definition: + * An alternative location where the data can be accessed + *
+ */ + public AttachmentDt setUrl(UriDt theValue) { + myUrl = theValue; + return this; + } + + /** + * Sets the value for url (Uri where the data can be found) + * + *+ * Definition: + * An alternative location where the data can be accessed + *
+ */ + public AttachmentDt setUrl( String theUri) { + myUrl = new UriDt(theUri); + return this; + } + + + /** + * Gets the value(s) for size (Number of bytes of content (if url provided)). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * The number of bytes of data that make up this attachment. + *
+ */ + public IntegerDt getSize() { + if (mySize == null) { + mySize = new IntegerDt(); + } + return mySize; + } + + /** + * Sets the value(s) for size (Number of bytes of content (if url provided)) + * + *+ * Definition: + * The number of bytes of data that make up this attachment. + *
+ */ + public AttachmentDt setSize(IntegerDt theValue) { + mySize = theValue; + return this; + } + + /** + * 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 AttachmentDt setSize( int theInteger) { + mySize = new IntegerDt(theInteger); + return this; + } + + + /** + * Gets the value(s) for hash (Hash of the data (sha-1, base64ed )). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * The calculated hash of the data using SHA-1. Represented using base64 + *
+ */ + public Base64BinaryDt getHash() { + if (myHash == null) { + myHash = new Base64BinaryDt(); + } + return myHash; + } + + /** + * Sets the value(s) for hash (Hash of the data (sha-1, base64ed )) + * + *+ * Definition: + * The calculated hash of the data using SHA-1. Represented using base64 + *
+ */ + public AttachmentDt setHash(Base64BinaryDt theValue) { + myHash = theValue; + return this; + } + + /** + * 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 AttachmentDt setHash( byte[] theBytes) { + myHash = new Base64BinaryDt(theBytes); + return this; + } + + + /** + * Gets the value(s) for title (Label to display in place of the data). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * A label or set of text to display in place of the data + *
+ */ + public StringDt getTitle() { + if (myTitle == null) { + myTitle = new StringDt(); + } + return myTitle; + } + + /** + * Sets the value(s) for title (Label to display in place of the data) + * + *+ * Definition: + * A label or set of text to display in place of the data + *
+ */ + public AttachmentDt setTitle(StringDt theValue) { + myTitle = theValue; + return this; + } + + /** + * Sets the value for title (Label to display in place of the data) + * + *+ * Definition: + * A label or set of text to display in place of the data + *
+ */ + public AttachmentDt setTitle( String theString) { + myTitle = new StringDt(theString); + return this; + } + + + + +} diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/BoundCodeableConceptDt.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/BoundCodeableConceptDt.java new file mode 100644 index 00000000000..5c411118f2e --- /dev/null +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/BoundCodeableConceptDt.java @@ -0,0 +1,122 @@ +package ca.uhn.fhir.model.dstu.composite; + +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import static org.apache.commons.lang3.StringUtils.*; + +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + +import ca.uhn.fhir.model.api.IValueSetEnumBinder; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; + +@DatatypeDef(name = "CodeableConcept", isSpecialization = true) +public class BoundCodeableConceptDtnull
+ */
+ public void setValueAsEnum(Collectionnull
+ */
+ public void setValueAsEnum(T theValue) {
+ getCoding().clear();
+ if (theValue == null) {
+ return;
+ }
+ getCoding().add(new CodingDt(myBinder.toSystemString(theValue), myBinder.toCodeString(theValue)));
+ }
+
+ /**
+ * Loops through the {@link #getCoding() codings} in this codeable concept
+ * and returns the first bound enumerated type that matches. Use
+ * caution using this method, see the return description for more
+ * information.
+ *
+ * @return Returns the bound enumerated type, or null
if none
+ * are found. Note that a null return value doesn't neccesarily
+ * imply that this Codeable Concept has no codes, only that it has
+ * no codes that match the enum.
+ */
+ public Set+ * Definition: + * A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text + *
+ * + *+ * Requirements: + * This is a common pattern in healthcare - a concept that may be defined by one or more codes from formal definitions including LOINC and SNOMED CT, and/or defined by the provision of text that captures a human sense of the concept + *
+ */ +@DatatypeDef(name="CodeableConceptDt") +public class CodeableConceptDt + extends BaseIdentifiableElement implements ICompositeDatatype +{ + + /** + * Constructor + */ + public CodeableConceptDt() { + // nothing + } + + /** + * Constructor which creates a CodeableConceptDt with one coding repetition, containing + * the given system and code + */ + public CodeableConceptDt(String theSystem, String theCode) { + addCoding().setSystem(theSystem).setCode(theCode); + } + + @Child(name="coding", type=CodingDt.class, order=0, min=0, max=Child.MAX_UNLIMITED) + @Description( + shortDefinition="Code defined by a terminology system", + formalDefinition="A reference to a code defined by a terminology system" + ) + private java.util.Listnull
.
+ *
+ * + * Definition: + * A reference to a code defined by a terminology system + *
+ */ + public java.util.List+ * Definition: + * A reference to a code defined by a terminology system + *
+ */ + public CodeableConceptDt setCoding(java.util.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 first repetition for coding (Code defined by a terminology system), + * creating it if it does not already exist. + * + *+ * Definition: + * A reference to a code defined by a terminology system + *
+ */ + public CodingDt getCodingFirstRep() { + if (getCoding().isEmpty()) { + return addCoding(); + } + return getCoding().get(0); + } + + /** + * Gets the value(s) for text (Plain text representation of the concept). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user + *
+ */ + public StringDt getText() { + if (myText == null) { + myText = new StringDt(); + } + return myText; + } + + /** + * Sets the value(s) for text (Plain text representation of the concept) + * + *+ * Definition: + * A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user + *
+ */ + public CodeableConceptDt setText(StringDt theValue) { + myText = theValue; + return this; + } + + /** + * Sets the value for text (Plain text representation of the concept) + * + *+ * Definition: + * A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user + *
+ */ + public CodeableConceptDt setText( String theString) { + myText = new StringDt(theString); + return this; + } + + + + +} diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/CodingDt.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/CodingDt.java new file mode 100644 index 00000000000..7f9f4b1e7cf --- /dev/null +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/CodingDt.java @@ -0,0 +1,393 @@ + + + + + + + + + + + + + + + + +package ca.uhn.fhir.model.dstu.composite; + +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import java.util.List; + +import ca.uhn.fhir.model.api.ICompositeDatatype; +import ca.uhn.fhir.model.api.IElement; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.base.composite.BaseCodingDt; +import ca.uhn.fhir.model.primitive.BooleanDt; +import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; + +/** + * HAPI/FHIR CodingDt Datatype + * (A reference to a code defined by a terminology system) + * + *+ * Definition: + * A reference to a code defined by a terminology system + *
+ * + *+ * Requirements: + * References to codes are very common in healthcare models + *
+ */ +@DatatypeDef(name="CodingDt") +public class CodingDt + extends BaseCodingDt implements ICompositeDatatype +{ + + /** + * Constructor + */ + public CodingDt() { + // nothing + } + + /** + * Creates a new Coding with the given system and code + */ + public CodingDt(String theSystem, String theCode) { + setSystem(theSystem); + setCode(theCode); + } + + @Child(name="system", type=UriDt.class, order=0, min=0, max=1) + @Description( + shortDefinition="Identity of the terminology system", + formalDefinition="The identification of the code system that defines the meaning of the symbol in the code." + ) + private UriDt mySystem; + + @Child(name="version", type=StringDt.class, order=1, min=0, max=1) + @Description( + shortDefinition="Version of the system - if relevant", + formalDefinition="The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and When the meaning is not guaranteed to be consistent, the version SHOULD be exchanged" + ) + private StringDt myVersion; + + @Child(name="code", type=CodeDt.class, order=2, min=0, max=1) + @Description( + shortDefinition="Symbol in syntax defined by the system", + formalDefinition="A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination)" + ) + private CodeDt myCode; + + @Child(name="display", type=StringDt.class, order=3, min=0, max=1) + @Description( + shortDefinition="Representation defined by the system", + formalDefinition="A representation of the meaning of the code in the system, following the rules of the system." + ) + private StringDt myDisplay; + + @Child(name="primary", type=BooleanDt.class, order=4, min=0, max=1) + @Description( + shortDefinition="If this code was chosen directly by the user", + formalDefinition="Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays)" + ) + private BooleanDt myPrimary; + + @Child(name="valueSet", order=5, min=0, max=1, type={ + ca.uhn.fhir.model.dstu.resource.ValueSet.class }) + @Description( + shortDefinition="Set this coding was chosen from", + formalDefinition="The set of possible coded values this coding was chosen from or constrained by" + ) + private ResourceReferenceDt myValueSet; + + + @Override + public boolean isEmpty() { + return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( mySystem, myVersion, myCode, myDisplay, myPrimary, myValueSet); + } + + @Override + publicnull
.
+ *
+ * + * Definition: + * The identification of the code system that defines the meaning of the symbol in the code. + *
+ */ + public UriDt getSystem() { + if (mySystem == null) { + mySystem = new UriDt(); + } + return mySystem; + } + + /** + * Sets the value(s) for system (Identity of the terminology system) + * + *+ * Definition: + * The identification of the code system that defines the meaning of the symbol in the code. + *
+ */ + public CodingDt setSystem(UriDt theValue) { + mySystem = theValue; + return this; + } + + /** + * Sets the value for system (Identity of the terminology system) + * + *+ * Definition: + * The identification of the code system that defines the meaning of the symbol in the code. + *
+ */ + public CodingDt setSystem( String theUri) { + mySystem = new UriDt(theUri); + return this; + } + + + /** + * Gets the value(s) for version (Version of the system - if relevant). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and When the meaning is not guaranteed to be consistent, the version SHOULD be exchanged + *
+ */ + public StringDt getVersion() { + if (myVersion == null) { + myVersion = new StringDt(); + } + return myVersion; + } + + /** + * Sets the value(s) for version (Version of the system - if relevant) + * + *+ * Definition: + * The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and When the meaning is not guaranteed to be consistent, the version SHOULD be exchanged + *
+ */ + public CodingDt setVersion(StringDt theValue) { + myVersion = theValue; + return this; + } + + /** + * Sets the value for version (Version of the system - if relevant) + * + *+ * Definition: + * The version of the code system which was used when choosing this code. Note that a well-maintained code system does not need the version reported, because the meaning of codes is consistent across versions. However this cannot consistently be assured. and When the meaning is not guaranteed to be consistent, the version SHOULD be exchanged + *
+ */ + public CodingDt setVersion( String theString) { + myVersion = new StringDt(theString); + return this; + } + + + /** + * Gets the value(s) for code (Symbol in syntax defined by the system). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination) + *
+ */ + public CodeDt getCode() { + if (myCode == null) { + myCode = new CodeDt(); + } + return myCode; + } + + /** + * Sets the value(s) for code (Symbol in syntax defined by the system) + * + *+ * Definition: + * A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination) + *
+ */ + public CodingDt setCode(CodeDt theValue) { + myCode = theValue; + return this; + } + + /** + * Sets the value for code (Symbol in syntax defined by the system) + * + *+ * Definition: + * A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination) + *
+ */ + public CodingDt setCode( String theCode) { + myCode = new CodeDt(theCode); + return this; + } + + + /** + * Gets the value(s) for display (Representation defined by the system). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * A representation of the meaning of the code in the system, following the rules of the system. + *
+ */ + public StringDt getDisplay() { + if (myDisplay == null) { + myDisplay = new StringDt(); + } + return myDisplay; + } + + /** + * Sets the value(s) for display (Representation defined by the system) + * + *+ * Definition: + * A representation of the meaning of the code in the system, following the rules of the system. + *
+ */ + public CodingDt setDisplay(StringDt theValue) { + myDisplay = theValue; + return this; + } + + /** + * Sets the value for display (Representation defined by the system) + * + *+ * Definition: + * A representation of the meaning of the code in the system, following the rules of the system. + *
+ */ + public CodingDt setDisplay( String theString) { + myDisplay = new StringDt(theString); + return this; + } + + + /** + * Gets the value(s) for primary (If this code was chosen directly by the user). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * Indicates that this code was chosen by a user directly - i.e. off a pick list of available items (codes or displays) + *
+ */ + public BooleanDt getPrimary() { + if (myPrimary == null) { + myPrimary = new BooleanDt(); + } + return myPrimary; + } + + /** + * Sets the value(s) 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 CodingDt setPrimary(BooleanDt theValue) { + myPrimary = theValue; + return this; + } + + /** + * 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 CodingDt setPrimary( boolean theBoolean) { + myPrimary = new BooleanDt(theBoolean); + return this; + } + + + /** + * Gets the value(s) for valueSet (Set this coding was chosen from). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * The set of possible coded values this coding was chosen from or constrained by + *
+ */ + public ResourceReferenceDt getValueSet() { + if (myValueSet == null) { + myValueSet = new ResourceReferenceDt(); + } + return myValueSet; + } + + /** + * Sets the value(s) for valueSet (Set this coding was chosen from) + * + *+ * Definition: + * The set of possible coded values this coding was chosen from or constrained by + *
+ */ + public CodingDt setValueSet(ResourceReferenceDt theValue) { + myValueSet = theValue; + return this; + } + + + + +} diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/ContactDt.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/ContactDt.java new file mode 100644 index 00000000000..6863159f5bc --- /dev/null +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/ContactDt.java @@ -0,0 +1,301 @@ + + + + + + + + + + + + + + + + +package ca.uhn.fhir.model.dstu.composite; + +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import java.util.List; + +import ca.uhn.fhir.model.api.BaseIdentifiableElement; +import ca.uhn.fhir.model.api.ICompositeDatatype; +import ca.uhn.fhir.model.api.IElement; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.SimpleSetter; +import ca.uhn.fhir.model.dstu.valueset.ContactSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum; +import ca.uhn.fhir.model.primitive.BoundCodeDt; +import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.StringDt; + +/** + * HAPI/FHIR ContactDt Datatype + * (Technology mediated contact details (phone, fax, email, etc)) + * + *+ * Definition: + * All kinds of technology mediated contact details for a person or organization, including telephone, email, etc. + *
+ * + *+ * Requirements: + * Need to track phone, fax, mobile, sms numbers, email addresses, twitter tags, etc. + *
+ */ +@DatatypeDef(name="ContactDt") +public class ContactDt + extends BaseIdentifiableElement implements ICompositeDatatype +{ + + /** + * Constructor + */ + public ContactDt() { + // nothing + } + + /** + * Constructor + */ + @SimpleSetter + public ContactDt(@SimpleSetter.Parameter(name="theValue") String theValue) { + setValue(theValue); + } + + /** + * Constructor + */ + @SimpleSetter + public ContactDt(@SimpleSetter.Parameter(name="theContactUse") ContactUseEnum theContactUse, @SimpleSetter.Parameter(name="theValue") String theValue) { + setUse(theContactUse); + setValue(theValue); + } + + @Child(name="system", type=CodeDt.class, order=0, min=0, max=1) + @Description( + shortDefinition="phone | fax | email | url", + formalDefinition="Telecommunications form for contact - what communications system is required to make use of the contact" + ) + private BoundCodeDtnull
.
+ *
+ * + * Definition: + * Telecommunications form for contact - what communications system is required to make use of the contact + *
+ */ + public BoundCodeDt+ * Definition: + * Telecommunications form for contact - what communications system is required to make use of the contact + *
+ */ + public ContactDt setSystem(BoundCodeDt+ * Definition: + * Telecommunications form for contact - what communications system is required to make use of the contact + *
+ */ + public ContactDt setSystem(ContactSystemEnum theValue) { + getSystem().setValueAsEnum(theValue); + return this; + } + + + /** + * Gets the value(s) for value (The actual contact details). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * The actual contact details, in a form that is meaningful to the designated communication system (i.e. phone number or email address). + *
+ */ + public StringDt getValue() { + if (myValue == null) { + myValue = new StringDt(); + } + return myValue; + } + + /** + * Sets the value(s) for value (The actual contact details) + * + *+ * Definition: + * The actual contact details, in a form that is meaningful to the designated communication system (i.e. phone number or email address). + *
+ */ + public ContactDt setValue(StringDt theValue) { + myValue = theValue; + return this; + } + + /** + * Sets the value for value (The actual contact details) + * + *+ * Definition: + * The actual contact details, in a form that is meaningful to the designated communication system (i.e. phone number or email address). + *
+ */ + public ContactDt setValue( String theString) { + myValue = new StringDt(theString); + return this; + } + + + /** + * Gets the value(s) for use (home | work | temp | old | mobile - purpose of this address). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * Identifies the purpose for the address + *
+ */ + public BoundCodeDt+ * Definition: + * Identifies the purpose for the address + *
+ */ + public ContactDt setUse(BoundCodeDt+ * Definition: + * Identifies the purpose for the address + *
+ */ + public ContactDt setUse(ContactUseEnum theValue) { + getUse().setValueAsEnum(theValue); + return this; + } + + + /** + * Gets the value(s) for period (Time period when the contact was/is in use). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * Time period when the contact was/is in use + *
+ */ + public PeriodDt getPeriod() { + if (myPeriod == null) { + myPeriod = new PeriodDt(); + } + return myPeriod; + } + + /** + * Sets the value(s) for period (Time period when the contact was/is in use) + * + *+ * Definition: + * Time period when the contact was/is in use + *
+ */ + public ContactDt setPeriod(PeriodDt theValue) { + myPeriod = theValue; + return this; + } + + + + +} diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/ContainedDt.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/ContainedDt.java new file mode 100644 index 00000000000..bc20f2b1a12 --- /dev/null +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/ContainedDt.java @@ -0,0 +1,53 @@ +package ca.uhn.fhir.model.dstu.composite; + +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import java.util.ArrayList; +import java.util.List; + +import ca.uhn.fhir.model.api.IDatatype; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; + +@DatatypeDef(name = "duration") +public class ContainedDt implements IDatatype { + + @Child(name = "resource", type = IResource.class, order = 0, min = 0, max = Child.MAX_UNLIMITED) + private List+ * Definition: + * A human's name with the ability to identify parts and usage + *
+ * + *+ * Requirements: + * Need to be able to record names, along with notes about their use + *
+ */ +@DatatypeDef(name="HumanNameDt") +public class HumanNameDt + extends BaseHumanNameDt implements ICompositeDatatype +{ + + /** + * Constructor + */ + public HumanNameDt() { + // nothing + } + + + @Child(name="use", type=CodeDt.class, order=0, min=0, max=1) + @Description( + shortDefinition="usual | official | temp | nickname | anonymous | old | maiden", + formalDefinition="Identifies the purpose for this name" + ) + private BoundCodeDtnull
.
+ *
+ * + * Definition: + * Identifies the purpose for this name + *
+ */ + public BoundCodeDt+ * Definition: + * Identifies the purpose for this name + *
+ */ + public HumanNameDt setUse(BoundCodeDt+ * Definition: + * Identifies the purpose for this name + *
+ */ + public HumanNameDt setUse(NameUseEnum theValue) { + getUse().setValueAsEnum(theValue); + return this; + } + + + /** + * Gets the value(s) for text (Text representation of the full name). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * A full text representation of the name + *
+ */ + public StringDt getText() { + if (myText == null) { + myText = new StringDt(); + } + return myText; + } + + /** + * Sets the value(s) for text (Text representation of the full name) + * + *+ * Definition: + * A full text representation of the name + *
+ */ + public HumanNameDt setText(StringDt theValue) { + myText = theValue; + return this; + } + + /** + * Sets the value for text (Text representation of the full name) + * + *+ * Definition: + * A full text representation of the name + *
+ */ + public HumanNameDt setText( String theString) { + myText = new StringDt(theString); + return this; + } + + + /** + * Gets the value(s) for family (Family name (often called 'Surname')). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * 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 java.util.List+ * 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 HumanNameDt setFamily(java.util.List+ * 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; + } + + /** + * Gets the first repetition for family (Family name (often called 'Surname')), + * creating it if it does not already exist. + * + *+ * 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 getFamilyFirstRep() { + if (getFamily().isEmpty()) { + return addFamily(); + } + return getFamily().get(0); + } + /** + * Adds 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. + *
+ * + * @return Returns a reference to this object, to allow for simple chaining. + */ + public HumanNameDt addFamily( String theString) { + if (myFamily == null) { + myFamily = new java.util.ArrayListnull
.
+ *
+ * + * Definition: + * Given name + *
+ */ + public java.util.List+ * Definition: + * Given name + *
+ */ + public HumanNameDt setGiven(java.util.List+ * Definition: + * Given name + *
+ */ + public StringDt addGiven() { + StringDt newType = new StringDt(); + getGiven().add(newType); + return newType; + } + + /** + * Gets the first repetition for given (Given names (not always 'first'). Includes middle names), + * creating it if it does not already exist. + * + *+ * Definition: + * Given name + *
+ */ + public StringDt getGivenFirstRep() { + if (getGiven().isEmpty()) { + return addGiven(); + } + return getGiven().get(0); + } + /** + * Adds a new value for given (Given names (not always 'first'). Includes middle names) + * + *+ * Definition: + * Given name + *
+ * + * @return Returns a reference to this object, to allow for simple chaining. + */ + public HumanNameDt addGiven( String theString) { + if (myGiven == null) { + myGiven = new java.util.ArrayListnull
.
+ *
+ * + * 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 java.util.List+ * 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 HumanNameDt setPrefix(java.util.List+ * 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; + } + + /** + * Gets the first repetition for prefix (Parts that come before the name), + * creating it if it does not already exist. + * + *+ * 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 getPrefixFirstRep() { + if (getPrefix().isEmpty()) { + return addPrefix(); + } + return getPrefix().get(0); + } + /** + * Adds 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 + *
+ * + * @return Returns a reference to this object, to allow for simple chaining. + */ + public HumanNameDt addPrefix( String theString) { + if (myPrefix == null) { + myPrefix = new java.util.ArrayListnull
.
+ *
+ * + * 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 java.util.List+ * 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 HumanNameDt setSuffix(java.util.List+ * 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; + } + + /** + * Gets the first repetition for suffix (Parts that come after the name), + * creating it if it does not already exist. + * + *+ * 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 getSuffixFirstRep() { + if (getSuffix().isEmpty()) { + return addSuffix(); + } + return getSuffix().get(0); + } + /** + * Adds 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 + *
+ * + * @return Returns a reference to this object, to allow for simple chaining. + */ + public HumanNameDt addSuffix( String theString) { + if (mySuffix == null) { + mySuffix = new java.util.ArrayListnull
.
+ *
+ * + * Definition: + * Indicates the period of time when this name was valid for the named person. + *
+ */ + public PeriodDt getPeriod() { + if (myPeriod == null) { + myPeriod = new PeriodDt(); + } + return myPeriod; + } + + /** + * Sets the value(s) for period (Time period when name was/is in use) + * + *+ * Definition: + * Indicates the period of time when this name was valid for the named person. + *
+ */ + public HumanNameDt setPeriod(PeriodDt theValue) { + myPeriod = theValue; + return this; + } + + + + +} diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/IdentifierDt.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/IdentifierDt.java new file mode 100644 index 00000000000..2cb87fbfa7e --- /dev/null +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/IdentifierDt.java @@ -0,0 +1,399 @@ + + + + + + + + + + + + + + + + +package ca.uhn.fhir.model.dstu.composite; + +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import java.util.List; + +import ca.uhn.fhir.model.api.ICompositeDatatype; +import ca.uhn.fhir.model.api.IElement; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.SimpleSetter; +import ca.uhn.fhir.model.base.composite.BaseIdentifierDt; +import ca.uhn.fhir.model.dstu.valueset.IdentifierUseEnum; +import ca.uhn.fhir.model.primitive.BoundCodeDt; +import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; + +/** + * HAPI/FHIR IdentifierDt Datatype + * (An identifier intended for computation) + * + *+ * Definition: + * A technical identifier - identifies some entity uniquely and unambiguously + *
+ * + *+ * Requirements: + * Need to be able to identify things with confidence and be sure that the identification is not subject to misinterpretation + *
+ */ +@DatatypeDef(name="IdentifierDt") +public class IdentifierDt + extends BaseIdentifierDt implements ICompositeDatatype +{ + + /** + * Constructor + */ + public IdentifierDt() { + // nothing + } + + /** + * Creates a new identifier with the given system and value + */ + @SimpleSetter + public IdentifierDt(@SimpleSetter.Parameter(name="theSystem") String theSystem, @SimpleSetter.Parameter(name="theValue") String theValue) { + setSystem(theSystem); + setValue(theValue); + } + + /** + * Creates a new identifier with the given system and value + */ + @SimpleSetter + public IdentifierDt(@SimpleSetter.Parameter(name="theUse") IdentifierUseEnum theUse, @SimpleSetter.Parameter(name="theSystem") String theSystem, @SimpleSetter.Parameter(name="theValue") String theValue, @SimpleSetter.Parameter(name="theLabel") String theLabel) { + setUse(theUse); + setSystem(theSystem); + setValue(theValue); + setLabel(theLabel); + } + + @Override + public String toString() { + return "IdentifierDt[" + getValueAsQueryToken() + "]"; + } + + @Child(name="use", type=CodeDt.class, order=0, min=0, max=1) + @Description( + shortDefinition="usual | official | temp | secondary (If known)", + formalDefinition="The purpose of this identifier" + ) + private BoundCodeDtnull
.
+ *
+ * + * Definition: + * The purpose of this identifier + *
+ */ + public BoundCodeDt+ * Definition: + * The purpose of this identifier + *
+ */ + public IdentifierDt setUse(BoundCodeDt+ * Definition: + * The purpose of this identifier + *
+ */ + public IdentifierDt setUse(IdentifierUseEnum theValue) { + getUse().setValueAsEnum(theValue); + return this; + } + + + /** + * Gets the value(s) for label (Description of identifier). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * A text string for the identifier that can be displayed to a human so they can recognize the identifier + *
+ */ + public StringDt getLabel() { + if (myLabel == null) { + myLabel = new StringDt(); + } + return myLabel; + } + + /** + * Sets the value(s) for label (Description of identifier) + * + *+ * Definition: + * A text string for the identifier that can be displayed to a human so they can recognize the identifier + *
+ */ + public IdentifierDt setLabel(StringDt theValue) { + myLabel = theValue; + return this; + } + + /** + * Sets the value for label (Description of identifier) + * + *+ * Definition: + * A text string for the identifier that can be displayed to a human so they can recognize the identifier + *
+ */ + public IdentifierDt setLabel( String theString) { + myLabel = new StringDt(theString); + return this; + } + + + /** + * Gets the value(s) for system (The namespace for the identifier). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * Establishes the namespace in which set of possible id values is unique. + *
+ */ + public UriDt getSystem() { + if (mySystem == null) { + mySystem = new UriDt(); + } + return mySystem; + } + + /** + * Sets the value(s) for system (The namespace for the identifier) + * + *+ * Definition: + * Establishes the namespace in which set of possible id values is unique. + *
+ */ + public IdentifierDt setSystem(UriDt theValue) { + mySystem = theValue; + return this; + } + + /** + * Sets the value for system (The namespace for the identifier) + * + *+ * Definition: + * Establishes the namespace in which set of possible id values is unique. + *
+ */ + public IdentifierDt setSystem( String theUri) { + mySystem = new UriDt(theUri); + return this; + } + + + /** + * Gets the value(s) for value (The value that is unique). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * The portion of the identifier typically displayed to the user and which is unique within the context of the system. + *
+ */ + public StringDt getValue() { + if (myValue == null) { + myValue = new StringDt(); + } + return myValue; + } + + /** + * Sets the value(s) for value (The value that is unique) + * + *+ * Definition: + * The portion of the identifier typically displayed to the user and which is unique within the context of the system. + *
+ */ + public IdentifierDt setValue(StringDt theValue) { + myValue = theValue; + return this; + } + + /** + * Sets the value for value (The value that is unique) + * + *+ * Definition: + * The portion of the identifier typically displayed to the user and which is unique within the context of the system. + *
+ */ + public IdentifierDt setValue( String theString) { + myValue = new StringDt(theString); + return this; + } + + + /** + * Gets the value(s) for period (Time period when id is/was valid for use). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * Time period during which identifier is/was valid for use + *
+ */ + public PeriodDt getPeriod() { + if (myPeriod == null) { + myPeriod = new PeriodDt(); + } + return myPeriod; + } + + /** + * Sets the value(s) for period (Time period when id is/was valid for use) + * + *+ * Definition: + * Time period during which identifier is/was valid for use + *
+ */ + public IdentifierDt setPeriod(PeriodDt theValue) { + myPeriod = theValue; + return this; + } + + + /** + * Gets the value(s) for assigner (Organization that issued id (may be just text)). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * Organization that issued/manages the identifier + *
+ */ + public ResourceReferenceDt getAssigner() { + if (myAssigner == null) { + myAssigner = new ResourceReferenceDt(); + } + return myAssigner; + } + + /** + * Sets the value(s) for assigner (Organization that issued id (may be just text)) + * + *+ * Definition: + * Organization that issued/manages the identifier + *
+ */ + public IdentifierDt setAssigner(ResourceReferenceDt theValue) { + myAssigner = theValue; + return this; + } + + + + +} diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/NarrativeDt.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/NarrativeDt.java new file mode 100644 index 00000000000..d442915f951 --- /dev/null +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/NarrativeDt.java @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + +package ca.uhn.fhir.model.dstu.composite; + +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import java.util.List; + +import ca.uhn.fhir.model.api.BaseIdentifiableElement; +import ca.uhn.fhir.model.api.ICompositeDatatype; +import ca.uhn.fhir.model.api.IElement; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.dstu.valueset.NarrativeStatusEnum; +import ca.uhn.fhir.model.primitive.BoundCodeDt; +import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.XhtmlDt; + +/** + * HAPI/FHIR Narrative Datatype + * (A human-readable formatted text, including images) + * + *+ * Definition: + * A human-readable formatted text, including images + *
+ * + *+ * Requirements: + * + *
+ */ +@DatatypeDef(name="Narrative") +public class NarrativeDt extends BaseIdentifiableElement implements ICompositeDatatype { + + @Child(name="status", type=CodeDt.class, order=0, min=1, max=1) + private BoundCodeDtnull
.
+ *
+ * + * Definition: + * The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data + *
+ */ + public BoundCodeDt+ * Definition: + * The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data + *
+ */ + public void setStatus(BoundCodeDt+ * Definition: + * The status of the narrative - whether it's entirely generated (from just the defined data or the extensions too), or whether a human authored it and it may contain additional data + *
+ */ + public void setStatus(NarrativeStatusEnum theValue) { + getStatus().setValueAsEnum(theValue); + } + + + /** + * Gets the value(s) for div (Limited xhtml content). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * The actual narrative content, a stripped down version of XHTML + *
+ */ + public XhtmlDt getDiv() { + if (myDiv == null) { + myDiv = new XhtmlDt(); + } + return myDiv; + } + + /** + * Sets the value(s) for div (Limited xhtml content) + * + *+ * Definition: + * The actual narrative content, a stripped down version of XHTML + *
+ */ + public void setDiv(XhtmlDt theValue) { + myDiv = theValue; + } + + /** + * Sets the value using a textual DIV (or simple text block which will be + * converted to XHTML) + */ + public void setDiv(String theTextDiv) { + myDiv = new XhtmlDt(theTextDiv); + } + + + + +} diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/PeriodDt.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/PeriodDt.java new file mode 100644 index 00000000000..e6bcd4ff20a --- /dev/null +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/PeriodDt.java @@ -0,0 +1,219 @@ + + + + + + + + + + + + + + + + +package ca.uhn.fhir.model.dstu.composite; + +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import java.util.Date; +import java.util.List; + +import ca.uhn.fhir.model.api.BaseIdentifiableElement; +import ca.uhn.fhir.model.api.ICompositeDatatype; +import ca.uhn.fhir.model.api.IElement; +import ca.uhn.fhir.model.api.TemporalPrecisionEnum; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.primitive.DateTimeDt; + +/** + * HAPI/FHIR PeriodDt Datatype + * (Time range defined by start and end date/time) + * + *+ * Definition: + * A time period defined by a start and end date and optionally time. + *
+ * + *+ * Requirements: + * + *
+ */ +@DatatypeDef(name="PeriodDt") +public class PeriodDt + extends BaseIdentifiableElement implements ICompositeDatatype +{ + + /** + * Constructor + */ + public PeriodDt() { + // nothing + } + + + @Child(name="start", type=DateTimeDt.class, order=0, min=0, max=1) + @Description( + shortDefinition="Starting time with inclusive boundary", + formalDefinition="The start of the period. The boundary is inclusive." + ) + private DateTimeDt myStart; + + @Child(name="end", type=DateTimeDt.class, order=1, min=0, max=1) + @Description( + shortDefinition="End time with inclusive boundary, if not ongoing", + formalDefinition="The end of the period. If the end of the period is missing, it means that the period is ongoing" + ) + private DateTimeDt myEnd; + + + @Override + public boolean isEmpty() { + return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myStart, myEnd); + } + + @Override + publicnull
.
+ *
+ * + * Definition: + * The start of the period. The boundary is inclusive. + *
+ */ + public DateTimeDt getStart() { + if (myStart == null) { + myStart = new DateTimeDt(); + } + return myStart; + } + + /** + * Sets the value(s) for start (Starting time with inclusive boundary) + * + *+ * Definition: + * The start of the period. The boundary is inclusive. + *
+ */ + public PeriodDt setStart(DateTimeDt theValue) { + myStart = theValue; + return this; + } + + /** + * Sets the value for start (Starting time with inclusive boundary) + * + *+ * Definition: + * The start of the period. The boundary is inclusive. + *
+ */ + public PeriodDt setStartWithSecondsPrecision( Date theDate) { + myStart = new DateTimeDt(theDate); + return this; + } + + /** + * Sets the value for start (Starting time with inclusive boundary) + * + *+ * Definition: + * The start of the period. The boundary is inclusive. + *
+ */ + public PeriodDt setStart( Date theDate, TemporalPrecisionEnum thePrecision) { + myStart = new DateTimeDt(theDate, thePrecision); + return this; + } + + + /** + * Gets the value(s) for end (End time with inclusive boundary, if not ongoing). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * The end of the period. If the end of the period is missing, it means that the period is ongoing + *
+ */ + public DateTimeDt getEnd() { + if (myEnd == null) { + myEnd = new DateTimeDt(); + } + return myEnd; + } + + /** + * Sets the value(s) 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 PeriodDt setEnd(DateTimeDt theValue) { + myEnd = theValue; + return this; + } + + /** + * 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 PeriodDt setEndWithSecondsPrecision( Date theDate) { + myEnd = new DateTimeDt(theDate); + return this; + } + + /** + * 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 PeriodDt setEnd( Date theDate, TemporalPrecisionEnum thePrecision) { + myEnd = new DateTimeDt(theDate, thePrecision); + return this; + } + + + + +} diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/QuantityDt.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/QuantityDt.java new file mode 100644 index 00000000000..06b7321e2dd --- /dev/null +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/QuantityDt.java @@ -0,0 +1,436 @@ + + + + + + + + + + + + + + + + +package ca.uhn.fhir.model.dstu.composite; + +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import java.util.List; + +import ca.uhn.fhir.model.api.ICompositeDatatype; +import ca.uhn.fhir.model.api.IElement; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.SimpleSetter; +import ca.uhn.fhir.model.base.composite.BaseQuantityDt; +import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum; +import ca.uhn.fhir.model.primitive.BoundCodeDt; +import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; + +/** + * HAPI/FHIR QuantityDt Datatype + * (A measured or measurable amount) + * + *+ * Definition: + * A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies + *
+ * + *+ * Requirements: + * Need to able to capture all sorts of measured values, even if the measured value are not precisely quantified. Values include exact measures such as 3.51g, customary units such as 3 tablets, and currencies such as $100.32USD + *
+ */ +@DatatypeDef(name="QuantityDt") +public class QuantityDt + extends BaseQuantityDt implements ICompositeDatatype +{ + + /** + * Constructor + */ + public QuantityDt() { + // nothing + } + + /** + * Constructor + */ + @SimpleSetter + public QuantityDt(@SimpleSetter.Parameter(name="theValue") double theValue) { + setValue(theValue); + } + + /** + * Constructor + */ + @SimpleSetter + public QuantityDt(@SimpleSetter.Parameter(name="theValue") long theValue) { + setValue(theValue); + } + + /** + * Constructor + */ + @SimpleSetter + public QuantityDt(@SimpleSetter.Parameter(name = "theComparator") QuantityCompararatorEnum theComparator, @SimpleSetter.Parameter(name = "theValue") double theValue, + @SimpleSetter.Parameter(name = "theUnits") String theUnits) { + setValue(theValue); + setComparator(theComparator); + setUnits(theUnits); + } + + /** + * Constructor + */ + @SimpleSetter + public QuantityDt(@SimpleSetter.Parameter(name = "theComparator") QuantityCompararatorEnum theComparator, @SimpleSetter.Parameter(name = "theValue") long theValue, + @SimpleSetter.Parameter(name = "theUnits") String theUnits) { + setValue(theValue); + setComparator(theComparator); + setUnits(theUnits); + } + + /** + * Constructor + */ + @SimpleSetter + public QuantityDt(@SimpleSetter.Parameter(name="theComparator") QuantityCompararatorEnum theComparator, @SimpleSetter.Parameter(name="theValue") double theValue, @SimpleSetter.Parameter(name="theSystem") String theSystem, @SimpleSetter.Parameter(name="theUnits") String theUnits) { + setValue(theValue); + setComparator(theComparator); + setSystem(theSystem); + setUnits(theUnits); + } + + /** + * Constructor + */ + @SimpleSetter + public QuantityDt(@SimpleSetter.Parameter(name="theComparator") QuantityCompararatorEnum theComparator, @SimpleSetter.Parameter(name="theValue") long theValue, @SimpleSetter.Parameter(name="theSystem") String theSystem, @SimpleSetter.Parameter(name="theUnits") String theUnits) { + setValue(theValue); + setComparator(theComparator); + setSystem(theSystem); + setUnits(theUnits); + } + + + @Child(name="value", type=DecimalDt.class, order=0, min=0, max=1) + @Description( + shortDefinition="Numerical value (with implicit precision)", + formalDefinition="The value of the measured amount. The value includes an implicit precision in the presentation of the value" + ) + private DecimalDt myValue; + + @Child(name="comparator", type=CodeDt.class, order=1, min=0, max=1) + @Description( + shortDefinition="< | <= | >= | > - how to understand the value", + formalDefinition="How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is \"<\" , then the real value is < stated value" + ) + private BoundCodeDtnull
.
+ *
+ * + * Definition: + * The value of the measured amount. The value includes an implicit precision in the presentation of the value + *
+ */ + public DecimalDt getValue() { + if (myValue == null) { + myValue = new DecimalDt(); + } + return myValue; + } + + /** + * Sets the value(s) for value (Numerical value (with implicit precision)) + * + *+ * Definition: + * The value of the measured amount. The value includes an implicit precision in the presentation of the value + *
+ */ + public QuantityDt setValue(DecimalDt theValue) { + myValue = theValue; + return this; + } + + /** + * Sets the value for value (Numerical value (with implicit precision)) + * + *+ * Definition: + * The value of the measured amount. The value includes an implicit precision in the presentation of the value + *
+ */ + public QuantityDt setValue( long theValue) { + myValue = new DecimalDt(theValue); + return this; + } + + /** + * Sets the value for value (Numerical value (with implicit precision)) + * + *+ * Definition: + * The value of the measured amount. The value includes an implicit precision in the presentation of the value + *
+ */ + public QuantityDt setValue( double theValue) { + myValue = new DecimalDt(theValue); + return this; + } + + /** + * Sets the value for value (Numerical value (with implicit precision)) + * + *+ * Definition: + * The value of the measured amount. The value includes an implicit precision in the presentation of the value + *
+ */ + public QuantityDt setValue( java.math.BigDecimal theValue) { + myValue = new DecimalDt(theValue); + return this; + } + + + /** + * Gets the value(s) for comparator (< | <= | >= | > - how to understand the value). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is \"<\" , then the real value is < stated value + *
+ */ + public BoundCodeDt+ * Definition: + * How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is \"<\" , then the real value is < stated value + *
+ */ + public QuantityDt setComparator(BoundCodeDt+ * Definition: + * How the value should be understood and represented - whether the actual value is greater or less than the stated value due to measurement issues. E.g. if the comparator is \"<\" , then the real value is < stated value + *
+ */ + public QuantityDt setComparator(QuantityCompararatorEnum theValue) { + getComparator().setValueAsEnum(theValue); + return this; + } + + + /** + * Gets the value(s) for units (Unit representation). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * A human-readable form of the units + *
+ */ + public StringDt getUnits() { + if (myUnits == null) { + myUnits = new StringDt(); + } + return myUnits; + } + + /** + * Sets the value(s) for units (Unit representation) + * + *+ * Definition: + * A human-readable form of the units + *
+ */ + public QuantityDt setUnits(StringDt theValue) { + myUnits = theValue; + return this; + } + + /** + * Sets the value for units (Unit representation) + * + *+ * Definition: + * A human-readable form of the units + *
+ */ + public QuantityDt setUnits( String theString) { + myUnits = new StringDt(theString); + return this; + } + + + /** + * Gets the value(s) for system (System that defines coded unit form). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * The identification of the system that provides the coded form of the unit + *
+ */ + public UriDt getSystem() { + if (mySystem == null) { + mySystem = new UriDt(); + } + return mySystem; + } + + /** + * Sets the value(s) for system (System that defines coded unit form) + * + *+ * Definition: + * The identification of the system that provides the coded form of the unit + *
+ */ + public QuantityDt setSystem(UriDt theValue) { + mySystem = theValue; + return this; + } + + /** + * Sets the value for system (System that defines coded unit form) + * + *+ * Definition: + * The identification of the system that provides the coded form of the unit + *
+ */ + public QuantityDt setSystem( String theUri) { + mySystem = new UriDt(theUri); + return this; + } + + + /** + * Gets the value(s) for code (Coded form of the unit). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * A computer processable form of the units in some unit representation system + *
+ */ + public CodeDt getCode() { + if (myCode == null) { + myCode = new CodeDt(); + } + return myCode; + } + + /** + * Sets the value(s) for code (Coded form of the unit) + * + *+ * Definition: + * A computer processable form of the units in some unit representation system + *
+ */ + public QuantityDt setCode(CodeDt theValue) { + myCode = theValue; + return this; + } + + /** + * Sets the value for code (Coded form of the unit) + * + *+ * Definition: + * A computer processable form of the units in some unit representation system + *
+ */ + public QuantityDt setCode( String theCode) { + myCode = new CodeDt(theCode); + return this; + } + + + + +} diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/RangeDt.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/RangeDt.java new file mode 100644 index 00000000000..8a23cb4785a --- /dev/null +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/RangeDt.java @@ -0,0 +1,321 @@ + + + + + + + + + + + + + + + + +package ca.uhn.fhir.model.dstu.composite; + +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import java.util.List; + +import ca.uhn.fhir.model.api.BaseIdentifiableElement; +import ca.uhn.fhir.model.api.ICompositeDatatype; +import ca.uhn.fhir.model.api.IElement; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum; + +/** + * HAPI/FHIR RangeDt Datatype + * (Set of values bounded by low and high) + * + *+ * Definition: + * A set of ordered Quantities defined by a low and high limit. + *
+ * + *+ * Requirements: + * Need to be able to specify ranges of values + *
+ */ +@DatatypeDef(name="RangeDt") +public class RangeDt + extends BaseIdentifiableElement implements ICompositeDatatype +{ + + /** + * Constructor + */ + public RangeDt() { + // nothing + } + + + @Child(name="low", type=QuantityDt.class, order=0, min=0, max=1) + @Description( + shortDefinition="Low limit", + formalDefinition="The low limit. The boundary is inclusive." + ) + private QuantityDt myLow; + + @Child(name="high", type=QuantityDt.class, order=1, min=0, max=1) + @Description( + shortDefinition="High limit", + formalDefinition="The high limit. The boundary is inclusive." + ) + private QuantityDt myHigh; + + + @Override + public boolean isEmpty() { + return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myLow, myHigh); + } + + @Override + publicnull
.
+ *
+ * + * Definition: + * The low limit. The boundary is inclusive. + *
+ */ + public QuantityDt getLow() { + if (myLow == null) { + myLow = new QuantityDt(); + } + return myLow; + } + + /** + * Sets the value(s) for low (Low limit) + * + *+ * Definition: + * The low limit. The boundary is inclusive. + *
+ */ + public RangeDt setLow(QuantityDt theValue) { + myLow = theValue; + return this; + } + + /** + * Sets the value for low (Low limit) + * + *+ * Definition: + * The low limit. The boundary is inclusive. + *
+ */ + public RangeDt setLow( QuantityCompararatorEnum theComparator, double theValue, String theUnits) { + myLow = new QuantityDt(theComparator, theValue, theUnits); + return this; + } + + /** + * Sets the value for low (Low limit) + * + *+ * Definition: + * The low limit. The boundary is inclusive. + *
+ */ + public RangeDt setLow( QuantityCompararatorEnum theComparator, long theValue, String theUnits) { + myLow = new QuantityDt(theComparator, theValue, theUnits); + return this; + } + + /** + * Sets the value for low (Low limit) + * + *+ * Definition: + * The low limit. The boundary is inclusive. + *
+ */ + public RangeDt setLow( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) { + myLow = new QuantityDt(theComparator, theValue, theSystem, theUnits); + return this; + } + + /** + * Sets the value for low (Low limit) + * + *+ * Definition: + * The low limit. The boundary is inclusive. + *
+ */ + public RangeDt setLow( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) { + myLow = new QuantityDt(theComparator, theValue, theSystem, theUnits); + return this; + } + + /** + * Sets the value for low (Low limit) + * + *+ * Definition: + * The low limit. The boundary is inclusive. + *
+ */ + public RangeDt setLow( double theValue) { + myLow = new QuantityDt(theValue); + return this; + } + + /** + * Sets the value for low (Low limit) + * + *+ * Definition: + * The low limit. The boundary is inclusive. + *
+ */ + public RangeDt setLow( long theValue) { + myLow = new QuantityDt(theValue); + return this; + } + + + /** + * Gets the value(s) for high (High limit). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * The high limit. The boundary is inclusive. + *
+ */ + public QuantityDt getHigh() { + if (myHigh == null) { + myHigh = new QuantityDt(); + } + return myHigh; + } + + /** + * Sets the value(s) for high (High limit) + * + *+ * Definition: + * The high limit. The boundary is inclusive. + *
+ */ + public RangeDt setHigh(QuantityDt theValue) { + myHigh = theValue; + return this; + } + + /** + * Sets the value for high (High limit) + * + *+ * Definition: + * The high limit. The boundary is inclusive. + *
+ */ + public RangeDt setHigh( QuantityCompararatorEnum theComparator, double theValue, String theUnits) { + myHigh = new QuantityDt(theComparator, theValue, theUnits); + return this; + } + + /** + * Sets the value for high (High limit) + * + *+ * Definition: + * The high limit. The boundary is inclusive. + *
+ */ + public RangeDt setHigh( QuantityCompararatorEnum theComparator, long theValue, String theUnits) { + myHigh = new QuantityDt(theComparator, theValue, theUnits); + return this; + } + + /** + * Sets the value for high (High limit) + * + *+ * Definition: + * The high limit. The boundary is inclusive. + *
+ */ + public RangeDt setHigh( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) { + myHigh = new QuantityDt(theComparator, theValue, theSystem, theUnits); + return this; + } + + /** + * Sets the value for high (High limit) + * + *+ * Definition: + * The high limit. The boundary is inclusive. + *
+ */ + public RangeDt setHigh( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) { + myHigh = new QuantityDt(theComparator, theValue, theSystem, theUnits); + return this; + } + + /** + * Sets the value for high (High limit) + * + *+ * Definition: + * The high limit. The boundary is inclusive. + *
+ */ + public RangeDt setHigh( double theValue) { + myHigh = new QuantityDt(theValue); + return this; + } + + /** + * Sets the value for high (High limit) + * + *+ * Definition: + * The high limit. The boundary is inclusive. + *
+ */ + public RangeDt setHigh( long theValue) { + myHigh = new QuantityDt(theValue); + return this; + } + + + + +} diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/RatioDt.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/RatioDt.java new file mode 100644 index 00000000000..39850e81c07 --- /dev/null +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/RatioDt.java @@ -0,0 +1,321 @@ + + + + + + + + + + + + + + + + +package ca.uhn.fhir.model.dstu.composite; + +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import java.util.List; + +import ca.uhn.fhir.model.api.BaseIdentifiableElement; +import ca.uhn.fhir.model.api.ICompositeDatatype; +import ca.uhn.fhir.model.api.IElement; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum; + +/** + * HAPI/FHIR RatioDt Datatype + * (A ratio of two Quantity values - a numerator and a denominator) + * + *+ * Definition: + * A relationship of two Quantity values - expressed as a numerator and a denominator. + *
+ * + *+ * Requirements: + * Need to able to capture ratios for some measurements (titers) and some rates (costs) + *
+ */ +@DatatypeDef(name="RatioDt") +public class RatioDt + extends BaseIdentifiableElement implements ICompositeDatatype +{ + + /** + * Constructor + */ + public RatioDt() { + // nothing + } + + + @Child(name="numerator", type=QuantityDt.class, order=0, min=0, max=1) + @Description( + shortDefinition="Numerator value", + formalDefinition="The value of the numerator" + ) + private QuantityDt myNumerator; + + @Child(name="denominator", type=QuantityDt.class, order=1, min=0, max=1) + @Description( + shortDefinition="Denominator value", + formalDefinition="The value of the denominator" + ) + private QuantityDt myDenominator; + + + @Override + public boolean isEmpty() { + return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myNumerator, myDenominator); + } + + @Override + publicnull
.
+ *
+ * + * Definition: + * The value of the numerator + *
+ */ + public QuantityDt getNumerator() { + if (myNumerator == null) { + myNumerator = new QuantityDt(); + } + return myNumerator; + } + + /** + * Sets the value(s) for numerator (Numerator value) + * + *+ * Definition: + * The value of the numerator + *
+ */ + public RatioDt setNumerator(QuantityDt theValue) { + myNumerator = theValue; + return this; + } + + /** + * Sets the value for numerator (Numerator value) + * + *+ * Definition: + * The value of the numerator + *
+ */ + public RatioDt setNumerator( QuantityCompararatorEnum theComparator, double theValue, String theUnits) { + myNumerator = new QuantityDt(theComparator, theValue, theUnits); + return this; + } + + /** + * Sets the value for numerator (Numerator value) + * + *+ * Definition: + * The value of the numerator + *
+ */ + public RatioDt setNumerator( QuantityCompararatorEnum theComparator, long theValue, String theUnits) { + myNumerator = new QuantityDt(theComparator, theValue, theUnits); + return this; + } + + /** + * Sets the value for numerator (Numerator value) + * + *+ * Definition: + * The value of the numerator + *
+ */ + public RatioDt setNumerator( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) { + myNumerator = new QuantityDt(theComparator, theValue, theSystem, theUnits); + return this; + } + + /** + * Sets the value for numerator (Numerator value) + * + *+ * Definition: + * The value of the numerator + *
+ */ + public RatioDt setNumerator( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) { + myNumerator = new QuantityDt(theComparator, theValue, theSystem, theUnits); + return this; + } + + /** + * Sets the value for numerator (Numerator value) + * + *+ * Definition: + * The value of the numerator + *
+ */ + public RatioDt setNumerator( double theValue) { + myNumerator = new QuantityDt(theValue); + return this; + } + + /** + * Sets the value for numerator (Numerator value) + * + *+ * Definition: + * The value of the numerator + *
+ */ + public RatioDt setNumerator( long theValue) { + myNumerator = new QuantityDt(theValue); + return this; + } + + + /** + * Gets the value(s) for denominator (Denominator value). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * The value of the denominator + *
+ */ + public QuantityDt getDenominator() { + if (myDenominator == null) { + myDenominator = new QuantityDt(); + } + return myDenominator; + } + + /** + * Sets the value(s) for denominator (Denominator value) + * + *+ * Definition: + * The value of the denominator + *
+ */ + public RatioDt setDenominator(QuantityDt theValue) { + myDenominator = theValue; + return this; + } + + /** + * Sets the value for denominator (Denominator value) + * + *+ * Definition: + * The value of the denominator + *
+ */ + public RatioDt setDenominator( QuantityCompararatorEnum theComparator, double theValue, String theUnits) { + myDenominator = new QuantityDt(theComparator, theValue, theUnits); + return this; + } + + /** + * Sets the value for denominator (Denominator value) + * + *+ * Definition: + * The value of the denominator + *
+ */ + public RatioDt setDenominator( QuantityCompararatorEnum theComparator, long theValue, String theUnits) { + myDenominator = new QuantityDt(theComparator, theValue, theUnits); + return this; + } + + /** + * Sets the value for denominator (Denominator value) + * + *+ * Definition: + * The value of the denominator + *
+ */ + public RatioDt setDenominator( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) { + myDenominator = new QuantityDt(theComparator, theValue, theSystem, theUnits); + return this; + } + + /** + * Sets the value for denominator (Denominator value) + * + *+ * Definition: + * The value of the denominator + *
+ */ + public RatioDt setDenominator( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) { + myDenominator = new QuantityDt(theComparator, theValue, theSystem, theUnits); + return this; + } + + /** + * Sets the value for denominator (Denominator value) + * + *+ * Definition: + * The value of the denominator + *
+ */ + public RatioDt setDenominator( double theValue) { + myDenominator = new QuantityDt(theValue); + return this; + } + + /** + * Sets the value for denominator (Denominator value) + * + *+ * Definition: + * The value of the denominator + *
+ */ + public RatioDt setDenominator( long theValue) { + myDenominator = new QuantityDt(theValue); + return this; + } + + + + +} diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/ResourceReferenceDt.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/ResourceReferenceDt.java new file mode 100644 index 00000000000..4f0a2b479d4 --- /dev/null +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/ResourceReferenceDt.java @@ -0,0 +1,230 @@ + + + + + + + + + + + + + + + + +package ca.uhn.fhir.model.dstu.composite; + +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import java.util.List; + +import ca.uhn.fhir.model.api.ICompositeDatatype; +import ca.uhn.fhir.model.api.IElement; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.base.composite.BaseResourceReferenceDt; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.model.primitive.StringDt; + +/** + * HAPI/FHIR ResourceReferenceDt Datatype + * (A reference from one resource to another) + * + *+ * Definition: + * A reference from one resource to another + *
+ * + *+ * Requirements: + * + *
+ */ +@DatatypeDef(name="ResourceReferenceDt") +public class ResourceReferenceDt + extends BaseResourceReferenceDt implements ICompositeDatatype +{ + + /** + * Constructor + */ + public ResourceReferenceDt() { + // nothing + } + + /** + * Constructor which creates a resource reference containing the actual resource in question. + *+ * When using this in a server: Generally if this is serialized, it will be serialized as a contained + * resource, so this should not be used if the intent is not to actually supply the referenced resource. This is not + * a hard-and-fast rule however, as the server can be configured to not serialized this resource, or to load an ID + * and contain even if this constructor is not used. + *
+ * + * @param theResource + * The resource instance + */ + public ResourceReferenceDt(IResource theResource) { + super(theResource); + } + + /** + * Constructor which accepts a reference directly (this can be an ID, a partial/relative URL or a complete/absolute + * URL) + * + * @param theId + * The reference itself + */ + public ResourceReferenceDt(String theId) { + setReference(new IdDt(theId)); + } + + /** + * Constructor which accepts a reference directly (this can be an ID, a partial/relative URL or a complete/absolute + * URL) + * + * @param theId + * The reference itself + */ + public ResourceReferenceDt(IdDt theResourceId) { + setReference(theResourceId); + } + + @Child(name="reference", type=IdDt.class, order=0, min=0, max=1) + @Description( + shortDefinition="Relative, internal or absolute URL reference", + formalDefinition="A reference to a location at which the other resource is found. The reference may a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources" + ) + private IdDt myReference; + + @Child(name="display", type=StringDt.class, order=1, min=0, max=1) + @Description( + shortDefinition="Text alternative for the resource", + formalDefinition="Plain text narrative that identifies the resource in addition to the resource reference" + ) + private StringDt myDisplay; + + + @Override + public boolean isEmpty() { + return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myReference, myDisplay); + } + + @Override + publicnull
.
+ *
+ * + * Definition: + * A reference to a location at which the other resource is found. The reference may a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources + *
+ */ + public IdDt getReference() { + if (myReference == null) { + myReference = new IdDt(); + } + return myReference; + } + + /** + * Sets the value(s) for reference (Relative, internal or absolute URL reference) + * + *+ * Definition: + * A reference to a location at which the other resource is found. The reference may a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources + *
+ */ + public ResourceReferenceDt setReference(IdDt theValue) { + myReference = theValue; + return this; + } + + /** + * Sets the value for reference (Relative, internal or absolute URL reference) + * + *+ * Definition: + * A reference to a location at which the other resource is found. The reference may a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources + *
+ */ + public ResourceReferenceDt setReference( String theId) { + myReference = new IdDt(theId); + return this; + } + + + /** + * Gets the value(s) for display (Text alternative for the resource). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * Plain text narrative that identifies the resource in addition to the resource reference + *
+ */ + public StringDt getDisplay() { + if (myDisplay == null) { + myDisplay = new StringDt(); + } + return myDisplay; + } + + /** + * Sets the value(s) for display (Text alternative for the resource) + * + *+ * Definition: + * Plain text narrative that identifies the resource in addition to the resource reference + *
+ */ + public ResourceReferenceDt setDisplay(StringDt theValue) { + myDisplay = theValue; + return this; + } + + /** + * Sets the value for display (Text alternative for the resource) + * + *+ * Definition: + * Plain text narrative that identifies the resource in addition to the resource reference + *
+ */ + public ResourceReferenceDt setDisplay( String theString) { + myDisplay = new StringDt(theString); + return this; + } + + + + +} diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/SampledDataDt.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/SampledDataDt.java new file mode 100644 index 00000000000..d9b2483396a --- /dev/null +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/SampledDataDt.java @@ -0,0 +1,618 @@ + + + + + + + + + + + + + + + + +package ca.uhn.fhir.model.dstu.composite; + +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import java.util.List; + +import ca.uhn.fhir.model.api.BaseIdentifiableElement; +import ca.uhn.fhir.model.api.ICompositeDatatype; +import ca.uhn.fhir.model.api.IElement; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.dstu.valueset.QuantityCompararatorEnum; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IntegerDt; +import ca.uhn.fhir.model.primitive.StringDt; + +/** + * HAPI/FHIR SampledDataDt Datatype + * (A series of measurements taken by a device) + * + *+ * Definition: + * A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data + *
+ * + *+ * Requirements: + * There is a need for a concise way to handle the data produced by devices that sample a physical state at a high frequency + *
+ */ +@DatatypeDef(name="SampledDataDt") +public class SampledDataDt + extends BaseIdentifiableElement implements ICompositeDatatype +{ + + /** + * Constructor + */ + public SampledDataDt() { + // nothing + } + + + @Child(name="origin", type=QuantityDt.class, order=0, min=1, max=1) + @Description( + shortDefinition="Zero value and units", + formalDefinition="The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series" + ) + private QuantityDt myOrigin; + + @Child(name="period", type=DecimalDt.class, order=1, min=1, max=1) + @Description( + shortDefinition="Number of milliseconds between samples", + formalDefinition="The length of time between sampling times, measured in milliseconds" + ) + private DecimalDt myPeriod; + + @Child(name="factor", type=DecimalDt.class, order=2, min=0, max=1) + @Description( + shortDefinition="Multiply data by this before adding to origin", + formalDefinition="A correction factor that is applied to the sampled data points before they are added to the origin" + ) + private DecimalDt myFactor; + + @Child(name="lowerLimit", type=DecimalDt.class, order=3, min=0, max=1) + @Description( + shortDefinition="Lower limit of detection", + formalDefinition="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)" + ) + private DecimalDt myLowerLimit; + + @Child(name="upperLimit", type=DecimalDt.class, order=4, min=0, max=1) + @Description( + shortDefinition="Upper limit of detection", + formalDefinition="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)" + ) + private DecimalDt myUpperLimit; + + @Child(name="dimensions", type=IntegerDt.class, order=5, min=1, max=1) + @Description( + shortDefinition="Number of sample points at each time point", + formalDefinition="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" + ) + private IntegerDt myDimensions; + + @Child(name="data", type=StringDt.class, order=6, min=1, max=1) + @Description( + shortDefinition="Decimal values with spaces, or \"E\" | \"U\" | \"L\"", + formalDefinition="A series of data points which are decimal values separated by a single space (character u20). The special values \"E\" (error), \"L\" (below detection limit) and \"U\" (above detection limit) can also be used in place of a decimal value" + ) + private StringDt myData; + + + @Override + public boolean isEmpty() { + return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myOrigin, myPeriod, myFactor, myLowerLimit, myUpperLimit, myDimensions, myData); + } + + @Override + publicnull
.
+ *
+ * + * Definition: + * The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series + *
+ */ + public QuantityDt getOrigin() { + if (myOrigin == null) { + myOrigin = new QuantityDt(); + } + return myOrigin; + } + + /** + * Sets the value(s) for origin (Zero value and units) + * + *+ * Definition: + * The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series + *
+ */ + public SampledDataDt setOrigin(QuantityDt theValue) { + myOrigin = theValue; + return this; + } + + /** + * Sets the value for origin (Zero value and units) + * + *+ * Definition: + * The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series + *
+ */ + public SampledDataDt setOrigin( QuantityCompararatorEnum theComparator, double theValue, String theUnits) { + myOrigin = new QuantityDt(theComparator, theValue, theUnits); + return this; + } + + /** + * Sets the value for origin (Zero value and units) + * + *+ * Definition: + * The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series + *
+ */ + public SampledDataDt setOrigin( QuantityCompararatorEnum theComparator, long theValue, String theUnits) { + myOrigin = new QuantityDt(theComparator, theValue, theUnits); + return this; + } + + /** + * Sets the value for origin (Zero value and units) + * + *+ * Definition: + * The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series + *
+ */ + public SampledDataDt setOrigin( QuantityCompararatorEnum theComparator, double theValue, String theSystem, String theUnits) { + myOrigin = new QuantityDt(theComparator, theValue, theSystem, theUnits); + return this; + } + + /** + * Sets the value for origin (Zero value and units) + * + *+ * Definition: + * The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series + *
+ */ + public SampledDataDt setOrigin( QuantityCompararatorEnum theComparator, long theValue, String theSystem, String theUnits) { + myOrigin = new QuantityDt(theComparator, theValue, theSystem, theUnits); + return this; + } + + /** + * Sets the value for origin (Zero value and units) + * + *+ * Definition: + * The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series + *
+ */ + public SampledDataDt setOrigin( double theValue) { + myOrigin = new QuantityDt(theValue); + return this; + } + + /** + * Sets the value for origin (Zero value and units) + * + *+ * Definition: + * The base quantity that a measured value of zero represents. In addition, this provides the units of the entire measurement series + *
+ */ + public SampledDataDt setOrigin( long theValue) { + myOrigin = new QuantityDt(theValue); + return this; + } + + + /** + * Gets the value(s) for period (Number of milliseconds between samples). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * The length of time between sampling times, measured in milliseconds + *
+ */ + public DecimalDt getPeriod() { + if (myPeriod == null) { + myPeriod = new DecimalDt(); + } + return myPeriod; + } + + /** + * Sets the value(s) for period (Number of milliseconds between samples) + * + *+ * Definition: + * The length of time between sampling times, measured in milliseconds + *
+ */ + public SampledDataDt setPeriod(DecimalDt theValue) { + myPeriod = theValue; + return this; + } + + /** + * Sets the value for period (Number of milliseconds between samples) + * + *+ * Definition: + * The length of time between sampling times, measured in milliseconds + *
+ */ + public SampledDataDt setPeriod( long theValue) { + myPeriod = new DecimalDt(theValue); + return this; + } + + /** + * Sets the value for period (Number of milliseconds between samples) + * + *+ * Definition: + * The length of time between sampling times, measured in milliseconds + *
+ */ + public SampledDataDt setPeriod( double theValue) { + myPeriod = new DecimalDt(theValue); + return this; + } + + /** + * Sets the value for period (Number of milliseconds between samples) + * + *+ * Definition: + * The length of time between sampling times, measured in milliseconds + *
+ */ + public SampledDataDt setPeriod( java.math.BigDecimal theValue) { + myPeriod = new DecimalDt(theValue); + return this; + } + + + /** + * Gets the value(s) for factor (Multiply data by this before adding to origin). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * A correction factor that is applied to the sampled data points before they are added to the origin + *
+ */ + public DecimalDt getFactor() { + if (myFactor == null) { + myFactor = new DecimalDt(); + } + return myFactor; + } + + /** + * Sets the value(s) for factor (Multiply data by this before adding to origin) + * + *+ * Definition: + * A correction factor that is applied to the sampled data points before they are added to the origin + *
+ */ + public SampledDataDt setFactor(DecimalDt theValue) { + myFactor = theValue; + return this; + } + + /** + * Sets the value for factor (Multiply data by this before adding to origin) + * + *+ * Definition: + * A correction factor that is applied to the sampled data points before they are added to the origin + *
+ */ + public SampledDataDt setFactor( long theValue) { + myFactor = new DecimalDt(theValue); + return this; + } + + /** + * Sets the value for factor (Multiply data by this before adding to origin) + * + *+ * Definition: + * A correction factor that is applied to the sampled data points before they are added to the origin + *
+ */ + public SampledDataDt setFactor( double theValue) { + myFactor = new DecimalDt(theValue); + return this; + } + + /** + * Sets the value for factor (Multiply data by this before adding to origin) + * + *+ * Definition: + * A correction factor that is applied to the sampled data points before they are added to the origin + *
+ */ + public SampledDataDt setFactor( java.math.BigDecimal theValue) { + myFactor = new DecimalDt(theValue); + return this; + } + + + /** + * Gets the value(s) for lowerLimit (Lower limit of detection). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * 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 DecimalDt getLowerLimit() { + if (myLowerLimit == null) { + myLowerLimit = new DecimalDt(); + } + return myLowerLimit; + } + + /** + * Sets the value(s) for lowerLimit (Lower limit of detection) + * + *+ * Definition: + * The lower limit of detection of the measured points. This is needed if any of the data points have the value \"L\" (lower than detection limit) + *
+ */ + public SampledDataDt setLowerLimit(DecimalDt theValue) { + myLowerLimit = theValue; + return this; + } + + /** + * Sets the value for lowerLimit (Lower limit of detection) + * + *+ * Definition: + * The lower limit of detection of the measured points. This is needed if any of the data points have the value \"L\" (lower than detection limit) + *
+ */ + public SampledDataDt setLowerLimit( long theValue) { + myLowerLimit = new DecimalDt(theValue); + return this; + } + + /** + * Sets the value for lowerLimit (Lower limit of detection) + * + *+ * Definition: + * The lower limit of detection of the measured points. This is needed if any of the data points have the value \"L\" (lower than detection limit) + *
+ */ + public SampledDataDt setLowerLimit( double theValue) { + myLowerLimit = new DecimalDt(theValue); + return this; + } + + /** + * Sets the value for lowerLimit (Lower limit of detection) + * + *+ * Definition: + * The lower limit of detection of the measured points. This is needed if any of the data points have the value \"L\" (lower than detection limit) + *
+ */ + public SampledDataDt setLowerLimit( java.math.BigDecimal theValue) { + myLowerLimit = new DecimalDt(theValue); + return this; + } + + + /** + * Gets the value(s) for upperLimit (Upper limit of detection). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * 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 DecimalDt getUpperLimit() { + if (myUpperLimit == null) { + myUpperLimit = new DecimalDt(); + } + return myUpperLimit; + } + + /** + * Sets the value(s) for upperLimit (Upper limit of detection) + * + *+ * Definition: + * The upper limit of detection of the measured points. This is needed if any of the data points have the value \"U\" (higher than detection limit) + *
+ */ + public SampledDataDt setUpperLimit(DecimalDt theValue) { + myUpperLimit = theValue; + return this; + } + + /** + * Sets the value for upperLimit (Upper limit of detection) + * + *+ * Definition: + * The upper limit of detection of the measured points. This is needed if any of the data points have the value \"U\" (higher than detection limit) + *
+ */ + public SampledDataDt setUpperLimit( long theValue) { + myUpperLimit = new DecimalDt(theValue); + return this; + } + + /** + * Sets the value for upperLimit (Upper limit of detection) + * + *+ * Definition: + * The upper limit of detection of the measured points. This is needed if any of the data points have the value \"U\" (higher than detection limit) + *
+ */ + public SampledDataDt setUpperLimit( double theValue) { + myUpperLimit = new DecimalDt(theValue); + return this; + } + + /** + * Sets the value for upperLimit (Upper limit of detection) + * + *+ * Definition: + * The upper limit of detection of the measured points. This is needed if any of the data points have the value \"U\" (higher than detection limit) + *
+ */ + public SampledDataDt setUpperLimit( java.math.BigDecimal theValue) { + myUpperLimit = new DecimalDt(theValue); + return this; + } + + + /** + * Gets the value(s) for dimensions (Number of sample points at each time point). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * 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 IntegerDt getDimensions() { + if (myDimensions == null) { + myDimensions = new IntegerDt(); + } + return myDimensions; + } + + /** + * Sets the value(s) 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 SampledDataDt setDimensions(IntegerDt theValue) { + myDimensions = theValue; + return this; + } + + /** + * 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 SampledDataDt setDimensions( int theInteger) { + myDimensions = new IntegerDt(theInteger); + return this; + } + + + /** + * Gets the value(s) for data (Decimal values with spaces, or \"E\" | \"U\" | \"L\"). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * A series of data points which are decimal values separated by a single space (character u20). The special values \"E\" (error), \"L\" (below detection limit) and \"U\" (above detection limit) can also be used in place of a decimal value + *
+ */ + public StringDt getData() { + if (myData == null) { + myData = new StringDt(); + } + return myData; + } + + /** + * Sets the value(s) for data (Decimal values with spaces, or \"E\" | \"U\" | \"L\") + * + *+ * Definition: + * A series of data points which are decimal values separated by a single space (character u20). The special values \"E\" (error), \"L\" (below detection limit) and \"U\" (above detection limit) can also be used in place of a decimal value + *
+ */ + public SampledDataDt setData(StringDt theValue) { + myData = theValue; + return this; + } + + /** + * Sets the value for data (Decimal values with spaces, or \"E\" | \"U\" | \"L\") + * + *+ * Definition: + * A series of data points which are decimal values separated by a single space (character u20). The special values \"E\" (error), \"L\" (below detection limit) and \"U\" (above detection limit) can also be used in place of a decimal value + *
+ */ + public SampledDataDt setData( String theString) { + myData = new StringDt(theString); + return this; + } + + + + +} diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/ScheduleDt.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/ScheduleDt.java new file mode 100644 index 00000000000..e13545c60ca --- /dev/null +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/composite/ScheduleDt.java @@ -0,0 +1,575 @@ + + + + + + + + + + + + + + + + +package ca.uhn.fhir.model.dstu.composite; + +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + +import java.util.Date; +import java.util.List; + +import ca.uhn.fhir.model.api.BaseIdentifiableElement; +import ca.uhn.fhir.model.api.ICompositeDatatype; +import ca.uhn.fhir.model.api.IElement; +import ca.uhn.fhir.model.api.IResourceBlock; +import ca.uhn.fhir.model.api.TemporalPrecisionEnum; +import ca.uhn.fhir.model.api.annotation.Block; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.DatatypeDef; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.dstu.valueset.EventTimingEnum; +import ca.uhn.fhir.model.dstu.valueset.UnitsOfTimeEnum; +import ca.uhn.fhir.model.primitive.BoundCodeDt; +import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.DecimalDt; +import ca.uhn.fhir.model.primitive.IntegerDt; + +/** + * HAPI/FHIR ScheduleDt Datatype + * (A schedule that specifies an event that may occur multiple times) + * + *+ * Definition: + * Specifies an event that may occur multiple times. Schedules are used for to reord when things are expected or requested to occur. + *
+ * + *+ * Requirements: + * Need to able to track schedules. There are several different ways to do scheduling: one or more specified times, a simple rules like three times a day, or before/after meals + *
+ */ +@DatatypeDef(name="ScheduleDt") +public class ScheduleDt + extends BaseIdentifiableElement implements ICompositeDatatype +{ + + /** + * Constructor + */ + public ScheduleDt() { + // nothing + } + + + @Child(name="event", type=PeriodDt.class, order=0, min=0, max=Child.MAX_UNLIMITED) + @Description( + shortDefinition="When the event occurs", + formalDefinition="Identifies specific time periods when the event should occur" + ) + private java.util.Listnull
.
+ *
+ * + * Definition: + * Identifies specific time periods when the event should occur + *
+ */ + public java.util.List+ * Definition: + * Identifies specific time periods when the event should occur + *
+ */ + public ScheduleDt setEvent(java.util.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 first repetition for event (When the event occurs), + * creating it if it does not already exist. + * + *+ * Definition: + * Identifies specific time periods when the event should occur + *
+ */ + public PeriodDt getEventFirstRep() { + if (getEvent().isEmpty()) { + return addEvent(); + } + return getEvent().get(0); + } + + /** + * Gets the value(s) for repeat (Only if there is none or one event). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * Identifies a repeating pattern to the intended time periods. + *
+ */ + public Repeat getRepeat() { + if (myRepeat == null) { + myRepeat = new Repeat(); + } + return myRepeat; + } + + /** + * Sets the value(s) for repeat (Only if there is none or one event) + * + *+ * Definition: + * Identifies a repeating pattern to the intended time periods. + *
+ */ + public ScheduleDt setRepeat(Repeat theValue) { + myRepeat = theValue; + return this; + } + + + /** + * Block class for child element: Schedule.repeat (Only if there is none or one event) + * + *+ * Definition: + * Identifies a repeating pattern to the intended time periods. + *
+ */ + @Block() + public static class Repeat extends BaseIdentifiableElement implements IResourceBlock { + + @Child(name="frequency", type=IntegerDt.class, order=0, min=0, max=1) + @Description( + shortDefinition="Event occurs frequency times per duration", + formalDefinition="Indicates how often the event should occur." + ) + private IntegerDt myFrequency; + + @Child(name="when", type=CodeDt.class, order=1, min=0, max=1) + @Description( + shortDefinition="HS | WAKE | AC | ACM | ACD | ACV | PC | PCM | PCD | PCV - common life events", + formalDefinition="Identifies the occurrence of daily life that determines timing" + ) + private BoundCodeDtnull
.
+ *
+ * + * Definition: + * Indicates how often the event should occur. + *
+ */ + public IntegerDt getFrequency() { + if (myFrequency == null) { + myFrequency = new IntegerDt(); + } + return myFrequency; + } + + /** + * Sets the value(s) for frequency (Event occurs frequency times per duration) + * + *+ * Definition: + * Indicates how often the event should occur. + *
+ */ + public Repeat setFrequency(IntegerDt theValue) { + myFrequency = theValue; + return this; + } + + /** + * Sets the value for frequency (Event occurs frequency times per duration) + * + *+ * Definition: + * Indicates how often the event should occur. + *
+ */ + public Repeat setFrequency( int theInteger) { + myFrequency = new IntegerDt(theInteger); + return this; + } + + + /** + * Gets the value(s) for when (HS | WAKE | AC | ACM | ACD | ACV | PC | PCM | PCD | PCV - common life events). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * Identifies the occurrence of daily life that determines timing + *
+ */ + public BoundCodeDt+ * Definition: + * Identifies the occurrence of daily life that determines timing + *
+ */ + public Repeat setWhen(BoundCodeDt+ * Definition: + * Identifies the occurrence of daily life that determines timing + *
+ */ + public Repeat setWhen(EventTimingEnum theValue) { + getWhen().setValueAsEnum(theValue); + return this; + } + + + /** + * Gets the value(s) for duration (Repeating or event-related duration). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * How long each repetition should last + *
+ */ + public DecimalDt getDuration() { + if (myDuration == null) { + myDuration = new DecimalDt(); + } + return myDuration; + } + + /** + * Sets the value(s) for duration (Repeating or event-related duration) + * + *+ * Definition: + * How long each repetition should last + *
+ */ + public Repeat setDuration(DecimalDt theValue) { + myDuration = theValue; + return this; + } + + /** + * Sets the value for duration (Repeating or event-related duration) + * + *+ * Definition: + * How long each repetition should last + *
+ */ + public Repeat setDuration( long theValue) { + myDuration = new DecimalDt(theValue); + return this; + } + + /** + * Sets the value for duration (Repeating or event-related duration) + * + *+ * Definition: + * How long each repetition should last + *
+ */ + public Repeat setDuration( double theValue) { + myDuration = new DecimalDt(theValue); + return this; + } + + /** + * Sets the value for duration (Repeating or event-related duration) + * + *+ * Definition: + * How long each repetition should last + *
+ */ + public Repeat setDuration( java.math.BigDecimal theValue) { + myDuration = new DecimalDt(theValue); + return this; + } + + + /** + * Gets the value(s) for units (s | min | h | d | wk | mo | a - unit of time (UCUM)). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * The units of time for the duration + *
+ */ + public BoundCodeDt+ * Definition: + * The units of time for the duration + *
+ */ + public Repeat setUnits(BoundCodeDt+ * Definition: + * The units of time for the duration + *
+ */ + public Repeat setUnits(UnitsOfTimeEnum theValue) { + getUnits().setValueAsEnum(theValue); + return this; + } + + + /** + * Gets the value(s) for count (Number of times to repeat). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * A total count of the desired number of repetitions + *
+ */ + public IntegerDt getCount() { + if (myCount == null) { + myCount = new IntegerDt(); + } + return myCount; + } + + /** + * Sets the value(s) for count (Number of times to repeat) + * + *+ * Definition: + * A total count of the desired number of repetitions + *
+ */ + public Repeat setCount(IntegerDt theValue) { + myCount = theValue; + return this; + } + + /** + * Sets the value for count (Number of times to repeat) + * + *+ * Definition: + * A total count of the desired number of repetitions + *
+ */ + public Repeat setCount( int theInteger) { + myCount = new IntegerDt(theInteger); + return this; + } + + + /** + * Gets the value(s) for end (When to stop repeats). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * When to stop repeating the schedule + *
+ */ + public DateTimeDt getEnd() { + if (myEnd == null) { + myEnd = new DateTimeDt(); + } + return myEnd; + } + + /** + * Sets the value(s) for end (When to stop repeats) + * + *+ * Definition: + * When to stop repeating the schedule + *
+ */ + public Repeat setEnd(DateTimeDt theValue) { + myEnd = theValue; + return this; + } + + /** + * Sets the value for end (When to stop repeats) + * + *+ * Definition: + * When to stop repeating the schedule + *
+ */ + public Repeat setEndWithSecondsPrecision( Date theDate) { + myEnd = new DateTimeDt(theDate); + return this; + } + + /** + * Sets the value for end (When to stop repeats) + * + *+ * Definition: + * When to stop repeating the schedule + *
+ */ + public Repeat setEnd( Date theDate, TemporalPrecisionEnum thePrecision) { + myEnd = new DateTimeDt(theDate, thePrecision); + return this; + } + + + + } + + + + +} diff --git a/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/resource/Conformance.java b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/resource/Conformance.java new file mode 100644 index 00000000000..fb7805f4b45 --- /dev/null +++ b/hapi-tinder-plugin/src/main/java/ca/uhn/fhir/model/dstu/resource/Conformance.java @@ -0,0 +1,4885 @@ + + + + + + + + + + + + + + + + +package ca.uhn.fhir.model.dstu.resource; + +/* + * #%L + * HAPI FHIR - Core Library + * %% + * Copyright (C) 2014 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + + +import java.util.Date; +import java.util.List; + +import ca.uhn.fhir.model.api.BaseIdentifiableElement; +import ca.uhn.fhir.model.api.BaseResource; +import ca.uhn.fhir.model.api.IElement; +import ca.uhn.fhir.model.api.IResource; +import ca.uhn.fhir.model.api.IResourceBlock; +import ca.uhn.fhir.model.api.Include; +import ca.uhn.fhir.model.api.TemporalPrecisionEnum; +import ca.uhn.fhir.model.api.annotation.Block; +import ca.uhn.fhir.model.api.annotation.Child; +import ca.uhn.fhir.model.api.annotation.Description; +import ca.uhn.fhir.model.api.annotation.ResourceDef; +import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; +import ca.uhn.fhir.model.base.resource.BaseConformance; +import ca.uhn.fhir.model.dstu.composite.BoundCodeableConceptDt; +import ca.uhn.fhir.model.dstu.composite.CodeableConceptDt; +import ca.uhn.fhir.model.dstu.composite.CodingDt; +import ca.uhn.fhir.model.dstu.composite.ContactDt; +import ca.uhn.fhir.model.dstu.composite.ResourceReferenceDt; +import ca.uhn.fhir.model.dstu.valueset.ConformanceEventModeEnum; +import ca.uhn.fhir.model.dstu.valueset.ConformanceStatementStatusEnum; +import ca.uhn.fhir.model.dstu.valueset.ContactUseEnum; +import ca.uhn.fhir.model.dstu.valueset.DocumentModeEnum; +import ca.uhn.fhir.model.dstu.valueset.MessageSignificanceCategoryEnum; +import ca.uhn.fhir.model.dstu.valueset.ResourceTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulConformanceModeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationSystemEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulOperationTypeEnum; +import ca.uhn.fhir.model.dstu.valueset.RestfulSecurityServiceEnum; +import ca.uhn.fhir.model.dstu.valueset.SearchParamTypeEnum; +import ca.uhn.fhir.model.primitive.Base64BinaryDt; +import ca.uhn.fhir.model.primitive.BooleanDt; +import ca.uhn.fhir.model.primitive.BoundCodeDt; +import ca.uhn.fhir.model.primitive.CodeDt; +import ca.uhn.fhir.model.primitive.DateTimeDt; +import ca.uhn.fhir.model.primitive.IdDt; +import ca.uhn.fhir.model.primitive.IntegerDt; +import ca.uhn.fhir.model.primitive.StringDt; +import ca.uhn.fhir.model.primitive.UriDt; +import ca.uhn.fhir.rest.gclient.DateClientParam; +import ca.uhn.fhir.rest.gclient.ReferenceClientParam; +import ca.uhn.fhir.rest.gclient.StringClientParam; +import ca.uhn.fhir.rest.gclient.TokenClientParam; + + +/** + * HAPI/FHIR Conformance Resource + * (A conformance statement) + * + *+ * Definition: + * A conformance statement is a set of requirements for a desired implementation or a description of how a target application fulfills those requirements in a particular implementation + *
+ * + *+ * Requirements: + * + *
+ * + *+ * Profile Definition: + * http://hl7.org/fhir/profiles/Conformance + *
+ * + */ +@ResourceDef(name="Conformance", profile="http://hl7.org/fhir/profiles/Conformance", id="conformance") +public class Conformance extends BaseConformance implements IResource { + + /** + * Search parameter constant for identifier + *
+ * Description: The identifier of the conformance statement
+ * Type: token
+ * Path: Conformance.identifier
+ *
+ * Description: The identifier of the conformance statement
+ * Type: token
+ * Path: Conformance.identifier
+ *
+ * Description: The version identifier of the conformance statement
+ * Type: token
+ * Path: Conformance.version
+ *
+ * Description: The version identifier of the conformance statement
+ * Type: token
+ * Path: Conformance.version
+ *
+ * Description: Name of the conformance statement
+ * Type: string
+ * Path: Conformance.name
+ *
+ * Description: Name of the conformance statement
+ * Type: string
+ * Path: Conformance.name
+ *
+ * Description: Name of the publisher of the conformance statement
+ * Type: string
+ * Path: Conformance.publisher
+ *
+ * Description: Name of the publisher of the conformance statement
+ * Type: string
+ * Path: Conformance.publisher
+ *
+ * Description: Text search in the description of the conformance statement
+ * Type: string
+ * Path: Conformance.description
+ *
+ * Description: Text search in the description of the conformance statement
+ * Type: string
+ * Path: Conformance.description
+ *
+ * Description: The current status of the conformance statement
+ * Type: token
+ * Path: Conformance.status
+ *
+ * Description: The current status of the conformance statement
+ * Type: token
+ * Path: Conformance.status
+ *
+ * Description: The conformance statement publication date
+ * Type: date
+ * Path: Conformance.date
+ *
+ * Description: The conformance statement publication date
+ * Type: date
+ * Path: Conformance.date
+ *
+ * Description: Part of a the name of a software application
+ * Type: string
+ * Path: Conformance.software.name
+ *
+ * Description: Part of a the name of a software application
+ * Type: string
+ * Path: Conformance.software.name
+ *
+ * Description: The version of FHIR
+ * Type: token
+ * Path: Conformance.version
+ *
+ * Description: The version of FHIR
+ * Type: token
+ * Path: Conformance.version
+ *
+ * Description: Name of a resource mentioned in a conformance statement
+ * Type: token
+ * Path: Conformance.rest.resource.type
+ *
+ * Description: Name of a resource mentioned in a conformance statement
+ * Type: token
+ * Path: Conformance.rest.resource.type
+ *
+ * Description: Event code in a conformance statement
+ * Type: token
+ * Path: Conformance.messaging.event.code
+ *
+ * Description: Event code in a conformance statement
+ * Type: token
+ * Path: Conformance.messaging.event.code
+ *
+ * Description: Mode - restful (server/client) or messaging (sender/receiver)
+ * Type: token
+ * Path: Conformance.rest.mode
+ *
+ * Description: Mode - restful (server/client) or messaging (sender/receiver)
+ * Type: token
+ * Path: Conformance.rest.mode
+ *
+ * Description: A profile id invoked in a conformance statement
+ * Type: reference
+ * Path: Conformance.rest.resource.profile
+ *
+ * Description: A profile id invoked in a conformance statement
+ * Type: reference
+ * Path: Conformance.rest.resource.profile
+ *
+ * Description:
+ * Type: token
+ * Path: Conformance.format
+ *
+ * Description:
+ * Type: token
+ * Path: Conformance.format
+ *
+ * Description:
+ * Type: token
+ * Path: Conformance.rest.security
+ *
+ * Description:
+ * Type: token
+ * Path: Conformance.rest.security
+ *
+ * Description:
+ * Type: reference
+ * Path: Conformance.profile
+ *
+ * Description:
+ * Type: reference
+ * Path: Conformance.profile
+ *
null
.
+ *
+ * + * Definition: + * The identifier that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI) + *
+ */ + public StringDt getIdentifier() { + if (myIdentifier == null) { + myIdentifier = new StringDt(); + } + return myIdentifier; + } + + /** + * Sets the value(s) for identifier (Logical id to reference this statement) + * + *+ * Definition: + * The identifier that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI) + *
+ */ + public Conformance setIdentifier(StringDt theValue) { + myIdentifier = theValue; + return this; + } + + /** + * Sets the value for identifier (Logical id to reference this statement) + * + *+ * Definition: + * The identifier that is used to identify this conformance statement when it is referenced in a specification, model, design or an instance (should be globally unique OID, UUID, or URI) + *
+ */ + public Conformance setIdentifier( String theString) { + myIdentifier = new StringDt(theString); + return this; + } + + + /** + * Gets the value(s) for version (Logical id for this version of the statement). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp + *
+ */ + public StringDt getVersion() { + if (myVersion == null) { + myVersion = new StringDt(); + } + return myVersion; + } + + /** + * Sets the value(s) for version (Logical id for this version of the statement) + * + *+ * Definition: + * The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp + *
+ */ + public Conformance setVersion(StringDt theValue) { + myVersion = theValue; + return this; + } + + /** + * Sets the value for version (Logical id for this version of the statement) + * + *+ * Definition: + * The identifier that is used to identify this version of the conformance statement when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the profile author manually and the value should be a timestamp + *
+ */ + public Conformance setVersion( String theString) { + myVersion = new StringDt(theString); + return this; + } + + + /** + * Gets the value(s) for name (Informal name for this conformance statement). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * A free text natural language name identifying the conformance statement + *
+ */ + public StringDt getName() { + if (myName == null) { + myName = new StringDt(); + } + return myName; + } + + /** + * Sets the value(s) for name (Informal name for this conformance statement) + * + *+ * Definition: + * A free text natural language name identifying the conformance statement + *
+ */ + public Conformance setName(StringDt theValue) { + myName = theValue; + return this; + } + + /** + * Sets the value for name (Informal name for this conformance statement) + * + *+ * Definition: + * A free text natural language name identifying the conformance statement + *
+ */ + public Conformance setName( String theString) { + myName = new StringDt(theString); + return this; + } + + + /** + * Gets the value(s) for publisher (Publishing Organization). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * Name of Organization publishing this conformance statement + *
+ */ + public StringDt getPublisher() { + if (myPublisher == null) { + myPublisher = new StringDt(); + } + return myPublisher; + } + + /** + * Sets the value(s) for publisher (Publishing Organization) + * + *+ * Definition: + * Name of Organization publishing this conformance statement + *
+ */ + public Conformance setPublisher(StringDt theValue) { + myPublisher = theValue; + return this; + } + + /** + * Sets the value for publisher (Publishing Organization) + * + *+ * Definition: + * Name of Organization publishing this conformance statement + *
+ */ + public Conformance setPublisher( String theString) { + myPublisher = new StringDt(theString); + return this; + } + + + /** + * Gets the value(s) for telecom (Contacts for Organization). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * Contacts for Organization relevant to this conformance statement. The contacts may be a website, email, phone numbers, etc. + *
+ */ + public java.util.List+ * Definition: + * Contacts for Organization relevant to this conformance statement. The contacts may be a website, email, phone numbers, etc. + *
+ */ + public Conformance setTelecom(java.util.List+ * Definition: + * Contacts for Organization relevant to this conformance statement. The contacts may be a website, email, phone numbers, etc. + *
+ */ + public ContactDt addTelecom() { + ContactDt newType = new ContactDt(); + getTelecom().add(newType); + return newType; + } + + /** + * Gets the first repetition for telecom (Contacts for Organization), + * creating it if it does not already exist. + * + *+ * Definition: + * Contacts for Organization relevant to this conformance statement. The contacts may be a website, email, phone numbers, etc. + *
+ */ + public ContactDt getTelecomFirstRep() { + if (getTelecom().isEmpty()) { + return addTelecom(); + } + return getTelecom().get(0); + } + /** + * Adds a new value for telecom (Contacts for Organization) + * + *+ * Definition: + * Contacts for Organization relevant to this conformance statement. The contacts may be a website, email, phone numbers, etc. + *
+ * + * @return Returns a reference to this object, to allow for simple chaining. + */ + public Conformance addTelecom( ContactUseEnum theContactUse, String theValue) { + if (myTelecom == null) { + myTelecom = new java.util.ArrayList+ * Definition: + * Contacts for Organization relevant to this conformance statement. The contacts may be a website, email, phone numbers, etc. + *
+ * + * @return Returns a reference to this object, to allow for simple chaining. + */ + public Conformance addTelecom( String theValue) { + if (myTelecom == null) { + myTelecom = new java.util.ArrayListnull
.
+ *
+ * + * Definition: + * A free text natural language description of the conformance statement and its use. Typically, this is used when the profile describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP + *
+ */ + public StringDt getDescription() { + if (myDescription == null) { + myDescription = new StringDt(); + } + return myDescription; + } + + /** + * Sets the value(s) for description (Human description of the conformance statement) + * + *+ * Definition: + * A free text natural language description of the conformance statement and its use. Typically, this is used when the profile describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP + *
+ */ + public Conformance setDescription(StringDt theValue) { + myDescription = theValue; + return this; + } + + /** + * Sets the value for description (Human description of the conformance statement) + * + *+ * Definition: + * A free text natural language description of the conformance statement and its use. Typically, this is used when the profile describes a desired rather than an actual solution, for example as a formal expression of requirements as part of an RFP + *
+ */ + public Conformance setDescription( String theString) { + myDescription = new StringDt(theString); + return this; + } + + + /** + * Gets the value(s) for status (draft | active | retired). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * The status of this conformance statement + *
+ */ + public BoundCodeDt+ * Definition: + * The status of this conformance statement + *
+ */ + public Conformance setStatus(BoundCodeDt+ * Definition: + * The status of this conformance statement + *
+ */ + public Conformance setStatus(ConformanceStatementStatusEnum theValue) { + getStatus().setValueAsEnum(theValue); + return this; + } + + + /** + * Gets the value(s) for experimental (If for testing purposes, not real usage). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage + *
+ */ + public BooleanDt getExperimental() { + if (myExperimental == null) { + myExperimental = new BooleanDt(); + } + return myExperimental; + } + + /** + * Sets the value(s) for experimental (If for testing purposes, not real usage) + * + *+ * Definition: + * A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage + *
+ */ + public Conformance setExperimental(BooleanDt theValue) { + myExperimental = theValue; + return this; + } + + /** + * Sets the value for experimental (If for testing purposes, not real usage) + * + *+ * Definition: + * A flag to indicate that this conformance statement is authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage + *
+ */ + public Conformance setExperimental( boolean theBoolean) { + myExperimental = new BooleanDt(theBoolean); + return this; + } + + + /** + * Gets the value(s) for date (Publication Date). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * The date when the conformance statement was published + *
+ */ + public DateTimeDt getDate() { + if (myDate == null) { + myDate = new DateTimeDt(); + } + return myDate; + } + + /** + * Sets the value(s) for date (Publication Date) + * + *+ * Definition: + * The date when the conformance statement was published + *
+ */ + public Conformance setDate(DateTimeDt theValue) { + myDate = theValue; + return this; + } + + /** + * Sets the value for date (Publication Date) + * + *+ * Definition: + * The date when the conformance statement was published + *
+ */ + public Conformance setDateWithSecondsPrecision( Date theDate) { + myDate = new DateTimeDt(theDate); + return this; + } + + /** + * Sets the value for date (Publication Date) + * + *+ * Definition: + * The date when the conformance statement was published + *
+ */ + public Conformance setDate( Date theDate, TemporalPrecisionEnum thePrecision) { + myDate = new DateTimeDt(theDate, thePrecision); + return this; + } + + + /** + * Gets the value(s) for software (Software that is covered by this conformance statement). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * Software that is covered by this conformance statement. It is used when the profile describes the capabilities of a particular software version, independent of an installation. + *
+ */ + public Software getSoftware() { + if (mySoftware == null) { + mySoftware = new Software(); + } + return mySoftware; + } + + /** + * Sets the value(s) for software (Software that is covered by this conformance statement) + * + *+ * Definition: + * Software that is covered by this conformance statement. It is used when the profile describes the capabilities of a particular software version, independent of an installation. + *
+ */ + public Conformance setSoftware(Software theValue) { + mySoftware = theValue; + return this; + } + + + /** + * Gets the value(s) for implementation (If this describes a specific instance). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program + *
+ */ + public Implementation getImplementation() { + if (myImplementation == null) { + myImplementation = new Implementation(); + } + return myImplementation; + } + + /** + * Sets the value(s) for implementation (If this describes a specific instance) + * + *+ * Definition: + * Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program + *
+ */ + public Conformance setImplementation(Implementation theValue) { + myImplementation = theValue; + return this; + } + + + /** + * Gets the value(s) for fhirVersion (FHIR Version). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * The version of the FHIR specification on which this conformance statement is based + *
+ */ + public IdDt getFhirVersion() { + if (myFhirVersion == null) { + myFhirVersion = new IdDt(); + } + return myFhirVersion; + } + + /** + * Sets the value(s) for fhirVersion (FHIR Version) + * + *+ * Definition: + * The version of the FHIR specification on which this conformance statement is based + *
+ */ + public Conformance setFhirVersion(IdDt theValue) { + myFhirVersion = theValue; + return this; + } + + /** + * Sets the value for fhirVersion (FHIR Version) + * + *+ * Definition: + * The version of the FHIR specification on which this conformance statement is based + *
+ */ + public Conformance setFhirVersion( String theId) { + myFhirVersion = new IdDt(theId); + return this; + } + + + /** + * Gets the value(s) for acceptUnknown (True if application accepts unknown elements). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * A flag that indicates whether the application accepts unknown elements as part of a resource. + *
+ */ + public BooleanDt getAcceptUnknown() { + if (myAcceptUnknown == null) { + myAcceptUnknown = new BooleanDt(); + } + return myAcceptUnknown; + } + + /** + * Sets the value(s) for acceptUnknown (True if application accepts unknown elements) + * + *+ * Definition: + * A flag that indicates whether the application accepts unknown elements as part of a resource. + *
+ */ + public Conformance setAcceptUnknown(BooleanDt theValue) { + myAcceptUnknown = theValue; + return this; + } + + /** + * Sets the value for acceptUnknown (True if application accepts unknown elements) + * + *+ * Definition: + * A flag that indicates whether the application accepts unknown elements as part of a resource. + *
+ */ + public Conformance setAcceptUnknown( boolean theBoolean) { + myAcceptUnknown = new BooleanDt(theBoolean); + return this; + } + + + /** + * Gets the value(s) for format (formats supported (xml | json | mime type)). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * A list of the formats supported by this implementation + *
+ */ + public java.util.List+ * Definition: + * A list of the formats supported by this implementation + *
+ */ + public Conformance setFormat(java.util.List+ * Definition: + * A list of the formats supported by this implementation + *
+ */ + public CodeDt addFormat() { + CodeDt newType = new CodeDt(); + getFormat().add(newType); + return newType; + } + + /** + * Gets the first repetition for format (formats supported (xml | json | mime type)), + * creating it if it does not already exist. + * + *+ * Definition: + * A list of the formats supported by this implementation + *
+ */ + public CodeDt getFormatFirstRep() { + if (getFormat().isEmpty()) { + return addFormat(); + } + return getFormat().get(0); + } + /** + * Adds a new value for format (formats supported (xml | json | mime type)) + * + *+ * Definition: + * A list of the formats supported by this implementation + *
+ * + * @return Returns a reference to this object, to allow for simple chaining. + */ + public Conformance addFormat( String theCode) { + if (myFormat == null) { + myFormat = new java.util.ArrayListnull
.
+ *
+ * + * Definition: + * A list of profiles supported by the system. For a server, \"supported by the system\" means the system hosts/produces a set of recourses, conformant to a particular profile, and allows its clients to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. + *
+ */ + public java.util.List+ * Definition: + * A list of profiles supported by the system. For a server, \"supported by the system\" means the system hosts/produces a set of recourses, conformant to a particular profile, and allows its clients to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. + *
+ */ + public Conformance setProfile(java.util.List+ * Definition: + * A list of profiles supported by the system. For a server, \"supported by the system\" means the system hosts/produces a set of recourses, conformant to a particular profile, and allows its clients to search using this profile and to find appropriate data. For a client, it means the system will search by this profile and process data according to the guidance implicit in the profile. + *
+ */ + public ResourceReferenceDt addProfile() { + ResourceReferenceDt newType = new ResourceReferenceDt(); + getProfile().add(newType); + return newType; + } + + /** + * Gets the value(s) for rest (If the endpoint is a RESTful one). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * A definition of the restful capabilities of the solution, if any + *
+ */ + public java.util.List+ * Definition: + * A definition of the restful capabilities of the solution, if any + *
+ */ + public Conformance setRest(java.util.List+ * Definition: + * A definition of the restful capabilities of the solution, if any + *
+ */ + public Rest addRest() { + Rest newType = new Rest(); + getRest().add(newType); + return newType; + } + + /** + * Gets the first repetition for rest (If the endpoint is a RESTful one), + * creating it if it does not already exist. + * + *+ * Definition: + * A definition of the restful capabilities of the solution, if any + *
+ */ + public Rest getRestFirstRep() { + if (getRest().isEmpty()) { + return addRest(); + } + return getRest().get(0); + } + + /** + * Gets the value(s) for messaging (If messaging is supported). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * A description of the messaging capabilities of the solution + *
+ */ + public java.util.List+ * Definition: + * A description of the messaging capabilities of the solution + *
+ */ + public Conformance setMessaging(java.util.List+ * Definition: + * A description of the messaging capabilities of the solution + *
+ */ + public Messaging addMessaging() { + Messaging newType = new Messaging(); + getMessaging().add(newType); + return newType; + } + + /** + * Gets the first repetition for messaging (If messaging is supported), + * creating it if it does not already exist. + * + *+ * Definition: + * A description of the messaging capabilities of the solution + *
+ */ + public Messaging getMessagingFirstRep() { + if (getMessaging().isEmpty()) { + return addMessaging(); + } + return getMessaging().get(0); + } + + /** + * Gets the value(s) for document (Document definition). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * A document definition + *
+ */ + public java.util.List+ * Definition: + * A document definition + *
+ */ + public Conformance setDocument(java.util.List+ * Definition: + * A document definition + *
+ */ + public Document addDocument() { + Document newType = new Document(); + getDocument().add(newType); + return newType; + } + + /** + * Gets the first repetition for document (Document definition), + * creating it if it does not already exist. + * + *+ * Definition: + * A document definition + *
+ */ + public Document getDocumentFirstRep() { + if (getDocument().isEmpty()) { + return addDocument(); + } + return getDocument().get(0); + } + + /** + * Block class for child element: Conformance.software (Software that is covered by this conformance statement) + * + *+ * Definition: + * Software that is covered by this conformance statement. It is used when the profile describes the capabilities of a particular software version, independent of an installation. + *
+ */ + @Block() + public static class Software extends BaseIdentifiableElement implements IResourceBlock { + + @Child(name="name", type=StringDt.class, order=0, min=1, max=1) + @Description( + shortDefinition="A name the software is known by", + formalDefinition="Name software is known by" + ) + private StringDt myName; + + @Child(name="version", type=StringDt.class, order=1, min=0, max=1) + @Description( + shortDefinition="Version covered by this statement", + formalDefinition="The version identifier for the software covered by this statement" + ) + private StringDt myVersion; + + @Child(name="releaseDate", type=DateTimeDt.class, order=2, min=0, max=1) + @Description( + shortDefinition="Date this version released", + formalDefinition="Date this version of the software released" + ) + private DateTimeDt myReleaseDate; + + + @Override + public boolean isEmpty() { + return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myName, myVersion, myReleaseDate); + } + + @Override + publicnull
.
+ *
+ * + * Definition: + * Name software is known by + *
+ */ + public StringDt getName() { + if (myName == null) { + myName = new StringDt(); + } + return myName; + } + + /** + * Sets the value(s) for name (A name the software is known by) + * + *+ * Definition: + * Name software is known by + *
+ */ + public Software setName(StringDt theValue) { + myName = theValue; + return this; + } + + /** + * Sets the value for name (A name the software is known by) + * + *+ * Definition: + * Name software is known by + *
+ */ + public Software setName( String theString) { + myName = new StringDt(theString); + return this; + } + + + /** + * Gets the value(s) for version (Version covered by this statement). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * The version identifier for the software covered by this statement + *
+ */ + public StringDt getVersion() { + if (myVersion == null) { + myVersion = new StringDt(); + } + return myVersion; + } + + /** + * Sets the value(s) for version (Version covered by this statement) + * + *+ * Definition: + * The version identifier for the software covered by this statement + *
+ */ + public Software setVersion(StringDt theValue) { + myVersion = theValue; + return this; + } + + /** + * Sets the value for version (Version covered by this statement) + * + *+ * Definition: + * The version identifier for the software covered by this statement + *
+ */ + public Software setVersion( String theString) { + myVersion = new StringDt(theString); + return this; + } + + + /** + * Gets the value(s) for releaseDate (Date this version released). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * Date this version of the software released + *
+ */ + public DateTimeDt getReleaseDate() { + if (myReleaseDate == null) { + myReleaseDate = new DateTimeDt(); + } + return myReleaseDate; + } + + /** + * Sets the value(s) for releaseDate (Date this version released) + * + *+ * Definition: + * Date this version of the software released + *
+ */ + public Software setReleaseDate(DateTimeDt theValue) { + myReleaseDate = theValue; + return this; + } + + /** + * Sets the value for releaseDate (Date this version released) + * + *+ * Definition: + * Date this version of the software released + *
+ */ + public Software setReleaseDateWithSecondsPrecision( Date theDate) { + myReleaseDate = new DateTimeDt(theDate); + return this; + } + + /** + * Sets the value for releaseDate (Date this version released) + * + *+ * Definition: + * Date this version of the software released + *
+ */ + public Software setReleaseDate( Date theDate, TemporalPrecisionEnum thePrecision) { + myReleaseDate = new DateTimeDt(theDate, thePrecision); + return this; + } + + + + } + + + /** + * Block class for child element: Conformance.implementation (If this describes a specific instance) + * + *+ * Definition: + * Identifies a specific implementation instance that is described by the conformance statement - i.e. a particular installation, rather than the capabilities of a software program + *
+ */ + @Block() + public static class Implementation extends BaseIdentifiableElement implements IResourceBlock { + + @Child(name="description", type=StringDt.class, order=0, min=1, max=1) + @Description( + shortDefinition="Describes this specific instance", + formalDefinition="Information about the specific installation that this conformance statement relates to" + ) + private StringDt myDescription; + + @Child(name="url", type=UriDt.class, order=1, min=0, max=1) + @Description( + shortDefinition="Base URL for the installation", + formalDefinition="A base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces." + ) + private UriDt myUrl; + + + @Override + public boolean isEmpty() { + return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myDescription, myUrl); + } + + @Override + publicnull
.
+ *
+ * + * Definition: + * Information about the specific installation that this conformance statement relates to + *
+ */ + public StringDt getDescription() { + if (myDescription == null) { + myDescription = new StringDt(); + } + return myDescription; + } + + /** + * Sets the value(s) for description (Describes this specific instance) + * + *+ * Definition: + * Information about the specific installation that this conformance statement relates to + *
+ */ + public Implementation setDescription(StringDt theValue) { + myDescription = theValue; + return this; + } + + /** + * Sets the value for description (Describes this specific instance) + * + *+ * Definition: + * Information about the specific installation that this conformance statement relates to + *
+ */ + public Implementation setDescription( String theString) { + myDescription = new StringDt(theString); + return this; + } + + + /** + * Gets the value(s) for url (Base URL for the installation). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * A base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces. + *
+ */ + public UriDt getUrl() { + if (myUrl == null) { + myUrl = new UriDt(); + } + return myUrl; + } + + /** + * Sets the value(s) for url (Base URL for the installation) + * + *+ * Definition: + * A base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces. + *
+ */ + public Implementation setUrl(UriDt theValue) { + myUrl = theValue; + return this; + } + + /** + * Sets the value for url (Base URL for the installation) + * + *+ * Definition: + * A base URL for the implementation. This forms the base for REST interfaces as well as the mailbox and document interfaces. + *
+ */ + public Implementation setUrl( String theUri) { + myUrl = new UriDt(theUri); + return this; + } + + + + } + + + /** + * Block class for child element: Conformance.rest (If the endpoint is a RESTful one) + * + *+ * Definition: + * A definition of the restful capabilities of the solution, if any + *
+ */ + @Block() + public static class Rest extends BaseIdentifiableElement implements IResourceBlock { + + @Child(name="mode", type=CodeDt.class, order=0, min=1, max=1) + @Description( + shortDefinition="client | server", + formalDefinition="Identifies whether this portion of the statement is describing ability to initiate or receive restful operations" + ) + private BoundCodeDtnull
.
+ *
+ * + * Definition: + * Identifies whether this portion of the statement is describing ability to initiate or receive restful operations + *
+ */ + public BoundCodeDt+ * Definition: + * Identifies whether this portion of the statement is describing ability to initiate or receive restful operations + *
+ */ + public Rest setMode(BoundCodeDt+ * Definition: + * Identifies whether this portion of the statement is describing ability to initiate or receive restful operations + *
+ */ + public Rest setMode(RestfulConformanceModeEnum theValue) { + getMode().setValueAsEnum(theValue); + return this; + } + + + /** + * Gets the value(s) for documentation (General description of implementation). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * Information about the system's restful capabilities that apply across all applications, such as security + *
+ */ + public StringDt getDocumentation() { + if (myDocumentation == null) { + myDocumentation = new StringDt(); + } + return myDocumentation; + } + + /** + * Sets the value(s) for documentation (General description of implementation) + * + *+ * Definition: + * Information about the system's restful capabilities that apply across all applications, such as security + *
+ */ + public Rest setDocumentation(StringDt theValue) { + myDocumentation = theValue; + return this; + } + + /** + * Sets the value for documentation (General description of implementation) + * + *+ * Definition: + * Information about the system's restful capabilities that apply across all applications, such as security + *
+ */ + public Rest setDocumentation( String theString) { + myDocumentation = new StringDt(theString); + return this; + } + + + /** + * Gets the value(s) for security (Information about security of implementation). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * Information about security of implementation + *
+ */ + public RestSecurity getSecurity() { + if (mySecurity == null) { + mySecurity = new RestSecurity(); + } + return mySecurity; + } + + /** + * Sets the value(s) for security (Information about security of implementation) + * + *+ * Definition: + * Information about security of implementation + *
+ */ + public Rest setSecurity(RestSecurity theValue) { + mySecurity = theValue; + return this; + } + + + /** + * Gets the value(s) for resource (Resource served on the REST interface). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * A specification of the restful capabilities of the solution for a specific resource type + *
+ */ + public java.util.List+ * Definition: + * A specification of the restful capabilities of the solution for a specific resource type + *
+ */ + public Rest setResource(java.util.List+ * Definition: + * A specification of the restful capabilities of the solution for a specific resource type + *
+ */ + public RestResource addResource() { + RestResource newType = new RestResource(); + getResource().add(newType); + return newType; + } + + /** + * Gets the first repetition for resource (Resource served on the REST interface), + * creating it if it does not already exist. + * + *+ * Definition: + * A specification of the restful capabilities of the solution for a specific resource type + *
+ */ + public RestResource getResourceFirstRep() { + if (getResource().isEmpty()) { + return addResource(); + } + return getResource().get(0); + } + + /** + * Gets the value(s) for operation (What operations are supported?). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * A specification of restful operations supported by the system + *
+ */ + public java.util.List+ * Definition: + * A specification of restful operations supported by the system + *
+ */ + public Rest setOperation(java.util.List+ * Definition: + * A specification of restful operations supported by the system + *
+ */ + public RestOperation addOperation() { + RestOperation newType = new RestOperation(); + getOperation().add(newType); + return newType; + } + + /** + * Gets the first repetition for operation (What operations are supported?), + * creating it if it does not already exist. + * + *+ * Definition: + * A specification of restful operations supported by the system + *
+ */ + public RestOperation getOperationFirstRep() { + if (getOperation().isEmpty()) { + return addOperation(); + } + return getOperation().get(0); + } + + /** + * Gets the value(s) for query (Definition of a named query). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * Definition of a named query and its parameters and their meaning + *
+ */ + public java.util.List+ * Definition: + * Definition of a named query and its parameters and their meaning + *
+ */ + public Rest setQuery(java.util.List+ * Definition: + * Definition of a named query and its parameters and their meaning + *
+ */ + public RestQuery addQuery() { + RestQuery newType = new RestQuery(); + getQuery().add(newType); + return newType; + } + + /** + * Gets the first repetition for query (Definition of a named query), + * creating it if it does not already exist. + * + *+ * Definition: + * Definition of a named query and its parameters and their meaning + *
+ */ + public RestQuery getQueryFirstRep() { + if (getQuery().isEmpty()) { + return addQuery(); + } + return getQuery().get(0); + } + + /** + * Gets the value(s) for documentMailbox (How documents are accepted in /Mailbox). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * A list of profiles that this server implements for accepting documents in the mailbox. If this list is empty, then documents are not accepted. The base specification has the profile identifier \"http://hl7.org/fhir/documents/mailbox\". Other specifications can declare their own identifier for this purpose + *
+ */ + public java.util.List+ * Definition: + * A list of profiles that this server implements for accepting documents in the mailbox. If this list is empty, then documents are not accepted. The base specification has the profile identifier \"http://hl7.org/fhir/documents/mailbox\". Other specifications can declare their own identifier for this purpose + *
+ */ + public Rest setDocumentMailbox(java.util.List+ * Definition: + * A list of profiles that this server implements for accepting documents in the mailbox. If this list is empty, then documents are not accepted. The base specification has the profile identifier \"http://hl7.org/fhir/documents/mailbox\". Other specifications can declare their own identifier for this purpose + *
+ */ + public UriDt addDocumentMailbox() { + UriDt newType = new UriDt(); + getDocumentMailbox().add(newType); + return newType; + } + + /** + * Gets the first repetition for documentMailbox (How documents are accepted in /Mailbox), + * creating it if it does not already exist. + * + *+ * Definition: + * A list of profiles that this server implements for accepting documents in the mailbox. If this list is empty, then documents are not accepted. The base specification has the profile identifier \"http://hl7.org/fhir/documents/mailbox\". Other specifications can declare their own identifier for this purpose + *
+ */ + public UriDt getDocumentMailboxFirstRep() { + if (getDocumentMailbox().isEmpty()) { + return addDocumentMailbox(); + } + return getDocumentMailbox().get(0); + } + /** + * Adds a new value for documentMailbox (How documents are accepted in /Mailbox) + * + *+ * Definition: + * A list of profiles that this server implements for accepting documents in the mailbox. If this list is empty, then documents are not accepted. The base specification has the profile identifier \"http://hl7.org/fhir/documents/mailbox\". Other specifications can declare their own identifier for this purpose + *
+ * + * @return Returns a reference to this object, to allow for simple chaining. + */ + public Rest addDocumentMailbox( String theUri) { + if (myDocumentMailbox == null) { + myDocumentMailbox = new java.util.ArrayList+ * Definition: + * Information about security of implementation + *
+ */ + @Block() + public static class RestSecurity extends BaseIdentifiableElement implements IResourceBlock { + + @Child(name="cors", type=BooleanDt.class, order=0, min=0, max=1) + @Description( + shortDefinition="Adds CORS Headers (http://enable-cors.org/)", + formalDefinition="Server adds CORS headers when responding to requests - this enables javascript applications to yuse the server" + ) + private BooleanDt myCors; + + @Child(name="service", type=CodeableConceptDt.class, order=1, min=0, max=Child.MAX_UNLIMITED) + @Description( + shortDefinition="OAuth | OAuth2 | NTLM | Basic | Kerberos", + formalDefinition="Types of security services are supported/required by the system" + ) + private java.util.Listnull
.
+ *
+ * + * Definition: + * Server adds CORS headers when responding to requests - this enables javascript applications to yuse the server + *
+ */ + public BooleanDt getCors() { + if (myCors == null) { + myCors = new BooleanDt(); + } + return myCors; + } + + /** + * Sets the value(s) for cors (Adds CORS Headers (http://enable-cors.org/)) + * + *+ * Definition: + * Server adds CORS headers when responding to requests - this enables javascript applications to yuse the server + *
+ */ + public RestSecurity setCors(BooleanDt theValue) { + myCors = theValue; + return this; + } + + /** + * Sets the value for cors (Adds CORS Headers (http://enable-cors.org/)) + * + *+ * Definition: + * Server adds CORS headers when responding to requests - this enables javascript applications to yuse the server + *
+ */ + public RestSecurity setCors( boolean theBoolean) { + myCors = new BooleanDt(theBoolean); + return this; + } + + + /** + * Gets the value(s) for service (OAuth | OAuth2 | NTLM | Basic | Kerberos). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * Types of security services are supported/required by the system + *
+ */ + public java.util.List+ * Definition: + * Types of security services are supported/required by the system + *
+ */ + public RestSecurity setService(java.util.List+ * Definition: + * Types of security services are supported/required by the system + *
+ */ + public BoundCodeableConceptDt+ * Definition: + * Types of security services are supported/required by the system + *
+ */ + public BoundCodeableConceptDt+ * Definition: + * Types of security services are supported/required by the system + *
+ */ + public BoundCodeableConceptDt+ * Definition: + * Types of security services are supported/required by the system + *
+ */ + public RestSecurity setService(RestfulSecurityServiceEnum theValue) { + getService().clear(); + addService(theValue); + return this; + } + + + /** + * Gets the value(s) for description (General description of how security works). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * General description of how security works + *
+ */ + public StringDt getDescription() { + if (myDescription == null) { + myDescription = new StringDt(); + } + return myDescription; + } + + /** + * Sets the value(s) for description (General description of how security works) + * + *+ * Definition: + * General description of how security works + *
+ */ + public RestSecurity setDescription(StringDt theValue) { + myDescription = theValue; + return this; + } + + /** + * Sets the value for description (General description of how security works) + * + *+ * Definition: + * General description of how security works + *
+ */ + public RestSecurity setDescription( String theString) { + myDescription = new StringDt(theString); + return this; + } + + + /** + * Gets the value(s) for certificate (Certificates associated with security profiles). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * Certificates associated with security profiles + *
+ */ + public java.util.List+ * Definition: + * Certificates associated with security profiles + *
+ */ + public RestSecurity setCertificate(java.util.List+ * Definition: + * Certificates associated with security profiles + *
+ */ + public RestSecurityCertificate addCertificate() { + RestSecurityCertificate newType = new RestSecurityCertificate(); + getCertificate().add(newType); + return newType; + } + + /** + * Gets the first repetition for certificate (Certificates associated with security profiles), + * creating it if it does not already exist. + * + *+ * Definition: + * Certificates associated with security profiles + *
+ */ + public RestSecurityCertificate getCertificateFirstRep() { + if (getCertificate().isEmpty()) { + return addCertificate(); + } + return getCertificate().get(0); + } + + + } + + /** + * Block class for child element: Conformance.rest.security.certificate (Certificates associated with security profiles) + * + *+ * Definition: + * Certificates associated with security profiles + *
+ */ + @Block() + public static class RestSecurityCertificate extends BaseIdentifiableElement implements IResourceBlock { + + @Child(name="type", type=CodeDt.class, order=0, min=0, max=1) + @Description( + shortDefinition="Mime type for certificate", + formalDefinition="Mime type for certificate" + ) + private CodeDt myType; + + @Child(name="blob", type=Base64BinaryDt.class, order=1, min=0, max=1) + @Description( + shortDefinition="Actual certificate", + formalDefinition="Actual certificate" + ) + private Base64BinaryDt myBlob; + + + @Override + public boolean isEmpty() { + return super.isBaseEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( myType, myBlob); + } + + @Override + publicnull
.
+ *
+ * + * Definition: + * Mime type for certificate + *
+ */ + public CodeDt getType() { + if (myType == null) { + myType = new CodeDt(); + } + return myType; + } + + /** + * Sets the value(s) for type (Mime type for certificate) + * + *+ * Definition: + * Mime type for certificate + *
+ */ + public RestSecurityCertificate setType(CodeDt theValue) { + myType = theValue; + return this; + } + + /** + * Sets the value for type (Mime type for certificate) + * + *+ * Definition: + * Mime type for certificate + *
+ */ + public RestSecurityCertificate setType( String theCode) { + myType = new CodeDt(theCode); + return this; + } + + + /** + * Gets the value(s) for blob (Actual certificate). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * Actual certificate + *
+ */ + public Base64BinaryDt getBlob() { + if (myBlob == null) { + myBlob = new Base64BinaryDt(); + } + return myBlob; + } + + /** + * Sets the value(s) for blob (Actual certificate) + * + *+ * Definition: + * Actual certificate + *
+ */ + public RestSecurityCertificate setBlob(Base64BinaryDt theValue) { + myBlob = theValue; + return this; + } + + /** + * Sets the value for blob (Actual certificate) + * + *+ * Definition: + * Actual certificate + *
+ */ + public RestSecurityCertificate setBlob( byte[] theBytes) { + myBlob = new Base64BinaryDt(theBytes); + return this; + } + + + + } + + + + /** + * Block class for child element: Conformance.rest.resource (Resource served on the REST interface) + * + *+ * Definition: + * A specification of the restful capabilities of the solution for a specific resource type + *
+ */ + @Block() + public static class RestResource extends BaseIdentifiableElement implements IResourceBlock { + + @Child(name="type", type=CodeDt.class, order=0, min=1, max=1) + @Description( + shortDefinition="A resource type that is supported", + formalDefinition="A type of resource exposed via the restful interface" + ) + private BoundCodeDtnull
.
+ *
+ * + * Definition: + * A type of resource exposed via the restful interface + *
+ */ + public BoundCodeDt+ * Definition: + * A type of resource exposed via the restful interface + *
+ */ + public RestResource setType(BoundCodeDt+ * Definition: + * A type of resource exposed via the restful interface + *
+ */ + public RestResource setType(ResourceTypeEnum theValue) { + getType().setValueAsEnum(theValue); + return this; + } + + + /** + * Gets the value(s) for profile (What structural features are supported). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * A specification of the profile that describes the solution's support for the resource, including any constraints on cardinality, bindings, lengths or other limitations + *
+ */ + public ResourceReferenceDt getProfile() { + if (myProfile == null) { + myProfile = new ResourceReferenceDt(); + } + return myProfile; + } + + /** + * Sets the value(s) for profile (What structural features are supported) + * + *+ * Definition: + * A specification of the profile that describes the solution's support for the resource, including any constraints on cardinality, bindings, lengths or other limitations + *
+ */ + public RestResource setProfile(ResourceReferenceDt theValue) { + myProfile = theValue; + return this; + } + + + /** + * Gets the value(s) for operation (What operations are supported?). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * Identifies a restful operation supported by the solution + *
+ */ + public java.util.List+ * Definition: + * Identifies a restful operation supported by the solution + *
+ */ + public RestResource setOperation(java.util.List+ * Definition: + * Identifies a restful operation supported by the solution + *
+ */ + public RestResourceOperation addOperation() { + RestResourceOperation newType = new RestResourceOperation(); + getOperation().add(newType); + return newType; + } + + /** + * Gets the first repetition for operation (What operations are supported?), + * creating it if it does not already exist. + * + *+ * Definition: + * Identifies a restful operation supported by the solution + *
+ */ + public RestResourceOperation getOperationFirstRep() { + if (getOperation().isEmpty()) { + return addOperation(); + } + return getOperation().get(0); + } + + /** + * Gets the value(s) for readHistory (Whether vRead can return past versions). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * A flag for whether the server is able to return past versions as part of the vRead operation + *
+ */ + public BooleanDt getReadHistory() { + if (myReadHistory == null) { + myReadHistory = new BooleanDt(); + } + return myReadHistory; + } + + /** + * Sets the value(s) for readHistory (Whether vRead can return past versions) + * + *+ * Definition: + * A flag for whether the server is able to return past versions as part of the vRead operation + *
+ */ + public RestResource setReadHistory(BooleanDt theValue) { + myReadHistory = theValue; + return this; + } + + /** + * Sets the value for readHistory (Whether vRead can return past versions) + * + *+ * Definition: + * A flag for whether the server is able to return past versions as part of the vRead operation + *
+ */ + public RestResource setReadHistory( boolean theBoolean) { + myReadHistory = new BooleanDt(theBoolean); + return this; + } + + + /** + * Gets the value(s) for updateCreate (If allows/uses update to a new location). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * A flag to indicate that the server allows the client to create new identities on the server. If the update operation is used (client) or allowed (server) to a new location where a resource doesn't already exist. This means that the server allows the client to create new identities on the server + *
+ */ + public BooleanDt getUpdateCreate() { + if (myUpdateCreate == null) { + myUpdateCreate = new BooleanDt(); + } + return myUpdateCreate; + } + + /** + * Sets the value(s) for updateCreate (If allows/uses update to a new location) + * + *+ * Definition: + * A flag to indicate that the server allows the client to create new identities on the server. If the update operation is used (client) or allowed (server) to a new location where a resource doesn't already exist. This means that the server allows the client to create new identities on the server + *
+ */ + public RestResource setUpdateCreate(BooleanDt theValue) { + myUpdateCreate = theValue; + return this; + } + + /** + * Sets the value for updateCreate (If allows/uses update to a new location) + * + *+ * Definition: + * A flag to indicate that the server allows the client to create new identities on the server. If the update operation is used (client) or allowed (server) to a new location where a resource doesn't already exist. This means that the server allows the client to create new identities on the server + *
+ */ + public RestResource setUpdateCreate( boolean theBoolean) { + myUpdateCreate = new BooleanDt(theBoolean); + return this; + } + + + /** + * Gets the value(s) for searchInclude (_include values supported by the server). + * creating it if it does + * not exist. Will not returnnull
.
+ *
+ * + * Definition: + * A list of _include values supported by the server + *
+ */ + public java.util.List+ * Definition: + * A list of _include values supported by the server + *
+ */ + public RestResource setSearchInclude(java.util.List+ * Definition: + * A list of _include values supported by the server + *
+ */ + public StringDt addSearchInclude() { + StringDt newType = new StringDt(); + getSearchInclude().add(newType); + return newType; + } + + /** + * Gets the first repetition for searchInclude (_include values supported by the server), + * creating it if it does not already exist. + * + *+ * Definition: + * A list of _include values supported by the server + *
+ */ + public StringDt getSearchIncludeFirstRep() { + if (getSearchInclude().isEmpty()) { + return addSearchInclude(); + } + return getSearchInclude().get(0); + } + /** + * Adds a new value for searchInclude (_include values supported by the server) + * + *+ * Definition: + * A list of _include values supported by the server + *
+ * + * @return Returns a reference to this object, to allow for simple chaining. + */ + public RestResource addSearchInclude( String theString) { + if (mySearchInclude == null) { + mySearchInclude = new java.util.ArrayListnull
.
+ *
+ * + * Definition: + * Additional search parameters for implementations to support and/or make use of + *
+ */ + public java.util.List+ * Definition: + * Additional search parameters for implementations to support and/or make use of + *
+ */ + public RestResource setSearchParam(java.util.List+ * Definition: + * Additional search parameters for implementations to support and/or make use of + *
+ */ + public RestResourceSearchParam addSearchParam() { + RestResourceSearchParam newType = new RestResourceSearchParam(); + getSearchParam().add(newType); + return newType; + } + + /** + * Gets the first repetition for searchParam (Additional search params defined), + * creating it if it does not already exist. + * + *+ * Definition: + * Additional search parameters for implementations to support and/or make use of + *
+ */ + public RestResourceSearchParam getSearchParamFirstRep() { + if (getSearchParam().isEmpty()) { + return addSearchParam(); + } + return getSearchParam().get(0); + } + + + } + + /** + * Block class for child element: Conformance.rest.resource.operation (What operations are supported?) + * + *+ * Definition: + * Identifies a restful operation supported by the solution + *
+ */ + @Block() + public static class RestResourceOperation extends BaseIdentifiableElement implements IResourceBlock { + + @Child(name="code", type=CodeDt.class, order=0, min=1, max=1) + @Description( + shortDefinition="read | vread | update | delete | history-instance | validate | history-type | create | search-type", + formalDefinition="Coded identifier of the operation, supported by the system resource" + ) + private BoundCodeDtnull
.
+ *
+ * + * Definition: + * Coded identifier of the operation, supported by the system resource + *
+ */ + public BoundCodeDt+ *