Class CarePlan.Activity.Detail.Builder
- java.lang.Object
-
- org.linuxforhealth.fhir.model.builder.AbstractBuilder<Element>
-
- org.linuxforhealth.fhir.model.type.Element.Builder
-
- org.linuxforhealth.fhir.model.type.BackboneElement.Builder
-
- org.linuxforhealth.fhir.model.resource.CarePlan.Activity.Detail.Builder
-
- Enclosing class:
- CarePlan.Activity.Detail
public static class CarePlan.Activity.Detail.Builder extends BackboneElement.Builder
-
-
Field Summary
-
Fields inherited from class org.linuxforhealth.fhir.model.type.BackboneElement.Builder
modifierExtension
-
Fields inherited from class org.linuxforhealth.fhir.model.type.Element.Builder
extension, id
-
Fields inherited from class org.linuxforhealth.fhir.model.builder.AbstractBuilder
validating
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CarePlan.Activity.Detail
build()
Build theCarePlan.Activity.Detail
CarePlan.Activity.Detail.Builder
code(CodeableConcept code)
Detailed description of the type of planned activity; e.g.CarePlan.Activity.Detail.Builder
dailyAmount(SimpleQuantity dailyAmount)
Identifies the quantity expected to be consumed in a given day.CarePlan.Activity.Detail.Builder
description(java.lang.String description)
Convenience method for settingdescription
.CarePlan.Activity.Detail.Builder
description(String description)
This provides a textual description of constraints on the intended activity occurrence, including relation to other activities.CarePlan.Activity.Detail.Builder
doNotPerform(java.lang.Boolean doNotPerform)
Convenience method for settingdoNotPerform
.CarePlan.Activity.Detail.Builder
doNotPerform(Boolean doNotPerform)
If true, indicates that the described activity is one that must NOT be engaged in when following the plan.CarePlan.Activity.Detail.Builder
extension(java.util.Collection<Extension> extension)
May be used to represent additional information that is not part of the basic definition of the element.CarePlan.Activity.Detail.Builder
extension(Extension... extension)
May be used to represent additional information that is not part of the basic definition of the element.protected CarePlan.Activity.Detail.Builder
from(CarePlan.Activity.Detail detail)
CarePlan.Activity.Detail.Builder
goal(java.util.Collection<Reference> goal)
Internal reference that identifies the goals that this activity is intended to contribute towards meeting.CarePlan.Activity.Detail.Builder
goal(Reference... goal)
Internal reference that identifies the goals that this activity is intended to contribute towards meeting.CarePlan.Activity.Detail.Builder
id(java.lang.String id)
Unique id for the element within a resource (for internal references).CarePlan.Activity.Detail.Builder
instantiatesCanonical(java.util.Collection<Canonical> instantiatesCanonical)
The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan activity.CarePlan.Activity.Detail.Builder
instantiatesCanonical(Canonical... instantiatesCanonical)
The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan activity.CarePlan.Activity.Detail.Builder
instantiatesUri(java.util.Collection<Uri> instantiatesUri)
The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan activity.CarePlan.Activity.Detail.Builder
instantiatesUri(Uri... instantiatesUri)
The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan activity.CarePlan.Activity.Detail.Builder
kind(CarePlanActivityKind kind)
A description of the kind of resource the in-line definition of a care plan activity is representing.CarePlan.Activity.Detail.Builder
location(Reference location)
Identifies the facility where the activity will occur; e.g.CarePlan.Activity.Detail.Builder
modifierExtension(java.util.Collection<Extension> modifierExtension)
May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants.CarePlan.Activity.Detail.Builder
modifierExtension(Extension... modifierExtension)
May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants.CarePlan.Activity.Detail.Builder
performer(java.util.Collection<Reference> performer)
Identifies who's expected to be involved in the activity.CarePlan.Activity.Detail.Builder
performer(Reference... performer)
Identifies who's expected to be involved in the activity.CarePlan.Activity.Detail.Builder
product(Element product)
Identifies the food, drug or other product to be consumed or supplied in the activity.CarePlan.Activity.Detail.Builder
quantity(SimpleQuantity quantity)
Identifies the quantity expected to be supplied, administered or consumed by the subject.CarePlan.Activity.Detail.Builder
reasonCode(java.util.Collection<CodeableConcept> reasonCode)
Provides the rationale that drove the inclusion of this particular activity as part of the plan or the reason why the activity was prohibited.CarePlan.Activity.Detail.Builder
reasonCode(CodeableConcept... reasonCode)
Provides the rationale that drove the inclusion of this particular activity as part of the plan or the reason why the activity was prohibited.CarePlan.Activity.Detail.Builder
reasonReference(java.util.Collection<Reference> reasonReference)
Indicates another resource, such as the health condition(s), whose existence justifies this request and drove the inclusion of this particular activity as part of the plan.CarePlan.Activity.Detail.Builder
reasonReference(Reference... reasonReference)
Indicates another resource, such as the health condition(s), whose existence justifies this request and drove the inclusion of this particular activity as part of the plan.CarePlan.Activity.Detail.Builder
scheduled(java.lang.String scheduled)
Convenience method for settingscheduled
with choice type String.CarePlan.Activity.Detail.Builder
scheduled(Element scheduled)
The period, timing or frequency upon which the described activity is to occur.CarePlan.Activity.Detail.Builder
status(CarePlanActivityStatus status)
Identifies what progress is being made for the specific activity.CarePlan.Activity.Detail.Builder
statusReason(CodeableConcept statusReason)
Provides reason why the activity isn't yet started, is on hold, was cancelled, etc.protected void
validate(CarePlan.Activity.Detail detail)
-
Methods inherited from class org.linuxforhealth.fhir.model.type.BackboneElement.Builder
from, validate
-
Methods inherited from class org.linuxforhealth.fhir.model.type.Element.Builder
from, validate
-
Methods inherited from class org.linuxforhealth.fhir.model.builder.AbstractBuilder
isValidating, setValidating
-
-
-
-
Method Detail
-
id
public CarePlan.Activity.Detail.Builder id(java.lang.String id)
Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.- Overrides:
id
in classBackboneElement.Builder
- Parameters:
id
- Unique id for inter-element referencing- Returns:
- A reference to this Builder instance
-
extension
public CarePlan.Activity.Detail.Builder extension(Extension... extension)
May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Overrides:
extension
in classBackboneElement.Builder
- Parameters:
extension
- Additional content defined by implementations- Returns:
- A reference to this Builder instance
-
extension
public CarePlan.Activity.Detail.Builder extension(java.util.Collection<Extension> extension)
May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Overrides:
extension
in classBackboneElement.Builder
- Parameters:
extension
- Additional content defined by implementations- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
modifierExtension
public CarePlan.Activity.Detail.Builder modifierExtension(Extension... modifierExtension)
May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Overrides:
modifierExtension
in classBackboneElement.Builder
- Parameters:
modifierExtension
- Extensions that cannot be ignored even if unrecognized- Returns:
- A reference to this Builder instance
-
modifierExtension
public CarePlan.Activity.Detail.Builder modifierExtension(java.util.Collection<Extension> modifierExtension)
May be used to represent additional information that is not part of the basic definition of the element and that modifies the understanding of the element in which it is contained and/or the understanding of the containing element's descendants. Usually modifier elements provide negation or qualification. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.Modifier extensions SHALL NOT change the meaning of any elements on Resource or DomainResource (including cannot change the meaning of modifierExtension itself).
Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Overrides:
modifierExtension
in classBackboneElement.Builder
- Parameters:
modifierExtension
- Extensions that cannot be ignored even if unrecognized- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
kind
public CarePlan.Activity.Detail.Builder kind(CarePlanActivityKind kind)
A description of the kind of resource the in-line definition of a care plan activity is representing. The CarePlan. activity.detail is an in-line definition when a resource is not referenced using CarePlan.activity.reference. For example, a MedicationRequest, a ServiceRequest, or a CommunicationRequest.- Parameters:
kind
- Appointment | CommunicationRequest | DeviceRequest | MedicationRequest | NutritionOrder | Task | ServiceRequest | VisionPrescription- Returns:
- A reference to this Builder instance
-
instantiatesCanonical
public CarePlan.Activity.Detail.Builder instantiatesCanonical(Canonical... instantiatesCanonical)
The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan activity.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
instantiatesCanonical
- Instantiates FHIR protocol or definition- Returns:
- A reference to this Builder instance
-
instantiatesCanonical
public CarePlan.Activity.Detail.Builder instantiatesCanonical(java.util.Collection<Canonical> instantiatesCanonical)
The URL pointing to a FHIR-defined protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan activity.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Parameters:
instantiatesCanonical
- Instantiates FHIR protocol or definition- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
instantiatesUri
public CarePlan.Activity.Detail.Builder instantiatesUri(Uri... instantiatesUri)
The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan activity.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
instantiatesUri
- Instantiates external protocol or definition- Returns:
- A reference to this Builder instance
-
instantiatesUri
public CarePlan.Activity.Detail.Builder instantiatesUri(java.util.Collection<Uri> instantiatesUri)
The URL pointing to an externally maintained protocol, guideline, questionnaire or other definition that is adhered to in whole or in part by this CarePlan activity.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Parameters:
instantiatesUri
- Instantiates external protocol or definition- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
code
public CarePlan.Activity.Detail.Builder code(CodeableConcept code)
Detailed description of the type of planned activity; e.g. what lab test, what procedure, what kind of encounter.- Parameters:
code
- Detail type of activity- Returns:
- A reference to this Builder instance
-
reasonCode
public CarePlan.Activity.Detail.Builder reasonCode(CodeableConcept... reasonCode)
Provides the rationale that drove the inclusion of this particular activity as part of the plan or the reason why the activity was prohibited.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
reasonCode
- Why activity should be done or why activity was prohibited- Returns:
- A reference to this Builder instance
-
reasonCode
public CarePlan.Activity.Detail.Builder reasonCode(java.util.Collection<CodeableConcept> reasonCode)
Provides the rationale that drove the inclusion of this particular activity as part of the plan or the reason why the activity was prohibited.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.- Parameters:
reasonCode
- Why activity should be done or why activity was prohibited- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
reasonReference
public CarePlan.Activity.Detail.Builder reasonReference(Reference... reasonReference)
Indicates another resource, such as the health condition(s), whose existence justifies this request and drove the inclusion of this particular activity as part of the plan.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.Allowed resource types for the references:
- Parameters:
reasonReference
- Why activity is needed- Returns:
- A reference to this Builder instance
-
reasonReference
public CarePlan.Activity.Detail.Builder reasonReference(java.util.Collection<Reference> reasonReference)
Indicates another resource, such as the health condition(s), whose existence justifies this request and drove the inclusion of this particular activity as part of the plan.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.Allowed resource types for the references:
- Parameters:
reasonReference
- Why activity is needed- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
goal
public CarePlan.Activity.Detail.Builder goal(Reference... goal)
Internal reference that identifies the goals that this activity is intended to contribute towards meeting.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.Allowed resource types for the references:
- Parameters:
goal
- Goals this activity relates to- Returns:
- A reference to this Builder instance
-
goal
public CarePlan.Activity.Detail.Builder goal(java.util.Collection<Reference> goal)
Internal reference that identifies the goals that this activity is intended to contribute towards meeting.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.Allowed resource types for the references:
- Parameters:
goal
- Goals this activity relates to- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
status
public CarePlan.Activity.Detail.Builder status(CarePlanActivityStatus status)
Identifies what progress is being made for the specific activity.This element is required.
- Parameters:
status
- not-started | scheduled | in-progress | on-hold | completed | cancelled | stopped | unknown | entered-in-error- Returns:
- A reference to this Builder instance
-
statusReason
public CarePlan.Activity.Detail.Builder statusReason(CodeableConcept statusReason)
Provides reason why the activity isn't yet started, is on hold, was cancelled, etc.- Parameters:
statusReason
- Reason for current status- Returns:
- A reference to this Builder instance
-
doNotPerform
public CarePlan.Activity.Detail.Builder doNotPerform(java.lang.Boolean doNotPerform)
Convenience method for settingdoNotPerform
.- Parameters:
doNotPerform
- If true, activity is prohibiting action- Returns:
- A reference to this Builder instance
- See Also:
doNotPerform(org.linuxforhealth.fhir.model.type.Boolean)
-
doNotPerform
public CarePlan.Activity.Detail.Builder doNotPerform(Boolean doNotPerform)
If true, indicates that the described activity is one that must NOT be engaged in when following the plan. If false, or missing, indicates that the described activity is one that should be engaged in when following the plan.- Parameters:
doNotPerform
- If true, activity is prohibiting action- Returns:
- A reference to this Builder instance
-
scheduled
public CarePlan.Activity.Detail.Builder scheduled(java.lang.String scheduled)
Convenience method for settingscheduled
with choice type String.- Parameters:
scheduled
- When activity is to occur- Returns:
- A reference to this Builder instance
- See Also:
scheduled(Element)
-
scheduled
public CarePlan.Activity.Detail.Builder scheduled(Element scheduled)
The period, timing or frequency upon which the described activity is to occur.This is a choice element with the following allowed types:
- Parameters:
scheduled
- When activity is to occur- Returns:
- A reference to this Builder instance
-
location
public CarePlan.Activity.Detail.Builder location(Reference location)
Identifies the facility where the activity will occur; e.g. home, hospital, specific clinic, etc.Allowed resource types for this reference:
- Parameters:
location
- Where it should happen- Returns:
- A reference to this Builder instance
-
performer
public CarePlan.Activity.Detail.Builder performer(Reference... performer)
Identifies who's expected to be involved in the activity.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.Allowed resource types for the references:
- Parameters:
performer
- Who will be responsible?- Returns:
- A reference to this Builder instance
-
performer
public CarePlan.Activity.Detail.Builder performer(java.util.Collection<Reference> performer)
Identifies who's expected to be involved in the activity.Replaces the existing list with a new one containing elements from the Collection. If any of the elements are null, calling
build()
will fail.Allowed resource types for the references:
- Parameters:
performer
- Who will be responsible?- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
product
public CarePlan.Activity.Detail.Builder product(Element product)
Identifies the food, drug or other product to be consumed or supplied in the activity.This is a choice element with the following allowed types:
When of typeReference
, the allowed resource types for this reference are:- Parameters:
product
- What is to be administered/supplied- Returns:
- A reference to this Builder instance
-
dailyAmount
public CarePlan.Activity.Detail.Builder dailyAmount(SimpleQuantity dailyAmount)
Identifies the quantity expected to be consumed in a given day.- Parameters:
dailyAmount
- How to consume/day?- Returns:
- A reference to this Builder instance
-
quantity
public CarePlan.Activity.Detail.Builder quantity(SimpleQuantity quantity)
Identifies the quantity expected to be supplied, administered or consumed by the subject.- Parameters:
quantity
- How much to administer/supply/consume- Returns:
- A reference to this Builder instance
-
description
public CarePlan.Activity.Detail.Builder description(java.lang.String description)
Convenience method for settingdescription
.- Parameters:
description
- Extra info describing activity to perform- Returns:
- A reference to this Builder instance
- See Also:
description(org.linuxforhealth.fhir.model.type.String)
-
description
public CarePlan.Activity.Detail.Builder description(String description)
This provides a textual description of constraints on the intended activity occurrence, including relation to other activities. It may also include objectives, pre-conditions and end-conditions. Finally, it may convey specifics about the activity such as body site, method, route, etc.- Parameters:
description
- Extra info describing activity to perform- Returns:
- A reference to this Builder instance
-
build
public CarePlan.Activity.Detail build()
- Specified by:
build
in interfaceBuilder<Element>
- Specified by:
build
in classBackboneElement.Builder
- Returns:
- An immutable object of type
CarePlan.Activity.Detail
- Throws:
java.lang.IllegalStateException
- if the current state cannot be built into a valid Detail per the base specification
-
validate
protected void validate(CarePlan.Activity.Detail detail)
-
from
protected CarePlan.Activity.Detail.Builder from(CarePlan.Activity.Detail detail)
-
-