Update datatypes

This commit is contained in:
jamesagnew 2016-05-01 10:31:02 -04:00
parent 9b55d0000b
commit 4f717661ad
35 changed files with 3216 additions and 126 deletions

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -661,6 +661,38 @@ public class ActionDefinition extends Type implements ICompositeType {
childrenList.add(new Property("anchor", "code", "An optional indicator for how the relationship is anchored to the related action. For example \"before the start\" or \"before the end\" of the related action.", 0, java.lang.Integer.MAX_VALUE, anchor)); childrenList.add(new Property("anchor", "code", "An optional indicator for how the relationship is anchored to the related action. For example \"before the start\" or \"before the end\" of the related action.", 0, java.lang.Integer.MAX_VALUE, anchor));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -889046145: /*actionIdentifier*/ return this.actionIdentifier == null ? new Base[0] : new Base[] {this.actionIdentifier}; // Identifier
case -261851592: /*relationship*/ return this.relationship == null ? new Base[0] : new Base[] {this.relationship}; // Enumeration<ActionRelationshipType>
case -1019779949: /*offset*/ return this.offset == null ? new Base[0] : new Base[] {this.offset}; // Type
case -1413299531: /*anchor*/ return this.anchor == null ? new Base[0] : new Base[] {this.anchor}; // Enumeration<ActionRelationshipAnchor>
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -889046145: // actionIdentifier
this.actionIdentifier = castToIdentifier(value); // Identifier
break;
case -261851592: // relationship
this.relationship = new ActionRelationshipTypeEnumFactory().fromType(value); // Enumeration<ActionRelationshipType>
break;
case -1019779949: // offset
this.offset = (Type) value; // Type
break;
case -1413299531: // anchor
this.anchor = new ActionRelationshipAnchorEnumFactory().fromType(value); // Enumeration<ActionRelationshipAnchor>
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("actionIdentifier")) if (name.equals("actionIdentifier"))
@ -675,6 +707,18 @@ public class ActionDefinition extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -889046145: return getActionIdentifier(); // Identifier
case -261851592: throw new FHIRException("Cannot make property relationship as it is not a complex type"); // Enumeration<ActionRelationshipType>
case -1960684787: return getOffset(); // Type
case -1413299531: throw new FHIRException("Cannot make property anchor as it is not a complex type"); // Enumeration<ActionRelationshipAnchor>
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("actionIdentifier")) { if (name.equals("actionIdentifier")) {
@ -731,8 +775,8 @@ public class ActionDefinition extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( actionIdentifier, relationship return super.isEmpty() && (actionIdentifier == null || actionIdentifier.isEmpty()) && (relationship == null || relationship.isEmpty())
, offset, anchor); && (offset == null || offset.isEmpty()) && (anchor == null || anchor.isEmpty());
} }
public String fhirType() { public String fhirType() {
@ -830,6 +874,30 @@ public class ActionDefinition extends Type implements ICompositeType {
childrenList.add(new Property("value", "Coding", "The specific behavior. The code used here is determined by the type of behavior being described. For example, the grouping behavior uses the grouping-behavior-type valueset.", 0, java.lang.Integer.MAX_VALUE, value)); childrenList.add(new Property("value", "Coding", "The specific behavior. The code used here is determined by the type of behavior being described. For example, the grouping behavior uses the grouping-behavior-type valueset.", 0, java.lang.Integer.MAX_VALUE, value));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding
case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // Coding
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3575610: // type
this.type = castToCoding(value); // Coding
break;
case 111972721: // value
this.value = castToCoding(value); // Coding
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("type")) if (name.equals("type"))
@ -840,6 +908,16 @@ public class ActionDefinition extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3575610: return getType(); // Coding
case 111972721: return getValue(); // Coding
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("type")) { if (name.equals("type")) {
@ -883,7 +961,8 @@ public class ActionDefinition extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, value); return super.isEmpty() && (type == null || type.isEmpty()) && (value == null || value.isEmpty())
;
} }
public String fhirType() { public String fhirType() {
@ -1023,6 +1102,30 @@ public class ActionDefinition extends Type implements ICompositeType {
childrenList.add(new Property("expression", "string", "An expression specifying the value of the customized element.", 0, java.lang.Integer.MAX_VALUE, expression)); childrenList.add(new Property("expression", "string", "An expression specifying the value of the customized element.", 0, java.lang.Integer.MAX_VALUE, expression));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType
case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3433509: // path
this.path = castToString(value); // StringType
break;
case -1795452264: // expression
this.expression = castToString(value); // StringType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("path")) if (name.equals("path"))
@ -1033,6 +1136,16 @@ public class ActionDefinition extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3433509: throw new FHIRException("Cannot make property path as it is not a complex type"); // StringType
case -1795452264: throw new FHIRException("Cannot make property expression as it is not a complex type"); // StringType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("path")) { if (name.equals("path")) {
@ -1074,7 +1187,8 @@ public class ActionDefinition extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( path, expression); return super.isEmpty() && (path == null || path.isEmpty()) && (expression == null || expression.isEmpty())
;
} }
public String fhirType() { public String fhirType() {
@ -1432,6 +1546,24 @@ public class ActionDefinition extends Type implements ICompositeType {
return this.concept; return this.concept;
} }
/**
* @return The first repetition of repeating field {@link #concept}, creating it if it does not already exist
*/
public CodeableConcept getConceptFirstRep() {
if (getConcept().isEmpty()) {
addConcept();
}
return getConcept().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ActionDefinition setConcept(List<CodeableConcept> theConcept) {
this.concept = theConcept;
return this;
}
public boolean hasConcept() { public boolean hasConcept() {
if (this.concept == null) if (this.concept == null)
return false; return false;
@ -1472,6 +1604,24 @@ public class ActionDefinition extends Type implements ICompositeType {
return this.supportingEvidence; return this.supportingEvidence;
} }
/**
* @return The first repetition of repeating field {@link #supportingEvidence}, creating it if it does not already exist
*/
public Attachment getSupportingEvidenceFirstRep() {
if (getSupportingEvidence().isEmpty()) {
addSupportingEvidence();
}
return getSupportingEvidence().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ActionDefinition setSupportingEvidence(List<Attachment> theSupportingEvidence) {
this.supportingEvidence = theSupportingEvidence;
return this;
}
public boolean hasSupportingEvidence() { public boolean hasSupportingEvidence() {
if (this.supportingEvidence == null) if (this.supportingEvidence == null)
return false; return false;
@ -1512,6 +1662,24 @@ public class ActionDefinition extends Type implements ICompositeType {
return this.documentation; return this.documentation;
} }
/**
* @return The first repetition of repeating field {@link #documentation}, creating it if it does not already exist
*/
public Attachment getDocumentationFirstRep() {
if (getDocumentation().isEmpty()) {
addDocumentation();
}
return getDocumentation().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ActionDefinition setDocumentation(List<Attachment> theDocumentation) {
this.documentation = theDocumentation;
return this;
}
public boolean hasDocumentation() { public boolean hasDocumentation() {
if (this.documentation == null) if (this.documentation == null)
return false; return false;
@ -1576,6 +1744,24 @@ public class ActionDefinition extends Type implements ICompositeType {
return this.participantType; return this.participantType;
} }
/**
* @return The first repetition of repeating field {@link #participantType}, creating it if it does not already exist
*/
public Enumeration<ParticipantType> getParticipantTypeFirstRep() {
if (getParticipantType().isEmpty()) {
addParticipantTypeElement();
}
return getParticipantType().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ActionDefinition setParticipantType(List<Enumeration<ParticipantType>> theParticipantType) {
this.participantType = theParticipantType;
return this;
}
public boolean hasParticipantType() { public boolean hasParticipantType() {
if (this.participantType == null) if (this.participantType == null)
return false; return false;
@ -1616,7 +1802,7 @@ public class ActionDefinition extends Type implements ICompositeType {
if (this.participantType == null) if (this.participantType == null)
return false; return false;
for (Enumeration<ParticipantType> v : this.participantType) for (Enumeration<ParticipantType> v : this.participantType)
if (v.equals(value)) // code if (v.getValue().equals(value)) // code
return true; return true;
return false; return false;
} }
@ -1679,6 +1865,24 @@ public class ActionDefinition extends Type implements ICompositeType {
return this.behavior; return this.behavior;
} }
/**
* @return The first repetition of repeating field {@link #behavior}, creating it if it does not already exist
*/
public ActionDefinitionBehaviorComponent getBehaviorFirstRep() {
if (getBehavior().isEmpty()) {
addBehavior();
}
return getBehavior().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ActionDefinition setBehavior(List<ActionDefinitionBehaviorComponent> theBehavior) {
this.behavior = theBehavior;
return this;
}
public boolean hasBehavior() { public boolean hasBehavior() {
if (this.behavior == null) if (this.behavior == null)
return false; return false;
@ -1758,6 +1962,24 @@ public class ActionDefinition extends Type implements ICompositeType {
return this.customization; return this.customization;
} }
/**
* @return The first repetition of repeating field {@link #customization}, creating it if it does not already exist
*/
public ActionDefinitionCustomizationComponent getCustomizationFirstRep() {
if (getCustomization().isEmpty()) {
addCustomization();
}
return getCustomization().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ActionDefinition setCustomization(List<ActionDefinitionCustomizationComponent> theCustomization) {
this.customization = theCustomization;
return this;
}
public boolean hasCustomization() { public boolean hasCustomization() {
if (this.customization == null) if (this.customization == null)
return false; return false;
@ -1798,6 +2020,24 @@ public class ActionDefinition extends Type implements ICompositeType {
return this.action; return this.action;
} }
/**
* @return The first repetition of repeating field {@link #action}, creating it if it does not already exist
*/
public ActionDefinition getActionFirstRep() {
if (getAction().isEmpty()) {
addAction();
}
return getAction().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ActionDefinition setAction(List<ActionDefinition> theAction) {
this.action = theAction;
return this;
}
public boolean hasAction() { public boolean hasAction() {
if (this.action == null) if (this.action == null)
return false; return false;
@ -1848,6 +2088,82 @@ public class ActionDefinition extends Type implements ICompositeType {
childrenList.add(new Property("action", "ActionDefinition", "Sub actions that are contained within the action. The behavior of this action determines the functionality of the sub-actions. For example, a selection behavior of at-most-one indicates that of the sub-actions, at most one may be chosen as part of realizing the action definition.", 0, java.lang.Integer.MAX_VALUE, action)); childrenList.add(new Property("action", "ActionDefinition", "Sub actions that are contained within the action. The behavior of this action determines the functionality of the sub-actions. For example, a selection behavior of at-most-one indicates that of the sub-actions, at most one may be chosen as part of realizing the action definition.", 0, java.lang.Integer.MAX_VALUE, action));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -889046145: /*actionIdentifier*/ return this.actionIdentifier == null ? new Base[0] : new Base[] {this.actionIdentifier}; // Identifier
case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType
case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
case -900391049: /*textEquivalent*/ return this.textEquivalent == null ? new Base[0] : new Base[] {this.textEquivalent}; // StringType
case 951024232: /*concept*/ return this.concept == null ? new Base[0] : this.concept.toArray(new Base[this.concept.size()]); // CodeableConcept
case -1735429846: /*supportingEvidence*/ return this.supportingEvidence == null ? new Base[0] : this.supportingEvidence.toArray(new Base[this.supportingEvidence.size()]); // Attachment
case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : this.documentation.toArray(new Base[this.documentation.size()]); // Attachment
case -384107967: /*relatedAction*/ return this.relatedAction == null ? new Base[0] : new Base[] {this.relatedAction}; // ActionDefinitionRelatedActionComponent
case 841294093: /*participantType*/ return this.participantType == null ? new Base[0] : this.participantType.toArray(new Base[this.participantType.size()]); // Enumeration<ParticipantType>
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<ActionType>
case 1510912594: /*behavior*/ return this.behavior == null ? new Base[0] : this.behavior.toArray(new Base[this.behavior.size()]); // ActionDefinitionBehaviorComponent
case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Reference
case 1637263315: /*customization*/ return this.customization == null ? new Base[0] : this.customization.toArray(new Base[this.customization.size()]); // ActionDefinitionCustomizationComponent
case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // ActionDefinition
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -889046145: // actionIdentifier
this.actionIdentifier = castToIdentifier(value); // Identifier
break;
case 102727412: // label
this.label = castToString(value); // StringType
break;
case 110371416: // title
this.title = castToString(value); // StringType
break;
case -1724546052: // description
this.description = castToString(value); // StringType
break;
case -900391049: // textEquivalent
this.textEquivalent = castToString(value); // StringType
break;
case 951024232: // concept
this.getConcept().add(castToCodeableConcept(value)); // CodeableConcept
break;
case -1735429846: // supportingEvidence
this.getSupportingEvidence().add(castToAttachment(value)); // Attachment
break;
case 1587405498: // documentation
this.getDocumentation().add(castToAttachment(value)); // Attachment
break;
case -384107967: // relatedAction
this.relatedAction = (ActionDefinitionRelatedActionComponent) value; // ActionDefinitionRelatedActionComponent
break;
case 841294093: // participantType
this.getParticipantType().add(new ParticipantTypeEnumFactory().fromType(value)); // Enumeration<ParticipantType>
break;
case 3575610: // type
this.type = new ActionTypeEnumFactory().fromType(value); // Enumeration<ActionType>
break;
case 1510912594: // behavior
this.getBehavior().add((ActionDefinitionBehaviorComponent) value); // ActionDefinitionBehaviorComponent
break;
case -341064690: // resource
this.resource = castToReference(value); // Reference
break;
case 1637263315: // customization
this.getCustomization().add((ActionDefinitionCustomizationComponent) value); // ActionDefinitionCustomizationComponent
break;
case -1422950858: // action
this.getAction().add(castToActionDefinition(value)); // ActionDefinition
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("actionIdentifier")) if (name.equals("actionIdentifier"))
@ -1884,6 +2200,29 @@ public class ActionDefinition extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -889046145: return getActionIdentifier(); // Identifier
case 102727412: throw new FHIRException("Cannot make property label as it is not a complex type"); // StringType
case 110371416: throw new FHIRException("Cannot make property title as it is not a complex type"); // StringType
case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType
case -900391049: throw new FHIRException("Cannot make property textEquivalent as it is not a complex type"); // StringType
case 951024232: return addConcept(); // CodeableConcept
case -1735429846: return addSupportingEvidence(); // Attachment
case 1587405498: return addDocumentation(); // Attachment
case -384107967: return getRelatedAction(); // ActionDefinitionRelatedActionComponent
case 841294093: throw new FHIRException("Cannot make property participantType as it is not a complex type"); // Enumeration<ParticipantType>
case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // Enumeration<ActionType>
case 1510912594: return addBehavior(); // ActionDefinitionBehaviorComponent
case -341064690: return getResource(); // Reference
case 1637263315: return addCustomization(); // ActionDefinitionCustomizationComponent
case -1422950858: return addAction(); // ActionDefinition
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("actionIdentifier")) { if (name.equals("actionIdentifier")) {
@ -2025,9 +2364,13 @@ public class ActionDefinition extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( actionIdentifier, label, title return super.isEmpty() && (actionIdentifier == null || actionIdentifier.isEmpty()) && (label == null || label.isEmpty())
, description, textEquivalent, concept, supportingEvidence, documentation, relatedAction && (title == null || title.isEmpty()) && (description == null || description.isEmpty()) && (textEquivalent == null || textEquivalent.isEmpty())
, participantType, type, behavior, resource, customization, action); && (concept == null || concept.isEmpty()) && (supportingEvidence == null || supportingEvidence.isEmpty())
&& (documentation == null || documentation.isEmpty()) && (relatedAction == null || relatedAction.isEmpty())
&& (participantType == null || participantType.isEmpty()) && (type == null || type.isEmpty())
&& (behavior == null || behavior.isEmpty()) && (resource == null || resource.isEmpty()) && (customization == null || customization.isEmpty())
&& (action == null || action.isEmpty());
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -503,6 +503,24 @@ public class Address extends Type implements ICompositeType {
return this.line; return this.line;
} }
/**
* @return The first repetition of repeating field {@link #line}, creating it if it does not already exist
*/
public StringType getLineFirstRep() {
if (getLine().isEmpty()) {
addLineElement();
}
return getLine().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Address setLine(List<StringType> theLine) {
this.line = theLine;
return this;
}
public boolean hasLine() { public boolean hasLine() {
if (this.line == null) if (this.line == null)
return false; return false;
@ -831,6 +849,62 @@ public class Address extends Type implements ICompositeType {
childrenList.add(new Property("period", "Period", "Time period when address was/is in use.", 0, java.lang.Integer.MAX_VALUE, period)); childrenList.add(new Property("period", "Period", "Time period when address was/is in use.", 0, java.lang.Integer.MAX_VALUE, period));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 116103: /*use*/ return this.use == null ? new Base[0] : new Base[] {this.use}; // Enumeration<AddressUse>
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<AddressType>
case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType
case 3321844: /*line*/ return this.line == null ? new Base[0] : this.line.toArray(new Base[this.line.size()]); // StringType
case 3053931: /*city*/ return this.city == null ? new Base[0] : new Base[] {this.city}; // StringType
case 288961422: /*district*/ return this.district == null ? new Base[0] : new Base[] {this.district}; // StringType
case 109757585: /*state*/ return this.state == null ? new Base[0] : new Base[] {this.state}; // StringType
case 2011152728: /*postalCode*/ return this.postalCode == null ? new Base[0] : new Base[] {this.postalCode}; // StringType
case 957831062: /*country*/ return this.country == null ? new Base[0] : new Base[] {this.country}; // StringType
case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 116103: // use
this.use = new AddressUseEnumFactory().fromType(value); // Enumeration<AddressUse>
break;
case 3575610: // type
this.type = new AddressTypeEnumFactory().fromType(value); // Enumeration<AddressType>
break;
case 3556653: // text
this.text = castToString(value); // StringType
break;
case 3321844: // line
this.getLine().add(castToString(value)); // StringType
break;
case 3053931: // city
this.city = castToString(value); // StringType
break;
case 288961422: // district
this.district = castToString(value); // StringType
break;
case 109757585: // state
this.state = castToString(value); // StringType
break;
case 2011152728: // postalCode
this.postalCode = castToString(value); // StringType
break;
case 957831062: // country
this.country = castToString(value); // StringType
break;
case -991726143: // period
this.period = castToPeriod(value); // Period
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("use")) if (name.equals("use"))
@ -857,6 +931,24 @@ public class Address extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 116103: throw new FHIRException("Cannot make property use as it is not a complex type"); // Enumeration<AddressUse>
case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // Enumeration<AddressType>
case 3556653: throw new FHIRException("Cannot make property text as it is not a complex type"); // StringType
case 3321844: throw new FHIRException("Cannot make property line as it is not a complex type"); // StringType
case 3053931: throw new FHIRException("Cannot make property city as it is not a complex type"); // StringType
case 288961422: throw new FHIRException("Cannot make property district as it is not a complex type"); // StringType
case 109757585: throw new FHIRException("Cannot make property state as it is not a complex type"); // StringType
case 2011152728: throw new FHIRException("Cannot make property postalCode as it is not a complex type"); // StringType
case 957831062: throw new FHIRException("Cannot make property country as it is not a complex type"); // StringType
case -991726143: return getPeriod(); // Period
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("use")) { if (name.equals("use")) {
@ -950,8 +1042,10 @@ public class Address extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( use, type, text, line, city return super.isEmpty() && (use == null || use.isEmpty()) && (type == null || type.isEmpty())
, district, state, postalCode, country, period); && (text == null || text.isEmpty()) && (line == null || line.isEmpty()) && (city == null || city.isEmpty())
&& (district == null || district.isEmpty()) && (state == null || state.isEmpty()) && (postalCode == null || postalCode.isEmpty())
&& (country == null || country.isEmpty()) && (period == null || period.isEmpty());
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Block; import ca.uhn.fhir.model.api.annotation.Block;
@ -81,8 +81,9 @@ public class Age extends Quantity {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( value, comparator, unit, system return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty())
, code); && (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty())
;
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -230,6 +230,34 @@ public class Annotation extends Type implements ICompositeType {
childrenList.add(new Property("text", "string", "The text of the annotation.", 0, java.lang.Integer.MAX_VALUE, text)); childrenList.add(new Property("text", "string", "The text of the annotation.", 0, java.lang.Integer.MAX_VALUE, text));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1406328437: /*author*/ return this.author == null ? new Base[0] : new Base[] {this.author}; // Type
case 3560141: /*time*/ return this.time == null ? new Base[0] : new Base[] {this.time}; // DateTimeType
case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1406328437: // author
this.author = (Type) value; // Type
break;
case 3560141: // time
this.time = castToDateTime(value); // DateTimeType
break;
case 3556653: // text
this.text = castToString(value); // StringType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("author[x]")) if (name.equals("author[x]"))
@ -242,6 +270,17 @@ public class Annotation extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1475597077: return getAuthor(); // Type
case 3560141: throw new FHIRException("Cannot make property time as it is not a complex type"); // DateTimeType
case 3556653: throw new FHIRException("Cannot make property text as it is not a complex type"); // StringType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("authorReference")) { if (name.equals("authorReference")) {
@ -302,7 +341,8 @@ public class Annotation extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( author, time, text); return super.isEmpty() && (author == null || author.isEmpty()) && (time == null || time.isEmpty())
&& (text == null || text.isEmpty());
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -512,6 +512,54 @@ public class Attachment extends Type implements ICompositeType {
childrenList.add(new Property("creation", "dateTime", "The date that the attachment was first created.", 0, java.lang.Integer.MAX_VALUE, creation)); childrenList.add(new Property("creation", "dateTime", "The date that the attachment was first created.", 0, java.lang.Integer.MAX_VALUE, creation));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -389131437: /*contentType*/ return this.contentType == null ? new Base[0] : new Base[] {this.contentType}; // CodeType
case -1613589672: /*language*/ return this.language == null ? new Base[0] : new Base[] {this.language}; // CodeType
case 3076010: /*data*/ return this.data == null ? new Base[0] : new Base[] {this.data}; // Base64BinaryType
case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
case 3530753: /*size*/ return this.size == null ? new Base[0] : new Base[] {this.size}; // UnsignedIntType
case 3195150: /*hash*/ return this.hash == null ? new Base[0] : new Base[] {this.hash}; // Base64BinaryType
case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
case 1820421855: /*creation*/ return this.creation == null ? new Base[0] : new Base[] {this.creation}; // DateTimeType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -389131437: // contentType
this.contentType = castToCode(value); // CodeType
break;
case -1613589672: // language
this.language = castToCode(value); // CodeType
break;
case 3076010: // data
this.data = castToBase64Binary(value); // Base64BinaryType
break;
case 116079: // url
this.url = castToUri(value); // UriType
break;
case 3530753: // size
this.size = castToUnsignedInt(value); // UnsignedIntType
break;
case 3195150: // hash
this.hash = castToBase64Binary(value); // Base64BinaryType
break;
case 110371416: // title
this.title = castToString(value); // StringType
break;
case 1820421855: // creation
this.creation = castToDateTime(value); // DateTimeType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("contentType")) if (name.equals("contentType"))
@ -534,6 +582,22 @@ public class Attachment extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -389131437: throw new FHIRException("Cannot make property contentType as it is not a complex type"); // CodeType
case -1613589672: throw new FHIRException("Cannot make property language as it is not a complex type"); // CodeType
case 3076010: throw new FHIRException("Cannot make property data as it is not a complex type"); // Base64BinaryType
case 116079: throw new FHIRException("Cannot make property url as it is not a complex type"); // UriType
case 3530753: throw new FHIRException("Cannot make property size as it is not a complex type"); // UnsignedIntType
case 3195150: throw new FHIRException("Cannot make property hash as it is not a complex type"); // Base64BinaryType
case 110371416: throw new FHIRException("Cannot make property title as it is not a complex type"); // StringType
case 1820421855: throw new FHIRException("Cannot make property creation as it is not a complex type"); // DateTimeType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("contentType")) { if (name.equals("contentType")) {
@ -614,8 +678,10 @@ public class Attachment extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( contentType, language, data, url return super.isEmpty() && (contentType == null || contentType.isEmpty()) && (language == null || language.isEmpty())
, size, hash, title, creation); && (data == null || data.isEmpty()) && (url == null || url.isEmpty()) && (size == null || size.isEmpty())
&& (hash == null || hash.isEmpty()) && (title == null || title.isEmpty()) && (creation == null || creation.isEmpty())
;
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -70,6 +70,24 @@ public abstract class BackboneElement extends Element implements IBaseBackboneEl
return this.modifierExtension; return this.modifierExtension;
} }
/**
* @return The first repetition of repeating field {@link #modifierExtension}, creating it if it does not already exist
*/
public Extension getModifierExtensionFirstRep() {
if (getModifierExtension().isEmpty()) {
addModifierExtension();
}
return getModifierExtension().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public BackboneElement setModifierExtension(List<Extension> theModifierExtension) {
this.modifierExtension = theModifierExtension;
return this;
}
public boolean hasModifierExtension() { public boolean hasModifierExtension() {
if (this.modifierExtension == null) if (this.modifierExtension == null)
return false; return false;
@ -105,6 +123,26 @@ public abstract class BackboneElement extends Element implements IBaseBackboneEl
childrenList.add(new Property("modifierExtension", "Extension", "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", 0, java.lang.Integer.MAX_VALUE, modifierExtension)); childrenList.add(new Property("modifierExtension", "Extension", "May be used to represent additional information that is not part of the basic definition of the element, and that modifies the understanding of the element that contains it. Usually modifier elements provide negation or qualification. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.", 0, java.lang.Integer.MAX_VALUE, modifierExtension));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -298878168: /*modifierExtension*/ return this.modifierExtension == null ? new Base[0] : this.modifierExtension.toArray(new Base[this.modifierExtension.size()]); // Extension
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -298878168: // modifierExtension
this.getModifierExtension().add(castToExtension(value)); // Extension
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("modifierExtension")) if (name.equals("modifierExtension"))
@ -113,6 +151,15 @@ public abstract class BackboneElement extends Element implements IBaseBackboneEl
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -298878168: return addModifierExtension(); // Extension
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("modifierExtension")) { if (name.equals("modifierExtension")) {
@ -158,7 +205,7 @@ public abstract class BackboneElement extends Element implements IBaseBackboneEl
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( modifierExtension); return super.isEmpty() && (modifierExtension == null || modifierExtension.isEmpty());
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -78,6 +78,24 @@ public class CodeableConcept extends Type implements ICompositeType {
return this.coding; return this.coding;
} }
/**
* @return The first repetition of repeating field {@link #coding}, creating it if it does not already exist
*/
public Coding getCodingFirstRep() {
if (getCoding().isEmpty()) {
addCoding();
}
return getCoding().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public CodeableConcept setCoding(List<Coding> theCoding) {
this.coding = theCoding;
return this;
}
public boolean hasCoding() { public boolean hasCoding() {
if (this.coding == null) if (this.coding == null)
return false; return false;
@ -164,6 +182,30 @@ public class CodeableConcept extends Type implements ICompositeType {
childrenList.add(new Property("text", "string", "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.", 0, java.lang.Integer.MAX_VALUE, text)); childrenList.add(new Property("text", "string", "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.", 0, java.lang.Integer.MAX_VALUE, text));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1355086998: /*coding*/ return this.coding == null ? new Base[0] : this.coding.toArray(new Base[this.coding.size()]); // Coding
case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1355086998: // coding
this.getCoding().add(castToCoding(value)); // Coding
break;
case 3556653: // text
this.text = castToString(value); // StringType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("coding")) if (name.equals("coding"))
@ -174,6 +216,16 @@ public class CodeableConcept extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1355086998: return addCoding(); // Coding
case 3556653: throw new FHIRException("Cannot make property text as it is not a complex type"); // StringType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("coding")) { if (name.equals("coding")) {
@ -228,7 +280,8 @@ public class CodeableConcept extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( coding, text); return super.isEmpty() && (coding == null || coding.isEmpty()) && (text == null || text.isEmpty())
;
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -352,6 +352,42 @@ public class Coding extends Type implements IBaseCoding, ICompositeType {
childrenList.add(new Property("userSelected", "boolean", "Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).", 0, java.lang.Integer.MAX_VALUE, userSelected)); childrenList.add(new Property("userSelected", "boolean", "Indicates that this coding was chosen by a user directly - i.e. off a pick list of available items (codes or displays).", 0, java.lang.Integer.MAX_VALUE, userSelected));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -887328209: /*system*/ return this.system == null ? new Base[0] : new Base[] {this.system}; // UriType
case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeType
case 1671764162: /*display*/ return this.display == null ? new Base[0] : new Base[] {this.display}; // StringType
case 423643014: /*userSelected*/ return this.userSelected == null ? new Base[0] : new Base[] {this.userSelected}; // BooleanType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -887328209: // system
this.system = castToUri(value); // UriType
break;
case 351608024: // version
this.version = castToString(value); // StringType
break;
case 3059181: // code
this.code = castToCode(value); // CodeType
break;
case 1671764162: // display
this.display = castToString(value); // StringType
break;
case 423643014: // userSelected
this.userSelected = castToBoolean(value); // BooleanType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("system")) if (name.equals("system"))
@ -368,6 +404,19 @@ public class Coding extends Type implements IBaseCoding, ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -887328209: throw new FHIRException("Cannot make property system as it is not a complex type"); // UriType
case 351608024: throw new FHIRException("Cannot make property version as it is not a complex type"); // StringType
case 3059181: throw new FHIRException("Cannot make property code as it is not a complex type"); // CodeType
case 1671764162: throw new FHIRException("Cannot make property display as it is not a complex type"); // StringType
case 423643014: throw new FHIRException("Cannot make property userSelected as it is not a complex type"); // BooleanType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("system")) { if (name.equals("system")) {
@ -432,8 +481,9 @@ public class Coding extends Type implements IBaseCoding, ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( system, version, code, display return super.isEmpty() && (system == null || system.isEmpty()) && (version == null || version.isEmpty())
, userSelected); && (code == null || code.isEmpty()) && (display == null || display.isEmpty()) && (userSelected == null || userSelected.isEmpty())
;
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -585,6 +585,42 @@ public class ContactPoint extends Type implements ICompositeType {
childrenList.add(new Property("period", "Period", "Time period when the contact point was/is in use.", 0, java.lang.Integer.MAX_VALUE, period)); childrenList.add(new Property("period", "Period", "Time period when the contact point was/is in use.", 0, java.lang.Integer.MAX_VALUE, period));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -887328209: /*system*/ return this.system == null ? new Base[0] : new Base[] {this.system}; // Enumeration<ContactPointSystem>
case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType
case 116103: /*use*/ return this.use == null ? new Base[0] : new Base[] {this.use}; // Enumeration<ContactPointUse>
case 3492908: /*rank*/ return this.rank == null ? new Base[0] : new Base[] {this.rank}; // PositiveIntType
case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -887328209: // system
this.system = new ContactPointSystemEnumFactory().fromType(value); // Enumeration<ContactPointSystem>
break;
case 111972721: // value
this.value = castToString(value); // StringType
break;
case 116103: // use
this.use = new ContactPointUseEnumFactory().fromType(value); // Enumeration<ContactPointUse>
break;
case 3492908: // rank
this.rank = castToPositiveInt(value); // PositiveIntType
break;
case -991726143: // period
this.period = castToPeriod(value); // Period
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("system")) if (name.equals("system"))
@ -601,6 +637,19 @@ public class ContactPoint extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -887328209: throw new FHIRException("Cannot make property system as it is not a complex type"); // Enumeration<ContactPointSystem>
case 111972721: throw new FHIRException("Cannot make property value as it is not a complex type"); // StringType
case 116103: throw new FHIRException("Cannot make property use as it is not a complex type"); // Enumeration<ContactPointUse>
case 3492908: throw new FHIRException("Cannot make property rank as it is not a complex type"); // PositiveIntType
case -991726143: return getPeriod(); // Period
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("system")) { if (name.equals("system")) {
@ -666,8 +715,9 @@ public class ContactPoint extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( system, value, use, rank, period return super.isEmpty() && (system == null || system.isEmpty()) && (value == null || value.isEmpty())
); && (use == null || use.isEmpty()) && (rank == null || rank.isEmpty()) && (period == null || period.isEmpty())
;
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Block; import ca.uhn.fhir.model.api.annotation.Block;
@ -81,8 +81,9 @@ public class Count extends Quantity {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( value, comparator, unit, system return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty())
, code); && (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty())
;
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -200,6 +200,24 @@ public class DataRequirement extends Type implements ICompositeType {
return this.valueCode; return this.valueCode;
} }
/**
* @return The first repetition of repeating field {@link #valueCode}, creating it if it does not already exist
*/
public CodeType getValueCodeFirstRep() {
if (getValueCode().isEmpty()) {
addValueCodeElement();
}
return getValueCode().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DataRequirementCodeFilterComponent setValueCode(List<CodeType> theValueCode) {
this.valueCode = theValueCode;
return this;
}
public boolean hasValueCode() { public boolean hasValueCode() {
if (this.valueCode == null) if (this.valueCode == null)
return false; return false;
@ -254,6 +272,24 @@ public class DataRequirement extends Type implements ICompositeType {
return this.valueCoding; return this.valueCoding;
} }
/**
* @return The first repetition of repeating field {@link #valueCoding}, creating it if it does not already exist
*/
public Coding getValueCodingFirstRep() {
if (getValueCoding().isEmpty()) {
addValueCoding();
}
return getValueCoding().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DataRequirementCodeFilterComponent setValueCoding(List<Coding> theValueCoding) {
this.valueCoding = theValueCoding;
return this;
}
public boolean hasValueCoding() { public boolean hasValueCoding() {
if (this.valueCoding == null) if (this.valueCoding == null)
return false; return false;
@ -294,6 +330,24 @@ public class DataRequirement extends Type implements ICompositeType {
return this.valueCodeableConcept; return this.valueCodeableConcept;
} }
/**
* @return The first repetition of repeating field {@link #valueCodeableConcept}, creating it if it does not already exist
*/
public CodeableConcept getValueCodeableConceptFirstRep() {
if (getValueCodeableConcept().isEmpty()) {
addValueCodeableConcept();
}
return getValueCodeableConcept().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DataRequirementCodeFilterComponent setValueCodeableConcept(List<CodeableConcept> theValueCodeableConcept) {
this.valueCodeableConcept = theValueCodeableConcept;
return this;
}
public boolean hasValueCodeableConcept() { public boolean hasValueCodeableConcept() {
if (this.valueCodeableConcept == null) if (this.valueCodeableConcept == null)
return false; return false;
@ -334,6 +388,42 @@ public class DataRequirement extends Type implements ICompositeType {
childrenList.add(new Property("valueCodeableConcept", "CodeableConcept", "The CodeableConcepts for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified CodeableConcepts.", 0, java.lang.Integer.MAX_VALUE, valueCodeableConcept)); childrenList.add(new Property("valueCodeableConcept", "CodeableConcept", "The CodeableConcepts for the code filter. Only one of valueSet, valueCode, valueConding, or valueCodeableConcept may be specified. If values are given, the filter will return only those data items for which the code-valued attribute specified by the path has a value that is one of the specified CodeableConcepts.", 0, java.lang.Integer.MAX_VALUE, valueCodeableConcept));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType
case -1410174671: /*valueSet*/ return this.valueSet == null ? new Base[0] : new Base[] {this.valueSet}; // Type
case -766209282: /*valueCode*/ return this.valueCode == null ? new Base[0] : this.valueCode.toArray(new Base[this.valueCode.size()]); // CodeType
case -1887705029: /*valueCoding*/ return this.valueCoding == null ? new Base[0] : this.valueCoding.toArray(new Base[this.valueCoding.size()]); // Coding
case 924902896: /*valueCodeableConcept*/ return this.valueCodeableConcept == null ? new Base[0] : this.valueCodeableConcept.toArray(new Base[this.valueCodeableConcept.size()]); // CodeableConcept
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3433509: // path
this.path = castToString(value); // StringType
break;
case -1410174671: // valueSet
this.valueSet = (Type) value; // Type
break;
case -766209282: // valueCode
this.getValueCode().add(castToCode(value)); // CodeType
break;
case -1887705029: // valueCoding
this.getValueCoding().add(castToCoding(value)); // Coding
break;
case 924902896: // valueCodeableConcept
this.getValueCodeableConcept().add(castToCodeableConcept(value)); // CodeableConcept
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("path")) if (name.equals("path"))
@ -350,6 +440,19 @@ public class DataRequirement extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3433509: throw new FHIRException("Cannot make property path as it is not a complex type"); // StringType
case -1438410321: return getValueSet(); // Type
case -766209282: throw new FHIRException("Cannot make property valueCode as it is not a complex type"); // CodeType
case -1887705029: return addValueCoding(); // Coding
case 924902896: return addValueCodeableConcept(); // CodeableConcept
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("path")) { if (name.equals("path")) {
@ -422,8 +525,9 @@ public class DataRequirement extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( path, valueSet, valueCode, valueCoding return super.isEmpty() && (path == null || path.isEmpty()) && (valueSet == null || valueSet.isEmpty())
, valueCodeableConcept); && (valueCode == null || valueCode.isEmpty()) && (valueCoding == null || valueCoding.isEmpty())
&& (valueCodeableConcept == null || valueCodeableConcept.isEmpty());
} }
public String fhirType() { public String fhirType() {
@ -562,6 +666,30 @@ public class DataRequirement extends Type implements ICompositeType {
childrenList.add(new Property("value[x]", "dateTime|Period", "The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime.", 0, java.lang.Integer.MAX_VALUE, value)); childrenList.add(new Property("value[x]", "dateTime|Period", "The value of the filter. If period is specified, the filter will return only those data items that fall within the bounds determined by the Period, inclusive of the period boundaries. If dateTime is specified, the filter will return only those data items that are equal to the specified dateTime.", 0, java.lang.Integer.MAX_VALUE, value));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType
case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // Type
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3433509: // path
this.path = castToString(value); // StringType
break;
case 111972721: // value
this.value = (Type) value; // Type
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("path")) if (name.equals("path"))
@ -572,6 +700,16 @@ public class DataRequirement extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3433509: throw new FHIRException("Cannot make property path as it is not a complex type"); // StringType
case -1410166417: return getValue(); // Type
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("path")) { if (name.equals("path")) {
@ -618,7 +756,8 @@ public class DataRequirement extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( path, value); return super.isEmpty() && (path == null || path.isEmpty()) && (value == null || value.isEmpty())
;
} }
public String fhirType() { public String fhirType() {
@ -783,6 +922,24 @@ public class DataRequirement extends Type implements ICompositeType {
return this.mustSupport; return this.mustSupport;
} }
/**
* @return The first repetition of repeating field {@link #mustSupport}, creating it if it does not already exist
*/
public StringType getMustSupportFirstRep() {
if (getMustSupport().isEmpty()) {
addMustSupportElement();
}
return getMustSupport().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DataRequirement setMustSupport(List<StringType> theMustSupport) {
this.mustSupport = theMustSupport;
return this;
}
public boolean hasMustSupport() { public boolean hasMustSupport() {
if (this.mustSupport == null) if (this.mustSupport == null)
return false; return false;
@ -837,6 +994,24 @@ public class DataRequirement extends Type implements ICompositeType {
return this.codeFilter; return this.codeFilter;
} }
/**
* @return The first repetition of repeating field {@link #codeFilter}, creating it if it does not already exist
*/
public DataRequirementCodeFilterComponent getCodeFilterFirstRep() {
if (getCodeFilter().isEmpty()) {
addCodeFilter();
}
return getCodeFilter().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DataRequirement setCodeFilter(List<DataRequirementCodeFilterComponent> theCodeFilter) {
this.codeFilter = theCodeFilter;
return this;
}
public boolean hasCodeFilter() { public boolean hasCodeFilter() {
if (this.codeFilter == null) if (this.codeFilter == null)
return false; return false;
@ -877,6 +1052,24 @@ public class DataRequirement extends Type implements ICompositeType {
return this.dateFilter; return this.dateFilter;
} }
/**
* @return The first repetition of repeating field {@link #dateFilter}, creating it if it does not already exist
*/
public DataRequirementDateFilterComponent getDateFilterFirstRep() {
if (getDateFilter().isEmpty()) {
addDateFilter();
}
return getDateFilter().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public DataRequirement setDateFilter(List<DataRequirementDateFilterComponent> theDateFilter) {
this.dateFilter = theDateFilter;
return this;
}
public boolean hasDateFilter() { public boolean hasDateFilter() {
if (this.dateFilter == null) if (this.dateFilter == null)
return false; return false;
@ -917,6 +1110,42 @@ public class DataRequirement extends Type implements ICompositeType {
childrenList.add(new Property("dateFilter", "", "Date filters specify additional constraints on the data in terms of the applicable date range for specific elements.", 0, java.lang.Integer.MAX_VALUE, dateFilter)); childrenList.add(new Property("dateFilter", "", "Date filters specify additional constraints on the data in terms of the applicable date range for specific elements.", 0, java.lang.Integer.MAX_VALUE, dateFilter));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeType
case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // Reference
case -1402857082: /*mustSupport*/ return this.mustSupport == null ? new Base[0] : this.mustSupport.toArray(new Base[this.mustSupport.size()]); // StringType
case -1303674939: /*codeFilter*/ return this.codeFilter == null ? new Base[0] : this.codeFilter.toArray(new Base[this.codeFilter.size()]); // DataRequirementCodeFilterComponent
case 149531846: /*dateFilter*/ return this.dateFilter == null ? new Base[0] : this.dateFilter.toArray(new Base[this.dateFilter.size()]); // DataRequirementDateFilterComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3575610: // type
this.type = castToCode(value); // CodeType
break;
case -309425751: // profile
this.profile = castToReference(value); // Reference
break;
case -1402857082: // mustSupport
this.getMustSupport().add(castToString(value)); // StringType
break;
case -1303674939: // codeFilter
this.getCodeFilter().add((DataRequirementCodeFilterComponent) value); // DataRequirementCodeFilterComponent
break;
case 149531846: // dateFilter
this.getDateFilter().add((DataRequirementDateFilterComponent) value); // DataRequirementDateFilterComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("type")) if (name.equals("type"))
@ -933,6 +1162,19 @@ public class DataRequirement extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // CodeType
case -309425751: return getProfile(); // Reference
case -1402857082: throw new FHIRException("Cannot make property mustSupport as it is not a complex type"); // StringType
case -1303674939: return addCodeFilter(); // DataRequirementCodeFilterComponent
case 149531846: return addDateFilter(); // DataRequirementDateFilterComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("type")) { if (name.equals("type")) {
@ -1009,8 +1251,9 @@ public class DataRequirement extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, profile, mustSupport, codeFilter return super.isEmpty() && (type == null || type.isEmpty()) && (profile == null || profile.isEmpty())
, dateFilter); && (mustSupport == null || mustSupport.isEmpty()) && (codeFilter == null || codeFilter.isEmpty())
&& (dateFilter == null || dateFilter.isEmpty());
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Block; import ca.uhn.fhir.model.api.annotation.Block;
@ -81,8 +81,9 @@ public class Distance extends Quantity {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( value, comparator, unit, system return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty())
, code); && (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty())
;
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Block; import ca.uhn.fhir.model.api.annotation.Block;
@ -81,8 +81,9 @@ public class Duration extends Quantity {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( value, comparator, unit, system return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty())
, code); && (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty())
;
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -43,7 +43,7 @@ import org.hl7.fhir.dstu3.exceptions.FHIRException;
/** /**
* Base definition for all elements in a resource. * Base definition for all elements in a resource.
*/ */
public abstract class Element extends Base implements IBaseHasExtensions, IBaseElement { public abstract class Element extends Base implements IBaseHasExtensions {
/** /**
* unique id for the element within a resource (for internal references). * unique id for the element within a resource (for internal references).
@ -126,6 +126,24 @@ public abstract class Element extends Base implements IBaseHasExtensions, IBaseE
return this.extension; return this.extension;
} }
/**
* @return The first repetition of repeating field {@link #extension}, creating it if it does not already exist
*/
public Extension getExtensionFirstRep() {
if (getExtension().isEmpty()) {
addExtension();
}
return getExtension().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Element setExtension(List<Extension> theExtension) {
this.extension = theExtension;
return this;
}
public boolean hasExtension() { public boolean hasExtension() {
if (this.extension == null) if (this.extension == null)
return false; return false;
@ -195,6 +213,30 @@ public abstract class Element extends Base implements IBaseHasExtensions, IBaseE
childrenList.add(new Property("extension", "Extension", "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", 0, java.lang.Integer.MAX_VALUE, extension)); childrenList.add(new Property("extension", "Extension", "May be used to represent additional information that is not part of the basic definition of the element. In order to make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.", 0, java.lang.Integer.MAX_VALUE, extension));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3355: /*id*/ return this.id == null ? new Base[0] : new Base[] {this.id}; // IdType
case -612557761: /*extension*/ return this.extension == null ? new Base[0] : this.extension.toArray(new Base[this.extension.size()]); // Extension
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3355: // id
this.id = castToId(value); // IdType
break;
case -612557761: // extension
this.getExtension().add(castToExtension(value)); // Extension
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("id")) if (name.equals("id"))
@ -205,6 +247,16 @@ public abstract class Element extends Base implements IBaseHasExtensions, IBaseE
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3355: throw new FHIRException("Cannot make property id as it is not a complex type"); // IdType
case -612557761: return addExtension(); // Extension
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("id")) { if (name.equals("id")) {
@ -254,7 +306,8 @@ public abstract class Element extends Base implements IBaseHasExtensions, IBaseE
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( id, extension); return super.isEmpty() && (id == null || id.isEmpty()) && (extension == null || extension.isEmpty())
;
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -618,6 +618,24 @@ public class ElementDefinition extends Type implements ICompositeType {
return this.discriminator; return this.discriminator;
} }
/**
* @return The first repetition of repeating field {@link #discriminator}, creating it if it does not already exist
*/
public StringType getDiscriminatorFirstRep() {
if (getDiscriminator().isEmpty()) {
addDiscriminatorElement();
}
return getDiscriminator().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ElementDefinitionSlicingComponent setDiscriminator(List<StringType> theDiscriminator) {
this.discriminator = theDiscriminator;
return this;
}
public boolean hasDiscriminator() { public boolean hasDiscriminator() {
if (this.discriminator == null) if (this.discriminator == null)
return false; return false;
@ -810,6 +828,38 @@ public class ElementDefinition extends Type implements ICompositeType {
childrenList.add(new Property("rules", "code", "Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.", 0, java.lang.Integer.MAX_VALUE, rules)); childrenList.add(new Property("rules", "code", "Whether additional slices are allowed or not. When the slices are ordered, profile authors can also say that additional slices are only allowed at the end.", 0, java.lang.Integer.MAX_VALUE, rules));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1888270692: /*discriminator*/ return this.discriminator == null ? new Base[0] : this.discriminator.toArray(new Base[this.discriminator.size()]); // StringType
case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
case -1207109523: /*ordered*/ return this.ordered == null ? new Base[0] : new Base[] {this.ordered}; // BooleanType
case 108873975: /*rules*/ return this.rules == null ? new Base[0] : new Base[] {this.rules}; // Enumeration<SlicingRules>
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1888270692: // discriminator
this.getDiscriminator().add(castToString(value)); // StringType
break;
case -1724546052: // description
this.description = castToString(value); // StringType
break;
case -1207109523: // ordered
this.ordered = castToBoolean(value); // BooleanType
break;
case 108873975: // rules
this.rules = new SlicingRulesEnumFactory().fromType(value); // Enumeration<SlicingRules>
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("discriminator")) if (name.equals("discriminator"))
@ -824,6 +874,18 @@ public class ElementDefinition extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1888270692: throw new FHIRException("Cannot make property discriminator as it is not a complex type"); // StringType
case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType
case -1207109523: throw new FHIRException("Cannot make property ordered as it is not a complex type"); // BooleanType
case 108873975: throw new FHIRException("Cannot make property rules as it is not a complex type"); // Enumeration<SlicingRules>
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("discriminator")) { if (name.equals("discriminator")) {
@ -879,8 +941,8 @@ public class ElementDefinition extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( discriminator, description, ordered return super.isEmpty() && (discriminator == null || discriminator.isEmpty()) && (description == null || description.isEmpty())
, rules); && (ordered == null || ordered.isEmpty()) && (rules == null || rules.isEmpty());
} }
public String fhirType() { public String fhirType() {
@ -1074,6 +1136,34 @@ public class ElementDefinition extends Type implements ICompositeType {
childrenList.add(new Property("max", "string", "Maximum cardinality of the base element identified by the path.", 0, java.lang.Integer.MAX_VALUE, max)); childrenList.add(new Property("max", "string", "Maximum cardinality of the base element identified by the path.", 0, java.lang.Integer.MAX_VALUE, max));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType
case 108114: /*min*/ return this.min == null ? new Base[0] : new Base[] {this.min}; // IntegerType
case 107876: /*max*/ return this.max == null ? new Base[0] : new Base[] {this.max}; // StringType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3433509: // path
this.path = castToString(value); // StringType
break;
case 108114: // min
this.min = castToInteger(value); // IntegerType
break;
case 107876: // max
this.max = castToString(value); // StringType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("path")) if (name.equals("path"))
@ -1086,6 +1176,17 @@ public class ElementDefinition extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3433509: throw new FHIRException("Cannot make property path as it is not a complex type"); // StringType
case 108114: throw new FHIRException("Cannot make property min as it is not a complex type"); // IntegerType
case 107876: throw new FHIRException("Cannot make property max as it is not a complex type"); // StringType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("path")) { if (name.equals("path")) {
@ -1133,7 +1234,8 @@ public class ElementDefinition extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( path, min, max); return super.isEmpty() && (path == null || path.isEmpty()) && (min == null || min.isEmpty())
&& (max == null || max.isEmpty());
} }
public String fhirType() { public String fhirType() {
@ -1244,6 +1346,24 @@ public class ElementDefinition extends Type implements ICompositeType {
return this.profile; return this.profile;
} }
/**
* @return The first repetition of repeating field {@link #profile}, creating it if it does not already exist
*/
public UriType getProfileFirstRep() {
if (getProfile().isEmpty()) {
addProfileElement();
}
return getProfile().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public TypeRefComponent setProfile(List<UriType> theProfile) {
this.profile = theProfile;
return this;
}
public boolean hasProfile() { public boolean hasProfile() {
if (this.profile == null) if (this.profile == null)
return false; return false;
@ -1298,6 +1418,24 @@ public class ElementDefinition extends Type implements ICompositeType {
return this.aggregation; return this.aggregation;
} }
/**
* @return The first repetition of repeating field {@link #aggregation}, creating it if it does not already exist
*/
public Enumeration<AggregationMode> getAggregationFirstRep() {
if (getAggregation().isEmpty()) {
addAggregationElement();
}
return getAggregation().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public TypeRefComponent setAggregation(List<Enumeration<AggregationMode>> theAggregation) {
this.aggregation = theAggregation;
return this;
}
public boolean hasAggregation() { public boolean hasAggregation() {
if (this.aggregation == null) if (this.aggregation == null)
return false; return false;
@ -1338,7 +1476,7 @@ public class ElementDefinition extends Type implements ICompositeType {
if (this.aggregation == null) if (this.aggregation == null)
return false; return false;
for (Enumeration<AggregationMode> v : this.aggregation) for (Enumeration<AggregationMode> v : this.aggregation)
if (v.equals(value)) // code if (v.getValue().equals(value)) // code
return true; return true;
return false; return false;
} }
@ -1400,6 +1538,38 @@ public class ElementDefinition extends Type implements ICompositeType {
childrenList.add(new Property("versioning", "code", "Whether this reference needs to be version specific or version independent, or whetehr either can be used.", 0, java.lang.Integer.MAX_VALUE, versioning)); childrenList.add(new Property("versioning", "code", "Whether this reference needs to be version specific or version independent, or whetehr either can be used.", 0, java.lang.Integer.MAX_VALUE, versioning));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeType
case -309425751: /*profile*/ return this.profile == null ? new Base[0] : this.profile.toArray(new Base[this.profile.size()]); // UriType
case 841524962: /*aggregation*/ return this.aggregation == null ? new Base[0] : this.aggregation.toArray(new Base[this.aggregation.size()]); // Enumeration<AggregationMode>
case -670487542: /*versioning*/ return this.versioning == null ? new Base[0] : new Base[] {this.versioning}; // Enumeration<ReferenceVersionRules>
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3059181: // code
this.code = castToCode(value); // CodeType
break;
case -309425751: // profile
this.getProfile().add(castToUri(value)); // UriType
break;
case 841524962: // aggregation
this.getAggregation().add(new AggregationModeEnumFactory().fromType(value)); // Enumeration<AggregationMode>
break;
case -670487542: // versioning
this.versioning = new ReferenceVersionRulesEnumFactory().fromType(value); // Enumeration<ReferenceVersionRules>
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("code")) if (name.equals("code"))
@ -1414,6 +1584,18 @@ public class ElementDefinition extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3059181: throw new FHIRException("Cannot make property code as it is not a complex type"); // CodeType
case -309425751: throw new FHIRException("Cannot make property profile as it is not a complex type"); // UriType
case 841524962: throw new FHIRException("Cannot make property aggregation as it is not a complex type"); // Enumeration<AggregationMode>
case -670487542: throw new FHIRException("Cannot make property versioning as it is not a complex type"); // Enumeration<ReferenceVersionRules>
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("code")) { if (name.equals("code")) {
@ -1473,8 +1655,9 @@ public class ElementDefinition extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( code, profile, aggregation, versioning return super.isEmpty() && (code == null || code.isEmpty()) && (profile == null || profile.isEmpty())
); && (aggregation == null || aggregation.isEmpty()) && (versioning == null || versioning.isEmpty())
;
} }
public String fhirType() { public String fhirType() {
@ -1836,6 +2019,46 @@ public class ElementDefinition extends Type implements ICompositeType {
childrenList.add(new Property("xpath", "string", "An XPath expression of constraint that can be executed to see if this constraint is met.", 0, java.lang.Integer.MAX_VALUE, xpath)); childrenList.add(new Property("xpath", "string", "An XPath expression of constraint that can be executed to see if this constraint is met.", 0, java.lang.Integer.MAX_VALUE, xpath));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 106079: /*key*/ return this.key == null ? new Base[0] : new Base[] {this.key}; // IdType
case -1619874672: /*requirements*/ return this.requirements == null ? new Base[0] : new Base[] {this.requirements}; // StringType
case 1478300413: /*severity*/ return this.severity == null ? new Base[0] : new Base[] {this.severity}; // Enumeration<ConstraintSeverity>
case 99639597: /*human*/ return this.human == null ? new Base[0] : new Base[] {this.human}; // StringType
case -1795452264: /*expression*/ return this.expression == null ? new Base[0] : new Base[] {this.expression}; // StringType
case 114256029: /*xpath*/ return this.xpath == null ? new Base[0] : new Base[] {this.xpath}; // StringType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 106079: // key
this.key = castToId(value); // IdType
break;
case -1619874672: // requirements
this.requirements = castToString(value); // StringType
break;
case 1478300413: // severity
this.severity = new ConstraintSeverityEnumFactory().fromType(value); // Enumeration<ConstraintSeverity>
break;
case 99639597: // human
this.human = castToString(value); // StringType
break;
case -1795452264: // expression
this.expression = castToString(value); // StringType
break;
case 114256029: // xpath
this.xpath = castToString(value); // StringType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("key")) if (name.equals("key"))
@ -1854,6 +2077,20 @@ public class ElementDefinition extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 106079: throw new FHIRException("Cannot make property key as it is not a complex type"); // IdType
case -1619874672: throw new FHIRException("Cannot make property requirements as it is not a complex type"); // StringType
case 1478300413: throw new FHIRException("Cannot make property severity as it is not a complex type"); // Enumeration<ConstraintSeverity>
case 99639597: throw new FHIRException("Cannot make property human as it is not a complex type"); // StringType
case -1795452264: throw new FHIRException("Cannot make property expression as it is not a complex type"); // StringType
case 114256029: throw new FHIRException("Cannot make property xpath as it is not a complex type"); // StringType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("key")) { if (name.equals("key")) {
@ -1915,8 +2152,9 @@ public class ElementDefinition extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( key, requirements, severity, human return super.isEmpty() && (key == null || key.isEmpty()) && (requirements == null || requirements.isEmpty())
, expression, xpath); && (severity == null || severity.isEmpty()) && (human == null || human.isEmpty()) && (expression == null || expression.isEmpty())
&& (xpath == null || xpath.isEmpty());
} }
public String fhirType() { public String fhirType() {
@ -2112,6 +2350,34 @@ public class ElementDefinition extends Type implements ICompositeType {
childrenList.add(new Property("valueSet[x]", "uri|Reference(ValueSet)", "Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.", 0, java.lang.Integer.MAX_VALUE, valueSet)); childrenList.add(new Property("valueSet[x]", "uri|Reference(ValueSet)", "Points to the value set or external definition (e.g. implicit value set) that identifies the set of codes to be used.", 0, java.lang.Integer.MAX_VALUE, valueSet));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 1791316033: /*strength*/ return this.strength == null ? new Base[0] : new Base[] {this.strength}; // Enumeration<BindingStrength>
case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
case -1410174671: /*valueSet*/ return this.valueSet == null ? new Base[0] : new Base[] {this.valueSet}; // Type
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 1791316033: // strength
this.strength = new BindingStrengthEnumFactory().fromType(value); // Enumeration<BindingStrength>
break;
case -1724546052: // description
this.description = castToString(value); // StringType
break;
case -1410174671: // valueSet
this.valueSet = (Type) value; // Type
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("strength")) if (name.equals("strength"))
@ -2124,6 +2390,17 @@ public class ElementDefinition extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1791316033: throw new FHIRException("Cannot make property strength as it is not a complex type"); // Enumeration<BindingStrength>
case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType
case -1438410321: return getValueSet(); // Type
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("strength")) { if (name.equals("strength")) {
@ -2176,8 +2453,8 @@ public class ElementDefinition extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( strength, description, valueSet return super.isEmpty() && (strength == null || strength.isEmpty()) && (description == null || description.isEmpty())
); && (valueSet == null || valueSet.isEmpty());
} }
public String fhirType() { public String fhirType() {
@ -2374,6 +2651,34 @@ public class ElementDefinition extends Type implements ICompositeType {
childrenList.add(new Property("map", "string", "Expresses what part of the target specification corresponds to this element.", 0, java.lang.Integer.MAX_VALUE, map)); childrenList.add(new Property("map", "string", "Expresses what part of the target specification corresponds to this element.", 0, java.lang.Integer.MAX_VALUE, map));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -135761730: /*identity*/ return this.identity == null ? new Base[0] : new Base[] {this.identity}; // IdType
case -1613589672: /*language*/ return this.language == null ? new Base[0] : new Base[] {this.language}; // CodeType
case 107868: /*map*/ return this.map == null ? new Base[0] : new Base[] {this.map}; // StringType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -135761730: // identity
this.identity = castToId(value); // IdType
break;
case -1613589672: // language
this.language = castToCode(value); // CodeType
break;
case 107868: // map
this.map = castToString(value); // StringType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("identity")) if (name.equals("identity"))
@ -2386,6 +2691,17 @@ public class ElementDefinition extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -135761730: throw new FHIRException("Cannot make property identity as it is not a complex type"); // IdType
case -1613589672: throw new FHIRException("Cannot make property language as it is not a complex type"); // CodeType
case 107868: throw new FHIRException("Cannot make property map as it is not a complex type"); // StringType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("identity")) { if (name.equals("identity")) {
@ -2433,7 +2749,8 @@ public class ElementDefinition extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( identity, language, map); return super.isEmpty() && (identity == null || identity.isEmpty()) && (language == null || language.isEmpty())
&& (map == null || map.isEmpty());
} }
public String fhirType() { public String fhirType() {
@ -2731,6 +3048,24 @@ public class ElementDefinition extends Type implements ICompositeType {
return this.representation; return this.representation;
} }
/**
* @return The first repetition of repeating field {@link #representation}, creating it if it does not already exist
*/
public Enumeration<PropertyRepresentation> getRepresentationFirstRep() {
if (getRepresentation().isEmpty()) {
addRepresentationElement();
}
return getRepresentation().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ElementDefinition setRepresentation(List<Enumeration<PropertyRepresentation>> theRepresentation) {
this.representation = theRepresentation;
return this;
}
public boolean hasRepresentation() { public boolean hasRepresentation() {
if (this.representation == null) if (this.representation == null)
return false; return false;
@ -2771,7 +3106,7 @@ public class ElementDefinition extends Type implements ICompositeType {
if (this.representation == null) if (this.representation == null)
return false; return false;
for (Enumeration<PropertyRepresentation> v : this.representation) for (Enumeration<PropertyRepresentation> v : this.representation)
if (v.equals(value)) // code if (v.getValue().equals(value)) // code
return true; return true;
return false; return false;
} }
@ -2883,6 +3218,24 @@ public class ElementDefinition extends Type implements ICompositeType {
return this.code; return this.code;
} }
/**
* @return The first repetition of repeating field {@link #code}, creating it if it does not already exist
*/
public Coding getCodeFirstRep() {
if (getCode().isEmpty()) {
addCode();
}
return getCode().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ElementDefinition setCode(List<Coding> theCode) {
this.code = theCode;
return this;
}
public boolean hasCode() { public boolean hasCode() {
if (this.code == null) if (this.code == null)
return false; return false;
@ -3143,6 +3496,24 @@ public class ElementDefinition extends Type implements ICompositeType {
return this.alias; return this.alias;
} }
/**
* @return The first repetition of repeating field {@link #alias}, creating it if it does not already exist
*/
public StringType getAliasFirstRep() {
if (getAlias().isEmpty()) {
addAliasElement();
}
return getAlias().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ElementDefinition setAlias(List<StringType> theAlias) {
this.alias = theAlias;
return this;
}
public boolean hasAlias() { public boolean hasAlias() {
if (this.alias == null) if (this.alias == null)
return false; return false;
@ -3364,6 +3735,24 @@ public class ElementDefinition extends Type implements ICompositeType {
return this.type; return this.type;
} }
/**
* @return The first repetition of repeating field {@link #type}, creating it if it does not already exist
*/
public TypeRefComponent getTypeFirstRep() {
if (getType().isEmpty()) {
addType();
}
return getType().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ElementDefinition setType(List<TypeRefComponent> theType) {
this.type = theType;
return this;
}
public boolean hasType() { public boolean hasType() {
if (this.type == null) if (this.type == null)
return false; return false;
@ -3612,6 +4001,24 @@ public class ElementDefinition extends Type implements ICompositeType {
return this.condition; return this.condition;
} }
/**
* @return The first repetition of repeating field {@link #condition}, creating it if it does not already exist
*/
public IdType getConditionFirstRep() {
if (getCondition().isEmpty()) {
addConditionElement();
}
return getCondition().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ElementDefinition setCondition(List<IdType> theCondition) {
this.condition = theCondition;
return this;
}
public boolean hasCondition() { public boolean hasCondition() {
if (this.condition == null) if (this.condition == null)
return false; return false;
@ -3666,6 +4073,24 @@ public class ElementDefinition extends Type implements ICompositeType {
return this.constraint; return this.constraint;
} }
/**
* @return The first repetition of repeating field {@link #constraint}, creating it if it does not already exist
*/
public ElementDefinitionConstraintComponent getConstraintFirstRep() {
if (getConstraint().isEmpty()) {
addConstraint();
}
return getConstraint().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ElementDefinition setConstraint(List<ElementDefinitionConstraintComponent> theConstraint) {
this.constraint = theConstraint;
return this;
}
public boolean hasConstraint() { public boolean hasConstraint() {
if (this.constraint == null) if (this.constraint == null)
return false; return false;
@ -3865,6 +4290,24 @@ public class ElementDefinition extends Type implements ICompositeType {
return this.mapping; return this.mapping;
} }
/**
* @return The first repetition of repeating field {@link #mapping}, creating it if it does not already exist
*/
public ElementDefinitionMappingComponent getMappingFirstRep() {
if (getMapping().isEmpty()) {
addMapping();
}
return getMapping().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ElementDefinition setMapping(List<ElementDefinitionMappingComponent> theMapping) {
this.mapping = theMapping;
return this;
}
public boolean hasMapping() { public boolean hasMapping() {
if (this.mapping == null) if (this.mapping == null)
return false; return false;
@ -3931,6 +4374,146 @@ public class ElementDefinition extends Type implements ICompositeType {
childrenList.add(new Property("mapping", "", "Identifies a concept from an external specification that roughly corresponds to this element.", 0, java.lang.Integer.MAX_VALUE, mapping)); childrenList.add(new Property("mapping", "", "Identifies a concept from an external specification that roughly corresponds to this element.", 0, java.lang.Integer.MAX_VALUE, mapping));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType
case -671065907: /*representation*/ return this.representation == null ? new Base[0] : this.representation.toArray(new Base[this.representation.size()]); // Enumeration<PropertyRepresentation>
case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
case 102727412: /*label*/ return this.label == null ? new Base[0] : new Base[] {this.label}; // StringType
case 3059181: /*code*/ return this.code == null ? new Base[0] : this.code.toArray(new Base[this.code.size()]); // Coding
case -2119287345: /*slicing*/ return this.slicing == null ? new Base[0] : new Base[] {this.slicing}; // ElementDefinitionSlicingComponent
case 109413500: /*short*/ return this.short_ == null ? new Base[0] : new Base[] {this.short_}; // StringType
case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : new Base[] {this.definition}; // MarkdownType
case -602415628: /*comments*/ return this.comments == null ? new Base[0] : new Base[] {this.comments}; // MarkdownType
case -1619874672: /*requirements*/ return this.requirements == null ? new Base[0] : new Base[] {this.requirements}; // MarkdownType
case 92902992: /*alias*/ return this.alias == null ? new Base[0] : this.alias.toArray(new Base[this.alias.size()]); // StringType
case 108114: /*min*/ return this.min == null ? new Base[0] : new Base[] {this.min}; // IntegerType
case 107876: /*max*/ return this.max == null ? new Base[0] : new Base[] {this.max}; // StringType
case 3016401: /*base*/ return this.base == null ? new Base[0] : new Base[] {this.base}; // ElementDefinitionBaseComponent
case 1193747154: /*contentReference*/ return this.contentReference == null ? new Base[0] : new Base[] {this.contentReference}; // UriType
case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // TypeRefComponent
case -659125328: /*defaultValue*/ return this.defaultValue == null ? new Base[0] : new Base[] {this.defaultValue}; // org.hl7.fhir.dstu3.model.Type
case 1857257103: /*meaningWhenMissing*/ return this.meaningWhenMissing == null ? new Base[0] : new Base[] {this.meaningWhenMissing}; // MarkdownType
case 97445748: /*fixed*/ return this.fixed == null ? new Base[0] : new Base[] {this.fixed}; // org.hl7.fhir.dstu3.model.Type
case -791090288: /*pattern*/ return this.pattern == null ? new Base[0] : new Base[] {this.pattern}; // org.hl7.fhir.dstu3.model.Type
case -1322970774: /*example*/ return this.example == null ? new Base[0] : new Base[] {this.example}; // org.hl7.fhir.dstu3.model.Type
case -1376969153: /*minValue*/ return this.minValue == null ? new Base[0] : new Base[] {this.minValue}; // org.hl7.fhir.dstu3.model.Type
case 399227501: /*maxValue*/ return this.maxValue == null ? new Base[0] : new Base[] {this.maxValue}; // org.hl7.fhir.dstu3.model.Type
case -791400086: /*maxLength*/ return this.maxLength == null ? new Base[0] : new Base[] {this.maxLength}; // IntegerType
case -861311717: /*condition*/ return this.condition == null ? new Base[0] : this.condition.toArray(new Base[this.condition.size()]); // IdType
case -190376483: /*constraint*/ return this.constraint == null ? new Base[0] : this.constraint.toArray(new Base[this.constraint.size()]); // ElementDefinitionConstraintComponent
case -1402857082: /*mustSupport*/ return this.mustSupport == null ? new Base[0] : new Base[] {this.mustSupport}; // BooleanType
case -1408783839: /*isModifier*/ return this.isModifier == null ? new Base[0] : new Base[] {this.isModifier}; // BooleanType
case 1857548060: /*isSummary*/ return this.isSummary == null ? new Base[0] : new Base[] {this.isSummary}; // BooleanType
case -108220795: /*binding*/ return this.binding == null ? new Base[0] : new Base[] {this.binding}; // ElementDefinitionBindingComponent
case 837556430: /*mapping*/ return this.mapping == null ? new Base[0] : this.mapping.toArray(new Base[this.mapping.size()]); // ElementDefinitionMappingComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3433509: // path
this.path = castToString(value); // StringType
break;
case -671065907: // representation
this.getRepresentation().add(new PropertyRepresentationEnumFactory().fromType(value)); // Enumeration<PropertyRepresentation>
break;
case 3373707: // name
this.name = castToString(value); // StringType
break;
case 102727412: // label
this.label = castToString(value); // StringType
break;
case 3059181: // code
this.getCode().add(castToCoding(value)); // Coding
break;
case -2119287345: // slicing
this.slicing = (ElementDefinitionSlicingComponent) value; // ElementDefinitionSlicingComponent
break;
case 109413500: // short
this.short_ = castToString(value); // StringType
break;
case -1014418093: // definition
this.definition = castToMarkdown(value); // MarkdownType
break;
case -602415628: // comments
this.comments = castToMarkdown(value); // MarkdownType
break;
case -1619874672: // requirements
this.requirements = castToMarkdown(value); // MarkdownType
break;
case 92902992: // alias
this.getAlias().add(castToString(value)); // StringType
break;
case 108114: // min
this.min = castToInteger(value); // IntegerType
break;
case 107876: // max
this.max = castToString(value); // StringType
break;
case 3016401: // base
this.base = (ElementDefinitionBaseComponent) value; // ElementDefinitionBaseComponent
break;
case 1193747154: // contentReference
this.contentReference = castToUri(value); // UriType
break;
case 3575610: // type
this.getType().add((TypeRefComponent) value); // TypeRefComponent
break;
case -659125328: // defaultValue
this.defaultValue = (org.hl7.fhir.dstu3.model.Type) value; // org.hl7.fhir.dstu3.model.Type
break;
case 1857257103: // meaningWhenMissing
this.meaningWhenMissing = castToMarkdown(value); // MarkdownType
break;
case 97445748: // fixed
this.fixed = (org.hl7.fhir.dstu3.model.Type) value; // org.hl7.fhir.dstu3.model.Type
break;
case -791090288: // pattern
this.pattern = (org.hl7.fhir.dstu3.model.Type) value; // org.hl7.fhir.dstu3.model.Type
break;
case -1322970774: // example
this.example = (org.hl7.fhir.dstu3.model.Type) value; // org.hl7.fhir.dstu3.model.Type
break;
case -1376969153: // minValue
this.minValue = (org.hl7.fhir.dstu3.model.Type) value; // org.hl7.fhir.dstu3.model.Type
break;
case 399227501: // maxValue
this.maxValue = (org.hl7.fhir.dstu3.model.Type) value; // org.hl7.fhir.dstu3.model.Type
break;
case -791400086: // maxLength
this.maxLength = castToInteger(value); // IntegerType
break;
case -861311717: // condition
this.getCondition().add(castToId(value)); // IdType
break;
case -190376483: // constraint
this.getConstraint().add((ElementDefinitionConstraintComponent) value); // ElementDefinitionConstraintComponent
break;
case -1402857082: // mustSupport
this.mustSupport = castToBoolean(value); // BooleanType
break;
case -1408783839: // isModifier
this.isModifier = castToBoolean(value); // BooleanType
break;
case 1857548060: // isSummary
this.isSummary = castToBoolean(value); // BooleanType
break;
case -108220795: // binding
this.binding = (ElementDefinitionBindingComponent) value; // ElementDefinitionBindingComponent
break;
case 837556430: // mapping
this.getMapping().add((ElementDefinitionMappingComponent) value); // ElementDefinitionMappingComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("path")) if (name.equals("path"))
@ -3999,6 +4582,45 @@ public class ElementDefinition extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3433509: throw new FHIRException("Cannot make property path as it is not a complex type"); // StringType
case -671065907: throw new FHIRException("Cannot make property representation as it is not a complex type"); // Enumeration<PropertyRepresentation>
case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType
case 102727412: throw new FHIRException("Cannot make property label as it is not a complex type"); // StringType
case 3059181: return addCode(); // Coding
case -2119287345: return getSlicing(); // ElementDefinitionSlicingComponent
case 109413500: throw new FHIRException("Cannot make property short as it is not a complex type"); // StringType
case -1014418093: throw new FHIRException("Cannot make property definition as it is not a complex type"); // MarkdownType
case -602415628: throw new FHIRException("Cannot make property comments as it is not a complex type"); // MarkdownType
case -1619874672: throw new FHIRException("Cannot make property requirements as it is not a complex type"); // MarkdownType
case 92902992: throw new FHIRException("Cannot make property alias as it is not a complex type"); // StringType
case 108114: throw new FHIRException("Cannot make property min as it is not a complex type"); // IntegerType
case 107876: throw new FHIRException("Cannot make property max as it is not a complex type"); // StringType
case 3016401: return getBase(); // ElementDefinitionBaseComponent
case 1193747154: throw new FHIRException("Cannot make property contentReference as it is not a complex type"); // UriType
case 3575610: return addType(); // TypeRefComponent
case 587922128: return getDefaultValue(); // org.hl7.fhir.dstu3.model.Type
case 1857257103: throw new FHIRException("Cannot make property meaningWhenMissing as it is not a complex type"); // MarkdownType
case -391522164: return getFixed(); // org.hl7.fhir.dstu3.model.Type
case -885125392: return getPattern(); // org.hl7.fhir.dstu3.model.Type
case -2002328874: return getExample(); // org.hl7.fhir.dstu3.model.Type
case -55301663: return getMinValue(); // org.hl7.fhir.dstu3.model.Type
case 622130931: return getMaxValue(); // org.hl7.fhir.dstu3.model.Type
case -791400086: throw new FHIRException("Cannot make property maxLength as it is not a complex type"); // IntegerType
case -861311717: throw new FHIRException("Cannot make property condition as it is not a complex type"); // IdType
case -190376483: return addConstraint(); // ElementDefinitionConstraintComponent
case -1402857082: throw new FHIRException("Cannot make property mustSupport as it is not a complex type"); // BooleanType
case -1408783839: throw new FHIRException("Cannot make property isModifier as it is not a complex type"); // BooleanType
case 1857548060: throw new FHIRException("Cannot make property isSummary as it is not a complex type"); // BooleanType
case -108220795: return getBinding(); // ElementDefinitionBindingComponent
case 837556430: return addMapping(); // ElementDefinitionMappingComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("path")) { if (name.equals("path")) {
@ -4986,11 +5608,19 @@ public class ElementDefinition extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( path, representation, name, label return super.isEmpty() && (path == null || path.isEmpty()) && (representation == null || representation.isEmpty())
, code, slicing, short_, definition, comments, requirements, alias, min, max, base && (name == null || name.isEmpty()) && (label == null || label.isEmpty()) && (code == null || code.isEmpty())
, contentReference, type, defaultValue, meaningWhenMissing, fixed, pattern, example, minValue && (slicing == null || slicing.isEmpty()) && (short_ == null || short_.isEmpty()) && (definition == null || definition.isEmpty())
, maxValue, maxLength, condition, constraint, mustSupport, isModifier, isSummary, binding && (comments == null || comments.isEmpty()) && (requirements == null || requirements.isEmpty())
, mapping); && (alias == null || alias.isEmpty()) && (min == null || min.isEmpty()) && (max == null || max.isEmpty())
&& (base == null || base.isEmpty()) && (contentReference == null || contentReference.isEmpty())
&& (type == null || type.isEmpty()) && (defaultValue == null || defaultValue.isEmpty()) && (meaningWhenMissing == null || meaningWhenMissing.isEmpty())
&& (fixed == null || fixed.isEmpty()) && (pattern == null || pattern.isEmpty()) && (example == null || example.isEmpty())
&& (minValue == null || minValue.isEmpty()) && (maxValue == null || maxValue.isEmpty()) && (maxLength == null || maxLength.isEmpty())
&& (condition == null || condition.isEmpty()) && (constraint == null || constraint.isEmpty())
&& (mustSupport == null || mustSupport.isEmpty()) && (isModifier == null || isModifier.isEmpty())
&& (isSummary == null || isSummary.isEmpty()) && (binding == null || binding.isEmpty()) && (mapping == null || mapping.isEmpty())
;
} }

View File

@ -49,13 +49,14 @@ public class Enumeration<T extends Enum<?>> extends PrimitiveType<T> implements
/** /**
* Constructor * Constructor
*
* @deprecated This no-arg constructor is provided for serialization only - Do not use * @deprecated This no-arg constructor is provided for serialization only - Do not use
*/ */
@Deprecated @Deprecated
public Enumeration() { public Enumeration() {
// nothing // nothing
} }
/** /**
* Constructor * Constructor
*/ */
@ -113,7 +114,7 @@ public class Enumeration<T extends Enum<?>> extends PrimitiveType<T> implements
} }
return null; return null;
} }
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
@Override @Override
public void readExternal(ObjectInput theIn) throws IOException, ClassNotFoundException { public void readExternal(ObjectInput theIn) throws IOException, ClassNotFoundException {
@ -121,10 +122,13 @@ public class Enumeration<T extends Enum<?>> extends PrimitiveType<T> implements
super.readExternal(theIn); super.readExternal(theIn);
} }
public String toSystem() {
return getEnumFactory().toSystem(getValue());
}
@Override @Override
public void writeExternal(ObjectOutput theOut) throws IOException { public void writeExternal(ObjectOutput theOut) throws IOException {
theOut.writeObject(myEnumFactory); theOut.writeObject(myEnumFactory);
super.writeExternal(theOut); super.writeExternal(theOut);
} }
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -162,6 +162,30 @@ public class Extension extends BaseExtension implements IBaseExtension<Extension
childrenList.add(new Property("value[x]", "*", "Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).", 0, java.lang.Integer.MAX_VALUE, value)); childrenList.add(new Property("value[x]", "*", "Value of extension - may be a resource or one of a constrained set of the data types (see Extensibility in the spec for list).", 0, java.lang.Integer.MAX_VALUE, value));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // org.hl7.fhir.dstu3.model.Type
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 116079: // url
this.url = castToUri(value); // UriType
break;
case 111972721: // value
this.value = (org.hl7.fhir.dstu3.model.Type) value; // org.hl7.fhir.dstu3.model.Type
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("url")) if (name.equals("url"))
@ -172,6 +196,16 @@ public class Extension extends BaseExtension implements IBaseExtension<Extension
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 116079: throw new FHIRException("Cannot make property url as it is not a complex type"); // UriType
case -1410166417: return getValue(); // org.hl7.fhir.dstu3.model.Type
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("url")) { if (name.equals("url")) {
@ -351,7 +385,8 @@ public class Extension extends BaseExtension implements IBaseExtension<Extension
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( url, value); return super.isEmpty() && (url == null || url.isEmpty()) && (value == null || value.isEmpty())
;
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -378,6 +378,24 @@ public class HumanName extends Type implements ICompositeType {
return this.family; return this.family;
} }
/**
* @return The first repetition of repeating field {@link #family}, creating it if it does not already exist
*/
public StringType getFamilyFirstRep() {
if (getFamily().isEmpty()) {
addFamilyElement();
}
return getFamily().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public HumanName setFamily(List<StringType> theFamily) {
this.family = theFamily;
return this;
}
public boolean hasFamily() { public boolean hasFamily() {
if (this.family == null) if (this.family == null)
return false; return false;
@ -432,6 +450,24 @@ public class HumanName extends Type implements ICompositeType {
return this.given; return this.given;
} }
/**
* @return The first repetition of repeating field {@link #given}, creating it if it does not already exist
*/
public StringType getGivenFirstRep() {
if (getGiven().isEmpty()) {
addGivenElement();
}
return getGiven().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public HumanName setGiven(List<StringType> theGiven) {
this.given = theGiven;
return this;
}
public boolean hasGiven() { public boolean hasGiven() {
if (this.given == null) if (this.given == null)
return false; return false;
@ -486,6 +522,24 @@ public class HumanName extends Type implements ICompositeType {
return this.prefix; return this.prefix;
} }
/**
* @return The first repetition of repeating field {@link #prefix}, creating it if it does not already exist
*/
public StringType getPrefixFirstRep() {
if (getPrefix().isEmpty()) {
addPrefixElement();
}
return getPrefix().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public HumanName setPrefix(List<StringType> thePrefix) {
this.prefix = thePrefix;
return this;
}
public boolean hasPrefix() { public boolean hasPrefix() {
if (this.prefix == null) if (this.prefix == null)
return false; return false;
@ -540,6 +594,24 @@ public class HumanName extends Type implements ICompositeType {
return this.suffix; return this.suffix;
} }
/**
* @return The first repetition of repeating field {@link #suffix}, creating it if it does not already exist
*/
public StringType getSuffixFirstRep() {
if (getSuffix().isEmpty()) {
addSuffixElement();
}
return getSuffix().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public HumanName setSuffix(List<StringType> theSuffix) {
this.suffix = theSuffix;
return this;
}
public boolean hasSuffix() { public boolean hasSuffix() {
if (this.suffix == null) if (this.suffix == null)
return false; return false;
@ -694,6 +766,50 @@ public class HumanName extends Type implements ICompositeType {
childrenList.add(new Property("period", "Period", "Indicates the period of time when this name was valid for the named person.", 0, java.lang.Integer.MAX_VALUE, period)); childrenList.add(new Property("period", "Period", "Indicates the period of time when this name was valid for the named person.", 0, java.lang.Integer.MAX_VALUE, period));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 116103: /*use*/ return this.use == null ? new Base[0] : new Base[] {this.use}; // Enumeration<NameUse>
case 3556653: /*text*/ return this.text == null ? new Base[0] : new Base[] {this.text}; // StringType
case -1281860764: /*family*/ return this.family == null ? new Base[0] : this.family.toArray(new Base[this.family.size()]); // StringType
case 98367357: /*given*/ return this.given == null ? new Base[0] : this.given.toArray(new Base[this.given.size()]); // StringType
case -980110702: /*prefix*/ return this.prefix == null ? new Base[0] : this.prefix.toArray(new Base[this.prefix.size()]); // StringType
case -891422895: /*suffix*/ return this.suffix == null ? new Base[0] : this.suffix.toArray(new Base[this.suffix.size()]); // StringType
case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 116103: // use
this.use = new NameUseEnumFactory().fromType(value); // Enumeration<NameUse>
break;
case 3556653: // text
this.text = castToString(value); // StringType
break;
case -1281860764: // family
this.getFamily().add(castToString(value)); // StringType
break;
case 98367357: // given
this.getGiven().add(castToString(value)); // StringType
break;
case -980110702: // prefix
this.getPrefix().add(castToString(value)); // StringType
break;
case -891422895: // suffix
this.getSuffix().add(castToString(value)); // StringType
break;
case -991726143: // period
this.period = castToPeriod(value); // Period
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("use")) if (name.equals("use"))
@ -714,6 +830,21 @@ public class HumanName extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 116103: throw new FHIRException("Cannot make property use as it is not a complex type"); // Enumeration<NameUse>
case 3556653: throw new FHIRException("Cannot make property text as it is not a complex type"); // StringType
case -1281860764: throw new FHIRException("Cannot make property family as it is not a complex type"); // StringType
case 98367357: throw new FHIRException("Cannot make property given as it is not a complex type"); // StringType
case -980110702: throw new FHIRException("Cannot make property prefix as it is not a complex type"); // StringType
case -891422895: throw new FHIRException("Cannot make property suffix as it is not a complex type"); // StringType
case -991726143: return getPeriod(); // Period
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("use")) { if (name.equals("use")) {
@ -805,8 +936,9 @@ public class HumanName extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( use, text, family, given, prefix return super.isEmpty() && (use == null || use.isEmpty()) && (text == null || text.isEmpty())
, suffix, period); && (family == null || family.isEmpty()) && (given == null || given.isEmpty()) && (prefix == null || prefix.isEmpty())
&& (suffix == null || suffix.isEmpty()) && (period == null || period.isEmpty());
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -471,6 +471,46 @@ public class Identifier extends Type implements ICompositeType {
childrenList.add(new Property("assigner", "Reference(Organization)", "Organization that issued/manages the identifier.", 0, java.lang.Integer.MAX_VALUE, assigner)); childrenList.add(new Property("assigner", "Reference(Organization)", "Organization that issued/manages the identifier.", 0, java.lang.Integer.MAX_VALUE, assigner));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 116103: /*use*/ return this.use == null ? new Base[0] : new Base[] {this.use}; // Enumeration<IdentifierUse>
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeableConcept
case -887328209: /*system*/ return this.system == null ? new Base[0] : new Base[] {this.system}; // UriType
case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType
case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // Period
case -369881636: /*assigner*/ return this.assigner == null ? new Base[0] : new Base[] {this.assigner}; // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 116103: // use
this.use = new IdentifierUseEnumFactory().fromType(value); // Enumeration<IdentifierUse>
break;
case 3575610: // type
this.type = castToCodeableConcept(value); // CodeableConcept
break;
case -887328209: // system
this.system = castToUri(value); // UriType
break;
case 111972721: // value
this.value = castToString(value); // StringType
break;
case -991726143: // period
this.period = castToPeriod(value); // Period
break;
case -369881636: // assigner
this.assigner = castToReference(value); // Reference
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("use")) if (name.equals("use"))
@ -489,6 +529,20 @@ public class Identifier extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 116103: throw new FHIRException("Cannot make property use as it is not a complex type"); // Enumeration<IdentifierUse>
case 3575610: return getType(); // CodeableConcept
case -887328209: throw new FHIRException("Cannot make property system as it is not a complex type"); // UriType
case 111972721: throw new FHIRException("Cannot make property value as it is not a complex type"); // StringType
case -991726143: return getPeriod(); // Period
case -369881636: return getAssigner(); // Reference
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("use")) { if (name.equals("use")) {
@ -561,8 +615,9 @@ public class Identifier extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( use, type, system, value, period return super.isEmpty() && (use == null || use.isEmpty()) && (type == null || type.isEmpty())
, assigner); && (system == null || system.isEmpty()) && (value == null || value.isEmpty()) && (period == null || period.isEmpty())
&& (assigner == null || assigner.isEmpty());
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -198,6 +198,24 @@ public class Meta extends Type implements IBaseMetaType {
return this.profile; return this.profile;
} }
/**
* @return The first repetition of repeating field {@link #profile}, creating it if it does not already exist
*/
public UriType getProfileFirstRep() {
if (getProfile().isEmpty()) {
addProfileElement();
}
return getProfile().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Meta setProfile(List<UriType> theProfile) {
this.profile = theProfile;
return this;
}
public boolean hasProfile() { public boolean hasProfile() {
if (this.profile == null) if (this.profile == null)
return false; return false;
@ -252,6 +270,24 @@ public class Meta extends Type implements IBaseMetaType {
return this.security; return this.security;
} }
/**
* @return The first repetition of repeating field {@link #security}, creating it if it does not already exist
*/
public Coding getSecurityFirstRep() {
if (getSecurity().isEmpty()) {
addSecurity();
}
return getSecurity().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Meta setSecurity(List<Coding> theSecurity) {
this.security = theSecurity;
return this;
}
public boolean hasSecurity() { public boolean hasSecurity() {
if (this.security == null) if (this.security == null)
return false; return false;
@ -292,6 +328,24 @@ public class Meta extends Type implements IBaseMetaType {
return this.tag; return this.tag;
} }
/**
* @return The first repetition of repeating field {@link #tag}, creating it if it does not already exist
*/
public Coding getTagFirstRep() {
if (getTag().isEmpty()) {
addTag();
}
return getTag().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Meta setTag(List<Coding> theTag) {
this.tag = theTag;
return this;
}
public boolean hasTag() { public boolean hasTag() {
if (this.tag == null) if (this.tag == null)
return false; return false;
@ -381,6 +435,42 @@ public class Meta extends Type implements IBaseMetaType {
childrenList.add(new Property("tag", "Coding", "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.", 0, java.lang.Integer.MAX_VALUE, tag)); childrenList.add(new Property("tag", "Coding", "Tags applied to this resource. Tags are intended to be used to identify and relate resources to process and workflow, and applications are not required to consider the tags when interpreting the meaning of a resource.", 0, java.lang.Integer.MAX_VALUE, tag));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1407102957: /*versionId*/ return this.versionId == null ? new Base[0] : new Base[] {this.versionId}; // IdType
case 1649733957: /*lastUpdated*/ return this.lastUpdated == null ? new Base[0] : new Base[] {this.lastUpdated}; // InstantType
case -309425751: /*profile*/ return this.profile == null ? new Base[0] : this.profile.toArray(new Base[this.profile.size()]); // UriType
case 949122880: /*security*/ return this.security == null ? new Base[0] : this.security.toArray(new Base[this.security.size()]); // Coding
case 114586: /*tag*/ return this.tag == null ? new Base[0] : this.tag.toArray(new Base[this.tag.size()]); // Coding
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1407102957: // versionId
this.versionId = castToId(value); // IdType
break;
case 1649733957: // lastUpdated
this.lastUpdated = castToInstant(value); // InstantType
break;
case -309425751: // profile
this.getProfile().add(castToUri(value)); // UriType
break;
case 949122880: // security
this.getSecurity().add(castToCoding(value)); // Coding
break;
case 114586: // tag
this.getTag().add(castToCoding(value)); // Coding
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("versionId")) if (name.equals("versionId"))
@ -397,6 +487,19 @@ public class Meta extends Type implements IBaseMetaType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1407102957: throw new FHIRException("Cannot make property versionId as it is not a complex type"); // IdType
case 1649733957: throw new FHIRException("Cannot make property lastUpdated as it is not a complex type"); // InstantType
case -309425751: throw new FHIRException("Cannot make property profile as it is not a complex type"); // UriType
case 949122880: return addSecurity(); // Coding
case 114586: return addTag(); // Coding
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("versionId")) { if (name.equals("versionId")) {
@ -474,8 +577,9 @@ public class Meta extends Type implements IBaseMetaType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( versionId, lastUpdated, profile return super.isEmpty() && (versionId == null || versionId.isEmpty()) && (lastUpdated == null || lastUpdated.isEmpty())
, security, tag); && (profile == null || profile.isEmpty()) && (security == null || security.isEmpty()) && (tag == null || tag.isEmpty())
;
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -642,6 +642,30 @@ public class ModuleMetadata extends Type implements ICompositeType {
childrenList.add(new Property("value", "CodeableConcept", "Provides a value for the coverage attribute. Different values are appropriate in different focus areas, as specified in the description of values for focus.", 0, java.lang.Integer.MAX_VALUE, value)); childrenList.add(new Property("value", "CodeableConcept", "Provides a value for the coverage attribute. Different values are appropriate in different focus areas, as specified in the description of values for focus.", 0, java.lang.Integer.MAX_VALUE, value));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 97604824: /*focus*/ return this.focus == null ? new Base[0] : new Base[] {this.focus}; // Coding
case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // CodeableConcept
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 97604824: // focus
this.focus = castToCoding(value); // Coding
break;
case 111972721: // value
this.value = castToCodeableConcept(value); // CodeableConcept
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("focus")) if (name.equals("focus"))
@ -652,6 +676,16 @@ public class ModuleMetadata extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 97604824: return getFocus(); // Coding
case 111972721: return getValue(); // CodeableConcept
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("focus")) { if (name.equals("focus")) {
@ -695,7 +729,8 @@ public class ModuleMetadata extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( focus, value); return super.isEmpty() && (focus == null || focus.isEmpty()) && (value == null || value.isEmpty())
;
} }
public String fhirType() { public String fhirType() {
@ -845,6 +880,24 @@ public class ModuleMetadata extends Type implements ICompositeType {
return this.contact; return this.contact;
} }
/**
* @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist
*/
public ModuleMetadataContributorContactComponent getContactFirstRep() {
if (getContact().isEmpty()) {
addContact();
}
return getContact().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ModuleMetadataContributorComponent setContact(List<ModuleMetadataContributorContactComponent> theContact) {
this.contact = theContact;
return this;
}
public boolean hasContact() { public boolean hasContact() {
if (this.contact == null) if (this.contact == null)
return false; return false;
@ -883,6 +936,34 @@ public class ModuleMetadata extends Type implements ICompositeType {
childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the contributor.", 0, java.lang.Integer.MAX_VALUE, contact)); childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the contributor.", 0, java.lang.Integer.MAX_VALUE, contact));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<ModuleMetadataContributorType>
case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ModuleMetadataContributorContactComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3575610: // type
this.type = new ModuleMetadataContributorTypeEnumFactory().fromType(value); // Enumeration<ModuleMetadataContributorType>
break;
case 3373707: // name
this.name = castToString(value); // StringType
break;
case 951526432: // contact
this.getContact().add((ModuleMetadataContributorContactComponent) value); // ModuleMetadataContributorContactComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("type")) if (name.equals("type"))
@ -895,6 +976,17 @@ public class ModuleMetadata extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // Enumeration<ModuleMetadataContributorType>
case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType
case 951526432: return addContact(); // ModuleMetadataContributorContactComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("type")) { if (name.equals("type")) {
@ -945,7 +1037,8 @@ public class ModuleMetadata extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, name, contact); return super.isEmpty() && (type == null || type.isEmpty()) && (name == null || name.isEmpty())
&& (contact == null || contact.isEmpty());
} }
public String fhirType() { public String fhirType() {
@ -1038,6 +1131,24 @@ public class ModuleMetadata extends Type implements ICompositeType {
return this.telecom; return this.telecom;
} }
/**
* @return The first repetition of repeating field {@link #telecom}, creating it if it does not already exist
*/
public ContactPoint getTelecomFirstRep() {
if (getTelecom().isEmpty()) {
addTelecom();
}
return getTelecom().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ModuleMetadataContributorContactComponent setTelecom(List<ContactPoint> theTelecom) {
this.telecom = theTelecom;
return this;
}
public boolean hasTelecom() { public boolean hasTelecom() {
if (this.telecom == null) if (this.telecom == null)
return false; return false;
@ -1075,6 +1186,30 @@ public class ModuleMetadata extends Type implements ICompositeType {
childrenList.add(new Property("telecom", "ContactPoint", "Contact details for the individual (if a name was provided) or the contributor.", 0, java.lang.Integer.MAX_VALUE, telecom)); childrenList.add(new Property("telecom", "ContactPoint", "Contact details for the individual (if a name was provided) or the contributor.", 0, java.lang.Integer.MAX_VALUE, telecom));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3373707: // name
this.name = castToString(value); // StringType
break;
case -1429363305: // telecom
this.getTelecom().add(castToContactPoint(value)); // ContactPoint
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("name")) if (name.equals("name"))
@ -1085,6 +1220,16 @@ public class ModuleMetadata extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType
case -1429363305: return addTelecom(); // ContactPoint
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("name")) { if (name.equals("name")) {
@ -1130,7 +1275,8 @@ public class ModuleMetadata extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, telecom); return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty())
;
} }
public String fhirType() { public String fhirType() {
@ -1223,6 +1369,24 @@ public class ModuleMetadata extends Type implements ICompositeType {
return this.telecom; return this.telecom;
} }
/**
* @return The first repetition of repeating field {@link #telecom}, creating it if it does not already exist
*/
public ContactPoint getTelecomFirstRep() {
if (getTelecom().isEmpty()) {
addTelecom();
}
return getTelecom().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ModuleMetadataContactComponent setTelecom(List<ContactPoint> theTelecom) {
this.telecom = theTelecom;
return this;
}
public boolean hasTelecom() { public boolean hasTelecom() {
if (this.telecom == null) if (this.telecom == null)
return false; return false;
@ -1260,6 +1424,30 @@ public class ModuleMetadata extends Type implements ICompositeType {
childrenList.add(new Property("telecom", "ContactPoint", "Contact details for the individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); childrenList.add(new Property("telecom", "ContactPoint", "Contact details for the individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3373707: // name
this.name = castToString(value); // StringType
break;
case -1429363305: // telecom
this.getTelecom().add(castToContactPoint(value)); // ContactPoint
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("name")) if (name.equals("name"))
@ -1270,6 +1458,16 @@ public class ModuleMetadata extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType
case -1429363305: return addTelecom(); // ContactPoint
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("name")) { if (name.equals("name")) {
@ -1315,7 +1513,8 @@ public class ModuleMetadata extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, telecom); return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty())
;
} }
public String fhirType() { public String fhirType() {
@ -1485,6 +1684,34 @@ public class ModuleMetadata extends Type implements ICompositeType {
childrenList.add(new Property("resource", "Reference(Any)", "The related resource, such as a library, value set, profile, or other module.", 0, java.lang.Integer.MAX_VALUE, resource)); childrenList.add(new Property("resource", "Reference(Any)", "The related resource, such as a library, value set, profile, or other module.", 0, java.lang.Integer.MAX_VALUE, resource));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<ModuleMetadataResourceType>
case 861720859: /*document*/ return this.document == null ? new Base[0] : new Base[] {this.document}; // Attachment
case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3575610: // type
this.type = new ModuleMetadataResourceTypeEnumFactory().fromType(value); // Enumeration<ModuleMetadataResourceType>
break;
case 861720859: // document
this.document = castToAttachment(value); // Attachment
break;
case -341064690: // resource
this.resource = castToReference(value); // Reference
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("type")) if (name.equals("type"))
@ -1497,6 +1724,17 @@ public class ModuleMetadata extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // Enumeration<ModuleMetadataResourceType>
case 861720859: return getDocument(); // Attachment
case -341064690: return getResource(); // Reference
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("type")) { if (name.equals("type")) {
@ -1545,7 +1783,8 @@ public class ModuleMetadata extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, document, resource); return super.isEmpty() && (type == null || type.isEmpty()) && (document == null || document.isEmpty())
&& (resource == null || resource.isEmpty());
} }
public String fhirType() { public String fhirType() {
@ -1778,6 +2017,24 @@ public class ModuleMetadata extends Type implements ICompositeType {
return this.identifier; return this.identifier;
} }
/**
* @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist
*/
public Identifier getIdentifierFirstRep() {
if (getIdentifier().isEmpty()) {
addIdentifier();
}
return getIdentifier().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ModuleMetadata setIdentifier(List<Identifier> theIdentifier) {
this.identifier = theIdentifier;
return this;
}
public boolean hasIdentifier() { public boolean hasIdentifier() {
if (this.identifier == null) if (this.identifier == null)
return false; return false;
@ -2369,6 +2626,24 @@ public class ModuleMetadata extends Type implements ICompositeType {
return this.coverage; return this.coverage;
} }
/**
* @return The first repetition of repeating field {@link #coverage}, creating it if it does not already exist
*/
public ModuleMetadataCoverageComponent getCoverageFirstRep() {
if (getCoverage().isEmpty()) {
addCoverage();
}
return getCoverage().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ModuleMetadata setCoverage(List<ModuleMetadataCoverageComponent> theCoverage) {
this.coverage = theCoverage;
return this;
}
public boolean hasCoverage() { public boolean hasCoverage() {
if (this.coverage == null) if (this.coverage == null)
return false; return false;
@ -2409,6 +2684,24 @@ public class ModuleMetadata extends Type implements ICompositeType {
return this.topic; return this.topic;
} }
/**
* @return The first repetition of repeating field {@link #topic}, creating it if it does not already exist
*/
public CodeableConcept getTopicFirstRep() {
if (getTopic().isEmpty()) {
addTopic();
}
return getTopic().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ModuleMetadata setTopic(List<CodeableConcept> theTopic) {
this.topic = theTopic;
return this;
}
public boolean hasTopic() { public boolean hasTopic() {
if (this.topic == null) if (this.topic == null)
return false; return false;
@ -2449,6 +2742,24 @@ public class ModuleMetadata extends Type implements ICompositeType {
return this.contributor; return this.contributor;
} }
/**
* @return The first repetition of repeating field {@link #contributor}, creating it if it does not already exist
*/
public ModuleMetadataContributorComponent getContributorFirstRep() {
if (getContributor().isEmpty()) {
addContributor();
}
return getContributor().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ModuleMetadata setContributor(List<ModuleMetadataContributorComponent> theContributor) {
this.contributor = theContributor;
return this;
}
public boolean hasContributor() { public boolean hasContributor() {
if (this.contributor == null) if (this.contributor == null)
return false; return false;
@ -2538,6 +2849,24 @@ public class ModuleMetadata extends Type implements ICompositeType {
return this.contact; return this.contact;
} }
/**
* @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist
*/
public ModuleMetadataContactComponent getContactFirstRep() {
if (getContact().isEmpty()) {
addContact();
}
return getContact().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ModuleMetadata setContact(List<ModuleMetadataContactComponent> theContact) {
this.contact = theContact;
return this;
}
public boolean hasContact() { public boolean hasContact() {
if (this.contact == null) if (this.contact == null)
return false; return false;
@ -2627,6 +2956,24 @@ public class ModuleMetadata extends Type implements ICompositeType {
return this.relatedResource; return this.relatedResource;
} }
/**
* @return The first repetition of repeating field {@link #relatedResource}, creating it if it does not already exist
*/
public ModuleMetadataRelatedResourceComponent getRelatedResourceFirstRep() {
if (getRelatedResource().isEmpty()) {
addRelatedResource();
}
return getRelatedResource().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public ModuleMetadata setRelatedResource(List<ModuleMetadataRelatedResourceComponent> theRelatedResource) {
this.relatedResource = theRelatedResource;
return this;
}
public boolean hasRelatedResource() { public boolean hasRelatedResource() {
if (this.relatedResource == null) if (this.relatedResource == null)
return false; return false;
@ -2683,6 +3030,106 @@ public class ModuleMetadata extends Type implements ICompositeType {
childrenList.add(new Property("relatedResource", "", "Related resources such as additional documentation, justification, or bibliographic references.", 0, java.lang.Integer.MAX_VALUE, relatedResource)); childrenList.add(new Property("relatedResource", "", "Related resources such as additional documentation, justification, or bibliographic references.", 0, java.lang.Integer.MAX_VALUE, relatedResource));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType
case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : this.identifier.toArray(new Base[this.identifier.size()]); // Identifier
case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType
case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType
case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<ModuleMetadataType>
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ModuleMetadataStatus>
case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType
case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
case -220463842: /*purpose*/ return this.purpose == null ? new Base[0] : new Base[] {this.purpose}; // StringType
case 111574433: /*usage*/ return this.usage == null ? new Base[0] : new Base[] {this.usage}; // StringType
case 1470566394: /*publicationDate*/ return this.publicationDate == null ? new Base[0] : new Base[] {this.publicationDate}; // DateType
case -1687512484: /*lastReviewDate*/ return this.lastReviewDate == null ? new Base[0] : new Base[] {this.lastReviewDate}; // DateType
case -403934648: /*effectivePeriod*/ return this.effectivePeriod == null ? new Base[0] : new Base[] {this.effectivePeriod}; // Period
case -351767064: /*coverage*/ return this.coverage == null ? new Base[0] : this.coverage.toArray(new Base[this.coverage.size()]); // ModuleMetadataCoverageComponent
case 110546223: /*topic*/ return this.topic == null ? new Base[0] : this.topic.toArray(new Base[this.topic.size()]); // CodeableConcept
case -1895276325: /*contributor*/ return this.contributor == null ? new Base[0] : this.contributor.toArray(new Base[this.contributor.size()]); // ModuleMetadataContributorComponent
case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType
case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ModuleMetadataContactComponent
case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // StringType
case 1554540889: /*relatedResource*/ return this.relatedResource == null ? new Base[0] : this.relatedResource.toArray(new Base[this.relatedResource.size()]); // ModuleMetadataRelatedResourceComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 116079: // url
this.url = castToUri(value); // UriType
break;
case -1618432855: // identifier
this.getIdentifier().add(castToIdentifier(value)); // Identifier
break;
case 351608024: // version
this.version = castToString(value); // StringType
break;
case 3373707: // name
this.name = castToString(value); // StringType
break;
case 110371416: // title
this.title = castToString(value); // StringType
break;
case 3575610: // type
this.type = new ModuleMetadataTypeEnumFactory().fromType(value); // Enumeration<ModuleMetadataType>
break;
case -892481550: // status
this.status = new ModuleMetadataStatusEnumFactory().fromType(value); // Enumeration<ModuleMetadataStatus>
break;
case -404562712: // experimental
this.experimental = castToBoolean(value); // BooleanType
break;
case -1724546052: // description
this.description = castToString(value); // StringType
break;
case -220463842: // purpose
this.purpose = castToString(value); // StringType
break;
case 111574433: // usage
this.usage = castToString(value); // StringType
break;
case 1470566394: // publicationDate
this.publicationDate = castToDate(value); // DateType
break;
case -1687512484: // lastReviewDate
this.lastReviewDate = castToDate(value); // DateType
break;
case -403934648: // effectivePeriod
this.effectivePeriod = castToPeriod(value); // Period
break;
case -351767064: // coverage
this.getCoverage().add((ModuleMetadataCoverageComponent) value); // ModuleMetadataCoverageComponent
break;
case 110546223: // topic
this.getTopic().add(castToCodeableConcept(value)); // CodeableConcept
break;
case -1895276325: // contributor
this.getContributor().add((ModuleMetadataContributorComponent) value); // ModuleMetadataContributorComponent
break;
case 1447404028: // publisher
this.publisher = castToString(value); // StringType
break;
case 951526432: // contact
this.getContact().add((ModuleMetadataContactComponent) value); // ModuleMetadataContactComponent
break;
case 1522889671: // copyright
this.copyright = castToString(value); // StringType
break;
case 1554540889: // relatedResource
this.getRelatedResource().add((ModuleMetadataRelatedResourceComponent) value); // ModuleMetadataRelatedResourceComponent
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("url")) if (name.equals("url"))
@ -2731,6 +3178,35 @@ public class ModuleMetadata extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 116079: throw new FHIRException("Cannot make property url as it is not a complex type"); // UriType
case -1618432855: return addIdentifier(); // Identifier
case 351608024: throw new FHIRException("Cannot make property version as it is not a complex type"); // StringType
case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType
case 110371416: throw new FHIRException("Cannot make property title as it is not a complex type"); // StringType
case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // Enumeration<ModuleMetadataType>
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<ModuleMetadataStatus>
case -404562712: throw new FHIRException("Cannot make property experimental as it is not a complex type"); // BooleanType
case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType
case -220463842: throw new FHIRException("Cannot make property purpose as it is not a complex type"); // StringType
case 111574433: throw new FHIRException("Cannot make property usage as it is not a complex type"); // StringType
case 1470566394: throw new FHIRException("Cannot make property publicationDate as it is not a complex type"); // DateType
case -1687512484: throw new FHIRException("Cannot make property lastReviewDate as it is not a complex type"); // DateType
case -403934648: return getEffectivePeriod(); // Period
case -351767064: return addCoverage(); // ModuleMetadataCoverageComponent
case 110546223: return addTopic(); // CodeableConcept
case -1895276325: return addContributor(); // ModuleMetadataContributorComponent
case 1447404028: throw new FHIRException("Cannot make property publisher as it is not a complex type"); // StringType
case 951526432: return addContact(); // ModuleMetadataContactComponent
case 1522889671: throw new FHIRException("Cannot make property copyright as it is not a complex type"); // StringType
case 1554540889: return addRelatedResource(); // ModuleMetadataRelatedResourceComponent
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("url")) { if (name.equals("url")) {
@ -2894,10 +3370,15 @@ public class ModuleMetadata extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( url, identifier, version, name return super.isEmpty() && (url == null || url.isEmpty()) && (identifier == null || identifier.isEmpty())
, title, type, status, experimental, description, purpose, usage, publicationDate, lastReviewDate && (version == null || version.isEmpty()) && (name == null || name.isEmpty()) && (title == null || title.isEmpty())
, effectivePeriod, coverage, topic, contributor, publisher, contact, copyright, relatedResource && (type == null || type.isEmpty()) && (status == null || status.isEmpty()) && (experimental == null || experimental.isEmpty())
); && (description == null || description.isEmpty()) && (purpose == null || purpose.isEmpty())
&& (usage == null || usage.isEmpty()) && (publicationDate == null || publicationDate.isEmpty())
&& (lastReviewDate == null || lastReviewDate.isEmpty()) && (effectivePeriod == null || effectivePeriod.isEmpty())
&& (coverage == null || coverage.isEmpty()) && (topic == null || topic.isEmpty()) && (contributor == null || contributor.isEmpty())
&& (publisher == null || publisher.isEmpty()) && (contact == null || contact.isEmpty()) && (copyright == null || copyright.isEmpty())
&& (relatedResource == null || relatedResource.isEmpty());
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Block; import ca.uhn.fhir.model.api.annotation.Block;
@ -81,8 +81,9 @@ public class Money extends Quantity {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( value, comparator, unit, system return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty())
, code); && (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty())
;
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
import org.hl7.fhir.utilities.xhtml.XhtmlNode; import org.hl7.fhir.utilities.xhtml.XhtmlNode;
@ -272,6 +272,26 @@ public class Narrative extends BaseNarrative implements INarrative {
childrenList.add(new Property("status", "code", "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.", 0, java.lang.Integer.MAX_VALUE, status)); childrenList.add(new Property("status", "code", "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.", 0, java.lang.Integer.MAX_VALUE, status));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<NarrativeStatus>
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -892481550: // status
this.status = new NarrativeStatusEnumFactory().fromType(value); // Enumeration<NarrativeStatus>
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("status")) if (name.equals("status"))
@ -280,6 +300,15 @@ public class Narrative extends BaseNarrative implements INarrative {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<NarrativeStatus>
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("status")) { if (name.equals("status")) {
@ -327,7 +356,8 @@ public class Narrative extends BaseNarrative implements INarrative {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( status, div); return super.isEmpty() && (status == null || status.isEmpty()) && (div == null || div.isEmpty())
;
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -456,6 +456,50 @@ public class ParameterDefinition extends Type implements ICompositeType {
childrenList.add(new Property("profile", "Reference(StructureDefinition)", "If specified, this indicates a profile that the input data must conform to, or that the output data will conform to.", 0, java.lang.Integer.MAX_VALUE, profile)); childrenList.add(new Property("profile", "Reference(StructureDefinition)", "If specified, this indicates a profile that the input data must conform to, or that the output data will conform to.", 0, java.lang.Integer.MAX_VALUE, profile));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // CodeType
case 116103: /*use*/ return this.use == null ? new Base[0] : new Base[] {this.use}; // CodeType
case 108114: /*min*/ return this.min == null ? new Base[0] : new Base[] {this.min}; // IntegerType
case 107876: /*max*/ return this.max == null ? new Base[0] : new Base[] {this.max}; // StringType
case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : new Base[] {this.documentation}; // StringType
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeType
case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // Reference
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3373707: // name
this.name = castToCode(value); // CodeType
break;
case 116103: // use
this.use = castToCode(value); // CodeType
break;
case 108114: // min
this.min = castToInteger(value); // IntegerType
break;
case 107876: // max
this.max = castToString(value); // StringType
break;
case 1587405498: // documentation
this.documentation = castToString(value); // StringType
break;
case 3575610: // type
this.type = castToCode(value); // CodeType
break;
case -309425751: // profile
this.profile = castToReference(value); // Reference
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("name")) if (name.equals("name"))
@ -476,6 +520,21 @@ public class ParameterDefinition extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // CodeType
case 116103: throw new FHIRException("Cannot make property use as it is not a complex type"); // CodeType
case 108114: throw new FHIRException("Cannot make property min as it is not a complex type"); // IntegerType
case 107876: throw new FHIRException("Cannot make property max as it is not a complex type"); // StringType
case 1587405498: throw new FHIRException("Cannot make property documentation as it is not a complex type"); // StringType
case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // CodeType
case -309425751: return getProfile(); // Reference
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("name")) { if (name.equals("name")) {
@ -551,8 +610,9 @@ public class ParameterDefinition extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( name, use, min, max, documentation return super.isEmpty() && (name == null || name.isEmpty()) && (use == null || use.isEmpty())
, type, profile); && (min == null || min.isEmpty()) && (max == null || max.isEmpty()) && (documentation == null || documentation.isEmpty())
&& (type == null || type.isEmpty()) && (profile == null || profile.isEmpty());
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -198,6 +198,30 @@ public class Period extends Type implements ICompositeType {
childrenList.add(new Property("end", "dateTime", "The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.", 0, java.lang.Integer.MAX_VALUE, end)); childrenList.add(new Property("end", "dateTime", "The end of the period. If the end of the period is missing, it means that the period is ongoing. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.", 0, java.lang.Integer.MAX_VALUE, end));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // DateTimeType
case 100571: /*end*/ return this.end == null ? new Base[0] : new Base[] {this.end}; // DateTimeType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 109757538: // start
this.start = castToDateTime(value); // DateTimeType
break;
case 100571: // end
this.end = castToDateTime(value); // DateTimeType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("start")) if (name.equals("start"))
@ -208,6 +232,16 @@ public class Period extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 109757538: throw new FHIRException("Cannot make property start as it is not a complex type"); // DateTimeType
case 100571: throw new FHIRException("Cannot make property end as it is not a complex type"); // DateTimeType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("start")) { if (name.equals("start")) {
@ -258,7 +292,8 @@ public class Period extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( start, end); return super.isEmpty() && (start == null || start.isEmpty()) && (end == null || end.isEmpty())
;
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -533,6 +533,42 @@ public class Quantity extends Type implements ICompositeType {
childrenList.add(new Property("code", "code", "A computer processable form of the unit in some unit representation system.", 0, java.lang.Integer.MAX_VALUE, code)); childrenList.add(new Property("code", "code", "A computer processable form of the unit in some unit representation system.", 0, java.lang.Integer.MAX_VALUE, code));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // DecimalType
case -844673834: /*comparator*/ return this.comparator == null ? new Base[0] : new Base[] {this.comparator}; // Enumeration<QuantityComparator>
case 3594628: /*unit*/ return this.unit == null ? new Base[0] : new Base[] {this.unit}; // StringType
case -887328209: /*system*/ return this.system == null ? new Base[0] : new Base[] {this.system}; // UriType
case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 111972721: // value
this.value = castToDecimal(value); // DecimalType
break;
case -844673834: // comparator
this.comparator = new QuantityComparatorEnumFactory().fromType(value); // Enumeration<QuantityComparator>
break;
case 3594628: // unit
this.unit = castToString(value); // StringType
break;
case -887328209: // system
this.system = castToUri(value); // UriType
break;
case 3059181: // code
this.code = castToCode(value); // CodeType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("value")) if (name.equals("value"))
@ -549,6 +585,19 @@ public class Quantity extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 111972721: throw new FHIRException("Cannot make property value as it is not a complex type"); // DecimalType
case -844673834: throw new FHIRException("Cannot make property comparator as it is not a complex type"); // Enumeration<QuantityComparator>
case 3594628: throw new FHIRException("Cannot make property unit as it is not a complex type"); // StringType
case -887328209: throw new FHIRException("Cannot make property system as it is not a complex type"); // UriType
case 3059181: throw new FHIRException("Cannot make property code as it is not a complex type"); // CodeType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("value")) { if (name.equals("value")) {
@ -613,8 +662,9 @@ public class Quantity extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( value, comparator, unit, system return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty())
, code); && (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty())
;
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -122,6 +122,30 @@ public class Range extends Type implements ICompositeType {
childrenList.add(new Property("high", "SimpleQuantity", "The high limit. The boundary is inclusive.", 0, java.lang.Integer.MAX_VALUE, high)); childrenList.add(new Property("high", "SimpleQuantity", "The high limit. The boundary is inclusive.", 0, java.lang.Integer.MAX_VALUE, high));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 107348: /*low*/ return this.low == null ? new Base[0] : new Base[] {this.low}; // SimpleQuantity
case 3202466: /*high*/ return this.high == null ? new Base[0] : new Base[] {this.high}; // SimpleQuantity
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 107348: // low
this.low = castToSimpleQuantity(value); // SimpleQuantity
break;
case 3202466: // high
this.high = castToSimpleQuantity(value); // SimpleQuantity
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("low")) if (name.equals("low"))
@ -132,6 +156,16 @@ public class Range extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 107348: return getLow(); // SimpleQuantity
case 3202466: return getHigh(); // SimpleQuantity
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("low")) { if (name.equals("low")) {
@ -184,7 +218,8 @@ public class Range extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( low, high); return super.isEmpty() && (low == null || low.isEmpty()) && (high == null || high.isEmpty())
;
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -122,6 +122,30 @@ public class Ratio extends Type implements ICompositeType {
childrenList.add(new Property("denominator", "Quantity", "The value of the denominator.", 0, java.lang.Integer.MAX_VALUE, denominator)); childrenList.add(new Property("denominator", "Quantity", "The value of the denominator.", 0, java.lang.Integer.MAX_VALUE, denominator));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 1747334793: /*numerator*/ return this.numerator == null ? new Base[0] : new Base[] {this.numerator}; // Quantity
case -1983274394: /*denominator*/ return this.denominator == null ? new Base[0] : new Base[] {this.denominator}; // Quantity
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 1747334793: // numerator
this.numerator = castToQuantity(value); // Quantity
break;
case -1983274394: // denominator
this.denominator = castToQuantity(value); // Quantity
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("numerator")) if (name.equals("numerator"))
@ -132,6 +156,16 @@ public class Ratio extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 1747334793: return getNumerator(); // Quantity
case -1983274394: return getDenominator(); // Quantity
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("numerator")) { if (name.equals("numerator")) {
@ -185,7 +219,8 @@ public class Ratio extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( numerator, denominator); return super.isEmpty() && (numerator == null || numerator.isEmpty()) && (denominator == null || denominator.isEmpty())
;
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -216,6 +216,30 @@ public class Reference extends BaseReference implements IBaseReference, IComposi
childrenList.add(new Property("display", "string", "Plain text narrative that identifies the resource in addition to the resource reference.", 0, java.lang.Integer.MAX_VALUE, display)); childrenList.add(new Property("display", "string", "Plain text narrative that identifies the resource in addition to the resource reference.", 0, java.lang.Integer.MAX_VALUE, display));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -925155509: /*reference*/ return this.reference == null ? new Base[0] : new Base[] {this.reference}; // StringType
case 1671764162: /*display*/ return this.display == null ? new Base[0] : new Base[] {this.display}; // StringType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -925155509: // reference
this.reference = castToString(value); // StringType
break;
case 1671764162: // display
this.display = castToString(value); // StringType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("reference")) if (name.equals("reference"))
@ -226,6 +250,16 @@ public class Reference extends BaseReference implements IBaseReference, IComposi
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -925155509: throw new FHIRException("Cannot make property reference as it is not a complex type"); // StringType
case 1671764162: throw new FHIRException("Cannot make property display as it is not a complex type"); // StringType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("reference")) { if (name.equals("reference")) {
@ -276,7 +310,8 @@ public class Reference extends BaseReference implements IBaseReference, IComposi
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( reference, display); return super.isEmpty() && (reference == null || reference.isEmpty()) && (display == null || display.isEmpty())
;
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -505,6 +505,50 @@ public class SampledData extends Type implements ICompositeType {
childrenList.add(new Property("data", "string", "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.", 0, java.lang.Integer.MAX_VALUE, data)); childrenList.add(new Property("data", "string", "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.", 0, java.lang.Integer.MAX_VALUE, data));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1008619738: /*origin*/ return this.origin == null ? new Base[0] : new Base[] {this.origin}; // SimpleQuantity
case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // DecimalType
case -1282148017: /*factor*/ return this.factor == null ? new Base[0] : new Base[] {this.factor}; // DecimalType
case 1209133370: /*lowerLimit*/ return this.lowerLimit == null ? new Base[0] : new Base[] {this.lowerLimit}; // DecimalType
case -1681713095: /*upperLimit*/ return this.upperLimit == null ? new Base[0] : new Base[] {this.upperLimit}; // DecimalType
case 414334925: /*dimensions*/ return this.dimensions == null ? new Base[0] : new Base[] {this.dimensions}; // PositiveIntType
case 3076010: /*data*/ return this.data == null ? new Base[0] : new Base[] {this.data}; // StringType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1008619738: // origin
this.origin = castToSimpleQuantity(value); // SimpleQuantity
break;
case -991726143: // period
this.period = castToDecimal(value); // DecimalType
break;
case -1282148017: // factor
this.factor = castToDecimal(value); // DecimalType
break;
case 1209133370: // lowerLimit
this.lowerLimit = castToDecimal(value); // DecimalType
break;
case -1681713095: // upperLimit
this.upperLimit = castToDecimal(value); // DecimalType
break;
case 414334925: // dimensions
this.dimensions = castToPositiveInt(value); // PositiveIntType
break;
case 3076010: // data
this.data = castToString(value); // StringType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("origin")) if (name.equals("origin"))
@ -525,6 +569,21 @@ public class SampledData extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1008619738: return getOrigin(); // SimpleQuantity
case -991726143: throw new FHIRException("Cannot make property period as it is not a complex type"); // DecimalType
case -1282148017: throw new FHIRException("Cannot make property factor as it is not a complex type"); // DecimalType
case 1209133370: throw new FHIRException("Cannot make property lowerLimit as it is not a complex type"); // DecimalType
case -1681713095: throw new FHIRException("Cannot make property upperLimit as it is not a complex type"); // DecimalType
case 414334925: throw new FHIRException("Cannot make property dimensions as it is not a complex type"); // PositiveIntType
case 3076010: throw new FHIRException("Cannot make property data as it is not a complex type"); // StringType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("origin")) { if (name.equals("origin")) {
@ -600,8 +659,9 @@ public class SampledData extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( origin, period, factor, lowerLimit return super.isEmpty() && (origin == null || origin.isEmpty()) && (period == null || period.isEmpty())
, upperLimit, dimensions, data); && (factor == null || factor.isEmpty()) && (lowerLimit == null || lowerLimit.isEmpty()) && (upperLimit == null || upperLimit.isEmpty())
&& (dimensions == null || dimensions.isEmpty()) && (data == null || data.isEmpty());
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -109,6 +109,24 @@ public class Signature extends Type implements ICompositeType {
return this.type; return this.type;
} }
/**
* @return The first repetition of repeating field {@link #type}, creating it if it does not already exist
*/
public Coding getTypeFirstRep() {
if (getType().isEmpty()) {
addType();
}
return getType().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Signature setType(List<Coding> theType) {
this.type = theType;
return this;
}
public boolean hasType() { public boolean hasType() {
if (this.type == null) if (this.type == null)
return false; return false;
@ -337,6 +355,42 @@ public class Signature extends Type implements ICompositeType {
childrenList.add(new Property("blob", "base64Binary", "The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty.", 0, java.lang.Integer.MAX_VALUE, blob)); childrenList.add(new Property("blob", "base64Binary", "The base64 encoding of the Signature content. When signature is not recorded electronically this element would be empty.", 0, java.lang.Integer.MAX_VALUE, blob));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // Coding
case 3648314: /*when*/ return this.when == null ? new Base[0] : new Base[] {this.when}; // InstantType
case 117694: /*who*/ return this.who == null ? new Base[0] : new Base[] {this.who}; // Type
case -389131437: /*contentType*/ return this.contentType == null ? new Base[0] : new Base[] {this.contentType}; // CodeType
case 3026845: /*blob*/ return this.blob == null ? new Base[0] : new Base[] {this.blob}; // Base64BinaryType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3575610: // type
this.getType().add(castToCoding(value)); // Coding
break;
case 3648314: // when
this.when = castToInstant(value); // InstantType
break;
case 117694: // who
this.who = (Type) value; // Type
break;
case -389131437: // contentType
this.contentType = castToCode(value); // CodeType
break;
case 3026845: // blob
this.blob = castToBase64Binary(value); // Base64BinaryType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("type")) if (name.equals("type"))
@ -353,6 +407,19 @@ public class Signature extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3575610: return addType(); // Coding
case 3648314: throw new FHIRException("Cannot make property when as it is not a complex type"); // InstantType
case -788654078: return getWho(); // Type
case -389131437: throw new FHIRException("Cannot make property contentType as it is not a complex type"); // CodeType
case 3026845: throw new FHIRException("Cannot make property blob as it is not a complex type"); // Base64BinaryType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("type")) { if (name.equals("type")) {
@ -426,8 +493,9 @@ public class Signature extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, when, who, contentType return super.isEmpty() && (type == null || type.isEmpty()) && (when == null || when.isEmpty())
, blob); && (who == null || who.isEmpty()) && (contentType == null || contentType.isEmpty()) && (blob == null || blob.isEmpty())
;
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import ca.uhn.fhir.model.api.annotation.DatatypeDef; import ca.uhn.fhir.model.api.annotation.DatatypeDef;
import ca.uhn.fhir.model.api.annotation.Block; import ca.uhn.fhir.model.api.annotation.Block;
@ -81,8 +81,9 @@ public class SimpleQuantity extends Quantity {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( value, comparator, unit, system return super.isEmpty() && (value == null || value.isEmpty()) && (comparator == null || comparator.isEmpty())
, code); && (unit == null || unit.isEmpty()) && (system == null || system.isEmpty()) && (code == null || code.isEmpty())
;
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -1310,6 +1310,74 @@ public class Timing extends Type implements ICompositeType {
childrenList.add(new Property("offset", "unsignedInt", "The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event.", 0, java.lang.Integer.MAX_VALUE, offset)); childrenList.add(new Property("offset", "unsignedInt", "The number of minutes from the event. If the event code does not indicate whether the minutes is before or after the event, then the offset is assumed to be after the event.", 0, java.lang.Integer.MAX_VALUE, offset));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1383205195: /*bounds*/ return this.bounds == null ? new Base[0] : new Base[] {this.bounds}; // Type
case 94851343: /*count*/ return this.count == null ? new Base[0] : new Base[] {this.count}; // IntegerType
case -372044331: /*countMax*/ return this.countMax == null ? new Base[0] : new Base[] {this.countMax}; // IntegerType
case -1992012396: /*duration*/ return this.duration == null ? new Base[0] : new Base[] {this.duration}; // DecimalType
case -478083280: /*durationMax*/ return this.durationMax == null ? new Base[0] : new Base[] {this.durationMax}; // DecimalType
case -1935429320: /*durationUnit*/ return this.durationUnit == null ? new Base[0] : new Base[] {this.durationUnit}; // Enumeration<UnitsOfTime>
case -70023844: /*frequency*/ return this.frequency == null ? new Base[0] : new Base[] {this.frequency}; // IntegerType
case 1273846376: /*frequencyMax*/ return this.frequencyMax == null ? new Base[0] : new Base[] {this.frequencyMax}; // IntegerType
case -991726143: /*period*/ return this.period == null ? new Base[0] : new Base[] {this.period}; // DecimalType
case 566580195: /*periodMax*/ return this.periodMax == null ? new Base[0] : new Base[] {this.periodMax}; // DecimalType
case 384367333: /*periodUnit*/ return this.periodUnit == null ? new Base[0] : new Base[] {this.periodUnit}; // Enumeration<UnitsOfTime>
case 3648314: /*when*/ return this.when == null ? new Base[0] : new Base[] {this.when}; // Enumeration<EventTiming>
case -1019779949: /*offset*/ return this.offset == null ? new Base[0] : new Base[] {this.offset}; // UnsignedIntType
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1383205195: // bounds
this.bounds = (Type) value; // Type
break;
case 94851343: // count
this.count = castToInteger(value); // IntegerType
break;
case -372044331: // countMax
this.countMax = castToInteger(value); // IntegerType
break;
case -1992012396: // duration
this.duration = castToDecimal(value); // DecimalType
break;
case -478083280: // durationMax
this.durationMax = castToDecimal(value); // DecimalType
break;
case -1935429320: // durationUnit
this.durationUnit = new UnitsOfTimeEnumFactory().fromType(value); // Enumeration<UnitsOfTime>
break;
case -70023844: // frequency
this.frequency = castToInteger(value); // IntegerType
break;
case 1273846376: // frequencyMax
this.frequencyMax = castToInteger(value); // IntegerType
break;
case -991726143: // period
this.period = castToDecimal(value); // DecimalType
break;
case 566580195: // periodMax
this.periodMax = castToDecimal(value); // DecimalType
break;
case 384367333: // periodUnit
this.periodUnit = new UnitsOfTimeEnumFactory().fromType(value); // Enumeration<UnitsOfTime>
break;
case 3648314: // when
this.when = new EventTimingEnumFactory().fromType(value); // Enumeration<EventTiming>
break;
case -1019779949: // offset
this.offset = castToUnsignedInt(value); // UnsignedIntType
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("bounds[x]")) if (name.equals("bounds[x]"))
@ -1342,6 +1410,27 @@ public class Timing extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1149635157: return getBounds(); // Type
case 94851343: throw new FHIRException("Cannot make property count as it is not a complex type"); // IntegerType
case -372044331: throw new FHIRException("Cannot make property countMax as it is not a complex type"); // IntegerType
case -1992012396: throw new FHIRException("Cannot make property duration as it is not a complex type"); // DecimalType
case -478083280: throw new FHIRException("Cannot make property durationMax as it is not a complex type"); // DecimalType
case -1935429320: throw new FHIRException("Cannot make property durationUnit as it is not a complex type"); // Enumeration<UnitsOfTime>
case -70023844: throw new FHIRException("Cannot make property frequency as it is not a complex type"); // IntegerType
case 1273846376: throw new FHIRException("Cannot make property frequencyMax as it is not a complex type"); // IntegerType
case -991726143: throw new FHIRException("Cannot make property period as it is not a complex type"); // DecimalType
case 566580195: throw new FHIRException("Cannot make property periodMax as it is not a complex type"); // DecimalType
case 384367333: throw new FHIRException("Cannot make property periodUnit as it is not a complex type"); // Enumeration<UnitsOfTime>
case 3648314: throw new FHIRException("Cannot make property when as it is not a complex type"); // Enumeration<EventTiming>
case -1019779949: throw new FHIRException("Cannot make property offset as it is not a complex type"); // UnsignedIntType
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("boundsDuration")) { if (name.equals("boundsDuration")) {
@ -1444,9 +1533,12 @@ public class Timing extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( bounds, count, countMax, duration return super.isEmpty() && (bounds == null || bounds.isEmpty()) && (count == null || count.isEmpty())
, durationMax, durationUnit, frequency, frequencyMax, period, periodMax, periodUnit, when && (countMax == null || countMax.isEmpty()) && (duration == null || duration.isEmpty()) && (durationMax == null || durationMax.isEmpty())
, offset); && (durationUnit == null || durationUnit.isEmpty()) && (frequency == null || frequency.isEmpty())
&& (frequencyMax == null || frequencyMax.isEmpty()) && (period == null || period.isEmpty())
&& (periodMax == null || periodMax.isEmpty()) && (periodUnit == null || periodUnit.isEmpty())
&& (when == null || when.isEmpty()) && (offset == null || offset.isEmpty());
} }
public String fhirType() { public String fhirType() {
@ -1495,6 +1587,24 @@ public class Timing extends Type implements ICompositeType {
return this.event; return this.event;
} }
/**
* @return The first repetition of repeating field {@link #event}, creating it if it does not already exist
*/
public DateTimeType getEventFirstRep() {
if (getEvent().isEmpty()) {
addEventElement();
}
return getEvent().get(0);
}
/**
* @return Returns a reference to <code>this</code> for easy method chaining
*/
public Timing setEvent(List<DateTimeType> theEvent) {
this.event = theEvent;
return this;
}
public boolean hasEvent() { public boolean hasEvent() {
if (this.event == null) if (this.event == null)
return false; return false;
@ -1595,6 +1705,34 @@ public class Timing extends Type implements ICompositeType {
childrenList.add(new Property("code", "CodeableConcept", "A code for the timing pattern. Some codes such as BID are ubiquitous, but many institutions define their own additional codes. If a code is provided, the code is understood to be a complete statement of whatever is specified in the structured timing data, and either the code or the data may be used to interpret the Timing.", 0, java.lang.Integer.MAX_VALUE, code)); childrenList.add(new Property("code", "CodeableConcept", "A code for the timing pattern. Some codes such as BID are ubiquitous, but many institutions define their own additional codes. If a code is provided, the code is understood to be a complete statement of whatever is specified in the structured timing data, and either the code or the data may be used to interpret the Timing.", 0, java.lang.Integer.MAX_VALUE, code));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 96891546: /*event*/ return this.event == null ? new Base[0] : this.event.toArray(new Base[this.event.size()]); // DateTimeType
case -934531685: /*repeat*/ return this.repeat == null ? new Base[0] : new Base[] {this.repeat}; // TimingRepeatComponent
case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeableConcept
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 96891546: // event
this.getEvent().add(castToDateTime(value)); // DateTimeType
break;
case -934531685: // repeat
this.repeat = (TimingRepeatComponent) value; // TimingRepeatComponent
break;
case 3059181: // code
this.code = castToCodeableConcept(value); // CodeableConcept
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("event")) if (name.equals("event"))
@ -1607,6 +1745,17 @@ public class Timing extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 96891546: throw new FHIRException("Cannot make property event as it is not a complex type"); // DateTimeType
case -934531685: return getRepeat(); // TimingRepeatComponent
case 3059181: return getCode(); // CodeableConcept
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("event")) { if (name.equals("event")) {
@ -1668,7 +1817,8 @@ public class Timing extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( event, repeat, code); return super.isEmpty() && (event == null || event.isEmpty()) && (repeat == null || repeat.isEmpty())
&& (code == null || code.isEmpty());
} }

View File

@ -29,7 +29,7 @@ package org.hl7.fhir.dstu3.model;
*/ */
// Generated on Fri, Apr 1, 2016 17:57-0400 for FHIR v1.4.0 // Generated on Sun, May 1, 2016 08:42-0400 for FHIR v1.4.0
import java.util.*; import java.util.*;
@ -455,6 +455,38 @@ public class TriggerDefinition extends Type implements ICompositeType {
childrenList.add(new Property("eventData", "DataRequirement", "The triggering data of the event (if this is a data trigger).", 0, java.lang.Integer.MAX_VALUE, eventData)); childrenList.add(new Property("eventData", "DataRequirement", "The triggering data of the event (if this is a data trigger).", 0, java.lang.Integer.MAX_VALUE, eventData));
} }
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<TriggerType>
case 31228997: /*eventName*/ return this.eventName == null ? new Base[0] : new Base[] {this.eventName}; // StringType
case 125465476: /*eventTiming*/ return this.eventTiming == null ? new Base[0] : new Base[] {this.eventTiming}; // Type
case 30931300: /*eventData*/ return this.eventData == null ? new Base[0] : new Base[] {this.eventData}; // DataRequirement
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public void setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3575610: // type
this.type = new TriggerTypeEnumFactory().fromType(value); // Enumeration<TriggerType>
break;
case 31228997: // eventName
this.eventName = castToString(value); // StringType
break;
case 125465476: // eventTiming
this.eventTiming = (Type) value; // Type
break;
case 30931300: // eventData
this.eventData = castToDataRequirement(value); // DataRequirement
break;
default: super.setProperty(hash, name, value);
}
}
@Override @Override
public void setProperty(String name, Base value) throws FHIRException { public void setProperty(String name, Base value) throws FHIRException {
if (name.equals("type")) if (name.equals("type"))
@ -469,6 +501,18 @@ public class TriggerDefinition extends Type implements ICompositeType {
super.setProperty(name, value); super.setProperty(name, value);
} }
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // Enumeration<TriggerType>
case 31228997: throw new FHIRException("Cannot make property eventName as it is not a complex type"); // StringType
case 1120539260: return getEventTiming(); // Type
case 30931300: return getEventData(); // DataRequirement
default: return super.makeProperty(hash, name);
}
}
@Override @Override
public Base addChild(String name) throws FHIRException { public Base addChild(String name) throws FHIRException {
if (name.equals("type")) { if (name.equals("type")) {
@ -542,8 +586,9 @@ public class TriggerDefinition extends Type implements ICompositeType {
} }
public boolean isEmpty() { public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty( type, eventName, eventTiming return super.isEmpty() && (type == null || type.isEmpty()) && (eventName == null || eventName.isEmpty())
, eventData); && (eventTiming == null || eventTiming.isEmpty()) && (eventData == null || eventData.isEmpty())
;
} }

View File

@ -39,6 +39,7 @@ resource.DocumentManifest=org.hl7.fhir.dstu3.model.DocumentManifest
resource.DocumentReference=org.hl7.fhir.dstu3.model.DocumentReference resource.DocumentReference=org.hl7.fhir.dstu3.model.DocumentReference
resource.EligibilityRequest=org.hl7.fhir.dstu3.model.EligibilityRequest resource.EligibilityRequest=org.hl7.fhir.dstu3.model.EligibilityRequest
resource.EligibilityResponse=org.hl7.fhir.dstu3.model.EligibilityResponse resource.EligibilityResponse=org.hl7.fhir.dstu3.model.EligibilityResponse
resource.Endpoint=org.hl7.fhir.dstu3.model.Endpoint
resource.Encounter=org.hl7.fhir.dstu3.model.Encounter resource.Encounter=org.hl7.fhir.dstu3.model.Encounter
resource.EnrollmentRequest=org.hl7.fhir.dstu3.model.EnrollmentRequest resource.EnrollmentRequest=org.hl7.fhir.dstu3.model.EnrollmentRequest
resource.EnrollmentResponse=org.hl7.fhir.dstu3.model.EnrollmentResponse resource.EnrollmentResponse=org.hl7.fhir.dstu3.model.EnrollmentResponse