
org.hl7.fhir.dstu3.model.PlanDefinition Maven / Gradle / Ivy
The newest version!
package org.hl7.fhir.dstu3.model;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
// Generated on Fri, Mar 16, 2018 15:21+1100 for FHIR v3.0.x
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.hl7.fhir.dstu3.model.Enumerations.PublicationStatus;
import org.hl7.fhir.dstu3.model.Enumerations.PublicationStatusEnumFactory;
import org.hl7.fhir.exceptions.FHIRException;
import org.hl7.fhir.exceptions.FHIRFormatError;
import org.hl7.fhir.instance.model.api.IBaseBackboneElement;
import org.hl7.fhir.utilities.Utilities;
import ca.uhn.fhir.model.api.annotation.Block;
import ca.uhn.fhir.model.api.annotation.Child;
import ca.uhn.fhir.model.api.annotation.ChildOrder;
import ca.uhn.fhir.model.api.annotation.Description;
import ca.uhn.fhir.model.api.annotation.ResourceDef;
import ca.uhn.fhir.model.api.annotation.SearchParamDefinition;
/**
* This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical artifacts such as clinical decision support rules, order sets and protocols.
*/
@ResourceDef(name="PlanDefinition", profile="http://hl7.org/fhir/Profile/PlanDefinition")
@ChildOrder(names={"url", "identifier", "version", "name", "title", "type", "status", "experimental", "date", "publisher", "description", "purpose", "usage", "approvalDate", "lastReviewDate", "effectivePeriod", "useContext", "jurisdiction", "topic", "contributor", "contact", "copyright", "relatedArtifact", "library", "goal", "action"})
public class PlanDefinition extends MetadataResource {
public enum ActionConditionKind {
/**
* The condition describes whether or not a given action is applicable
*/
APPLICABILITY,
/**
* The condition is a starting condition for the action
*/
START,
/**
* The condition is a stop, or exit condition for the action
*/
STOP,
/**
* added to help the parsers with the generic types
*/
NULL;
public static ActionConditionKind fromCode(String codeString) throws FHIRException {
if (codeString == null || "".equals(codeString))
return null;
if ("applicability".equals(codeString))
return APPLICABILITY;
if ("start".equals(codeString))
return START;
if ("stop".equals(codeString))
return STOP;
if (Configuration.isAcceptInvalidEnums())
return null;
else
throw new FHIRException("Unknown ActionConditionKind code '"+codeString+"'");
}
public String toCode() {
switch (this) {
case APPLICABILITY: return "applicability";
case START: return "start";
case STOP: return "stop";
case NULL: return null;
default: return "?";
}
}
public String getSystem() {
switch (this) {
case APPLICABILITY: return "http://hl7.org/fhir/action-condition-kind";
case START: return "http://hl7.org/fhir/action-condition-kind";
case STOP: return "http://hl7.org/fhir/action-condition-kind";
case NULL: return null;
default: return "?";
}
}
public String getDefinition() {
switch (this) {
case APPLICABILITY: return "The condition describes whether or not a given action is applicable";
case START: return "The condition is a starting condition for the action";
case STOP: return "The condition is a stop, or exit condition for the action";
case NULL: return null;
default: return "?";
}
}
public String getDisplay() {
switch (this) {
case APPLICABILITY: return "Applicability";
case START: return "Start";
case STOP: return "Stop";
case NULL: return null;
default: return "?";
}
}
}
public static class ActionConditionKindEnumFactory implements EnumFactory {
public ActionConditionKind fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString))
if (codeString == null || "".equals(codeString))
return null;
if ("applicability".equals(codeString))
return ActionConditionKind.APPLICABILITY;
if ("start".equals(codeString))
return ActionConditionKind.START;
if ("stop".equals(codeString))
return ActionConditionKind.STOP;
throw new IllegalArgumentException("Unknown ActionConditionKind code '"+codeString+"'");
}
public Enumeration fromType(PrimitiveType> code) throws FHIRException {
if (code == null)
return null;
if (code.isEmpty())
return new Enumeration(this);
String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString))
return null;
if ("applicability".equals(codeString))
return new Enumeration(this, ActionConditionKind.APPLICABILITY);
if ("start".equals(codeString))
return new Enumeration(this, ActionConditionKind.START);
if ("stop".equals(codeString))
return new Enumeration(this, ActionConditionKind.STOP);
throw new FHIRException("Unknown ActionConditionKind code '"+codeString+"'");
}
public String toCode(ActionConditionKind code) {
if (code == ActionConditionKind.NULL)
return null;
if (code == ActionConditionKind.APPLICABILITY)
return "applicability";
if (code == ActionConditionKind.START)
return "start";
if (code == ActionConditionKind.STOP)
return "stop";
return "?";
}
public String toSystem(ActionConditionKind code) {
return code.getSystem();
}
}
public enum ActionRelationshipType {
/**
* The action must be performed before the start of the related action
*/
BEFORESTART,
/**
* The action must be performed before the related action
*/
BEFORE,
/**
* The action must be performed before the end of the related action
*/
BEFOREEND,
/**
* The action must be performed concurrent with the start of the related action
*/
CONCURRENTWITHSTART,
/**
* The action must be performed concurrent with the related action
*/
CONCURRENT,
/**
* The action must be performed concurrent with the end of the related action
*/
CONCURRENTWITHEND,
/**
* The action must be performed after the start of the related action
*/
AFTERSTART,
/**
* The action must be performed after the related action
*/
AFTER,
/**
* The action must be performed after the end of the related action
*/
AFTEREND,
/**
* added to help the parsers with the generic types
*/
NULL;
public static ActionRelationshipType fromCode(String codeString) throws FHIRException {
if (codeString == null || "".equals(codeString))
return null;
if ("before-start".equals(codeString))
return BEFORESTART;
if ("before".equals(codeString))
return BEFORE;
if ("before-end".equals(codeString))
return BEFOREEND;
if ("concurrent-with-start".equals(codeString))
return CONCURRENTWITHSTART;
if ("concurrent".equals(codeString))
return CONCURRENT;
if ("concurrent-with-end".equals(codeString))
return CONCURRENTWITHEND;
if ("after-start".equals(codeString))
return AFTERSTART;
if ("after".equals(codeString))
return AFTER;
if ("after-end".equals(codeString))
return AFTEREND;
if (Configuration.isAcceptInvalidEnums())
return null;
else
throw new FHIRException("Unknown ActionRelationshipType code '"+codeString+"'");
}
public String toCode() {
switch (this) {
case BEFORESTART: return "before-start";
case BEFORE: return "before";
case BEFOREEND: return "before-end";
case CONCURRENTWITHSTART: return "concurrent-with-start";
case CONCURRENT: return "concurrent";
case CONCURRENTWITHEND: return "concurrent-with-end";
case AFTERSTART: return "after-start";
case AFTER: return "after";
case AFTEREND: return "after-end";
case NULL: return null;
default: return "?";
}
}
public String getSystem() {
switch (this) {
case BEFORESTART: return "http://hl7.org/fhir/action-relationship-type";
case BEFORE: return "http://hl7.org/fhir/action-relationship-type";
case BEFOREEND: return "http://hl7.org/fhir/action-relationship-type";
case CONCURRENTWITHSTART: return "http://hl7.org/fhir/action-relationship-type";
case CONCURRENT: return "http://hl7.org/fhir/action-relationship-type";
case CONCURRENTWITHEND: return "http://hl7.org/fhir/action-relationship-type";
case AFTERSTART: return "http://hl7.org/fhir/action-relationship-type";
case AFTER: return "http://hl7.org/fhir/action-relationship-type";
case AFTEREND: return "http://hl7.org/fhir/action-relationship-type";
case NULL: return null;
default: return "?";
}
}
public String getDefinition() {
switch (this) {
case BEFORESTART: return "The action must be performed before the start of the related action";
case BEFORE: return "The action must be performed before the related action";
case BEFOREEND: return "The action must be performed before the end of the related action";
case CONCURRENTWITHSTART: return "The action must be performed concurrent with the start of the related action";
case CONCURRENT: return "The action must be performed concurrent with the related action";
case CONCURRENTWITHEND: return "The action must be performed concurrent with the end of the related action";
case AFTERSTART: return "The action must be performed after the start of the related action";
case AFTER: return "The action must be performed after the related action";
case AFTEREND: return "The action must be performed after the end of the related action";
case NULL: return null;
default: return "?";
}
}
public String getDisplay() {
switch (this) {
case BEFORESTART: return "Before Start";
case BEFORE: return "Before";
case BEFOREEND: return "Before End";
case CONCURRENTWITHSTART: return "Concurrent With Start";
case CONCURRENT: return "Concurrent";
case CONCURRENTWITHEND: return "Concurrent With End";
case AFTERSTART: return "After Start";
case AFTER: return "After";
case AFTEREND: return "After End";
case NULL: return null;
default: return "?";
}
}
}
public static class ActionRelationshipTypeEnumFactory implements EnumFactory {
public ActionRelationshipType fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString))
if (codeString == null || "".equals(codeString))
return null;
if ("before-start".equals(codeString))
return ActionRelationshipType.BEFORESTART;
if ("before".equals(codeString))
return ActionRelationshipType.BEFORE;
if ("before-end".equals(codeString))
return ActionRelationshipType.BEFOREEND;
if ("concurrent-with-start".equals(codeString))
return ActionRelationshipType.CONCURRENTWITHSTART;
if ("concurrent".equals(codeString))
return ActionRelationshipType.CONCURRENT;
if ("concurrent-with-end".equals(codeString))
return ActionRelationshipType.CONCURRENTWITHEND;
if ("after-start".equals(codeString))
return ActionRelationshipType.AFTERSTART;
if ("after".equals(codeString))
return ActionRelationshipType.AFTER;
if ("after-end".equals(codeString))
return ActionRelationshipType.AFTEREND;
throw new IllegalArgumentException("Unknown ActionRelationshipType code '"+codeString+"'");
}
public Enumeration fromType(PrimitiveType> code) throws FHIRException {
if (code == null)
return null;
if (code.isEmpty())
return new Enumeration(this);
String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString))
return null;
if ("before-start".equals(codeString))
return new Enumeration(this, ActionRelationshipType.BEFORESTART);
if ("before".equals(codeString))
return new Enumeration(this, ActionRelationshipType.BEFORE);
if ("before-end".equals(codeString))
return new Enumeration(this, ActionRelationshipType.BEFOREEND);
if ("concurrent-with-start".equals(codeString))
return new Enumeration(this, ActionRelationshipType.CONCURRENTWITHSTART);
if ("concurrent".equals(codeString))
return new Enumeration(this, ActionRelationshipType.CONCURRENT);
if ("concurrent-with-end".equals(codeString))
return new Enumeration(this, ActionRelationshipType.CONCURRENTWITHEND);
if ("after-start".equals(codeString))
return new Enumeration(this, ActionRelationshipType.AFTERSTART);
if ("after".equals(codeString))
return new Enumeration(this, ActionRelationshipType.AFTER);
if ("after-end".equals(codeString))
return new Enumeration(this, ActionRelationshipType.AFTEREND);
throw new FHIRException("Unknown ActionRelationshipType code '"+codeString+"'");
}
public String toCode(ActionRelationshipType code) {
if (code == ActionRelationshipType.NULL)
return null;
if (code == ActionRelationshipType.BEFORESTART)
return "before-start";
if (code == ActionRelationshipType.BEFORE)
return "before";
if (code == ActionRelationshipType.BEFOREEND)
return "before-end";
if (code == ActionRelationshipType.CONCURRENTWITHSTART)
return "concurrent-with-start";
if (code == ActionRelationshipType.CONCURRENT)
return "concurrent";
if (code == ActionRelationshipType.CONCURRENTWITHEND)
return "concurrent-with-end";
if (code == ActionRelationshipType.AFTERSTART)
return "after-start";
if (code == ActionRelationshipType.AFTER)
return "after";
if (code == ActionRelationshipType.AFTEREND)
return "after-end";
return "?";
}
public String toSystem(ActionRelationshipType code) {
return code.getSystem();
}
}
public enum ActionParticipantType {
/**
* The participant is the patient under evaluation
*/
PATIENT,
/**
* The participant is a practitioner involved in the patient's care
*/
PRACTITIONER,
/**
* The participant is a person related to the patient
*/
RELATEDPERSON,
/**
* added to help the parsers with the generic types
*/
NULL;
public static ActionParticipantType fromCode(String codeString) throws FHIRException {
if (codeString == null || "".equals(codeString))
return null;
if ("patient".equals(codeString))
return PATIENT;
if ("practitioner".equals(codeString))
return PRACTITIONER;
if ("related-person".equals(codeString))
return RELATEDPERSON;
if (Configuration.isAcceptInvalidEnums())
return null;
else
throw new FHIRException("Unknown ActionParticipantType code '"+codeString+"'");
}
public String toCode() {
switch (this) {
case PATIENT: return "patient";
case PRACTITIONER: return "practitioner";
case RELATEDPERSON: return "related-person";
case NULL: return null;
default: return "?";
}
}
public String getSystem() {
switch (this) {
case PATIENT: return "http://hl7.org/fhir/action-participant-type";
case PRACTITIONER: return "http://hl7.org/fhir/action-participant-type";
case RELATEDPERSON: return "http://hl7.org/fhir/action-participant-type";
case NULL: return null;
default: return "?";
}
}
public String getDefinition() {
switch (this) {
case PATIENT: return "The participant is the patient under evaluation";
case PRACTITIONER: return "The participant is a practitioner involved in the patient's care";
case RELATEDPERSON: return "The participant is a person related to the patient";
case NULL: return null;
default: return "?";
}
}
public String getDisplay() {
switch (this) {
case PATIENT: return "Patient";
case PRACTITIONER: return "Practitioner";
case RELATEDPERSON: return "Related Person";
case NULL: return null;
default: return "?";
}
}
}
public static class ActionParticipantTypeEnumFactory implements EnumFactory {
public ActionParticipantType fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString))
if (codeString == null || "".equals(codeString))
return null;
if ("patient".equals(codeString))
return ActionParticipantType.PATIENT;
if ("practitioner".equals(codeString))
return ActionParticipantType.PRACTITIONER;
if ("related-person".equals(codeString))
return ActionParticipantType.RELATEDPERSON;
throw new IllegalArgumentException("Unknown ActionParticipantType code '"+codeString+"'");
}
public Enumeration fromType(PrimitiveType> code) throws FHIRException {
if (code == null)
return null;
if (code.isEmpty())
return new Enumeration(this);
String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString))
return null;
if ("patient".equals(codeString))
return new Enumeration(this, ActionParticipantType.PATIENT);
if ("practitioner".equals(codeString))
return new Enumeration(this, ActionParticipantType.PRACTITIONER);
if ("related-person".equals(codeString))
return new Enumeration(this, ActionParticipantType.RELATEDPERSON);
throw new FHIRException("Unknown ActionParticipantType code '"+codeString+"'");
}
public String toCode(ActionParticipantType code) {
if (code == ActionParticipantType.NULL)
return null;
if (code == ActionParticipantType.PATIENT)
return "patient";
if (code == ActionParticipantType.PRACTITIONER)
return "practitioner";
if (code == ActionParticipantType.RELATEDPERSON)
return "related-person";
return "?";
}
public String toSystem(ActionParticipantType code) {
return code.getSystem();
}
}
public enum ActionGroupingBehavior {
/**
* Any group marked with this behavior should be displayed as a visual group to the end user
*/
VISUALGROUP,
/**
* A group with this behavior logically groups its sub-elements, and may be shown as a visual group to the end user, but it is not required to do so
*/
LOGICALGROUP,
/**
* A group of related alternative actions is a sentence group if the target referenced by the action is the same in all the actions and each action simply constitutes a different variation on how to specify the details for the target. For example, two actions that could be in a SentenceGroup are "aspirin, 500 mg, 2 times per day" and "aspirin, 300 mg, 3 times per day". In both cases, aspirin is the target referenced by the action, and the two actions represent different options for how aspirin might be ordered for the patient. Note that a SentenceGroup would almost always have an associated selection behavior of "AtMostOne", unless it's a required action, in which case, it would be "ExactlyOne"
*/
SENTENCEGROUP,
/**
* added to help the parsers with the generic types
*/
NULL;
public static ActionGroupingBehavior fromCode(String codeString) throws FHIRException {
if (codeString == null || "".equals(codeString))
return null;
if ("visual-group".equals(codeString))
return VISUALGROUP;
if ("logical-group".equals(codeString))
return LOGICALGROUP;
if ("sentence-group".equals(codeString))
return SENTENCEGROUP;
if (Configuration.isAcceptInvalidEnums())
return null;
else
throw new FHIRException("Unknown ActionGroupingBehavior code '"+codeString+"'");
}
public String toCode() {
switch (this) {
case VISUALGROUP: return "visual-group";
case LOGICALGROUP: return "logical-group";
case SENTENCEGROUP: return "sentence-group";
case NULL: return null;
default: return "?";
}
}
public String getSystem() {
switch (this) {
case VISUALGROUP: return "http://hl7.org/fhir/action-grouping-behavior";
case LOGICALGROUP: return "http://hl7.org/fhir/action-grouping-behavior";
case SENTENCEGROUP: return "http://hl7.org/fhir/action-grouping-behavior";
case NULL: return null;
default: return "?";
}
}
public String getDefinition() {
switch (this) {
case VISUALGROUP: return "Any group marked with this behavior should be displayed as a visual group to the end user";
case LOGICALGROUP: return "A group with this behavior logically groups its sub-elements, and may be shown as a visual group to the end user, but it is not required to do so";
case SENTENCEGROUP: return "A group of related alternative actions is a sentence group if the target referenced by the action is the same in all the actions and each action simply constitutes a different variation on how to specify the details for the target. For example, two actions that could be in a SentenceGroup are \"aspirin, 500 mg, 2 times per day\" and \"aspirin, 300 mg, 3 times per day\". In both cases, aspirin is the target referenced by the action, and the two actions represent different options for how aspirin might be ordered for the patient. Note that a SentenceGroup would almost always have an associated selection behavior of \"AtMostOne\", unless it's a required action, in which case, it would be \"ExactlyOne\"";
case NULL: return null;
default: return "?";
}
}
public String getDisplay() {
switch (this) {
case VISUALGROUP: return "Visual Group";
case LOGICALGROUP: return "Logical Group";
case SENTENCEGROUP: return "Sentence Group";
case NULL: return null;
default: return "?";
}
}
}
public static class ActionGroupingBehaviorEnumFactory implements EnumFactory {
public ActionGroupingBehavior fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString))
if (codeString == null || "".equals(codeString))
return null;
if ("visual-group".equals(codeString))
return ActionGroupingBehavior.VISUALGROUP;
if ("logical-group".equals(codeString))
return ActionGroupingBehavior.LOGICALGROUP;
if ("sentence-group".equals(codeString))
return ActionGroupingBehavior.SENTENCEGROUP;
throw new IllegalArgumentException("Unknown ActionGroupingBehavior code '"+codeString+"'");
}
public Enumeration fromType(PrimitiveType> code) throws FHIRException {
if (code == null)
return null;
if (code.isEmpty())
return new Enumeration(this);
String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString))
return null;
if ("visual-group".equals(codeString))
return new Enumeration(this, ActionGroupingBehavior.VISUALGROUP);
if ("logical-group".equals(codeString))
return new Enumeration(this, ActionGroupingBehavior.LOGICALGROUP);
if ("sentence-group".equals(codeString))
return new Enumeration(this, ActionGroupingBehavior.SENTENCEGROUP);
throw new FHIRException("Unknown ActionGroupingBehavior code '"+codeString+"'");
}
public String toCode(ActionGroupingBehavior code) {
if (code == ActionGroupingBehavior.NULL)
return null;
if (code == ActionGroupingBehavior.VISUALGROUP)
return "visual-group";
if (code == ActionGroupingBehavior.LOGICALGROUP)
return "logical-group";
if (code == ActionGroupingBehavior.SENTENCEGROUP)
return "sentence-group";
return "?";
}
public String toSystem(ActionGroupingBehavior code) {
return code.getSystem();
}
}
public enum ActionSelectionBehavior {
/**
* Any number of the actions in the group may be chosen, from zero to all
*/
ANY,
/**
* All the actions in the group must be selected as a single unit
*/
ALL,
/**
* All the actions in the group are meant to be chosen as a single unit: either all must be selected by the end user, or none may be selected
*/
ALLORNONE,
/**
* The end user must choose one and only one of the selectable actions in the group. The user may not choose none of the actions in the group
*/
EXACTLYONE,
/**
* The end user may choose zero or at most one of the actions in the group
*/
ATMOSTONE,
/**
* The end user must choose a minimum of one, and as many additional as desired
*/
ONEORMORE,
/**
* added to help the parsers with the generic types
*/
NULL;
public static ActionSelectionBehavior fromCode(String codeString) throws FHIRException {
if (codeString == null || "".equals(codeString))
return null;
if ("any".equals(codeString))
return ANY;
if ("all".equals(codeString))
return ALL;
if ("all-or-none".equals(codeString))
return ALLORNONE;
if ("exactly-one".equals(codeString))
return EXACTLYONE;
if ("at-most-one".equals(codeString))
return ATMOSTONE;
if ("one-or-more".equals(codeString))
return ONEORMORE;
if (Configuration.isAcceptInvalidEnums())
return null;
else
throw new FHIRException("Unknown ActionSelectionBehavior code '"+codeString+"'");
}
public String toCode() {
switch (this) {
case ANY: return "any";
case ALL: return "all";
case ALLORNONE: return "all-or-none";
case EXACTLYONE: return "exactly-one";
case ATMOSTONE: return "at-most-one";
case ONEORMORE: return "one-or-more";
case NULL: return null;
default: return "?";
}
}
public String getSystem() {
switch (this) {
case ANY: return "http://hl7.org/fhir/action-selection-behavior";
case ALL: return "http://hl7.org/fhir/action-selection-behavior";
case ALLORNONE: return "http://hl7.org/fhir/action-selection-behavior";
case EXACTLYONE: return "http://hl7.org/fhir/action-selection-behavior";
case ATMOSTONE: return "http://hl7.org/fhir/action-selection-behavior";
case ONEORMORE: return "http://hl7.org/fhir/action-selection-behavior";
case NULL: return null;
default: return "?";
}
}
public String getDefinition() {
switch (this) {
case ANY: return "Any number of the actions in the group may be chosen, from zero to all";
case ALL: return "All the actions in the group must be selected as a single unit";
case ALLORNONE: return "All the actions in the group are meant to be chosen as a single unit: either all must be selected by the end user, or none may be selected";
case EXACTLYONE: return "The end user must choose one and only one of the selectable actions in the group. The user may not choose none of the actions in the group";
case ATMOSTONE: return "The end user may choose zero or at most one of the actions in the group";
case ONEORMORE: return "The end user must choose a minimum of one, and as many additional as desired";
case NULL: return null;
default: return "?";
}
}
public String getDisplay() {
switch (this) {
case ANY: return "Any";
case ALL: return "All";
case ALLORNONE: return "All Or None";
case EXACTLYONE: return "Exactly One";
case ATMOSTONE: return "At Most One";
case ONEORMORE: return "One Or More";
case NULL: return null;
default: return "?";
}
}
}
public static class ActionSelectionBehaviorEnumFactory implements EnumFactory {
public ActionSelectionBehavior fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString))
if (codeString == null || "".equals(codeString))
return null;
if ("any".equals(codeString))
return ActionSelectionBehavior.ANY;
if ("all".equals(codeString))
return ActionSelectionBehavior.ALL;
if ("all-or-none".equals(codeString))
return ActionSelectionBehavior.ALLORNONE;
if ("exactly-one".equals(codeString))
return ActionSelectionBehavior.EXACTLYONE;
if ("at-most-one".equals(codeString))
return ActionSelectionBehavior.ATMOSTONE;
if ("one-or-more".equals(codeString))
return ActionSelectionBehavior.ONEORMORE;
throw new IllegalArgumentException("Unknown ActionSelectionBehavior code '"+codeString+"'");
}
public Enumeration fromType(PrimitiveType> code) throws FHIRException {
if (code == null)
return null;
if (code.isEmpty())
return new Enumeration(this);
String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString))
return null;
if ("any".equals(codeString))
return new Enumeration(this, ActionSelectionBehavior.ANY);
if ("all".equals(codeString))
return new Enumeration(this, ActionSelectionBehavior.ALL);
if ("all-or-none".equals(codeString))
return new Enumeration(this, ActionSelectionBehavior.ALLORNONE);
if ("exactly-one".equals(codeString))
return new Enumeration(this, ActionSelectionBehavior.EXACTLYONE);
if ("at-most-one".equals(codeString))
return new Enumeration(this, ActionSelectionBehavior.ATMOSTONE);
if ("one-or-more".equals(codeString))
return new Enumeration(this, ActionSelectionBehavior.ONEORMORE);
throw new FHIRException("Unknown ActionSelectionBehavior code '"+codeString+"'");
}
public String toCode(ActionSelectionBehavior code) {
if (code == ActionSelectionBehavior.NULL)
return null;
if (code == ActionSelectionBehavior.ANY)
return "any";
if (code == ActionSelectionBehavior.ALL)
return "all";
if (code == ActionSelectionBehavior.ALLORNONE)
return "all-or-none";
if (code == ActionSelectionBehavior.EXACTLYONE)
return "exactly-one";
if (code == ActionSelectionBehavior.ATMOSTONE)
return "at-most-one";
if (code == ActionSelectionBehavior.ONEORMORE)
return "one-or-more";
return "?";
}
public String toSystem(ActionSelectionBehavior code) {
return code.getSystem();
}
}
public enum ActionRequiredBehavior {
/**
* An action with this behavior must be included in the actions processed by the end user; the end user may not choose not to include this action
*/
MUST,
/**
* An action with this behavior may be included in the set of actions processed by the end user
*/
COULD,
/**
* An action with this behavior must be included in the set of actions processed by the end user, unless the end user provides documentation as to why the action was not included
*/
MUSTUNLESSDOCUMENTED,
/**
* added to help the parsers with the generic types
*/
NULL;
public static ActionRequiredBehavior fromCode(String codeString) throws FHIRException {
if (codeString == null || "".equals(codeString))
return null;
if ("must".equals(codeString))
return MUST;
if ("could".equals(codeString))
return COULD;
if ("must-unless-documented".equals(codeString))
return MUSTUNLESSDOCUMENTED;
if (Configuration.isAcceptInvalidEnums())
return null;
else
throw new FHIRException("Unknown ActionRequiredBehavior code '"+codeString+"'");
}
public String toCode() {
switch (this) {
case MUST: return "must";
case COULD: return "could";
case MUSTUNLESSDOCUMENTED: return "must-unless-documented";
case NULL: return null;
default: return "?";
}
}
public String getSystem() {
switch (this) {
case MUST: return "http://hl7.org/fhir/action-required-behavior";
case COULD: return "http://hl7.org/fhir/action-required-behavior";
case MUSTUNLESSDOCUMENTED: return "http://hl7.org/fhir/action-required-behavior";
case NULL: return null;
default: return "?";
}
}
public String getDefinition() {
switch (this) {
case MUST: return "An action with this behavior must be included in the actions processed by the end user; the end user may not choose not to include this action";
case COULD: return "An action with this behavior may be included in the set of actions processed by the end user";
case MUSTUNLESSDOCUMENTED: return "An action with this behavior must be included in the set of actions processed by the end user, unless the end user provides documentation as to why the action was not included";
case NULL: return null;
default: return "?";
}
}
public String getDisplay() {
switch (this) {
case MUST: return "Must";
case COULD: return "Could";
case MUSTUNLESSDOCUMENTED: return "Must Unless Documented";
case NULL: return null;
default: return "?";
}
}
}
public static class ActionRequiredBehaviorEnumFactory implements EnumFactory {
public ActionRequiredBehavior fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString))
if (codeString == null || "".equals(codeString))
return null;
if ("must".equals(codeString))
return ActionRequiredBehavior.MUST;
if ("could".equals(codeString))
return ActionRequiredBehavior.COULD;
if ("must-unless-documented".equals(codeString))
return ActionRequiredBehavior.MUSTUNLESSDOCUMENTED;
throw new IllegalArgumentException("Unknown ActionRequiredBehavior code '"+codeString+"'");
}
public Enumeration fromType(PrimitiveType> code) throws FHIRException {
if (code == null)
return null;
if (code.isEmpty())
return new Enumeration(this);
String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString))
return null;
if ("must".equals(codeString))
return new Enumeration(this, ActionRequiredBehavior.MUST);
if ("could".equals(codeString))
return new Enumeration(this, ActionRequiredBehavior.COULD);
if ("must-unless-documented".equals(codeString))
return new Enumeration(this, ActionRequiredBehavior.MUSTUNLESSDOCUMENTED);
throw new FHIRException("Unknown ActionRequiredBehavior code '"+codeString+"'");
}
public String toCode(ActionRequiredBehavior code) {
if (code == ActionRequiredBehavior.NULL)
return null;
if (code == ActionRequiredBehavior.MUST)
return "must";
if (code == ActionRequiredBehavior.COULD)
return "could";
if (code == ActionRequiredBehavior.MUSTUNLESSDOCUMENTED)
return "must-unless-documented";
return "?";
}
public String toSystem(ActionRequiredBehavior code) {
return code.getSystem();
}
}
public enum ActionPrecheckBehavior {
/**
* An action with this behavior is one of the most frequent action that is, or should be, included by an end user, for the particular context in which the action occurs. The system displaying the action to the end user should consider "pre-checking" such an action as a convenience for the user
*/
YES,
/**
* An action with this behavior is one of the less frequent actions included by the end user, for the particular context in which the action occurs. The system displaying the actions to the end user would typically not "pre-check" such an action
*/
NO,
/**
* added to help the parsers with the generic types
*/
NULL;
public static ActionPrecheckBehavior fromCode(String codeString) throws FHIRException {
if (codeString == null || "".equals(codeString))
return null;
if ("yes".equals(codeString))
return YES;
if ("no".equals(codeString))
return NO;
if (Configuration.isAcceptInvalidEnums())
return null;
else
throw new FHIRException("Unknown ActionPrecheckBehavior code '"+codeString+"'");
}
public String toCode() {
switch (this) {
case YES: return "yes";
case NO: return "no";
case NULL: return null;
default: return "?";
}
}
public String getSystem() {
switch (this) {
case YES: return "http://hl7.org/fhir/action-precheck-behavior";
case NO: return "http://hl7.org/fhir/action-precheck-behavior";
case NULL: return null;
default: return "?";
}
}
public String getDefinition() {
switch (this) {
case YES: return "An action with this behavior is one of the most frequent action that is, or should be, included by an end user, for the particular context in which the action occurs. The system displaying the action to the end user should consider \"pre-checking\" such an action as a convenience for the user";
case NO: return "An action with this behavior is one of the less frequent actions included by the end user, for the particular context in which the action occurs. The system displaying the actions to the end user would typically not \"pre-check\" such an action";
case NULL: return null;
default: return "?";
}
}
public String getDisplay() {
switch (this) {
case YES: return "Yes";
case NO: return "No";
case NULL: return null;
default: return "?";
}
}
}
public static class ActionPrecheckBehaviorEnumFactory implements EnumFactory {
public ActionPrecheckBehavior fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString))
if (codeString == null || "".equals(codeString))
return null;
if ("yes".equals(codeString))
return ActionPrecheckBehavior.YES;
if ("no".equals(codeString))
return ActionPrecheckBehavior.NO;
throw new IllegalArgumentException("Unknown ActionPrecheckBehavior code '"+codeString+"'");
}
public Enumeration fromType(PrimitiveType> code) throws FHIRException {
if (code == null)
return null;
if (code.isEmpty())
return new Enumeration(this);
String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString))
return null;
if ("yes".equals(codeString))
return new Enumeration(this, ActionPrecheckBehavior.YES);
if ("no".equals(codeString))
return new Enumeration(this, ActionPrecheckBehavior.NO);
throw new FHIRException("Unknown ActionPrecheckBehavior code '"+codeString+"'");
}
public String toCode(ActionPrecheckBehavior code) {
if (code == ActionPrecheckBehavior.NULL)
return null;
if (code == ActionPrecheckBehavior.YES)
return "yes";
if (code == ActionPrecheckBehavior.NO)
return "no";
return "?";
}
public String toSystem(ActionPrecheckBehavior code) {
return code.getSystem();
}
}
public enum ActionCardinalityBehavior {
/**
* The action may only be selected one time
*/
SINGLE,
/**
* The action may be selected multiple times
*/
MULTIPLE,
/**
* added to help the parsers with the generic types
*/
NULL;
public static ActionCardinalityBehavior fromCode(String codeString) throws FHIRException {
if (codeString == null || "".equals(codeString))
return null;
if ("single".equals(codeString))
return SINGLE;
if ("multiple".equals(codeString))
return MULTIPLE;
if (Configuration.isAcceptInvalidEnums())
return null;
else
throw new FHIRException("Unknown ActionCardinalityBehavior code '"+codeString+"'");
}
public String toCode() {
switch (this) {
case SINGLE: return "single";
case MULTIPLE: return "multiple";
case NULL: return null;
default: return "?";
}
}
public String getSystem() {
switch (this) {
case SINGLE: return "http://hl7.org/fhir/action-cardinality-behavior";
case MULTIPLE: return "http://hl7.org/fhir/action-cardinality-behavior";
case NULL: return null;
default: return "?";
}
}
public String getDefinition() {
switch (this) {
case SINGLE: return "The action may only be selected one time";
case MULTIPLE: return "The action may be selected multiple times";
case NULL: return null;
default: return "?";
}
}
public String getDisplay() {
switch (this) {
case SINGLE: return "Single";
case MULTIPLE: return "Multiple";
case NULL: return null;
default: return "?";
}
}
}
public static class ActionCardinalityBehaviorEnumFactory implements EnumFactory {
public ActionCardinalityBehavior fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString))
if (codeString == null || "".equals(codeString))
return null;
if ("single".equals(codeString))
return ActionCardinalityBehavior.SINGLE;
if ("multiple".equals(codeString))
return ActionCardinalityBehavior.MULTIPLE;
throw new IllegalArgumentException("Unknown ActionCardinalityBehavior code '"+codeString+"'");
}
public Enumeration fromType(PrimitiveType> code) throws FHIRException {
if (code == null)
return null;
if (code.isEmpty())
return new Enumeration(this);
String codeString = code.asStringValue();
if (codeString == null || "".equals(codeString))
return null;
if ("single".equals(codeString))
return new Enumeration(this, ActionCardinalityBehavior.SINGLE);
if ("multiple".equals(codeString))
return new Enumeration(this, ActionCardinalityBehavior.MULTIPLE);
throw new FHIRException("Unknown ActionCardinalityBehavior code '"+codeString+"'");
}
public String toCode(ActionCardinalityBehavior code) {
if (code == ActionCardinalityBehavior.NULL)
return null;
if (code == ActionCardinalityBehavior.SINGLE)
return "single";
if (code == ActionCardinalityBehavior.MULTIPLE)
return "multiple";
return "?";
}
public String toSystem(ActionCardinalityBehavior code) {
return code.getSystem();
}
}
@Block()
public static class PlanDefinitionGoalComponent extends BackboneElement implements IBaseBackboneElement {
/**
* Indicates a category the goal falls within.
*/
@Child(name = "category", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="E.g. Treatment, dietary, behavioral, etc", formalDefinition="Indicates a category the goal falls within." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/goal-category")
protected CodeableConcept category;
/**
* Human-readable and/or coded description of a specific desired objective of care, such as "control blood pressure" or "negotiate an obstacle course" or "dance with child at wedding".
*/
@Child(name = "description", type = {CodeableConcept.class}, order=2, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="Code or text describing the goal", formalDefinition="Human-readable and/or coded description of a specific desired objective of care, such as \"control blood pressure\" or \"negotiate an obstacle course\" or \"dance with child at wedding\"." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/clinical-findings")
protected CodeableConcept description;
/**
* Identifies the expected level of importance associated with reaching/sustaining the defined goal.
*/
@Child(name = "priority", type = {CodeableConcept.class}, order=3, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="high-priority | medium-priority | low-priority", formalDefinition="Identifies the expected level of importance associated with reaching/sustaining the defined goal." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/goal-priority")
protected CodeableConcept priority;
/**
* The event after which the goal should begin being pursued.
*/
@Child(name = "start", type = {CodeableConcept.class}, order=4, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="When goal pursuit begins", formalDefinition="The event after which the goal should begin being pursued." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/goal-start-event")
protected CodeableConcept start;
/**
* Identifies problems, conditions, issues, or concerns the goal is intended to address.
*/
@Child(name = "addresses", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="What does the goal address", formalDefinition="Identifies problems, conditions, issues, or concerns the goal is intended to address." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/condition-code")
protected List addresses;
/**
* Didactic or other informational resources associated with the goal that provide further supporting information about the goal. Information resources can include inline text commentary and links to web resources.
*/
@Child(name = "documentation", type = {RelatedArtifact.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Supporting documentation for the goal", formalDefinition="Didactic or other informational resources associated with the goal that provide further supporting information about the goal. Information resources can include inline text commentary and links to web resources." )
protected List documentation;
/**
* Indicates what should be done and within what timeframe.
*/
@Child(name = "target", type = {}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Target outcome for the goal", formalDefinition="Indicates what should be done and within what timeframe." )
protected List target;
private static final long serialVersionUID = -795308926L;
/**
* Constructor
*/
public PlanDefinitionGoalComponent() {
super();
}
/**
* Constructor
*/
public PlanDefinitionGoalComponent(CodeableConcept description) {
super();
this.description = description;
}
/**
* @return {@link #category} (Indicates a category the goal falls within.)
*/
public CodeableConcept getCategory() {
if (this.category == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionGoalComponent.category");
else if (Configuration.doAutoCreate())
this.category = new CodeableConcept(); // cc
return this.category;
}
public boolean hasCategory() {
return this.category != null && !this.category.isEmpty();
}
/**
* @param value {@link #category} (Indicates a category the goal falls within.)
*/
public PlanDefinitionGoalComponent setCategory(CodeableConcept value) {
this.category = value;
return this;
}
/**
* @return {@link #description} (Human-readable and/or coded description of a specific desired objective of care, such as "control blood pressure" or "negotiate an obstacle course" or "dance with child at wedding".)
*/
public CodeableConcept getDescription() {
if (this.description == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionGoalComponent.description");
else if (Configuration.doAutoCreate())
this.description = new CodeableConcept(); // cc
return this.description;
}
public boolean hasDescription() {
return this.description != null && !this.description.isEmpty();
}
/**
* @param value {@link #description} (Human-readable and/or coded description of a specific desired objective of care, such as "control blood pressure" or "negotiate an obstacle course" or "dance with child at wedding".)
*/
public PlanDefinitionGoalComponent setDescription(CodeableConcept value) {
this.description = value;
return this;
}
/**
* @return {@link #priority} (Identifies the expected level of importance associated with reaching/sustaining the defined goal.)
*/
public CodeableConcept getPriority() {
if (this.priority == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionGoalComponent.priority");
else if (Configuration.doAutoCreate())
this.priority = new CodeableConcept(); // cc
return this.priority;
}
public boolean hasPriority() {
return this.priority != null && !this.priority.isEmpty();
}
/**
* @param value {@link #priority} (Identifies the expected level of importance associated with reaching/sustaining the defined goal.)
*/
public PlanDefinitionGoalComponent setPriority(CodeableConcept value) {
this.priority = value;
return this;
}
/**
* @return {@link #start} (The event after which the goal should begin being pursued.)
*/
public CodeableConcept getStart() {
if (this.start == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionGoalComponent.start");
else if (Configuration.doAutoCreate())
this.start = new CodeableConcept(); // cc
return this.start;
}
public boolean hasStart() {
return this.start != null && !this.start.isEmpty();
}
/**
* @param value {@link #start} (The event after which the goal should begin being pursued.)
*/
public PlanDefinitionGoalComponent setStart(CodeableConcept value) {
this.start = value;
return this;
}
/**
* @return {@link #addresses} (Identifies problems, conditions, issues, or concerns the goal is intended to address.)
*/
public List getAddresses() {
if (this.addresses == null)
this.addresses = new ArrayList();
return this.addresses;
}
/**
* @return Returns a reference to this
for easy method chaining
*/
public PlanDefinitionGoalComponent setAddresses(List theAddresses) {
this.addresses = theAddresses;
return this;
}
public boolean hasAddresses() {
if (this.addresses == null)
return false;
for (CodeableConcept item : this.addresses)
if (!item.isEmpty())
return true;
return false;
}
public CodeableConcept addAddresses() { //3
CodeableConcept t = new CodeableConcept();
if (this.addresses == null)
this.addresses = new ArrayList();
this.addresses.add(t);
return t;
}
public PlanDefinitionGoalComponent addAddresses(CodeableConcept t) { //3
if (t == null)
return this;
if (this.addresses == null)
this.addresses = new ArrayList();
this.addresses.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #addresses}, creating it if it does not already exist
*/
public CodeableConcept getAddressesFirstRep() {
if (getAddresses().isEmpty()) {
addAddresses();
}
return getAddresses().get(0);
}
/**
* @return {@link #documentation} (Didactic or other informational resources associated with the goal that provide further supporting information about the goal. Information resources can include inline text commentary and links to web resources.)
*/
public List getDocumentation() {
if (this.documentation == null)
this.documentation = new ArrayList();
return this.documentation;
}
/**
* @return Returns a reference to this
for easy method chaining
*/
public PlanDefinitionGoalComponent setDocumentation(List theDocumentation) {
this.documentation = theDocumentation;
return this;
}
public boolean hasDocumentation() {
if (this.documentation == null)
return false;
for (RelatedArtifact item : this.documentation)
if (!item.isEmpty())
return true;
return false;
}
public RelatedArtifact addDocumentation() { //3
RelatedArtifact t = new RelatedArtifact();
if (this.documentation == null)
this.documentation = new ArrayList();
this.documentation.add(t);
return t;
}
public PlanDefinitionGoalComponent addDocumentation(RelatedArtifact t) { //3
if (t == null)
return this;
if (this.documentation == null)
this.documentation = new ArrayList();
this.documentation.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #documentation}, creating it if it does not already exist
*/
public RelatedArtifact getDocumentationFirstRep() {
if (getDocumentation().isEmpty()) {
addDocumentation();
}
return getDocumentation().get(0);
}
/**
* @return {@link #target} (Indicates what should be done and within what timeframe.)
*/
public List getTarget() {
if (this.target == null)
this.target = new ArrayList();
return this.target;
}
/**
* @return Returns a reference to this
for easy method chaining
*/
public PlanDefinitionGoalComponent setTarget(List theTarget) {
this.target = theTarget;
return this;
}
public boolean hasTarget() {
if (this.target == null)
return false;
for (PlanDefinitionGoalTargetComponent item : this.target)
if (!item.isEmpty())
return true;
return false;
}
public PlanDefinitionGoalTargetComponent addTarget() { //3
PlanDefinitionGoalTargetComponent t = new PlanDefinitionGoalTargetComponent();
if (this.target == null)
this.target = new ArrayList();
this.target.add(t);
return t;
}
public PlanDefinitionGoalComponent addTarget(PlanDefinitionGoalTargetComponent t) { //3
if (t == null)
return this;
if (this.target == null)
this.target = new ArrayList();
this.target.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #target}, creating it if it does not already exist
*/
public PlanDefinitionGoalTargetComponent getTargetFirstRep() {
if (getTarget().isEmpty()) {
addTarget();
}
return getTarget().get(0);
}
protected void listChildren(List children) {
super.listChildren(children);
children.add(new Property("category", "CodeableConcept", "Indicates a category the goal falls within.", 0, 1, category));
children.add(new Property("description", "CodeableConcept", "Human-readable and/or coded description of a specific desired objective of care, such as \"control blood pressure\" or \"negotiate an obstacle course\" or \"dance with child at wedding\".", 0, 1, description));
children.add(new Property("priority", "CodeableConcept", "Identifies the expected level of importance associated with reaching/sustaining the defined goal.", 0, 1, priority));
children.add(new Property("start", "CodeableConcept", "The event after which the goal should begin being pursued.", 0, 1, start));
children.add(new Property("addresses", "CodeableConcept", "Identifies problems, conditions, issues, or concerns the goal is intended to address.", 0, java.lang.Integer.MAX_VALUE, addresses));
children.add(new Property("documentation", "RelatedArtifact", "Didactic or other informational resources associated with the goal that provide further supporting information about the goal. Information resources can include inline text commentary and links to web resources.", 0, java.lang.Integer.MAX_VALUE, documentation));
children.add(new Property("target", "", "Indicates what should be done and within what timeframe.", 0, java.lang.Integer.MAX_VALUE, target));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case 50511102: /*category*/ return new Property("category", "CodeableConcept", "Indicates a category the goal falls within.", 0, 1, category);
case -1724546052: /*description*/ return new Property("description", "CodeableConcept", "Human-readable and/or coded description of a specific desired objective of care, such as \"control blood pressure\" or \"negotiate an obstacle course\" or \"dance with child at wedding\".", 0, 1, description);
case -1165461084: /*priority*/ return new Property("priority", "CodeableConcept", "Identifies the expected level of importance associated with reaching/sustaining the defined goal.", 0, 1, priority);
case 109757538: /*start*/ return new Property("start", "CodeableConcept", "The event after which the goal should begin being pursued.", 0, 1, start);
case 874544034: /*addresses*/ return new Property("addresses", "CodeableConcept", "Identifies problems, conditions, issues, or concerns the goal is intended to address.", 0, java.lang.Integer.MAX_VALUE, addresses);
case 1587405498: /*documentation*/ return new Property("documentation", "RelatedArtifact", "Didactic or other informational resources associated with the goal that provide further supporting information about the goal. Information resources can include inline text commentary and links to web resources.", 0, java.lang.Integer.MAX_VALUE, documentation);
case -880905839: /*target*/ return new Property("target", "", "Indicates what should be done and within what timeframe.", 0, java.lang.Integer.MAX_VALUE, target);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 50511102: /*category*/ return this.category == null ? new Base[0] : new Base[] {this.category}; // CodeableConcept
case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // CodeableConcept
case -1165461084: /*priority*/ return this.priority == null ? new Base[0] : new Base[] {this.priority}; // CodeableConcept
case 109757538: /*start*/ return this.start == null ? new Base[0] : new Base[] {this.start}; // CodeableConcept
case 874544034: /*addresses*/ return this.addresses == null ? new Base[0] : this.addresses.toArray(new Base[this.addresses.size()]); // CodeableConcept
case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : this.documentation.toArray(new Base[this.documentation.size()]); // RelatedArtifact
case -880905839: /*target*/ return this.target == null ? new Base[0] : this.target.toArray(new Base[this.target.size()]); // PlanDefinitionGoalTargetComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 50511102: // category
this.category = castToCodeableConcept(value); // CodeableConcept
return value;
case -1724546052: // description
this.description = castToCodeableConcept(value); // CodeableConcept
return value;
case -1165461084: // priority
this.priority = castToCodeableConcept(value); // CodeableConcept
return value;
case 109757538: // start
this.start = castToCodeableConcept(value); // CodeableConcept
return value;
case 874544034: // addresses
this.getAddresses().add(castToCodeableConcept(value)); // CodeableConcept
return value;
case 1587405498: // documentation
this.getDocumentation().add(castToRelatedArtifact(value)); // RelatedArtifact
return value;
case -880905839: // target
this.getTarget().add((PlanDefinitionGoalTargetComponent) value); // PlanDefinitionGoalTargetComponent
return value;
default: return super.setProperty(hash, name, value);
}
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("category")) {
this.category = castToCodeableConcept(value); // CodeableConcept
} else if (name.equals("description")) {
this.description = castToCodeableConcept(value); // CodeableConcept
} else if (name.equals("priority")) {
this.priority = castToCodeableConcept(value); // CodeableConcept
} else if (name.equals("start")) {
this.start = castToCodeableConcept(value); // CodeableConcept
} else if (name.equals("addresses")) {
this.getAddresses().add(castToCodeableConcept(value));
} else if (name.equals("documentation")) {
this.getDocumentation().add(castToRelatedArtifact(value));
} else if (name.equals("target")) {
this.getTarget().add((PlanDefinitionGoalTargetComponent) value);
} else
return super.setProperty(name, value);
return value;
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 50511102: return getCategory();
case -1724546052: return getDescription();
case -1165461084: return getPriority();
case 109757538: return getStart();
case 874544034: return addAddresses();
case 1587405498: return addDocumentation();
case -880905839: return addTarget();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 50511102: /*category*/ return new String[] {"CodeableConcept"};
case -1724546052: /*description*/ return new String[] {"CodeableConcept"};
case -1165461084: /*priority*/ return new String[] {"CodeableConcept"};
case 109757538: /*start*/ return new String[] {"CodeableConcept"};
case 874544034: /*addresses*/ return new String[] {"CodeableConcept"};
case 1587405498: /*documentation*/ return new String[] {"RelatedArtifact"};
case -880905839: /*target*/ return new String[] {};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("category")) {
this.category = new CodeableConcept();
return this.category;
}
else if (name.equals("description")) {
this.description = new CodeableConcept();
return this.description;
}
else if (name.equals("priority")) {
this.priority = new CodeableConcept();
return this.priority;
}
else if (name.equals("start")) {
this.start = new CodeableConcept();
return this.start;
}
else if (name.equals("addresses")) {
return addAddresses();
}
else if (name.equals("documentation")) {
return addDocumentation();
}
else if (name.equals("target")) {
return addTarget();
}
else
return super.addChild(name);
}
public PlanDefinitionGoalComponent copy() {
PlanDefinitionGoalComponent dst = new PlanDefinitionGoalComponent();
copyValues(dst);
dst.category = category == null ? null : category.copy();
dst.description = description == null ? null : description.copy();
dst.priority = priority == null ? null : priority.copy();
dst.start = start == null ? null : start.copy();
if (addresses != null) {
dst.addresses = new ArrayList();
for (CodeableConcept i : addresses)
dst.addresses.add(i.copy());
};
if (documentation != null) {
dst.documentation = new ArrayList();
for (RelatedArtifact i : documentation)
dst.documentation.add(i.copy());
};
if (target != null) {
dst.target = new ArrayList();
for (PlanDefinitionGoalTargetComponent i : target)
dst.target.add(i.copy());
};
return dst;
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof PlanDefinitionGoalComponent))
return false;
PlanDefinitionGoalComponent o = (PlanDefinitionGoalComponent) other_;
return compareDeep(category, o.category, true) && compareDeep(description, o.description, true)
&& compareDeep(priority, o.priority, true) && compareDeep(start, o.start, true) && compareDeep(addresses, o.addresses, true)
&& compareDeep(documentation, o.documentation, true) && compareDeep(target, o.target, true);
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof PlanDefinitionGoalComponent))
return false;
PlanDefinitionGoalComponent o = (PlanDefinitionGoalComponent) other_;
return true;
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(category, description, priority
, start, addresses, documentation, target);
}
public String fhirType() {
return "PlanDefinition.goal";
}
}
@Block()
public static class PlanDefinitionGoalTargetComponent extends BackboneElement implements IBaseBackboneElement {
/**
* The parameter whose value is to be tracked, e.g. body weigth, blood pressure, or hemoglobin A1c level.
*/
@Child(name = "measure", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="The parameter whose value is to be tracked", formalDefinition="The parameter whose value is to be tracked, e.g. body weigth, blood pressure, or hemoglobin A1c level." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/observation-codes")
protected CodeableConcept measure;
/**
* The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. Whan a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.
*/
@Child(name = "detail", type = {Quantity.class, Range.class, CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="The target value to be achieved", formalDefinition="The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. Whan a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value." )
protected Type detail;
/**
* Indicates the timeframe after the start of the goal in which the goal should be met.
*/
@Child(name = "due", type = {Duration.class}, order=3, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Reach goal within", formalDefinition="Indicates the timeframe after the start of the goal in which the goal should be met." )
protected Duration due;
private static final long serialVersionUID = -131874144L;
/**
* Constructor
*/
public PlanDefinitionGoalTargetComponent() {
super();
}
/**
* @return {@link #measure} (The parameter whose value is to be tracked, e.g. body weigth, blood pressure, or hemoglobin A1c level.)
*/
public CodeableConcept getMeasure() {
if (this.measure == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionGoalTargetComponent.measure");
else if (Configuration.doAutoCreate())
this.measure = new CodeableConcept(); // cc
return this.measure;
}
public boolean hasMeasure() {
return this.measure != null && !this.measure.isEmpty();
}
/**
* @param value {@link #measure} (The parameter whose value is to be tracked, e.g. body weigth, blood pressure, or hemoglobin A1c level.)
*/
public PlanDefinitionGoalTargetComponent setMeasure(CodeableConcept value) {
this.measure = value;
return this;
}
/**
* @return {@link #detail} (The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. Whan a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.)
*/
public Type getDetail() {
return this.detail;
}
/**
* @return {@link #detail} (The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. Whan a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.)
*/
public Quantity getDetailQuantity() throws FHIRException {
if (this.detail == null)
return null;
if (!(this.detail instanceof Quantity))
throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.detail.getClass().getName()+" was encountered");
return (Quantity) this.detail;
}
public boolean hasDetailQuantity() {
return this != null && this.detail instanceof Quantity;
}
/**
* @return {@link #detail} (The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. Whan a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.)
*/
public Range getDetailRange() throws FHIRException {
if (this.detail == null)
return null;
if (!(this.detail instanceof Range))
throw new FHIRException("Type mismatch: the type Range was expected, but "+this.detail.getClass().getName()+" was encountered");
return (Range) this.detail;
}
public boolean hasDetailRange() {
return this != null && this.detail instanceof Range;
}
/**
* @return {@link #detail} (The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. Whan a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.)
*/
public CodeableConcept getDetailCodeableConcept() throws FHIRException {
if (this.detail == null)
return null;
if (!(this.detail instanceof CodeableConcept))
throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.detail.getClass().getName()+" was encountered");
return (CodeableConcept) this.detail;
}
public boolean hasDetailCodeableConcept() {
return this != null && this.detail instanceof CodeableConcept;
}
public boolean hasDetail() {
return this.detail != null && !this.detail.isEmpty();
}
/**
* @param value {@link #detail} (The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. Whan a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.)
*/
public PlanDefinitionGoalTargetComponent setDetail(Type value) throws FHIRFormatError {
if (value != null && !(value instanceof Quantity || value instanceof Range || value instanceof CodeableConcept))
throw new FHIRFormatError("Not the right type for PlanDefinition.goal.target.detail[x]: "+value.fhirType());
this.detail = value;
return this;
}
/**
* @return {@link #due} (Indicates the timeframe after the start of the goal in which the goal should be met.)
*/
public Duration getDue() {
if (this.due == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionGoalTargetComponent.due");
else if (Configuration.doAutoCreate())
this.due = new Duration(); // cc
return this.due;
}
public boolean hasDue() {
return this.due != null && !this.due.isEmpty();
}
/**
* @param value {@link #due} (Indicates the timeframe after the start of the goal in which the goal should be met.)
*/
public PlanDefinitionGoalTargetComponent setDue(Duration value) {
this.due = value;
return this;
}
protected void listChildren(List children) {
super.listChildren(children);
children.add(new Property("measure", "CodeableConcept", "The parameter whose value is to be tracked, e.g. body weigth, blood pressure, or hemoglobin A1c level.", 0, 1, measure));
children.add(new Property("detail[x]", "Quantity|Range|CodeableConcept", "The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. Whan a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.", 0, 1, detail));
children.add(new Property("due", "Duration", "Indicates the timeframe after the start of the goal in which the goal should be met.", 0, 1, due));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case 938321246: /*measure*/ return new Property("measure", "CodeableConcept", "The parameter whose value is to be tracked, e.g. body weigth, blood pressure, or hemoglobin A1c level.", 0, 1, measure);
case -1973084529: /*detail[x]*/ return new Property("detail[x]", "Quantity|Range|CodeableConcept", "The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. Whan a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.", 0, 1, detail);
case -1335224239: /*detail*/ return new Property("detail[x]", "Quantity|Range|CodeableConcept", "The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. Whan a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.", 0, 1, detail);
case -1313079300: /*detailQuantity*/ return new Property("detail[x]", "Quantity|Range|CodeableConcept", "The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. Whan a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.", 0, 1, detail);
case -2062632084: /*detailRange*/ return new Property("detail[x]", "Quantity|Range|CodeableConcept", "The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. Whan a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.", 0, 1, detail);
case -175586544: /*detailCodeableConcept*/ return new Property("detail[x]", "Quantity|Range|CodeableConcept", "The target value of the measure to be achieved to signify fulfillment of the goal, e.g. 150 pounds or 7.0%. Either the high or low or both values of the range can be specified. Whan a low value is missing, it indicates that the goal is achieved at any value at or below the high value. Similarly, if the high value is missing, it indicates that the goal is achieved at any value at or above the low value.", 0, 1, detail);
case 99828: /*due*/ return new Property("due", "Duration", "Indicates the timeframe after the start of the goal in which the goal should be met.", 0, 1, due);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 938321246: /*measure*/ return this.measure == null ? new Base[0] : new Base[] {this.measure}; // CodeableConcept
case -1335224239: /*detail*/ return this.detail == null ? new Base[0] : new Base[] {this.detail}; // Type
case 99828: /*due*/ return this.due == null ? new Base[0] : new Base[] {this.due}; // Duration
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 938321246: // measure
this.measure = castToCodeableConcept(value); // CodeableConcept
return value;
case -1335224239: // detail
this.detail = castToType(value); // Type
return value;
case 99828: // due
this.due = castToDuration(value); // Duration
return value;
default: return super.setProperty(hash, name, value);
}
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("measure")) {
this.measure = castToCodeableConcept(value); // CodeableConcept
} else if (name.equals("detail[x]")) {
this.detail = castToType(value); // Type
} else if (name.equals("due")) {
this.due = castToDuration(value); // Duration
} else
return super.setProperty(name, value);
return value;
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 938321246: return getMeasure();
case -1973084529: return getDetail();
case -1335224239: return getDetail();
case 99828: return getDue();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 938321246: /*measure*/ return new String[] {"CodeableConcept"};
case -1335224239: /*detail*/ return new String[] {"Quantity", "Range", "CodeableConcept"};
case 99828: /*due*/ return new String[] {"Duration"};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("measure")) {
this.measure = new CodeableConcept();
return this.measure;
}
else if (name.equals("detailQuantity")) {
this.detail = new Quantity();
return this.detail;
}
else if (name.equals("detailRange")) {
this.detail = new Range();
return this.detail;
}
else if (name.equals("detailCodeableConcept")) {
this.detail = new CodeableConcept();
return this.detail;
}
else if (name.equals("due")) {
this.due = new Duration();
return this.due;
}
else
return super.addChild(name);
}
public PlanDefinitionGoalTargetComponent copy() {
PlanDefinitionGoalTargetComponent dst = new PlanDefinitionGoalTargetComponent();
copyValues(dst);
dst.measure = measure == null ? null : measure.copy();
dst.detail = detail == null ? null : detail.copy();
dst.due = due == null ? null : due.copy();
return dst;
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof PlanDefinitionGoalTargetComponent))
return false;
PlanDefinitionGoalTargetComponent o = (PlanDefinitionGoalTargetComponent) other_;
return compareDeep(measure, o.measure, true) && compareDeep(detail, o.detail, true) && compareDeep(due, o.due, true)
;
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof PlanDefinitionGoalTargetComponent))
return false;
PlanDefinitionGoalTargetComponent o = (PlanDefinitionGoalTargetComponent) other_;
return true;
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(measure, detail, due);
}
public String fhirType() {
return "PlanDefinition.goal.target";
}
}
@Block()
public static class PlanDefinitionActionComponent extends BackboneElement implements IBaseBackboneElement {
/**
* A user-visible label for the action.
*/
@Child(name = "label", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="User-visible label for the action (e.g. 1. or A.)", formalDefinition="A user-visible label for the action." )
protected StringType label;
/**
* The title of the action displayed to a user.
*/
@Child(name = "title", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="User-visible title", formalDefinition="The title of the action displayed to a user." )
protected StringType title;
/**
* A short description of the action used to provide a summary to display to the user.
*/
@Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Short description of the action", formalDefinition="A short description of the action used to provide a summary to display to the user." )
protected StringType description;
/**
* A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.
*/
@Child(name = "textEquivalent", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Static text equivalent of the action, used if the dynamic aspects cannot be interpreted by the receiving system", formalDefinition="A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically." )
protected StringType textEquivalent;
/**
* A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a the section of a documentation template.
*/
@Child(name = "code", type = {CodeableConcept.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Code representing the meaning of the action or sub-actions", formalDefinition="A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a the section of a documentation template." )
protected List code;
/**
* A description of why this action is necessary or appropriate.
*/
@Child(name = "reason", type = {CodeableConcept.class}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Why the action should be performed", formalDefinition="A description of why this action is necessary or appropriate." )
protected List reason;
/**
* Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.
*/
@Child(name = "documentation", type = {RelatedArtifact.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Supporting documentation for the intended performer of the action", formalDefinition="Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources." )
protected List documentation;
/**
* Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.
*/
@Child(name = "goalId", type = {IdType.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="What goals this action supports", formalDefinition="Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition." )
protected List goalId;
/**
* A description of when the action should be triggered.
*/
@Child(name = "triggerDefinition", type = {TriggerDefinition.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="When the action should be triggered", formalDefinition="A description of when the action should be triggered." )
protected List triggerDefinition;
/**
* An expression that describes applicability criteria, or start/stop conditions for the action.
*/
@Child(name = "condition", type = {}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Whether or not the action is applicable", formalDefinition="An expression that describes applicability criteria, or start/stop conditions for the action." )
protected List condition;
/**
* Defines input data requirements for the action.
*/
@Child(name = "input", type = {DataRequirement.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Input data requirements", formalDefinition="Defines input data requirements for the action." )
protected List input;
/**
* Defines the outputs of the action, if any.
*/
@Child(name = "output", type = {DataRequirement.class}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Output data definition", formalDefinition="Defines the outputs of the action, if any." )
protected List output;
/**
* A relationship to another action such as "before" or "30-60 minutes after start of".
*/
@Child(name = "relatedAction", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Relationship to another action", formalDefinition="A relationship to another action such as \"before\" or \"30-60 minutes after start of\"." )
protected List relatedAction;
/**
* An optional value describing when the action should be performed.
*/
@Child(name = "timing", type = {DateTimeType.class, Period.class, Duration.class, Range.class, Timing.class}, order=14, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="When the action should take place", formalDefinition="An optional value describing when the action should be performed." )
protected Type timing;
/**
* Indicates who should participate in performing the action described.
*/
@Child(name = "participant", type = {}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Who should participate in the action", formalDefinition="Indicates who should participate in performing the action described." )
protected List participant;
/**
* The type of action to perform (create, update, remove).
*/
@Child(name = "type", type = {Coding.class}, order=16, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="create | update | remove | fire-event", formalDefinition="The type of action to perform (create, update, remove)." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-type")
protected Coding type;
/**
* Defines the grouping behavior for the action and its children.
*/
@Child(name = "groupingBehavior", type = {CodeType.class}, order=17, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="visual-group | logical-group | sentence-group", formalDefinition="Defines the grouping behavior for the action and its children." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-grouping-behavior")
protected Enumeration groupingBehavior;
/**
* Defines the selection behavior for the action and its children.
*/
@Child(name = "selectionBehavior", type = {CodeType.class}, order=18, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="any | all | all-or-none | exactly-one | at-most-one | one-or-more", formalDefinition="Defines the selection behavior for the action and its children." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-selection-behavior")
protected Enumeration selectionBehavior;
/**
* Defines the requiredness behavior for the action.
*/
@Child(name = "requiredBehavior", type = {CodeType.class}, order=19, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="must | could | must-unless-documented", formalDefinition="Defines the requiredness behavior for the action." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-required-behavior")
protected Enumeration requiredBehavior;
/**
* Defines whether the action should usually be preselected.
*/
@Child(name = "precheckBehavior", type = {CodeType.class}, order=20, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="yes | no", formalDefinition="Defines whether the action should usually be preselected." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-precheck-behavior")
protected Enumeration precheckBehavior;
/**
* Defines whether the action can be selected multiple times.
*/
@Child(name = "cardinalityBehavior", type = {CodeType.class}, order=21, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="single | multiple", formalDefinition="Defines whether the action can be selected multiple times." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-cardinality-behavior")
protected Enumeration cardinalityBehavior;
/**
* A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.
*/
@Child(name = "definition", type = {ActivityDefinition.class, PlanDefinition.class}, order=22, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Description of the activity to be performed", formalDefinition="A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken." )
protected Reference definition;
/**
* The actual object that is the target of the reference (A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.)
*/
protected Resource definitionTarget;
/**
* A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.
*/
@Child(name = "transform", type = {StructureMap.class}, order=23, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Transform to apply the template", formalDefinition="A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input." )
protected Reference transform;
/**
* The actual object that is the target of the reference (A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.)
*/
protected StructureMap transformTarget;
/**
* Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result.
*/
@Child(name = "dynamicValue", type = {}, order=24, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Dynamic aspects of the definition", formalDefinition="Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result." )
protected List dynamicValue;
/**
* 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.
*/
@Child(name = "action", type = {PlanDefinitionActionComponent.class}, order=25, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="A sub-action", formalDefinition="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." )
protected List action;
private static final long serialVersionUID = -1404963512L;
/**
* Constructor
*/
public PlanDefinitionActionComponent() {
super();
}
/**
* @return {@link #label} (A user-visible label for the action.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value
*/
public StringType getLabelElement() {
if (this.label == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionActionComponent.label");
else if (Configuration.doAutoCreate())
this.label = new StringType(); // bb
return this.label;
}
public boolean hasLabelElement() {
return this.label != null && !this.label.isEmpty();
}
public boolean hasLabel() {
return this.label != null && !this.label.isEmpty();
}
/**
* @param value {@link #label} (A user-visible label for the action.). This is the underlying object with id, value and extensions. The accessor "getLabel" gives direct access to the value
*/
public PlanDefinitionActionComponent setLabelElement(StringType value) {
this.label = value;
return this;
}
/**
* @return A user-visible label for the action.
*/
public String getLabel() {
return this.label == null ? null : this.label.getValue();
}
/**
* @param value A user-visible label for the action.
*/
public PlanDefinitionActionComponent setLabel(String value) {
if (Utilities.noString(value))
this.label = null;
else {
if (this.label == null)
this.label = new StringType();
this.label.setValue(value);
}
return this;
}
/**
* @return {@link #title} (The title of the action displayed to a user.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
*/
public StringType getTitleElement() {
if (this.title == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionActionComponent.title");
else if (Configuration.doAutoCreate())
this.title = new StringType(); // bb
return this.title;
}
public boolean hasTitleElement() {
return this.title != null && !this.title.isEmpty();
}
public boolean hasTitle() {
return this.title != null && !this.title.isEmpty();
}
/**
* @param value {@link #title} (The title of the action displayed to a user.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
*/
public PlanDefinitionActionComponent setTitleElement(StringType value) {
this.title = value;
return this;
}
/**
* @return The title of the action displayed to a user.
*/
public String getTitle() {
return this.title == null ? null : this.title.getValue();
}
/**
* @param value The title of the action displayed to a user.
*/
public PlanDefinitionActionComponent setTitle(String value) {
if (Utilities.noString(value))
this.title = null;
else {
if (this.title == null)
this.title = new StringType();
this.title.setValue(value);
}
return this;
}
/**
* @return {@link #description} (A short description of the action used to provide a summary to display to the user.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
*/
public StringType getDescriptionElement() {
if (this.description == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionActionComponent.description");
else if (Configuration.doAutoCreate())
this.description = new StringType(); // bb
return this.description;
}
public boolean hasDescriptionElement() {
return this.description != null && !this.description.isEmpty();
}
public boolean hasDescription() {
return this.description != null && !this.description.isEmpty();
}
/**
* @param value {@link #description} (A short description of the action used to provide a summary to display to the user.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
*/
public PlanDefinitionActionComponent setDescriptionElement(StringType value) {
this.description = value;
return this;
}
/**
* @return A short description of the action used to provide a summary to display to the user.
*/
public String getDescription() {
return this.description == null ? null : this.description.getValue();
}
/**
* @param value A short description of the action used to provide a summary to display to the user.
*/
public PlanDefinitionActionComponent setDescription(String value) {
if (Utilities.noString(value))
this.description = null;
else {
if (this.description == null)
this.description = new StringType();
this.description.setValue(value);
}
return this;
}
/**
* @return {@link #textEquivalent} (A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.). This is the underlying object with id, value and extensions. The accessor "getTextEquivalent" gives direct access to the value
*/
public StringType getTextEquivalentElement() {
if (this.textEquivalent == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionActionComponent.textEquivalent");
else if (Configuration.doAutoCreate())
this.textEquivalent = new StringType(); // bb
return this.textEquivalent;
}
public boolean hasTextEquivalentElement() {
return this.textEquivalent != null && !this.textEquivalent.isEmpty();
}
public boolean hasTextEquivalent() {
return this.textEquivalent != null && !this.textEquivalent.isEmpty();
}
/**
* @param value {@link #textEquivalent} (A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.). This is the underlying object with id, value and extensions. The accessor "getTextEquivalent" gives direct access to the value
*/
public PlanDefinitionActionComponent setTextEquivalentElement(StringType value) {
this.textEquivalent = value;
return this;
}
/**
* @return A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.
*/
public String getTextEquivalent() {
return this.textEquivalent == null ? null : this.textEquivalent.getValue();
}
/**
* @param value A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.
*/
public PlanDefinitionActionComponent setTextEquivalent(String value) {
if (Utilities.noString(value))
this.textEquivalent = null;
else {
if (this.textEquivalent == null)
this.textEquivalent = new StringType();
this.textEquivalent.setValue(value);
}
return this;
}
/**
* @return {@link #code} (A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a the section of a documentation template.)
*/
public List getCode() {
if (this.code == null)
this.code = new ArrayList();
return this.code;
}
/**
* @return Returns a reference to this
for easy method chaining
*/
public PlanDefinitionActionComponent setCode(List theCode) {
this.code = theCode;
return this;
}
public boolean hasCode() {
if (this.code == null)
return false;
for (CodeableConcept item : this.code)
if (!item.isEmpty())
return true;
return false;
}
public CodeableConcept addCode() { //3
CodeableConcept t = new CodeableConcept();
if (this.code == null)
this.code = new ArrayList();
this.code.add(t);
return t;
}
public PlanDefinitionActionComponent addCode(CodeableConcept t) { //3
if (t == null)
return this;
if (this.code == null)
this.code = new ArrayList();
this.code.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #code}, creating it if it does not already exist
*/
public CodeableConcept getCodeFirstRep() {
if (getCode().isEmpty()) {
addCode();
}
return getCode().get(0);
}
/**
* @return {@link #reason} (A description of why this action is necessary or appropriate.)
*/
public List getReason() {
if (this.reason == null)
this.reason = new ArrayList();
return this.reason;
}
/**
* @return Returns a reference to this
for easy method chaining
*/
public PlanDefinitionActionComponent setReason(List theReason) {
this.reason = theReason;
return this;
}
public boolean hasReason() {
if (this.reason == null)
return false;
for (CodeableConcept item : this.reason)
if (!item.isEmpty())
return true;
return false;
}
public CodeableConcept addReason() { //3
CodeableConcept t = new CodeableConcept();
if (this.reason == null)
this.reason = new ArrayList();
this.reason.add(t);
return t;
}
public PlanDefinitionActionComponent addReason(CodeableConcept t) { //3
if (t == null)
return this;
if (this.reason == null)
this.reason = new ArrayList();
this.reason.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #reason}, creating it if it does not already exist
*/
public CodeableConcept getReasonFirstRep() {
if (getReason().isEmpty()) {
addReason();
}
return getReason().get(0);
}
/**
* @return {@link #documentation} (Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.)
*/
public List getDocumentation() {
if (this.documentation == null)
this.documentation = new ArrayList();
return this.documentation;
}
/**
* @return Returns a reference to this
for easy method chaining
*/
public PlanDefinitionActionComponent setDocumentation(List theDocumentation) {
this.documentation = theDocumentation;
return this;
}
public boolean hasDocumentation() {
if (this.documentation == null)
return false;
for (RelatedArtifact item : this.documentation)
if (!item.isEmpty())
return true;
return false;
}
public RelatedArtifact addDocumentation() { //3
RelatedArtifact t = new RelatedArtifact();
if (this.documentation == null)
this.documentation = new ArrayList();
this.documentation.add(t);
return t;
}
public PlanDefinitionActionComponent addDocumentation(RelatedArtifact t) { //3
if (t == null)
return this;
if (this.documentation == null)
this.documentation = new ArrayList();
this.documentation.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #documentation}, creating it if it does not already exist
*/
public RelatedArtifact getDocumentationFirstRep() {
if (getDocumentation().isEmpty()) {
addDocumentation();
}
return getDocumentation().get(0);
}
/**
* @return {@link #goalId} (Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.)
*/
public List getGoalId() {
if (this.goalId == null)
this.goalId = new ArrayList();
return this.goalId;
}
/**
* @return Returns a reference to this
for easy method chaining
*/
public PlanDefinitionActionComponent setGoalId(List theGoalId) {
this.goalId = theGoalId;
return this;
}
public boolean hasGoalId() {
if (this.goalId == null)
return false;
for (IdType item : this.goalId)
if (!item.isEmpty())
return true;
return false;
}
/**
* @return {@link #goalId} (Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.)
*/
public IdType addGoalIdElement() {//2
IdType t = new IdType();
if (this.goalId == null)
this.goalId = new ArrayList();
this.goalId.add(t);
return t;
}
/**
* @param value {@link #goalId} (Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.)
*/
public PlanDefinitionActionComponent addGoalId(String value) { //1
IdType t = new IdType();
t.setValue(value);
if (this.goalId == null)
this.goalId = new ArrayList();
this.goalId.add(t);
return this;
}
/**
* @param value {@link #goalId} (Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.)
*/
public boolean hasGoalId(String value) {
if (this.goalId == null)
return false;
for (IdType v : this.goalId)
if (v.getValue().equals(value)) // id
return true;
return false;
}
/**
* @return {@link #triggerDefinition} (A description of when the action should be triggered.)
*/
public List getTriggerDefinition() {
if (this.triggerDefinition == null)
this.triggerDefinition = new ArrayList();
return this.triggerDefinition;
}
/**
* @return Returns a reference to this
for easy method chaining
*/
public PlanDefinitionActionComponent setTriggerDefinition(List theTriggerDefinition) {
this.triggerDefinition = theTriggerDefinition;
return this;
}
public boolean hasTriggerDefinition() {
if (this.triggerDefinition == null)
return false;
for (TriggerDefinition item : this.triggerDefinition)
if (!item.isEmpty())
return true;
return false;
}
public TriggerDefinition addTriggerDefinition() { //3
TriggerDefinition t = new TriggerDefinition();
if (this.triggerDefinition == null)
this.triggerDefinition = new ArrayList();
this.triggerDefinition.add(t);
return t;
}
public PlanDefinitionActionComponent addTriggerDefinition(TriggerDefinition t) { //3
if (t == null)
return this;
if (this.triggerDefinition == null)
this.triggerDefinition = new ArrayList();
this.triggerDefinition.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #triggerDefinition}, creating it if it does not already exist
*/
public TriggerDefinition getTriggerDefinitionFirstRep() {
if (getTriggerDefinition().isEmpty()) {
addTriggerDefinition();
}
return getTriggerDefinition().get(0);
}
/**
* @return {@link #condition} (An expression that describes applicability criteria, or start/stop conditions for the action.)
*/
public List getCondition() {
if (this.condition == null)
this.condition = new ArrayList();
return this.condition;
}
/**
* @return Returns a reference to this
for easy method chaining
*/
public PlanDefinitionActionComponent setCondition(List theCondition) {
this.condition = theCondition;
return this;
}
public boolean hasCondition() {
if (this.condition == null)
return false;
for (PlanDefinitionActionConditionComponent item : this.condition)
if (!item.isEmpty())
return true;
return false;
}
public PlanDefinitionActionConditionComponent addCondition() { //3
PlanDefinitionActionConditionComponent t = new PlanDefinitionActionConditionComponent();
if (this.condition == null)
this.condition = new ArrayList();
this.condition.add(t);
return t;
}
public PlanDefinitionActionComponent addCondition(PlanDefinitionActionConditionComponent t) { //3
if (t == null)
return this;
if (this.condition == null)
this.condition = new ArrayList();
this.condition.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #condition}, creating it if it does not already exist
*/
public PlanDefinitionActionConditionComponent getConditionFirstRep() {
if (getCondition().isEmpty()) {
addCondition();
}
return getCondition().get(0);
}
/**
* @return {@link #input} (Defines input data requirements for the action.)
*/
public List getInput() {
if (this.input == null)
this.input = new ArrayList();
return this.input;
}
/**
* @return Returns a reference to this
for easy method chaining
*/
public PlanDefinitionActionComponent setInput(List theInput) {
this.input = theInput;
return this;
}
public boolean hasInput() {
if (this.input == null)
return false;
for (DataRequirement item : this.input)
if (!item.isEmpty())
return true;
return false;
}
public DataRequirement addInput() { //3
DataRequirement t = new DataRequirement();
if (this.input == null)
this.input = new ArrayList();
this.input.add(t);
return t;
}
public PlanDefinitionActionComponent addInput(DataRequirement t) { //3
if (t == null)
return this;
if (this.input == null)
this.input = new ArrayList();
this.input.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #input}, creating it if it does not already exist
*/
public DataRequirement getInputFirstRep() {
if (getInput().isEmpty()) {
addInput();
}
return getInput().get(0);
}
/**
* @return {@link #output} (Defines the outputs of the action, if any.)
*/
public List getOutput() {
if (this.output == null)
this.output = new ArrayList();
return this.output;
}
/**
* @return Returns a reference to this
for easy method chaining
*/
public PlanDefinitionActionComponent setOutput(List theOutput) {
this.output = theOutput;
return this;
}
public boolean hasOutput() {
if (this.output == null)
return false;
for (DataRequirement item : this.output)
if (!item.isEmpty())
return true;
return false;
}
public DataRequirement addOutput() { //3
DataRequirement t = new DataRequirement();
if (this.output == null)
this.output = new ArrayList();
this.output.add(t);
return t;
}
public PlanDefinitionActionComponent addOutput(DataRequirement t) { //3
if (t == null)
return this;
if (this.output == null)
this.output = new ArrayList();
this.output.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #output}, creating it if it does not already exist
*/
public DataRequirement getOutputFirstRep() {
if (getOutput().isEmpty()) {
addOutput();
}
return getOutput().get(0);
}
/**
* @return {@link #relatedAction} (A relationship to another action such as "before" or "30-60 minutes after start of".)
*/
public List getRelatedAction() {
if (this.relatedAction == null)
this.relatedAction = new ArrayList();
return this.relatedAction;
}
/**
* @return Returns a reference to this
for easy method chaining
*/
public PlanDefinitionActionComponent setRelatedAction(List theRelatedAction) {
this.relatedAction = theRelatedAction;
return this;
}
public boolean hasRelatedAction() {
if (this.relatedAction == null)
return false;
for (PlanDefinitionActionRelatedActionComponent item : this.relatedAction)
if (!item.isEmpty())
return true;
return false;
}
public PlanDefinitionActionRelatedActionComponent addRelatedAction() { //3
PlanDefinitionActionRelatedActionComponent t = new PlanDefinitionActionRelatedActionComponent();
if (this.relatedAction == null)
this.relatedAction = new ArrayList();
this.relatedAction.add(t);
return t;
}
public PlanDefinitionActionComponent addRelatedAction(PlanDefinitionActionRelatedActionComponent t) { //3
if (t == null)
return this;
if (this.relatedAction == null)
this.relatedAction = new ArrayList();
this.relatedAction.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #relatedAction}, creating it if it does not already exist
*/
public PlanDefinitionActionRelatedActionComponent getRelatedActionFirstRep() {
if (getRelatedAction().isEmpty()) {
addRelatedAction();
}
return getRelatedAction().get(0);
}
/**
* @return {@link #timing} (An optional value describing when the action should be performed.)
*/
public Type getTiming() {
return this.timing;
}
/**
* @return {@link #timing} (An optional value describing when the action should be performed.)
*/
public DateTimeType getTimingDateTimeType() throws FHIRException {
if (this.timing == null)
return null;
if (!(this.timing instanceof DateTimeType))
throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.timing.getClass().getName()+" was encountered");
return (DateTimeType) this.timing;
}
public boolean hasTimingDateTimeType() {
return this != null && this.timing instanceof DateTimeType;
}
/**
* @return {@link #timing} (An optional value describing when the action should be performed.)
*/
public Period getTimingPeriod() throws FHIRException {
if (this.timing == null)
return null;
if (!(this.timing instanceof Period))
throw new FHIRException("Type mismatch: the type Period was expected, but "+this.timing.getClass().getName()+" was encountered");
return (Period) this.timing;
}
public boolean hasTimingPeriod() {
return this != null && this.timing instanceof Period;
}
/**
* @return {@link #timing} (An optional value describing when the action should be performed.)
*/
public Duration getTimingDuration() throws FHIRException {
if (this.timing == null)
return null;
if (!(this.timing instanceof Duration))
throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.timing.getClass().getName()+" was encountered");
return (Duration) this.timing;
}
public boolean hasTimingDuration() {
return this != null && this.timing instanceof Duration;
}
/**
* @return {@link #timing} (An optional value describing when the action should be performed.)
*/
public Range getTimingRange() throws FHIRException {
if (this.timing == null)
return null;
if (!(this.timing instanceof Range))
throw new FHIRException("Type mismatch: the type Range was expected, but "+this.timing.getClass().getName()+" was encountered");
return (Range) this.timing;
}
public boolean hasTimingRange() {
return this != null && this.timing instanceof Range;
}
/**
* @return {@link #timing} (An optional value describing when the action should be performed.)
*/
public Timing getTimingTiming() throws FHIRException {
if (this.timing == null)
return null;
if (!(this.timing instanceof Timing))
throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.timing.getClass().getName()+" was encountered");
return (Timing) this.timing;
}
public boolean hasTimingTiming() {
return this != null && this.timing instanceof Timing;
}
public boolean hasTiming() {
return this.timing != null && !this.timing.isEmpty();
}
/**
* @param value {@link #timing} (An optional value describing when the action should be performed.)
*/
public PlanDefinitionActionComponent setTiming(Type value) throws FHIRFormatError {
if (value != null && !(value instanceof DateTimeType || value instanceof Period || value instanceof Duration || value instanceof Range || value instanceof Timing))
throw new FHIRFormatError("Not the right type for PlanDefinition.action.timing[x]: "+value.fhirType());
this.timing = value;
return this;
}
/**
* @return {@link #participant} (Indicates who should participate in performing the action described.)
*/
public List getParticipant() {
if (this.participant == null)
this.participant = new ArrayList();
return this.participant;
}
/**
* @return Returns a reference to this
for easy method chaining
*/
public PlanDefinitionActionComponent setParticipant(List theParticipant) {
this.participant = theParticipant;
return this;
}
public boolean hasParticipant() {
if (this.participant == null)
return false;
for (PlanDefinitionActionParticipantComponent item : this.participant)
if (!item.isEmpty())
return true;
return false;
}
public PlanDefinitionActionParticipantComponent addParticipant() { //3
PlanDefinitionActionParticipantComponent t = new PlanDefinitionActionParticipantComponent();
if (this.participant == null)
this.participant = new ArrayList();
this.participant.add(t);
return t;
}
public PlanDefinitionActionComponent addParticipant(PlanDefinitionActionParticipantComponent t) { //3
if (t == null)
return this;
if (this.participant == null)
this.participant = new ArrayList();
this.participant.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #participant}, creating it if it does not already exist
*/
public PlanDefinitionActionParticipantComponent getParticipantFirstRep() {
if (getParticipant().isEmpty()) {
addParticipant();
}
return getParticipant().get(0);
}
/**
* @return {@link #type} (The type of action to perform (create, update, remove).)
*/
public Coding getType() {
if (this.type == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionActionComponent.type");
else if (Configuration.doAutoCreate())
this.type = new Coding(); // cc
return this.type;
}
public boolean hasType() {
return this.type != null && !this.type.isEmpty();
}
/**
* @param value {@link #type} (The type of action to perform (create, update, remove).)
*/
public PlanDefinitionActionComponent setType(Coding value) {
this.type = value;
return this;
}
/**
* @return {@link #groupingBehavior} (Defines the grouping behavior for the action and its children.). This is the underlying object with id, value and extensions. The accessor "getGroupingBehavior" gives direct access to the value
*/
public Enumeration getGroupingBehaviorElement() {
if (this.groupingBehavior == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionActionComponent.groupingBehavior");
else if (Configuration.doAutoCreate())
this.groupingBehavior = new Enumeration(new ActionGroupingBehaviorEnumFactory()); // bb
return this.groupingBehavior;
}
public boolean hasGroupingBehaviorElement() {
return this.groupingBehavior != null && !this.groupingBehavior.isEmpty();
}
public boolean hasGroupingBehavior() {
return this.groupingBehavior != null && !this.groupingBehavior.isEmpty();
}
/**
* @param value {@link #groupingBehavior} (Defines the grouping behavior for the action and its children.). This is the underlying object with id, value and extensions. The accessor "getGroupingBehavior" gives direct access to the value
*/
public PlanDefinitionActionComponent setGroupingBehaviorElement(Enumeration value) {
this.groupingBehavior = value;
return this;
}
/**
* @return Defines the grouping behavior for the action and its children.
*/
public ActionGroupingBehavior getGroupingBehavior() {
return this.groupingBehavior == null ? null : this.groupingBehavior.getValue();
}
/**
* @param value Defines the grouping behavior for the action and its children.
*/
public PlanDefinitionActionComponent setGroupingBehavior(ActionGroupingBehavior value) {
if (value == null)
this.groupingBehavior = null;
else {
if (this.groupingBehavior == null)
this.groupingBehavior = new Enumeration(new ActionGroupingBehaviorEnumFactory());
this.groupingBehavior.setValue(value);
}
return this;
}
/**
* @return {@link #selectionBehavior} (Defines the selection behavior for the action and its children.). This is the underlying object with id, value and extensions. The accessor "getSelectionBehavior" gives direct access to the value
*/
public Enumeration getSelectionBehaviorElement() {
if (this.selectionBehavior == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionActionComponent.selectionBehavior");
else if (Configuration.doAutoCreate())
this.selectionBehavior = new Enumeration(new ActionSelectionBehaviorEnumFactory()); // bb
return this.selectionBehavior;
}
public boolean hasSelectionBehaviorElement() {
return this.selectionBehavior != null && !this.selectionBehavior.isEmpty();
}
public boolean hasSelectionBehavior() {
return this.selectionBehavior != null && !this.selectionBehavior.isEmpty();
}
/**
* @param value {@link #selectionBehavior} (Defines the selection behavior for the action and its children.). This is the underlying object with id, value and extensions. The accessor "getSelectionBehavior" gives direct access to the value
*/
public PlanDefinitionActionComponent setSelectionBehaviorElement(Enumeration value) {
this.selectionBehavior = value;
return this;
}
/**
* @return Defines the selection behavior for the action and its children.
*/
public ActionSelectionBehavior getSelectionBehavior() {
return this.selectionBehavior == null ? null : this.selectionBehavior.getValue();
}
/**
* @param value Defines the selection behavior for the action and its children.
*/
public PlanDefinitionActionComponent setSelectionBehavior(ActionSelectionBehavior value) {
if (value == null)
this.selectionBehavior = null;
else {
if (this.selectionBehavior == null)
this.selectionBehavior = new Enumeration(new ActionSelectionBehaviorEnumFactory());
this.selectionBehavior.setValue(value);
}
return this;
}
/**
* @return {@link #requiredBehavior} (Defines the requiredness behavior for the action.). This is the underlying object with id, value and extensions. The accessor "getRequiredBehavior" gives direct access to the value
*/
public Enumeration getRequiredBehaviorElement() {
if (this.requiredBehavior == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionActionComponent.requiredBehavior");
else if (Configuration.doAutoCreate())
this.requiredBehavior = new Enumeration(new ActionRequiredBehaviorEnumFactory()); // bb
return this.requiredBehavior;
}
public boolean hasRequiredBehaviorElement() {
return this.requiredBehavior != null && !this.requiredBehavior.isEmpty();
}
public boolean hasRequiredBehavior() {
return this.requiredBehavior != null && !this.requiredBehavior.isEmpty();
}
/**
* @param value {@link #requiredBehavior} (Defines the requiredness behavior for the action.). This is the underlying object with id, value and extensions. The accessor "getRequiredBehavior" gives direct access to the value
*/
public PlanDefinitionActionComponent setRequiredBehaviorElement(Enumeration value) {
this.requiredBehavior = value;
return this;
}
/**
* @return Defines the requiredness behavior for the action.
*/
public ActionRequiredBehavior getRequiredBehavior() {
return this.requiredBehavior == null ? null : this.requiredBehavior.getValue();
}
/**
* @param value Defines the requiredness behavior for the action.
*/
public PlanDefinitionActionComponent setRequiredBehavior(ActionRequiredBehavior value) {
if (value == null)
this.requiredBehavior = null;
else {
if (this.requiredBehavior == null)
this.requiredBehavior = new Enumeration(new ActionRequiredBehaviorEnumFactory());
this.requiredBehavior.setValue(value);
}
return this;
}
/**
* @return {@link #precheckBehavior} (Defines whether the action should usually be preselected.). This is the underlying object with id, value and extensions. The accessor "getPrecheckBehavior" gives direct access to the value
*/
public Enumeration getPrecheckBehaviorElement() {
if (this.precheckBehavior == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionActionComponent.precheckBehavior");
else if (Configuration.doAutoCreate())
this.precheckBehavior = new Enumeration(new ActionPrecheckBehaviorEnumFactory()); // bb
return this.precheckBehavior;
}
public boolean hasPrecheckBehaviorElement() {
return this.precheckBehavior != null && !this.precheckBehavior.isEmpty();
}
public boolean hasPrecheckBehavior() {
return this.precheckBehavior != null && !this.precheckBehavior.isEmpty();
}
/**
* @param value {@link #precheckBehavior} (Defines whether the action should usually be preselected.). This is the underlying object with id, value and extensions. The accessor "getPrecheckBehavior" gives direct access to the value
*/
public PlanDefinitionActionComponent setPrecheckBehaviorElement(Enumeration value) {
this.precheckBehavior = value;
return this;
}
/**
* @return Defines whether the action should usually be preselected.
*/
public ActionPrecheckBehavior getPrecheckBehavior() {
return this.precheckBehavior == null ? null : this.precheckBehavior.getValue();
}
/**
* @param value Defines whether the action should usually be preselected.
*/
public PlanDefinitionActionComponent setPrecheckBehavior(ActionPrecheckBehavior value) {
if (value == null)
this.precheckBehavior = null;
else {
if (this.precheckBehavior == null)
this.precheckBehavior = new Enumeration(new ActionPrecheckBehaviorEnumFactory());
this.precheckBehavior.setValue(value);
}
return this;
}
/**
* @return {@link #cardinalityBehavior} (Defines whether the action can be selected multiple times.). This is the underlying object with id, value and extensions. The accessor "getCardinalityBehavior" gives direct access to the value
*/
public Enumeration getCardinalityBehaviorElement() {
if (this.cardinalityBehavior == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionActionComponent.cardinalityBehavior");
else if (Configuration.doAutoCreate())
this.cardinalityBehavior = new Enumeration(new ActionCardinalityBehaviorEnumFactory()); // bb
return this.cardinalityBehavior;
}
public boolean hasCardinalityBehaviorElement() {
return this.cardinalityBehavior != null && !this.cardinalityBehavior.isEmpty();
}
public boolean hasCardinalityBehavior() {
return this.cardinalityBehavior != null && !this.cardinalityBehavior.isEmpty();
}
/**
* @param value {@link #cardinalityBehavior} (Defines whether the action can be selected multiple times.). This is the underlying object with id, value and extensions. The accessor "getCardinalityBehavior" gives direct access to the value
*/
public PlanDefinitionActionComponent setCardinalityBehaviorElement(Enumeration value) {
this.cardinalityBehavior = value;
return this;
}
/**
* @return Defines whether the action can be selected multiple times.
*/
public ActionCardinalityBehavior getCardinalityBehavior() {
return this.cardinalityBehavior == null ? null : this.cardinalityBehavior.getValue();
}
/**
* @param value Defines whether the action can be selected multiple times.
*/
public PlanDefinitionActionComponent setCardinalityBehavior(ActionCardinalityBehavior value) {
if (value == null)
this.cardinalityBehavior = null;
else {
if (this.cardinalityBehavior == null)
this.cardinalityBehavior = new Enumeration(new ActionCardinalityBehaviorEnumFactory());
this.cardinalityBehavior.setValue(value);
}
return this;
}
/**
* @return {@link #definition} (A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.)
*/
public Reference getDefinition() {
if (this.definition == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionActionComponent.definition");
else if (Configuration.doAutoCreate())
this.definition = new Reference(); // cc
return this.definition;
}
public boolean hasDefinition() {
return this.definition != null && !this.definition.isEmpty();
}
/**
* @param value {@link #definition} (A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.)
*/
public PlanDefinitionActionComponent setDefinition(Reference value) {
this.definition = value;
return this;
}
/**
* @return {@link #definition} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.)
*/
public Resource getDefinitionTarget() {
return this.definitionTarget;
}
/**
* @param value {@link #definition} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.)
*/
public PlanDefinitionActionComponent setDefinitionTarget(Resource value) {
this.definitionTarget = value;
return this;
}
/**
* @return {@link #transform} (A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.)
*/
public Reference getTransform() {
if (this.transform == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionActionComponent.transform");
else if (Configuration.doAutoCreate())
this.transform = new Reference(); // cc
return this.transform;
}
public boolean hasTransform() {
return this.transform != null && !this.transform.isEmpty();
}
/**
* @param value {@link #transform} (A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.)
*/
public PlanDefinitionActionComponent setTransform(Reference value) {
this.transform = value;
return this;
}
/**
* @return {@link #transform} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.)
*/
public StructureMap getTransformTarget() {
if (this.transformTarget == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionActionComponent.transform");
else if (Configuration.doAutoCreate())
this.transformTarget = new StructureMap(); // aa
return this.transformTarget;
}
/**
* @param value {@link #transform} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.)
*/
public PlanDefinitionActionComponent setTransformTarget(StructureMap value) {
this.transformTarget = value;
return this;
}
/**
* @return {@link #dynamicValue} (Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result.)
*/
public List getDynamicValue() {
if (this.dynamicValue == null)
this.dynamicValue = new ArrayList();
return this.dynamicValue;
}
/**
* @return Returns a reference to this
for easy method chaining
*/
public PlanDefinitionActionComponent setDynamicValue(List theDynamicValue) {
this.dynamicValue = theDynamicValue;
return this;
}
public boolean hasDynamicValue() {
if (this.dynamicValue == null)
return false;
for (PlanDefinitionActionDynamicValueComponent item : this.dynamicValue)
if (!item.isEmpty())
return true;
return false;
}
public PlanDefinitionActionDynamicValueComponent addDynamicValue() { //3
PlanDefinitionActionDynamicValueComponent t = new PlanDefinitionActionDynamicValueComponent();
if (this.dynamicValue == null)
this.dynamicValue = new ArrayList();
this.dynamicValue.add(t);
return t;
}
public PlanDefinitionActionComponent addDynamicValue(PlanDefinitionActionDynamicValueComponent t) { //3
if (t == null)
return this;
if (this.dynamicValue == null)
this.dynamicValue = new ArrayList();
this.dynamicValue.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #dynamicValue}, creating it if it does not already exist
*/
public PlanDefinitionActionDynamicValueComponent getDynamicValueFirstRep() {
if (getDynamicValue().isEmpty()) {
addDynamicValue();
}
return getDynamicValue().get(0);
}
/**
* @return {@link #action} (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.)
*/
public List getAction() {
if (this.action == null)
this.action = new ArrayList();
return this.action;
}
/**
* @return Returns a reference to this
for easy method chaining
*/
public PlanDefinitionActionComponent setAction(List theAction) {
this.action = theAction;
return this;
}
public boolean hasAction() {
if (this.action == null)
return false;
for (PlanDefinitionActionComponent item : this.action)
if (!item.isEmpty())
return true;
return false;
}
public PlanDefinitionActionComponent addAction() { //3
PlanDefinitionActionComponent t = new PlanDefinitionActionComponent();
if (this.action == null)
this.action = new ArrayList();
this.action.add(t);
return t;
}
public PlanDefinitionActionComponent addAction(PlanDefinitionActionComponent t) { //3
if (t == null)
return this;
if (this.action == null)
this.action = new ArrayList();
this.action.add(t);
return this;
}
/**
* @return The first repetition of repeating field {@link #action}, creating it if it does not already exist
*/
public PlanDefinitionActionComponent getActionFirstRep() {
if (getAction().isEmpty()) {
addAction();
}
return getAction().get(0);
}
protected void listChildren(List children) {
super.listChildren(children);
children.add(new Property("label", "string", "A user-visible label for the action.", 0, 1, label));
children.add(new Property("title", "string", "The title of the action displayed to a user.", 0, 1, title));
children.add(new Property("description", "string", "A short description of the action used to provide a summary to display to the user.", 0, 1, description));
children.add(new Property("textEquivalent", "string", "A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.", 0, 1, textEquivalent));
children.add(new Property("code", "CodeableConcept", "A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a the section of a documentation template.", 0, java.lang.Integer.MAX_VALUE, code));
children.add(new Property("reason", "CodeableConcept", "A description of why this action is necessary or appropriate.", 0, java.lang.Integer.MAX_VALUE, reason));
children.add(new Property("documentation", "RelatedArtifact", "Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.", 0, java.lang.Integer.MAX_VALUE, documentation));
children.add(new Property("goalId", "id", "Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.", 0, java.lang.Integer.MAX_VALUE, goalId));
children.add(new Property("triggerDefinition", "TriggerDefinition", "A description of when the action should be triggered.", 0, java.lang.Integer.MAX_VALUE, triggerDefinition));
children.add(new Property("condition", "", "An expression that describes applicability criteria, or start/stop conditions for the action.", 0, java.lang.Integer.MAX_VALUE, condition));
children.add(new Property("input", "DataRequirement", "Defines input data requirements for the action.", 0, java.lang.Integer.MAX_VALUE, input));
children.add(new Property("output", "DataRequirement", "Defines the outputs of the action, if any.", 0, java.lang.Integer.MAX_VALUE, output));
children.add(new Property("relatedAction", "", "A relationship to another action such as \"before\" or \"30-60 minutes after start of\".", 0, java.lang.Integer.MAX_VALUE, relatedAction));
children.add(new Property("timing[x]", "dateTime|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing));
children.add(new Property("participant", "", "Indicates who should participate in performing the action described.", 0, java.lang.Integer.MAX_VALUE, participant));
children.add(new Property("type", "Coding", "The type of action to perform (create, update, remove).", 0, 1, type));
children.add(new Property("groupingBehavior", "code", "Defines the grouping behavior for the action and its children.", 0, 1, groupingBehavior));
children.add(new Property("selectionBehavior", "code", "Defines the selection behavior for the action and its children.", 0, 1, selectionBehavior));
children.add(new Property("requiredBehavior", "code", "Defines the requiredness behavior for the action.", 0, 1, requiredBehavior));
children.add(new Property("precheckBehavior", "code", "Defines whether the action should usually be preselected.", 0, 1, precheckBehavior));
children.add(new Property("cardinalityBehavior", "code", "Defines whether the action can be selected multiple times.", 0, 1, cardinalityBehavior));
children.add(new Property("definition", "Reference(ActivityDefinition|PlanDefinition)", "A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.", 0, 1, definition));
children.add(new Property("transform", "Reference(StructureMap)", "A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.", 0, 1, transform));
children.add(new Property("dynamicValue", "", "Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result.", 0, java.lang.Integer.MAX_VALUE, dynamicValue));
children.add(new Property("action", "@PlanDefinition.action", "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 Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case 102727412: /*label*/ return new Property("label", "string", "A user-visible label for the action.", 0, 1, label);
case 110371416: /*title*/ return new Property("title", "string", "The title of the action displayed to a user.", 0, 1, title);
case -1724546052: /*description*/ return new Property("description", "string", "A short description of the action used to provide a summary to display to the user.", 0, 1, description);
case -900391049: /*textEquivalent*/ return new Property("textEquivalent", "string", "A text equivalent of the action to be performed. This provides a human-interpretable description of the action when the definition is consumed by a system that may not be capable of interpreting it dynamically.", 0, 1, textEquivalent);
case 3059181: /*code*/ return new Property("code", "CodeableConcept", "A code that provides meaning for the action or action group. For example, a section may have a LOINC code for a the section of a documentation template.", 0, java.lang.Integer.MAX_VALUE, code);
case -934964668: /*reason*/ return new Property("reason", "CodeableConcept", "A description of why this action is necessary or appropriate.", 0, java.lang.Integer.MAX_VALUE, reason);
case 1587405498: /*documentation*/ return new Property("documentation", "RelatedArtifact", "Didactic or other informational resources associated with the action that can be provided to the CDS recipient. Information resources can include inline text commentary and links to web resources.", 0, java.lang.Integer.MAX_VALUE, documentation);
case -1240658034: /*goalId*/ return new Property("goalId", "id", "Identifies goals that this action supports. The reference must be to a goal element defined within this plan definition.", 0, java.lang.Integer.MAX_VALUE, goalId);
case 1126736171: /*triggerDefinition*/ return new Property("triggerDefinition", "TriggerDefinition", "A description of when the action should be triggered.", 0, java.lang.Integer.MAX_VALUE, triggerDefinition);
case -861311717: /*condition*/ return new Property("condition", "", "An expression that describes applicability criteria, or start/stop conditions for the action.", 0, java.lang.Integer.MAX_VALUE, condition);
case 100358090: /*input*/ return new Property("input", "DataRequirement", "Defines input data requirements for the action.", 0, java.lang.Integer.MAX_VALUE, input);
case -1005512447: /*output*/ return new Property("output", "DataRequirement", "Defines the outputs of the action, if any.", 0, java.lang.Integer.MAX_VALUE, output);
case -384107967: /*relatedAction*/ return new Property("relatedAction", "", "A relationship to another action such as \"before\" or \"30-60 minutes after start of\".", 0, java.lang.Integer.MAX_VALUE, relatedAction);
case 164632566: /*timing[x]*/ return new Property("timing[x]", "dateTime|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing);
case -873664438: /*timing*/ return new Property("timing[x]", "dateTime|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing);
case -1837458939: /*timingDateTime*/ return new Property("timing[x]", "dateTime|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing);
case -615615829: /*timingPeriod*/ return new Property("timing[x]", "dateTime|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing);
case -1327253506: /*timingDuration*/ return new Property("timing[x]", "dateTime|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing);
case -710871277: /*timingRange*/ return new Property("timing[x]", "dateTime|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing);
case -497554124: /*timingTiming*/ return new Property("timing[x]", "dateTime|Period|Duration|Range|Timing", "An optional value describing when the action should be performed.", 0, 1, timing);
case 767422259: /*participant*/ return new Property("participant", "", "Indicates who should participate in performing the action described.", 0, java.lang.Integer.MAX_VALUE, participant);
case 3575610: /*type*/ return new Property("type", "Coding", "The type of action to perform (create, update, remove).", 0, 1, type);
case 586678389: /*groupingBehavior*/ return new Property("groupingBehavior", "code", "Defines the grouping behavior for the action and its children.", 0, 1, groupingBehavior);
case 168639486: /*selectionBehavior*/ return new Property("selectionBehavior", "code", "Defines the selection behavior for the action and its children.", 0, 1, selectionBehavior);
case -1163906287: /*requiredBehavior*/ return new Property("requiredBehavior", "code", "Defines the requiredness behavior for the action.", 0, 1, requiredBehavior);
case -1174249033: /*precheckBehavior*/ return new Property("precheckBehavior", "code", "Defines whether the action should usually be preselected.", 0, 1, precheckBehavior);
case -922577408: /*cardinalityBehavior*/ return new Property("cardinalityBehavior", "code", "Defines whether the action can be selected multiple times.", 0, 1, cardinalityBehavior);
case -1014418093: /*definition*/ return new Property("definition", "Reference(ActivityDefinition|PlanDefinition)", "A reference to an ActivityDefinition that describes the action to be taken in detail, or a PlanDefinition that describes a series of actions to be taken.", 0, 1, definition);
case 1052666732: /*transform*/ return new Property("transform", "Reference(StructureMap)", "A reference to a StructureMap resource that defines a transform that can be executed to produce the intent resource using the ActivityDefinition instance as the input.", 0, 1, transform);
case 572625010: /*dynamicValue*/ return new Property("dynamicValue", "", "Customizations that should be applied to the statically defined resource. For example, if the dosage of a medication must be computed based on the patient's weight, a customization would be used to specify an expression that calculated the weight, and the path on the resource that would contain the result.", 0, java.lang.Integer.MAX_VALUE, dynamicValue);
case -1422950858: /*action*/ return new Property("action", "@PlanDefinition.action", "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);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
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 3059181: /*code*/ return this.code == null ? new Base[0] : this.code.toArray(new Base[this.code.size()]); // CodeableConcept
case -934964668: /*reason*/ return this.reason == null ? new Base[0] : this.reason.toArray(new Base[this.reason.size()]); // CodeableConcept
case 1587405498: /*documentation*/ return this.documentation == null ? new Base[0] : this.documentation.toArray(new Base[this.documentation.size()]); // RelatedArtifact
case -1240658034: /*goalId*/ return this.goalId == null ? new Base[0] : this.goalId.toArray(new Base[this.goalId.size()]); // IdType
case 1126736171: /*triggerDefinition*/ return this.triggerDefinition == null ? new Base[0] : this.triggerDefinition.toArray(new Base[this.triggerDefinition.size()]); // TriggerDefinition
case -861311717: /*condition*/ return this.condition == null ? new Base[0] : this.condition.toArray(new Base[this.condition.size()]); // PlanDefinitionActionConditionComponent
case 100358090: /*input*/ return this.input == null ? new Base[0] : this.input.toArray(new Base[this.input.size()]); // DataRequirement
case -1005512447: /*output*/ return this.output == null ? new Base[0] : this.output.toArray(new Base[this.output.size()]); // DataRequirement
case -384107967: /*relatedAction*/ return this.relatedAction == null ? new Base[0] : this.relatedAction.toArray(new Base[this.relatedAction.size()]); // PlanDefinitionActionRelatedActionComponent
case -873664438: /*timing*/ return this.timing == null ? new Base[0] : new Base[] {this.timing}; // Type
case 767422259: /*participant*/ return this.participant == null ? new Base[0] : this.participant.toArray(new Base[this.participant.size()]); // PlanDefinitionActionParticipantComponent
case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Coding
case 586678389: /*groupingBehavior*/ return this.groupingBehavior == null ? new Base[0] : new Base[] {this.groupingBehavior}; // Enumeration
case 168639486: /*selectionBehavior*/ return this.selectionBehavior == null ? new Base[0] : new Base[] {this.selectionBehavior}; // Enumeration
case -1163906287: /*requiredBehavior*/ return this.requiredBehavior == null ? new Base[0] : new Base[] {this.requiredBehavior}; // Enumeration
case -1174249033: /*precheckBehavior*/ return this.precheckBehavior == null ? new Base[0] : new Base[] {this.precheckBehavior}; // Enumeration
case -922577408: /*cardinalityBehavior*/ return this.cardinalityBehavior == null ? new Base[0] : new Base[] {this.cardinalityBehavior}; // Enumeration
case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : new Base[] {this.definition}; // Reference
case 1052666732: /*transform*/ return this.transform == null ? new Base[0] : new Base[] {this.transform}; // Reference
case 572625010: /*dynamicValue*/ return this.dynamicValue == null ? new Base[0] : this.dynamicValue.toArray(new Base[this.dynamicValue.size()]); // PlanDefinitionActionDynamicValueComponent
case -1422950858: /*action*/ return this.action == null ? new Base[0] : this.action.toArray(new Base[this.action.size()]); // PlanDefinitionActionComponent
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 102727412: // label
this.label = castToString(value); // StringType
return value;
case 110371416: // title
this.title = castToString(value); // StringType
return value;
case -1724546052: // description
this.description = castToString(value); // StringType
return value;
case -900391049: // textEquivalent
this.textEquivalent = castToString(value); // StringType
return value;
case 3059181: // code
this.getCode().add(castToCodeableConcept(value)); // CodeableConcept
return value;
case -934964668: // reason
this.getReason().add(castToCodeableConcept(value)); // CodeableConcept
return value;
case 1587405498: // documentation
this.getDocumentation().add(castToRelatedArtifact(value)); // RelatedArtifact
return value;
case -1240658034: // goalId
this.getGoalId().add(castToId(value)); // IdType
return value;
case 1126736171: // triggerDefinition
this.getTriggerDefinition().add(castToTriggerDefinition(value)); // TriggerDefinition
return value;
case -861311717: // condition
this.getCondition().add((PlanDefinitionActionConditionComponent) value); // PlanDefinitionActionConditionComponent
return value;
case 100358090: // input
this.getInput().add(castToDataRequirement(value)); // DataRequirement
return value;
case -1005512447: // output
this.getOutput().add(castToDataRequirement(value)); // DataRequirement
return value;
case -384107967: // relatedAction
this.getRelatedAction().add((PlanDefinitionActionRelatedActionComponent) value); // PlanDefinitionActionRelatedActionComponent
return value;
case -873664438: // timing
this.timing = castToType(value); // Type
return value;
case 767422259: // participant
this.getParticipant().add((PlanDefinitionActionParticipantComponent) value); // PlanDefinitionActionParticipantComponent
return value;
case 3575610: // type
this.type = castToCoding(value); // Coding
return value;
case 586678389: // groupingBehavior
value = new ActionGroupingBehaviorEnumFactory().fromType(castToCode(value));
this.groupingBehavior = (Enumeration) value; // Enumeration
return value;
case 168639486: // selectionBehavior
value = new ActionSelectionBehaviorEnumFactory().fromType(castToCode(value));
this.selectionBehavior = (Enumeration) value; // Enumeration
return value;
case -1163906287: // requiredBehavior
value = new ActionRequiredBehaviorEnumFactory().fromType(castToCode(value));
this.requiredBehavior = (Enumeration) value; // Enumeration
return value;
case -1174249033: // precheckBehavior
value = new ActionPrecheckBehaviorEnumFactory().fromType(castToCode(value));
this.precheckBehavior = (Enumeration) value; // Enumeration
return value;
case -922577408: // cardinalityBehavior
value = new ActionCardinalityBehaviorEnumFactory().fromType(castToCode(value));
this.cardinalityBehavior = (Enumeration) value; // Enumeration
return value;
case -1014418093: // definition
this.definition = castToReference(value); // Reference
return value;
case 1052666732: // transform
this.transform = castToReference(value); // Reference
return value;
case 572625010: // dynamicValue
this.getDynamicValue().add((PlanDefinitionActionDynamicValueComponent) value); // PlanDefinitionActionDynamicValueComponent
return value;
case -1422950858: // action
this.getAction().add((PlanDefinitionActionComponent) value); // PlanDefinitionActionComponent
return value;
default: return super.setProperty(hash, name, value);
}
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("label")) {
this.label = castToString(value); // StringType
} else if (name.equals("title")) {
this.title = castToString(value); // StringType
} else if (name.equals("description")) {
this.description = castToString(value); // StringType
} else if (name.equals("textEquivalent")) {
this.textEquivalent = castToString(value); // StringType
} else if (name.equals("code")) {
this.getCode().add(castToCodeableConcept(value));
} else if (name.equals("reason")) {
this.getReason().add(castToCodeableConcept(value));
} else if (name.equals("documentation")) {
this.getDocumentation().add(castToRelatedArtifact(value));
} else if (name.equals("goalId")) {
this.getGoalId().add(castToId(value));
} else if (name.equals("triggerDefinition")) {
this.getTriggerDefinition().add(castToTriggerDefinition(value));
} else if (name.equals("condition")) {
this.getCondition().add((PlanDefinitionActionConditionComponent) value);
} else if (name.equals("input")) {
this.getInput().add(castToDataRequirement(value));
} else if (name.equals("output")) {
this.getOutput().add(castToDataRequirement(value));
} else if (name.equals("relatedAction")) {
this.getRelatedAction().add((PlanDefinitionActionRelatedActionComponent) value);
} else if (name.equals("timing[x]")) {
this.timing = castToType(value); // Type
} else if (name.equals("participant")) {
this.getParticipant().add((PlanDefinitionActionParticipantComponent) value);
} else if (name.equals("type")) {
this.type = castToCoding(value); // Coding
} else if (name.equals("groupingBehavior")) {
value = new ActionGroupingBehaviorEnumFactory().fromType(castToCode(value));
this.groupingBehavior = (Enumeration) value; // Enumeration
} else if (name.equals("selectionBehavior")) {
value = new ActionSelectionBehaviorEnumFactory().fromType(castToCode(value));
this.selectionBehavior = (Enumeration) value; // Enumeration
} else if (name.equals("requiredBehavior")) {
value = new ActionRequiredBehaviorEnumFactory().fromType(castToCode(value));
this.requiredBehavior = (Enumeration) value; // Enumeration
} else if (name.equals("precheckBehavior")) {
value = new ActionPrecheckBehaviorEnumFactory().fromType(castToCode(value));
this.precheckBehavior = (Enumeration) value; // Enumeration
} else if (name.equals("cardinalityBehavior")) {
value = new ActionCardinalityBehaviorEnumFactory().fromType(castToCode(value));
this.cardinalityBehavior = (Enumeration) value; // Enumeration
} else if (name.equals("definition")) {
this.definition = castToReference(value); // Reference
} else if (name.equals("transform")) {
this.transform = castToReference(value); // Reference
} else if (name.equals("dynamicValue")) {
this.getDynamicValue().add((PlanDefinitionActionDynamicValueComponent) value);
} else if (name.equals("action")) {
this.getAction().add((PlanDefinitionActionComponent) value);
} else
return super.setProperty(name, value);
return value;
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 102727412: return getLabelElement();
case 110371416: return getTitleElement();
case -1724546052: return getDescriptionElement();
case -900391049: return getTextEquivalentElement();
case 3059181: return addCode();
case -934964668: return addReason();
case 1587405498: return addDocumentation();
case -1240658034: return addGoalIdElement();
case 1126736171: return addTriggerDefinition();
case -861311717: return addCondition();
case 100358090: return addInput();
case -1005512447: return addOutput();
case -384107967: return addRelatedAction();
case 164632566: return getTiming();
case -873664438: return getTiming();
case 767422259: return addParticipant();
case 3575610: return getType();
case 586678389: return getGroupingBehaviorElement();
case 168639486: return getSelectionBehaviorElement();
case -1163906287: return getRequiredBehaviorElement();
case -1174249033: return getPrecheckBehaviorElement();
case -922577408: return getCardinalityBehaviorElement();
case -1014418093: return getDefinition();
case 1052666732: return getTransform();
case 572625010: return addDynamicValue();
case -1422950858: return addAction();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 102727412: /*label*/ return new String[] {"string"};
case 110371416: /*title*/ return new String[] {"string"};
case -1724546052: /*description*/ return new String[] {"string"};
case -900391049: /*textEquivalent*/ return new String[] {"string"};
case 3059181: /*code*/ return new String[] {"CodeableConcept"};
case -934964668: /*reason*/ return new String[] {"CodeableConcept"};
case 1587405498: /*documentation*/ return new String[] {"RelatedArtifact"};
case -1240658034: /*goalId*/ return new String[] {"id"};
case 1126736171: /*triggerDefinition*/ return new String[] {"TriggerDefinition"};
case -861311717: /*condition*/ return new String[] {};
case 100358090: /*input*/ return new String[] {"DataRequirement"};
case -1005512447: /*output*/ return new String[] {"DataRequirement"};
case -384107967: /*relatedAction*/ return new String[] {};
case -873664438: /*timing*/ return new String[] {"dateTime", "Period", "Duration", "Range", "Timing"};
case 767422259: /*participant*/ return new String[] {};
case 3575610: /*type*/ return new String[] {"Coding"};
case 586678389: /*groupingBehavior*/ return new String[] {"code"};
case 168639486: /*selectionBehavior*/ return new String[] {"code"};
case -1163906287: /*requiredBehavior*/ return new String[] {"code"};
case -1174249033: /*precheckBehavior*/ return new String[] {"code"};
case -922577408: /*cardinalityBehavior*/ return new String[] {"code"};
case -1014418093: /*definition*/ return new String[] {"Reference"};
case 1052666732: /*transform*/ return new String[] {"Reference"};
case 572625010: /*dynamicValue*/ return new String[] {};
case -1422950858: /*action*/ return new String[] {"@PlanDefinition.action"};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("label")) {
throw new FHIRException("Cannot call addChild on a singleton property PlanDefinition.label");
}
else if (name.equals("title")) {
throw new FHIRException("Cannot call addChild on a singleton property PlanDefinition.title");
}
else if (name.equals("description")) {
throw new FHIRException("Cannot call addChild on a singleton property PlanDefinition.description");
}
else if (name.equals("textEquivalent")) {
throw new FHIRException("Cannot call addChild on a singleton property PlanDefinition.textEquivalent");
}
else if (name.equals("code")) {
return addCode();
}
else if (name.equals("reason")) {
return addReason();
}
else if (name.equals("documentation")) {
return addDocumentation();
}
else if (name.equals("goalId")) {
throw new FHIRException("Cannot call addChild on a singleton property PlanDefinition.goalId");
}
else if (name.equals("triggerDefinition")) {
return addTriggerDefinition();
}
else if (name.equals("condition")) {
return addCondition();
}
else if (name.equals("input")) {
return addInput();
}
else if (name.equals("output")) {
return addOutput();
}
else if (name.equals("relatedAction")) {
return addRelatedAction();
}
else if (name.equals("timingDateTime")) {
this.timing = new DateTimeType();
return this.timing;
}
else if (name.equals("timingPeriod")) {
this.timing = new Period();
return this.timing;
}
else if (name.equals("timingDuration")) {
this.timing = new Duration();
return this.timing;
}
else if (name.equals("timingRange")) {
this.timing = new Range();
return this.timing;
}
else if (name.equals("timingTiming")) {
this.timing = new Timing();
return this.timing;
}
else if (name.equals("participant")) {
return addParticipant();
}
else if (name.equals("type")) {
this.type = new Coding();
return this.type;
}
else if (name.equals("groupingBehavior")) {
throw new FHIRException("Cannot call addChild on a singleton property PlanDefinition.groupingBehavior");
}
else if (name.equals("selectionBehavior")) {
throw new FHIRException("Cannot call addChild on a singleton property PlanDefinition.selectionBehavior");
}
else if (name.equals("requiredBehavior")) {
throw new FHIRException("Cannot call addChild on a singleton property PlanDefinition.requiredBehavior");
}
else if (name.equals("precheckBehavior")) {
throw new FHIRException("Cannot call addChild on a singleton property PlanDefinition.precheckBehavior");
}
else if (name.equals("cardinalityBehavior")) {
throw new FHIRException("Cannot call addChild on a singleton property PlanDefinition.cardinalityBehavior");
}
else if (name.equals("definition")) {
this.definition = new Reference();
return this.definition;
}
else if (name.equals("transform")) {
this.transform = new Reference();
return this.transform;
}
else if (name.equals("dynamicValue")) {
return addDynamicValue();
}
else if (name.equals("action")) {
return addAction();
}
else
return super.addChild(name);
}
public PlanDefinitionActionComponent copy() {
PlanDefinitionActionComponent dst = new PlanDefinitionActionComponent();
copyValues(dst);
dst.label = label == null ? null : label.copy();
dst.title = title == null ? null : title.copy();
dst.description = description == null ? null : description.copy();
dst.textEquivalent = textEquivalent == null ? null : textEquivalent.copy();
if (code != null) {
dst.code = new ArrayList();
for (CodeableConcept i : code)
dst.code.add(i.copy());
};
if (reason != null) {
dst.reason = new ArrayList();
for (CodeableConcept i : reason)
dst.reason.add(i.copy());
};
if (documentation != null) {
dst.documentation = new ArrayList();
for (RelatedArtifact i : documentation)
dst.documentation.add(i.copy());
};
if (goalId != null) {
dst.goalId = new ArrayList();
for (IdType i : goalId)
dst.goalId.add(i.copy());
};
if (triggerDefinition != null) {
dst.triggerDefinition = new ArrayList();
for (TriggerDefinition i : triggerDefinition)
dst.triggerDefinition.add(i.copy());
};
if (condition != null) {
dst.condition = new ArrayList();
for (PlanDefinitionActionConditionComponent i : condition)
dst.condition.add(i.copy());
};
if (input != null) {
dst.input = new ArrayList();
for (DataRequirement i : input)
dst.input.add(i.copy());
};
if (output != null) {
dst.output = new ArrayList();
for (DataRequirement i : output)
dst.output.add(i.copy());
};
if (relatedAction != null) {
dst.relatedAction = new ArrayList();
for (PlanDefinitionActionRelatedActionComponent i : relatedAction)
dst.relatedAction.add(i.copy());
};
dst.timing = timing == null ? null : timing.copy();
if (participant != null) {
dst.participant = new ArrayList();
for (PlanDefinitionActionParticipantComponent i : participant)
dst.participant.add(i.copy());
};
dst.type = type == null ? null : type.copy();
dst.groupingBehavior = groupingBehavior == null ? null : groupingBehavior.copy();
dst.selectionBehavior = selectionBehavior == null ? null : selectionBehavior.copy();
dst.requiredBehavior = requiredBehavior == null ? null : requiredBehavior.copy();
dst.precheckBehavior = precheckBehavior == null ? null : precheckBehavior.copy();
dst.cardinalityBehavior = cardinalityBehavior == null ? null : cardinalityBehavior.copy();
dst.definition = definition == null ? null : definition.copy();
dst.transform = transform == null ? null : transform.copy();
if (dynamicValue != null) {
dst.dynamicValue = new ArrayList();
for (PlanDefinitionActionDynamicValueComponent i : dynamicValue)
dst.dynamicValue.add(i.copy());
};
if (action != null) {
dst.action = new ArrayList();
for (PlanDefinitionActionComponent i : action)
dst.action.add(i.copy());
};
return dst;
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof PlanDefinitionActionComponent))
return false;
PlanDefinitionActionComponent o = (PlanDefinitionActionComponent) other_;
return compareDeep(label, o.label, true) && compareDeep(title, o.title, true) && compareDeep(description, o.description, true)
&& compareDeep(textEquivalent, o.textEquivalent, true) && compareDeep(code, o.code, true) && compareDeep(reason, o.reason, true)
&& compareDeep(documentation, o.documentation, true) && compareDeep(goalId, o.goalId, true) && compareDeep(triggerDefinition, o.triggerDefinition, true)
&& compareDeep(condition, o.condition, true) && compareDeep(input, o.input, true) && compareDeep(output, o.output, true)
&& compareDeep(relatedAction, o.relatedAction, true) && compareDeep(timing, o.timing, true) && compareDeep(participant, o.participant, true)
&& compareDeep(type, o.type, true) && compareDeep(groupingBehavior, o.groupingBehavior, true) && compareDeep(selectionBehavior, o.selectionBehavior, true)
&& compareDeep(requiredBehavior, o.requiredBehavior, true) && compareDeep(precheckBehavior, o.precheckBehavior, true)
&& compareDeep(cardinalityBehavior, o.cardinalityBehavior, true) && compareDeep(definition, o.definition, true)
&& compareDeep(transform, o.transform, true) && compareDeep(dynamicValue, o.dynamicValue, true)
&& compareDeep(action, o.action, true);
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof PlanDefinitionActionComponent))
return false;
PlanDefinitionActionComponent o = (PlanDefinitionActionComponent) other_;
return compareValues(label, o.label, true) && compareValues(title, o.title, true) && compareValues(description, o.description, true)
&& compareValues(textEquivalent, o.textEquivalent, true) && compareValues(goalId, o.goalId, true) && compareValues(groupingBehavior, o.groupingBehavior, true)
&& compareValues(selectionBehavior, o.selectionBehavior, true) && compareValues(requiredBehavior, o.requiredBehavior, true)
&& compareValues(precheckBehavior, o.precheckBehavior, true) && compareValues(cardinalityBehavior, o.cardinalityBehavior, true)
;
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(label, title, description
, textEquivalent, code, reason, documentation, goalId, triggerDefinition, condition
, input, output, relatedAction, timing, participant, type, groupingBehavior, selectionBehavior
, requiredBehavior, precheckBehavior, cardinalityBehavior, definition, transform, dynamicValue
, action);
}
public String fhirType() {
return "PlanDefinition.action";
}
}
@Block()
public static class PlanDefinitionActionConditionComponent extends BackboneElement implements IBaseBackboneElement {
/**
* The kind of condition.
*/
@Child(name = "kind", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="applicability | start | stop", formalDefinition="The kind of condition." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-condition-kind")
protected Enumeration kind;
/**
* A brief, natural language description of the condition that effectively communicates the intended semantics.
*/
@Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Natural language description of the condition", formalDefinition="A brief, natural language description of the condition that effectively communicates the intended semantics." )
protected StringType description;
/**
* The media type of the language for the expression.
*/
@Child(name = "language", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Language of the expression", formalDefinition="The media type of the language for the expression." )
protected StringType language;
/**
* An expression that returns true or false, indicating whether or not the condition is satisfied.
*/
@Child(name = "expression", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Boolean-valued expression", formalDefinition="An expression that returns true or false, indicating whether or not the condition is satisfied." )
protected StringType expression;
private static final long serialVersionUID = 944300105L;
/**
* Constructor
*/
public PlanDefinitionActionConditionComponent() {
super();
}
/**
* Constructor
*/
public PlanDefinitionActionConditionComponent(Enumeration kind) {
super();
this.kind = kind;
}
/**
* @return {@link #kind} (The kind of condition.). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value
*/
public Enumeration getKindElement() {
if (this.kind == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionActionConditionComponent.kind");
else if (Configuration.doAutoCreate())
this.kind = new Enumeration(new ActionConditionKindEnumFactory()); // bb
return this.kind;
}
public boolean hasKindElement() {
return this.kind != null && !this.kind.isEmpty();
}
public boolean hasKind() {
return this.kind != null && !this.kind.isEmpty();
}
/**
* @param value {@link #kind} (The kind of condition.). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value
*/
public PlanDefinitionActionConditionComponent setKindElement(Enumeration value) {
this.kind = value;
return this;
}
/**
* @return The kind of condition.
*/
public ActionConditionKind getKind() {
return this.kind == null ? null : this.kind.getValue();
}
/**
* @param value The kind of condition.
*/
public PlanDefinitionActionConditionComponent setKind(ActionConditionKind value) {
if (this.kind == null)
this.kind = new Enumeration(new ActionConditionKindEnumFactory());
this.kind.setValue(value);
return this;
}
/**
* @return {@link #description} (A brief, natural language description of the condition that effectively communicates the intended semantics.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
*/
public StringType getDescriptionElement() {
if (this.description == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionActionConditionComponent.description");
else if (Configuration.doAutoCreate())
this.description = new StringType(); // bb
return this.description;
}
public boolean hasDescriptionElement() {
return this.description != null && !this.description.isEmpty();
}
public boolean hasDescription() {
return this.description != null && !this.description.isEmpty();
}
/**
* @param value {@link #description} (A brief, natural language description of the condition that effectively communicates the intended semantics.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
*/
public PlanDefinitionActionConditionComponent setDescriptionElement(StringType value) {
this.description = value;
return this;
}
/**
* @return A brief, natural language description of the condition that effectively communicates the intended semantics.
*/
public String getDescription() {
return this.description == null ? null : this.description.getValue();
}
/**
* @param value A brief, natural language description of the condition that effectively communicates the intended semantics.
*/
public PlanDefinitionActionConditionComponent setDescription(String value) {
if (Utilities.noString(value))
this.description = null;
else {
if (this.description == null)
this.description = new StringType();
this.description.setValue(value);
}
return this;
}
/**
* @return {@link #language} (The media type of the language for the expression.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value
*/
public StringType getLanguageElement() {
if (this.language == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionActionConditionComponent.language");
else if (Configuration.doAutoCreate())
this.language = new StringType(); // bb
return this.language;
}
public boolean hasLanguageElement() {
return this.language != null && !this.language.isEmpty();
}
public boolean hasLanguage() {
return this.language != null && !this.language.isEmpty();
}
/**
* @param value {@link #language} (The media type of the language for the expression.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value
*/
public PlanDefinitionActionConditionComponent setLanguageElement(StringType value) {
this.language = value;
return this;
}
/**
* @return The media type of the language for the expression.
*/
public String getLanguage() {
return this.language == null ? null : this.language.getValue();
}
/**
* @param value The media type of the language for the expression.
*/
public PlanDefinitionActionConditionComponent setLanguage(String value) {
if (Utilities.noString(value))
this.language = null;
else {
if (this.language == null)
this.language = new StringType();
this.language.setValue(value);
}
return this;
}
/**
* @return {@link #expression} (An expression that returns true or false, indicating whether or not the condition is satisfied.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value
*/
public StringType getExpressionElement() {
if (this.expression == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionActionConditionComponent.expression");
else if (Configuration.doAutoCreate())
this.expression = new StringType(); // bb
return this.expression;
}
public boolean hasExpressionElement() {
return this.expression != null && !this.expression.isEmpty();
}
public boolean hasExpression() {
return this.expression != null && !this.expression.isEmpty();
}
/**
* @param value {@link #expression} (An expression that returns true or false, indicating whether or not the condition is satisfied.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value
*/
public PlanDefinitionActionConditionComponent setExpressionElement(StringType value) {
this.expression = value;
return this;
}
/**
* @return An expression that returns true or false, indicating whether or not the condition is satisfied.
*/
public String getExpression() {
return this.expression == null ? null : this.expression.getValue();
}
/**
* @param value An expression that returns true or false, indicating whether or not the condition is satisfied.
*/
public PlanDefinitionActionConditionComponent setExpression(String value) {
if (Utilities.noString(value))
this.expression = null;
else {
if (this.expression == null)
this.expression = new StringType();
this.expression.setValue(value);
}
return this;
}
protected void listChildren(List children) {
super.listChildren(children);
children.add(new Property("kind", "code", "The kind of condition.", 0, 1, kind));
children.add(new Property("description", "string", "A brief, natural language description of the condition that effectively communicates the intended semantics.", 0, 1, description));
children.add(new Property("language", "string", "The media type of the language for the expression.", 0, 1, language));
children.add(new Property("expression", "string", "An expression that returns true or false, indicating whether or not the condition is satisfied.", 0, 1, expression));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case 3292052: /*kind*/ return new Property("kind", "code", "The kind of condition.", 0, 1, kind);
case -1724546052: /*description*/ return new Property("description", "string", "A brief, natural language description of the condition that effectively communicates the intended semantics.", 0, 1, description);
case -1613589672: /*language*/ return new Property("language", "string", "The media type of the language for the expression.", 0, 1, language);
case -1795452264: /*expression*/ return new Property("expression", "string", "An expression that returns true or false, indicating whether or not the condition is satisfied.", 0, 1, expression);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case 3292052: /*kind*/ return this.kind == null ? new Base[0] : new Base[] {this.kind}; // Enumeration
case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
case -1613589672: /*language*/ return this.language == null ? new Base[0] : new Base[] {this.language}; // 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 Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3292052: // kind
value = new ActionConditionKindEnumFactory().fromType(castToCode(value));
this.kind = (Enumeration) value; // Enumeration
return value;
case -1724546052: // description
this.description = castToString(value); // StringType
return value;
case -1613589672: // language
this.language = castToString(value); // StringType
return value;
case -1795452264: // expression
this.expression = castToString(value); // StringType
return value;
default: return super.setProperty(hash, name, value);
}
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("kind")) {
value = new ActionConditionKindEnumFactory().fromType(castToCode(value));
this.kind = (Enumeration) value; // Enumeration
} else if (name.equals("description")) {
this.description = castToString(value); // StringType
} else if (name.equals("language")) {
this.language = castToString(value); // StringType
} else if (name.equals("expression")) {
this.expression = castToString(value); // StringType
} else
return super.setProperty(name, value);
return value;
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3292052: return getKindElement();
case -1724546052: return getDescriptionElement();
case -1613589672: return getLanguageElement();
case -1795452264: return getExpressionElement();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3292052: /*kind*/ return new String[] {"code"};
case -1724546052: /*description*/ return new String[] {"string"};
case -1613589672: /*language*/ return new String[] {"string"};
case -1795452264: /*expression*/ return new String[] {"string"};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("kind")) {
throw new FHIRException("Cannot call addChild on a singleton property PlanDefinition.kind");
}
else if (name.equals("description")) {
throw new FHIRException("Cannot call addChild on a singleton property PlanDefinition.description");
}
else if (name.equals("language")) {
throw new FHIRException("Cannot call addChild on a singleton property PlanDefinition.language");
}
else if (name.equals("expression")) {
throw new FHIRException("Cannot call addChild on a singleton property PlanDefinition.expression");
}
else
return super.addChild(name);
}
public PlanDefinitionActionConditionComponent copy() {
PlanDefinitionActionConditionComponent dst = new PlanDefinitionActionConditionComponent();
copyValues(dst);
dst.kind = kind == null ? null : kind.copy();
dst.description = description == null ? null : description.copy();
dst.language = language == null ? null : language.copy();
dst.expression = expression == null ? null : expression.copy();
return dst;
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof PlanDefinitionActionConditionComponent))
return false;
PlanDefinitionActionConditionComponent o = (PlanDefinitionActionConditionComponent) other_;
return compareDeep(kind, o.kind, true) && compareDeep(description, o.description, true) && compareDeep(language, o.language, true)
&& compareDeep(expression, o.expression, true);
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof PlanDefinitionActionConditionComponent))
return false;
PlanDefinitionActionConditionComponent o = (PlanDefinitionActionConditionComponent) other_;
return compareValues(kind, o.kind, true) && compareValues(description, o.description, true) && compareValues(language, o.language, true)
&& compareValues(expression, o.expression, true);
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(kind, description, language
, expression);
}
public String fhirType() {
return "PlanDefinition.action.condition";
}
}
@Block()
public static class PlanDefinitionActionRelatedActionComponent extends BackboneElement implements IBaseBackboneElement {
/**
* The element id of the related action.
*/
@Child(name = "actionId", type = {IdType.class}, order=1, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="What action is this related to", formalDefinition="The element id of the related action." )
protected IdType actionId;
/**
* The relationship of this action to the related action.
*/
@Child(name = "relationship", type = {CodeType.class}, order=2, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="before-start | before | before-end | concurrent-with-start | concurrent | concurrent-with-end | after-start | after | after-end", formalDefinition="The relationship of this action to the related action." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-relationship-type")
protected Enumeration relationship;
/**
* A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.
*/
@Child(name = "offset", type = {Duration.class, Range.class}, order=3, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Time offset for the relationship", formalDefinition="A duration or range of durations to apply to the relationship. For example, 30-60 minutes before." )
protected Type offset;
private static final long serialVersionUID = 1063306770L;
/**
* Constructor
*/
public PlanDefinitionActionRelatedActionComponent() {
super();
}
/**
* Constructor
*/
public PlanDefinitionActionRelatedActionComponent(IdType actionId, Enumeration relationship) {
super();
this.actionId = actionId;
this.relationship = relationship;
}
/**
* @return {@link #actionId} (The element id of the related action.). This is the underlying object with id, value and extensions. The accessor "getActionId" gives direct access to the value
*/
public IdType getActionIdElement() {
if (this.actionId == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionActionRelatedActionComponent.actionId");
else if (Configuration.doAutoCreate())
this.actionId = new IdType(); // bb
return this.actionId;
}
public boolean hasActionIdElement() {
return this.actionId != null && !this.actionId.isEmpty();
}
public boolean hasActionId() {
return this.actionId != null && !this.actionId.isEmpty();
}
/**
* @param value {@link #actionId} (The element id of the related action.). This is the underlying object with id, value and extensions. The accessor "getActionId" gives direct access to the value
*/
public PlanDefinitionActionRelatedActionComponent setActionIdElement(IdType value) {
this.actionId = value;
return this;
}
/**
* @return The element id of the related action.
*/
public String getActionId() {
return this.actionId == null ? null : this.actionId.getValue();
}
/**
* @param value The element id of the related action.
*/
public PlanDefinitionActionRelatedActionComponent setActionId(String value) {
if (this.actionId == null)
this.actionId = new IdType();
this.actionId.setValue(value);
return this;
}
/**
* @return {@link #relationship} (The relationship of this action to the related action.). This is the underlying object with id, value and extensions. The accessor "getRelationship" gives direct access to the value
*/
public Enumeration getRelationshipElement() {
if (this.relationship == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionActionRelatedActionComponent.relationship");
else if (Configuration.doAutoCreate())
this.relationship = new Enumeration(new ActionRelationshipTypeEnumFactory()); // bb
return this.relationship;
}
public boolean hasRelationshipElement() {
return this.relationship != null && !this.relationship.isEmpty();
}
public boolean hasRelationship() {
return this.relationship != null && !this.relationship.isEmpty();
}
/**
* @param value {@link #relationship} (The relationship of this action to the related action.). This is the underlying object with id, value and extensions. The accessor "getRelationship" gives direct access to the value
*/
public PlanDefinitionActionRelatedActionComponent setRelationshipElement(Enumeration value) {
this.relationship = value;
return this;
}
/**
* @return The relationship of this action to the related action.
*/
public ActionRelationshipType getRelationship() {
return this.relationship == null ? null : this.relationship.getValue();
}
/**
* @param value The relationship of this action to the related action.
*/
public PlanDefinitionActionRelatedActionComponent setRelationship(ActionRelationshipType value) {
if (this.relationship == null)
this.relationship = new Enumeration(new ActionRelationshipTypeEnumFactory());
this.relationship.setValue(value);
return this;
}
/**
* @return {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.)
*/
public Type getOffset() {
return this.offset;
}
/**
* @return {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.)
*/
public Duration getOffsetDuration() throws FHIRException {
if (this.offset == null)
return null;
if (!(this.offset instanceof Duration))
throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.offset.getClass().getName()+" was encountered");
return (Duration) this.offset;
}
public boolean hasOffsetDuration() {
return this != null && this.offset instanceof Duration;
}
/**
* @return {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.)
*/
public Range getOffsetRange() throws FHIRException {
if (this.offset == null)
return null;
if (!(this.offset instanceof Range))
throw new FHIRException("Type mismatch: the type Range was expected, but "+this.offset.getClass().getName()+" was encountered");
return (Range) this.offset;
}
public boolean hasOffsetRange() {
return this != null && this.offset instanceof Range;
}
public boolean hasOffset() {
return this.offset != null && !this.offset.isEmpty();
}
/**
* @param value {@link #offset} (A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.)
*/
public PlanDefinitionActionRelatedActionComponent setOffset(Type value) throws FHIRFormatError {
if (value != null && !(value instanceof Duration || value instanceof Range))
throw new FHIRFormatError("Not the right type for PlanDefinition.action.relatedAction.offset[x]: "+value.fhirType());
this.offset = value;
return this;
}
protected void listChildren(List children) {
super.listChildren(children);
children.add(new Property("actionId", "id", "The element id of the related action.", 0, 1, actionId));
children.add(new Property("relationship", "code", "The relationship of this action to the related action.", 0, 1, relationship));
children.add(new Property("offset[x]", "Duration|Range", "A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.", 0, 1, offset));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case -1656172047: /*actionId*/ return new Property("actionId", "id", "The element id of the related action.", 0, 1, actionId);
case -261851592: /*relationship*/ return new Property("relationship", "code", "The relationship of this action to the related action.", 0, 1, relationship);
case -1960684787: /*offset[x]*/ return new Property("offset[x]", "Duration|Range", "A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.", 0, 1, offset);
case -1019779949: /*offset*/ return new Property("offset[x]", "Duration|Range", "A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.", 0, 1, offset);
case 134075207: /*offsetDuration*/ return new Property("offset[x]", "Duration|Range", "A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.", 0, 1, offset);
case 1263585386: /*offsetRange*/ return new Property("offset[x]", "Duration|Range", "A duration or range of durations to apply to the relationship. For example, 30-60 minutes before.", 0, 1, offset);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1656172047: /*actionId*/ return this.actionId == null ? new Base[0] : new Base[] {this.actionId}; // IdType
case -261851592: /*relationship*/ return this.relationship == null ? new Base[0] : new Base[] {this.relationship}; // Enumeration
case -1019779949: /*offset*/ return this.offset == null ? new Base[0] : new Base[] {this.offset}; // Type
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1656172047: // actionId
this.actionId = castToId(value); // IdType
return value;
case -261851592: // relationship
value = new ActionRelationshipTypeEnumFactory().fromType(castToCode(value));
this.relationship = (Enumeration) value; // Enumeration
return value;
case -1019779949: // offset
this.offset = castToType(value); // Type
return value;
default: return super.setProperty(hash, name, value);
}
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("actionId")) {
this.actionId = castToId(value); // IdType
} else if (name.equals("relationship")) {
value = new ActionRelationshipTypeEnumFactory().fromType(castToCode(value));
this.relationship = (Enumeration) value; // Enumeration
} else if (name.equals("offset[x]")) {
this.offset = castToType(value); // Type
} else
return super.setProperty(name, value);
return value;
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1656172047: return getActionIdElement();
case -261851592: return getRelationshipElement();
case -1960684787: return getOffset();
case -1019779949: return getOffset();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1656172047: /*actionId*/ return new String[] {"id"};
case -261851592: /*relationship*/ return new String[] {"code"};
case -1019779949: /*offset*/ return new String[] {"Duration", "Range"};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("actionId")) {
throw new FHIRException("Cannot call addChild on a singleton property PlanDefinition.actionId");
}
else if (name.equals("relationship")) {
throw new FHIRException("Cannot call addChild on a singleton property PlanDefinition.relationship");
}
else if (name.equals("offsetDuration")) {
this.offset = new Duration();
return this.offset;
}
else if (name.equals("offsetRange")) {
this.offset = new Range();
return this.offset;
}
else
return super.addChild(name);
}
public PlanDefinitionActionRelatedActionComponent copy() {
PlanDefinitionActionRelatedActionComponent dst = new PlanDefinitionActionRelatedActionComponent();
copyValues(dst);
dst.actionId = actionId == null ? null : actionId.copy();
dst.relationship = relationship == null ? null : relationship.copy();
dst.offset = offset == null ? null : offset.copy();
return dst;
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof PlanDefinitionActionRelatedActionComponent))
return false;
PlanDefinitionActionRelatedActionComponent o = (PlanDefinitionActionRelatedActionComponent) other_;
return compareDeep(actionId, o.actionId, true) && compareDeep(relationship, o.relationship, true)
&& compareDeep(offset, o.offset, true);
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof PlanDefinitionActionRelatedActionComponent))
return false;
PlanDefinitionActionRelatedActionComponent o = (PlanDefinitionActionRelatedActionComponent) other_;
return compareValues(actionId, o.actionId, true) && compareValues(relationship, o.relationship, true)
;
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(actionId, relationship, offset
);
}
public String fhirType() {
return "PlanDefinition.action.relatedAction";
}
}
@Block()
public static class PlanDefinitionActionParticipantComponent extends BackboneElement implements IBaseBackboneElement {
/**
* The type of participant in the action.
*/
@Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false)
@Description(shortDefinition="patient | practitioner | related-person", formalDefinition="The type of participant in the action." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-participant-type")
protected Enumeration type;
/**
* The role the participant should play in performing the described action.
*/
@Child(name = "role", type = {CodeableConcept.class}, order=2, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="E.g. Nurse, Surgeon, Parent, etc", formalDefinition="The role the participant should play in performing the described action." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/action-participant-role")
protected CodeableConcept role;
private static final long serialVersionUID = -1152013659L;
/**
* Constructor
*/
public PlanDefinitionActionParticipantComponent() {
super();
}
/**
* Constructor
*/
public PlanDefinitionActionParticipantComponent(Enumeration type) {
super();
this.type = type;
}
/**
* @return {@link #type} (The type of participant in the action.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
*/
public Enumeration getTypeElement() {
if (this.type == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionActionParticipantComponent.type");
else if (Configuration.doAutoCreate())
this.type = new Enumeration(new ActionParticipantTypeEnumFactory()); // bb
return this.type;
}
public boolean hasTypeElement() {
return this.type != null && !this.type.isEmpty();
}
public boolean hasType() {
return this.type != null && !this.type.isEmpty();
}
/**
* @param value {@link #type} (The type of participant in the action.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
*/
public PlanDefinitionActionParticipantComponent setTypeElement(Enumeration value) {
this.type = value;
return this;
}
/**
* @return The type of participant in the action.
*/
public ActionParticipantType getType() {
return this.type == null ? null : this.type.getValue();
}
/**
* @param value The type of participant in the action.
*/
public PlanDefinitionActionParticipantComponent setType(ActionParticipantType value) {
if (this.type == null)
this.type = new Enumeration(new ActionParticipantTypeEnumFactory());
this.type.setValue(value);
return this;
}
/**
* @return {@link #role} (The role the participant should play in performing the described action.)
*/
public CodeableConcept getRole() {
if (this.role == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionActionParticipantComponent.role");
else if (Configuration.doAutoCreate())
this.role = new CodeableConcept(); // cc
return this.role;
}
public boolean hasRole() {
return this.role != null && !this.role.isEmpty();
}
/**
* @param value {@link #role} (The role the participant should play in performing the described action.)
*/
public PlanDefinitionActionParticipantComponent setRole(CodeableConcept value) {
this.role = value;
return this;
}
protected void listChildren(List children) {
super.listChildren(children);
children.add(new Property("type", "code", "The type of participant in the action.", 0, 1, type));
children.add(new Property("role", "CodeableConcept", "The role the participant should play in performing the described action.", 0, 1, role));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case 3575610: /*type*/ return new Property("type", "code", "The type of participant in the action.", 0, 1, type);
case 3506294: /*role*/ return new Property("role", "CodeableConcept", "The role the participant should play in performing the described action.", 0, 1, role);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@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
case 3506294: /*role*/ return this.role == null ? new Base[0] : new Base[] {this.role}; // CodeableConcept
default: return super.getProperty(hash, name, checkValid);
}
}
@Override
public Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case 3575610: // type
value = new ActionParticipantTypeEnumFactory().fromType(castToCode(value));
this.type = (Enumeration) value; // Enumeration
return value;
case 3506294: // role
this.role = castToCodeableConcept(value); // CodeableConcept
return value;
default: return super.setProperty(hash, name, value);
}
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("type")) {
value = new ActionParticipantTypeEnumFactory().fromType(castToCode(value));
this.type = (Enumeration) value; // Enumeration
} else if (name.equals("role")) {
this.role = castToCodeableConcept(value); // CodeableConcept
} else
return super.setProperty(name, value);
return value;
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3575610: return getTypeElement();
case 3506294: return getRole();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case 3575610: /*type*/ return new String[] {"code"};
case 3506294: /*role*/ return new String[] {"CodeableConcept"};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("type")) {
throw new FHIRException("Cannot call addChild on a singleton property PlanDefinition.type");
}
else if (name.equals("role")) {
this.role = new CodeableConcept();
return this.role;
}
else
return super.addChild(name);
}
public PlanDefinitionActionParticipantComponent copy() {
PlanDefinitionActionParticipantComponent dst = new PlanDefinitionActionParticipantComponent();
copyValues(dst);
dst.type = type == null ? null : type.copy();
dst.role = role == null ? null : role.copy();
return dst;
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof PlanDefinitionActionParticipantComponent))
return false;
PlanDefinitionActionParticipantComponent o = (PlanDefinitionActionParticipantComponent) other_;
return compareDeep(type, o.type, true) && compareDeep(role, o.role, true);
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof PlanDefinitionActionParticipantComponent))
return false;
PlanDefinitionActionParticipantComponent o = (PlanDefinitionActionParticipantComponent) other_;
return compareValues(type, o.type, true);
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, role);
}
public String fhirType() {
return "PlanDefinition.action.participant";
}
}
@Block()
public static class PlanDefinitionActionDynamicValueComponent extends BackboneElement implements IBaseBackboneElement {
/**
* A brief, natural language description of the intended semantics of the dynamic value.
*/
@Child(name = "description", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Natural language description of the dynamic value", formalDefinition="A brief, natural language description of the intended semantics of the dynamic value." )
protected StringType description;
/**
* The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression.
*/
@Child(name = "path", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="The path to the element to be set dynamically", formalDefinition="The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression." )
protected StringType path;
/**
* The media type of the language for the expression.
*/
@Child(name = "language", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Language of the expression", formalDefinition="The media type of the language for the expression." )
protected StringType language;
/**
* An expression specifying the value of the customized element.
*/
@Child(name = "expression", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="An expression that provides the dynamic value for the customization", formalDefinition="An expression specifying the value of the customized element." )
protected StringType expression;
private static final long serialVersionUID = 448404361L;
/**
* Constructor
*/
public PlanDefinitionActionDynamicValueComponent() {
super();
}
/**
* @return {@link #description} (A brief, natural language description of the intended semantics of the dynamic value.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
*/
public StringType getDescriptionElement() {
if (this.description == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionActionDynamicValueComponent.description");
else if (Configuration.doAutoCreate())
this.description = new StringType(); // bb
return this.description;
}
public boolean hasDescriptionElement() {
return this.description != null && !this.description.isEmpty();
}
public boolean hasDescription() {
return this.description != null && !this.description.isEmpty();
}
/**
* @param value {@link #description} (A brief, natural language description of the intended semantics of the dynamic value.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value
*/
public PlanDefinitionActionDynamicValueComponent setDescriptionElement(StringType value) {
this.description = value;
return this;
}
/**
* @return A brief, natural language description of the intended semantics of the dynamic value.
*/
public String getDescription() {
return this.description == null ? null : this.description.getValue();
}
/**
* @param value A brief, natural language description of the intended semantics of the dynamic value.
*/
public PlanDefinitionActionDynamicValueComponent setDescription(String value) {
if (Utilities.noString(value))
this.description = null;
else {
if (this.description == null)
this.description = new StringType();
this.description.setValue(value);
}
return this;
}
/**
* @return {@link #path} (The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value
*/
public StringType getPathElement() {
if (this.path == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionActionDynamicValueComponent.path");
else if (Configuration.doAutoCreate())
this.path = new StringType(); // bb
return this.path;
}
public boolean hasPathElement() {
return this.path != null && !this.path.isEmpty();
}
public boolean hasPath() {
return this.path != null && !this.path.isEmpty();
}
/**
* @param value {@link #path} (The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression.). This is the underlying object with id, value and extensions. The accessor "getPath" gives direct access to the value
*/
public PlanDefinitionActionDynamicValueComponent setPathElement(StringType value) {
this.path = value;
return this;
}
/**
* @return The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression.
*/
public String getPath() {
return this.path == null ? null : this.path.getValue();
}
/**
* @param value The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression.
*/
public PlanDefinitionActionDynamicValueComponent setPath(String value) {
if (Utilities.noString(value))
this.path = null;
else {
if (this.path == null)
this.path = new StringType();
this.path.setValue(value);
}
return this;
}
/**
* @return {@link #language} (The media type of the language for the expression.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value
*/
public StringType getLanguageElement() {
if (this.language == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionActionDynamicValueComponent.language");
else if (Configuration.doAutoCreate())
this.language = new StringType(); // bb
return this.language;
}
public boolean hasLanguageElement() {
return this.language != null && !this.language.isEmpty();
}
public boolean hasLanguage() {
return this.language != null && !this.language.isEmpty();
}
/**
* @param value {@link #language} (The media type of the language for the expression.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value
*/
public PlanDefinitionActionDynamicValueComponent setLanguageElement(StringType value) {
this.language = value;
return this;
}
/**
* @return The media type of the language for the expression.
*/
public String getLanguage() {
return this.language == null ? null : this.language.getValue();
}
/**
* @param value The media type of the language for the expression.
*/
public PlanDefinitionActionDynamicValueComponent setLanguage(String value) {
if (Utilities.noString(value))
this.language = null;
else {
if (this.language == null)
this.language = new StringType();
this.language.setValue(value);
}
return this;
}
/**
* @return {@link #expression} (An expression specifying the value of the customized element.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value
*/
public StringType getExpressionElement() {
if (this.expression == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinitionActionDynamicValueComponent.expression");
else if (Configuration.doAutoCreate())
this.expression = new StringType(); // bb
return this.expression;
}
public boolean hasExpressionElement() {
return this.expression != null && !this.expression.isEmpty();
}
public boolean hasExpression() {
return this.expression != null && !this.expression.isEmpty();
}
/**
* @param value {@link #expression} (An expression specifying the value of the customized element.). This is the underlying object with id, value and extensions. The accessor "getExpression" gives direct access to the value
*/
public PlanDefinitionActionDynamicValueComponent setExpressionElement(StringType value) {
this.expression = value;
return this;
}
/**
* @return An expression specifying the value of the customized element.
*/
public String getExpression() {
return this.expression == null ? null : this.expression.getValue();
}
/**
* @param value An expression specifying the value of the customized element.
*/
public PlanDefinitionActionDynamicValueComponent setExpression(String value) {
if (Utilities.noString(value))
this.expression = null;
else {
if (this.expression == null)
this.expression = new StringType();
this.expression.setValue(value);
}
return this;
}
protected void listChildren(List children) {
super.listChildren(children);
children.add(new Property("description", "string", "A brief, natural language description of the intended semantics of the dynamic value.", 0, 1, description));
children.add(new Property("path", "string", "The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression.", 0, 1, path));
children.add(new Property("language", "string", "The media type of the language for the expression.", 0, 1, language));
children.add(new Property("expression", "string", "An expression specifying the value of the customized element.", 0, 1, expression));
}
@Override
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException {
switch (_hash) {
case -1724546052: /*description*/ return new Property("description", "string", "A brief, natural language description of the intended semantics of the dynamic value.", 0, 1, description);
case 3433509: /*path*/ return new Property("path", "string", "The path to the element to be customized. This is the path on the resource that will hold the result of the calculation defined by the expression.", 0, 1, path);
case -1613589672: /*language*/ return new Property("language", "string", "The media type of the language for the expression.", 0, 1, language);
case -1795452264: /*expression*/ return new Property("expression", "string", "An expression specifying the value of the customized element.", 0, 1, expression);
default: return super.getNamedProperty(_hash, _name, _checkValid);
}
}
@Override
public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException {
switch (hash) {
case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType
case 3433509: /*path*/ return this.path == null ? new Base[0] : new Base[] {this.path}; // StringType
case -1613589672: /*language*/ return this.language == null ? new Base[0] : new Base[] {this.language}; // 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 Base setProperty(int hash, String name, Base value) throws FHIRException {
switch (hash) {
case -1724546052: // description
this.description = castToString(value); // StringType
return value;
case 3433509: // path
this.path = castToString(value); // StringType
return value;
case -1613589672: // language
this.language = castToString(value); // StringType
return value;
case -1795452264: // expression
this.expression = castToString(value); // StringType
return value;
default: return super.setProperty(hash, name, value);
}
}
@Override
public Base setProperty(String name, Base value) throws FHIRException {
if (name.equals("description")) {
this.description = castToString(value); // StringType
} else if (name.equals("path")) {
this.path = castToString(value); // StringType
} else if (name.equals("language")) {
this.language = castToString(value); // StringType
} else if (name.equals("expression")) {
this.expression = castToString(value); // StringType
} else
return super.setProperty(name, value);
return value;
}
@Override
public Base makeProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1724546052: return getDescriptionElement();
case 3433509: return getPathElement();
case -1613589672: return getLanguageElement();
case -1795452264: return getExpressionElement();
default: return super.makeProperty(hash, name);
}
}
@Override
public String[] getTypesForProperty(int hash, String name) throws FHIRException {
switch (hash) {
case -1724546052: /*description*/ return new String[] {"string"};
case 3433509: /*path*/ return new String[] {"string"};
case -1613589672: /*language*/ return new String[] {"string"};
case -1795452264: /*expression*/ return new String[] {"string"};
default: return super.getTypesForProperty(hash, name);
}
}
@Override
public Base addChild(String name) throws FHIRException {
if (name.equals("description")) {
throw new FHIRException("Cannot call addChild on a singleton property PlanDefinition.description");
}
else if (name.equals("path")) {
throw new FHIRException("Cannot call addChild on a singleton property PlanDefinition.path");
}
else if (name.equals("language")) {
throw new FHIRException("Cannot call addChild on a singleton property PlanDefinition.language");
}
else if (name.equals("expression")) {
throw new FHIRException("Cannot call addChild on a singleton property PlanDefinition.expression");
}
else
return super.addChild(name);
}
public PlanDefinitionActionDynamicValueComponent copy() {
PlanDefinitionActionDynamicValueComponent dst = new PlanDefinitionActionDynamicValueComponent();
copyValues(dst);
dst.description = description == null ? null : description.copy();
dst.path = path == null ? null : path.copy();
dst.language = language == null ? null : language.copy();
dst.expression = expression == null ? null : expression.copy();
return dst;
}
@Override
public boolean equalsDeep(Base other_) {
if (!super.equalsDeep(other_))
return false;
if (!(other_ instanceof PlanDefinitionActionDynamicValueComponent))
return false;
PlanDefinitionActionDynamicValueComponent o = (PlanDefinitionActionDynamicValueComponent) other_;
return compareDeep(description, o.description, true) && compareDeep(path, o.path, true) && compareDeep(language, o.language, true)
&& compareDeep(expression, o.expression, true);
}
@Override
public boolean equalsShallow(Base other_) {
if (!super.equalsShallow(other_))
return false;
if (!(other_ instanceof PlanDefinitionActionDynamicValueComponent))
return false;
PlanDefinitionActionDynamicValueComponent o = (PlanDefinitionActionDynamicValueComponent) other_;
return compareValues(description, o.description, true) && compareValues(path, o.path, true) && compareValues(language, o.language, true)
&& compareValues(expression, o.expression, true);
}
public boolean isEmpty() {
return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(description, path, language
, expression);
}
public String fhirType() {
return "PlanDefinition.action.dynamicValue";
}
}
/**
* A formal identifier that is used to identify this plan definition when it is represented in other formats, or referenced in a specification, model, design or an instance.
*/
@Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true)
@Description(shortDefinition="Additional identifier for the plan definition", formalDefinition="A formal identifier that is used to identify this plan definition when it is represented in other formats, or referenced in a specification, model, design or an instance." )
protected List identifier;
/**
* The type of asset the plan definition represents, e.g. an order set, protocol, or event-condition-action rule.
*/
@Child(name = "type", type = {CodeableConcept.class}, order=1, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="order-set | protocol | eca-rule", formalDefinition="The type of asset the plan definition represents, e.g. an order set, protocol, or event-condition-action rule." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/plan-definition-type")
protected CodeableConcept type;
/**
* Explaination of why this plan definition is needed and why it has been designed as it has.
*/
@Child(name = "purpose", type = {MarkdownType.class}, order=2, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Why this plan definition is defined", formalDefinition="Explaination of why this plan definition is needed and why it has been designed as it has." )
protected MarkdownType purpose;
/**
* A detailed description of how the asset is used from a clinical perspective.
*/
@Child(name = "usage", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Describes the clinical usage of the asset", formalDefinition="A detailed description of how the asset is used from a clinical perspective." )
protected StringType usage;
/**
* The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage.
*/
@Child(name = "approvalDate", type = {DateType.class}, order=4, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="When the plan definition was approved by publisher", formalDefinition="The date on which the resource content was approved by the publisher. Approval happens once when the content is officially approved for usage." )
protected DateType approvalDate;
/**
* The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date.
*/
@Child(name = "lastReviewDate", type = {DateType.class}, order=5, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="When the plan definition was last reviewed", formalDefinition="The date on which the resource content was last reviewed. Review happens periodically after approval, but doesn't change the original approval date." )
protected DateType lastReviewDate;
/**
* The period during which the plan definition content was or is planned to be in active use.
*/
@Child(name = "effectivePeriod", type = {Period.class}, order=6, min=0, max=1, modifier=false, summary=true)
@Description(shortDefinition="When the plan definition is expected to be used", formalDefinition="The period during which the plan definition content was or is planned to be in active use." )
protected Period effectivePeriod;
/**
* Descriptive topics related to the content of the plan definition. Topics provide a high-level categorization of the definition that can be useful for filtering and searching.
*/
@Child(name = "topic", type = {CodeableConcept.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="E.g. Education, Treatment, Assessment, etc", formalDefinition="Descriptive topics related to the content of the plan definition. Topics provide a high-level categorization of the definition that can be useful for filtering and searching." )
@ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/definition-topic")
protected List topic;
/**
* A contributor to the content of the asset, including authors, editors, reviewers, and endorsers.
*/
@Child(name = "contributor", type = {Contributor.class}, order=8, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="A content contributor", formalDefinition="A contributor to the content of the asset, including authors, editors, reviewers, and endorsers." )
protected List contributor;
/**
* A copyright statement relating to the plan definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the plan definition.
*/
@Child(name = "copyright", type = {MarkdownType.class}, order=9, min=0, max=1, modifier=false, summary=false)
@Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the plan definition and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the plan definition." )
protected MarkdownType copyright;
/**
* Related artifacts such as additional documentation, justification, or bibliographic references.
*/
@Child(name = "relatedArtifact", type = {RelatedArtifact.class}, order=10, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Related artifacts for the asset", formalDefinition="Related artifacts such as additional documentation, justification, or bibliographic references." )
protected List relatedArtifact;
/**
* A reference to a Library resource containing any formal logic used by the plan definition.
*/
@Child(name = "library", type = {Library.class}, order=11, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Logic used by the plan definition", formalDefinition="A reference to a Library resource containing any formal logic used by the plan definition." )
protected List library;
/**
* The actual objects that are the target of the reference (A reference to a Library resource containing any formal logic used by the plan definition.)
*/
protected List libraryTarget;
/**
* Goals that describe what the activities within the plan are intended to achieve. For example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc.
*/
@Child(name = "goal", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="What the plan is trying to accomplish", formalDefinition="Goals that describe what the activities within the plan are intended to achieve. For example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc." )
protected List goal;
/**
* An action to be taken as part of the plan.
*/
@Child(name = "action", type = {}, order=13, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false)
@Description(shortDefinition="Action defined by the plan", formalDefinition="An action to be taken as part of the plan." )
protected List action;
private static final long serialVersionUID = -1191108677L;
/**
* Constructor
*/
public PlanDefinition() {
super();
}
/**
* Constructor
*/
public PlanDefinition(Enumeration status) {
super();
this.status = status;
}
/**
* @return {@link #url} (An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this plan definition is (or will be) published. The URL SHOULD include the major version of the plan definition. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
*/
public UriType getUrlElement() {
if (this.url == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinition.url");
else if (Configuration.doAutoCreate())
this.url = new UriType(); // bb
return this.url;
}
public boolean hasUrlElement() {
return this.url != null && !this.url.isEmpty();
}
public boolean hasUrl() {
return this.url != null && !this.url.isEmpty();
}
/**
* @param value {@link #url} (An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this plan definition is (or will be) published. The URL SHOULD include the major version of the plan definition. For more information see [Technical and Business Versions](resource.html#versions).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
*/
public PlanDefinition setUrlElement(UriType value) {
this.url = value;
return this;
}
/**
* @return An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this plan definition is (or will be) published. The URL SHOULD include the major version of the plan definition. For more information see [Technical and Business Versions](resource.html#versions).
*/
public String getUrl() {
return this.url == null ? null : this.url.getValue();
}
/**
* @param value An absolute URI that is used to identify this plan definition when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this plan definition is (or will be) published. The URL SHOULD include the major version of the plan definition. For more information see [Technical and Business Versions](resource.html#versions).
*/
public PlanDefinition setUrl(String value) {
if (Utilities.noString(value))
this.url = null;
else {
if (this.url == null)
this.url = new UriType();
this.url.setValue(value);
}
return this;
}
/**
* @return {@link #identifier} (A formal identifier that is used to identify this plan definition when it is represented in other formats, or referenced in a specification, model, design or an instance.)
*/
public List getIdentifier() {
if (this.identifier == null)
this.identifier = new ArrayList();
return this.identifier;
}
/**
* @return Returns a reference to this
for easy method chaining
*/
public PlanDefinition setIdentifier(List theIdentifier) {
this.identifier = theIdentifier;
return this;
}
public boolean hasIdentifier() {
if (this.identifier == null)
return false;
for (Identifier item : this.identifier)
if (!item.isEmpty())
return true;
return false;
}
public Identifier addIdentifier() { //3
Identifier t = new Identifier();
if (this.identifier == null)
this.identifier = new ArrayList();
this.identifier.add(t);
return t;
}
public PlanDefinition addIdentifier(Identifier t) { //3
if (t == null)
return this;
if (this.identifier == null)
this.identifier = new ArrayList();
this.identifier.add(t);
return this;
}
/**
* @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 {@link #version} (The identifier that is used to identify this version of the plan definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the plan definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
*/
public StringType getVersionElement() {
if (this.version == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinition.version");
else if (Configuration.doAutoCreate())
this.version = new StringType(); // bb
return this.version;
}
public boolean hasVersionElement() {
return this.version != null && !this.version.isEmpty();
}
public boolean hasVersion() {
return this.version != null && !this.version.isEmpty();
}
/**
* @param value {@link #version} (The identifier that is used to identify this version of the plan definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the plan definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value
*/
public PlanDefinition setVersionElement(StringType value) {
this.version = value;
return this;
}
/**
* @return The identifier that is used to identify this version of the plan definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the plan definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.
*/
public String getVersion() {
return this.version == null ? null : this.version.getValue();
}
/**
* @param value The identifier that is used to identify this version of the plan definition when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the plan definition author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence. To provide a version consistent with the Decision Support Service specification, use the format Major.Minor.Revision (e.g. 1.0.0). For more information on versioning knowledge assets, refer to the Decision Support Service specification. Note that a version is required for non-experimental active artifacts.
*/
public PlanDefinition setVersion(String value) {
if (Utilities.noString(value))
this.version = null;
else {
if (this.version == null)
this.version = new StringType();
this.version.setValue(value);
}
return this;
}
/**
* @return {@link #name} (A natural language name identifying the plan definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
*/
public StringType getNameElement() {
if (this.name == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinition.name");
else if (Configuration.doAutoCreate())
this.name = new StringType(); // bb
return this.name;
}
public boolean hasNameElement() {
return this.name != null && !this.name.isEmpty();
}
public boolean hasName() {
return this.name != null && !this.name.isEmpty();
}
/**
* @param value {@link #name} (A natural language name identifying the plan definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value
*/
public PlanDefinition setNameElement(StringType value) {
this.name = value;
return this;
}
/**
* @return A natural language name identifying the plan definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.
*/
public String getName() {
return this.name == null ? null : this.name.getValue();
}
/**
* @param value A natural language name identifying the plan definition. This name should be usable as an identifier for the module by machine processing applications such as code generation.
*/
public PlanDefinition setName(String value) {
if (Utilities.noString(value))
this.name = null;
else {
if (this.name == null)
this.name = new StringType();
this.name.setValue(value);
}
return this;
}
/**
* @return {@link #title} (A short, descriptive, user-friendly title for the plan definition.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
*/
public StringType getTitleElement() {
if (this.title == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinition.title");
else if (Configuration.doAutoCreate())
this.title = new StringType(); // bb
return this.title;
}
public boolean hasTitleElement() {
return this.title != null && !this.title.isEmpty();
}
public boolean hasTitle() {
return this.title != null && !this.title.isEmpty();
}
/**
* @param value {@link #title} (A short, descriptive, user-friendly title for the plan definition.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
*/
public PlanDefinition setTitleElement(StringType value) {
this.title = value;
return this;
}
/**
* @return A short, descriptive, user-friendly title for the plan definition.
*/
public String getTitle() {
return this.title == null ? null : this.title.getValue();
}
/**
* @param value A short, descriptive, user-friendly title for the plan definition.
*/
public PlanDefinition setTitle(String value) {
if (Utilities.noString(value))
this.title = null;
else {
if (this.title == null)
this.title = new StringType();
this.title.setValue(value);
}
return this;
}
/**
* @return {@link #type} (The type of asset the plan definition represents, e.g. an order set, protocol, or event-condition-action rule.)
*/
public CodeableConcept getType() {
if (this.type == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinition.type");
else if (Configuration.doAutoCreate())
this.type = new CodeableConcept(); // cc
return this.type;
}
public boolean hasType() {
return this.type != null && !this.type.isEmpty();
}
/**
* @param value {@link #type} (The type of asset the plan definition represents, e.g. an order set, protocol, or event-condition-action rule.)
*/
public PlanDefinition setType(CodeableConcept value) {
this.type = value;
return this;
}
/**
* @return {@link #status} (The status of this plan definition. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
*/
public Enumeration getStatusElement() {
if (this.status == null)
if (Configuration.errorOnAutoCreate())
throw new Error("Attempt to auto-create PlanDefinition.status");
else if (Configuration.doAutoCreate())
this.status = new Enumeration(new PublicationStatusEnumFactory()); // bb
return this.status;
}
public boolean hasStatusElement() {
return this.status != null && !this.status.isEmpty();
}
public boolean hasStatus() {
return this.status != null && !this.status.isEmpty();
}
/**
* @param value {@link #status} (The status of this plan definition. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value
*/
public PlanDefinition setStatusElement(Enumeration