Class NutritionOrder.Builder
- java.lang.Object
-
- com.ibm.fhir.model.builder.AbstractBuilder<Resource>
-
- com.ibm.fhir.model.resource.Resource.Builder
-
- com.ibm.fhir.model.resource.DomainResource.Builder
-
- com.ibm.fhir.model.resource.NutritionOrder.Builder
-
- Enclosing class:
- NutritionOrder
public static class NutritionOrder.Builder extends DomainResource.Builder
-
-
Field Summary
-
Fields inherited from class com.ibm.fhir.model.resource.DomainResource.Builder
contained, extension, modifierExtension, text
-
Fields inherited from class com.ibm.fhir.model.resource.Resource.Builder
id, implicitRules, language, meta
-
Fields inherited from class com.ibm.fhir.model.builder.AbstractBuilder
validating
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NutritionOrder.Builder
allergyIntolerance(Reference... allergyIntolerance)
A link to a record of allergies or intolerances which should be included in the nutrition order.NutritionOrder.Builder
allergyIntolerance(Collection<Reference> allergyIntolerance)
A link to a record of allergies or intolerances which should be included in the nutrition order.NutritionOrder
build()
Build theNutritionOrder
NutritionOrder.Builder
contained(Resource... contained)
These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.NutritionOrder.Builder
contained(Collection<Resource> contained)
These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.NutritionOrder.Builder
dateTime(DateTime dateTime)
The date and time that this nutrition order was requested.NutritionOrder.Builder
encounter(Reference encounter)
An encounter that provides additional information about the healthcare context in which this request is made.NutritionOrder.Builder
enteralFormula(NutritionOrder.EnteralFormula enteralFormula)
Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.NutritionOrder.Builder
excludeFoodModifier(CodeableConcept... excludeFoodModifier)
This modifier is used to convey Order-specific modifier about the type of oral food or oral fluids that should not be given.NutritionOrder.Builder
excludeFoodModifier(Collection<CodeableConcept> excludeFoodModifier)
This modifier is used to convey Order-specific modifier about the type of oral food or oral fluids that should not be given.NutritionOrder.Builder
extension(Extension... extension)
May be used to represent additional information that is not part of the basic definition of the resource.NutritionOrder.Builder
extension(Collection<Extension> extension)
May be used to represent additional information that is not part of the basic definition of the resource.NutritionOrder.Builder
foodPreferenceModifier(CodeableConcept... foodPreferenceModifier)
This modifier is used to convey order-specific modifiers about the type of food that should be given.NutritionOrder.Builder
foodPreferenceModifier(Collection<CodeableConcept> foodPreferenceModifier)
This modifier is used to convey order-specific modifiers about the type of food that should be given.protected NutritionOrder.Builder
from(NutritionOrder nutritionOrder)
NutritionOrder.Builder
id(String id)
The logical id of the resource, as used in the URL for the resource.NutritionOrder.Builder
identifier(Identifier... identifier)
Identifiers assigned to this order by the order sender or by the order receiver.NutritionOrder.Builder
identifier(Collection<Identifier> identifier)
Identifiers assigned to this order by the order sender or by the order receiver.NutritionOrder.Builder
implicitRules(Uri implicitRules)
A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content.NutritionOrder.Builder
instantiates(Uri... instantiates)
The URL pointing to a protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.NutritionOrder.Builder
instantiates(Collection<Uri> instantiates)
The URL pointing to a protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.NutritionOrder.Builder
instantiatesCanonical(Canonical... instantiatesCanonical)
The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.NutritionOrder.Builder
instantiatesCanonical(Collection<Canonical> instantiatesCanonical)
The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.NutritionOrder.Builder
instantiatesUri(Uri... instantiatesUri)
The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.NutritionOrder.Builder
instantiatesUri(Collection<Uri> instantiatesUri)
The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.NutritionOrder.Builder
intent(NutritionOrderIntent intent)
Indicates the level of authority/intentionality associated with the NutrionOrder and where the request fits into the workflow chain.NutritionOrder.Builder
language(Code language)
The base language in which the resource is written.NutritionOrder.Builder
meta(Meta meta)
The metadata about the resource.NutritionOrder.Builder
modifierExtension(Extension... modifierExtension)
May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants.NutritionOrder.Builder
modifierExtension(Collection<Extension> modifierExtension)
May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it and/or the understanding of the containing element's descendants.NutritionOrder.Builder
note(Annotation... note)
Comments made about the {{title}} by the requester, performer, subject or other participants.NutritionOrder.Builder
note(Collection<Annotation> note)
Comments made about the {{title}} by the requester, performer, subject or other participants.NutritionOrder.Builder
oralDiet(NutritionOrder.OralDiet oralDiet)
Diet given orally in contrast to enteral (tube) feeding.NutritionOrder.Builder
orderer(Reference orderer)
The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.NutritionOrder.Builder
patient(Reference patient)
The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.NutritionOrder.Builder
status(NutritionOrderStatus status)
The workflow status of the nutrition order/request.NutritionOrder.Builder
supplement(NutritionOrder.Supplement... supplement)
Oral nutritional products given in order to add further nutritional value to the patient's diet.NutritionOrder.Builder
supplement(Collection<NutritionOrder.Supplement> supplement)
Oral nutritional products given in order to add further nutritional value to the patient's diet.NutritionOrder.Builder
text(Narrative text)
A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human.protected void
validate(NutritionOrder nutritionOrder)
-
Methods inherited from class com.ibm.fhir.model.resource.DomainResource.Builder
from, validate
-
Methods inherited from class com.ibm.fhir.model.resource.Resource.Builder
from, validate
-
Methods inherited from class com.ibm.fhir.model.builder.AbstractBuilder
isValidating, setValidating
-
-
-
-
Method Detail
-
id
public NutritionOrder.Builder id(String id)
The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.- Overrides:
id
in classDomainResource.Builder
- Parameters:
id
- Logical id of this artifact- Returns:
- A reference to this Builder instance
-
meta
public NutritionOrder.Builder meta(Meta meta)
The metadata about the resource. This is content that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource.- Overrides:
meta
in classDomainResource.Builder
- Parameters:
meta
- Metadata about the resource- Returns:
- A reference to this Builder instance
-
implicitRules
public NutritionOrder.Builder implicitRules(Uri implicitRules)
A reference to a set of rules that were followed when the resource was constructed, and which must be understood when processing the content. Often, this is a reference to an implementation guide that defines the special rules along with other profiles etc.- Overrides:
implicitRules
in classDomainResource.Builder
- Parameters:
implicitRules
- A set of rules under which this content was created- Returns:
- A reference to this Builder instance
-
language
public NutritionOrder.Builder language(Code language)
The base language in which the resource is written.- Overrides:
language
in classDomainResource.Builder
- Parameters:
language
- Language of the resource content- Returns:
- A reference to this Builder instance
-
text
public NutritionOrder.Builder text(Narrative text)
A human-readable narrative that contains a summary of the resource and can be used to represent the content of the resource to a human. The narrative need not encode all the structured data, but is required to contain sufficient detail to make it "clinically safe" for a human to just read the narrative. Resource definitions may define what content should be represented in the narrative to ensure clinical safety.- Overrides:
text
in classDomainResource.Builder
- Parameters:
text
- Text summary of the resource, for human interpretation- Returns:
- A reference to this Builder instance
-
contained
public NutritionOrder.Builder contained(Resource... contained)
These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Overrides:
contained
in classDomainResource.Builder
- Parameters:
contained
- Contained, inline Resources- Returns:
- A reference to this Builder instance
-
contained
public NutritionOrder.Builder contained(Collection<Resource> contained)
These resources do not have an independent existence apart from the resource that contains them - they cannot be identified independently, and nor can they have their own independent transaction scope.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:
contained
in classDomainResource.Builder
- Parameters:
contained
- Contained, inline Resources- Returns:
- A reference to this Builder instance
- Throws:
NullPointerException
- If the passed collection is null
-
extension
public NutritionOrder.Builder extension(Extension... extension)
May be used to represent additional information that is not part of the basic definition of the resource. 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 classDomainResource.Builder
- Parameters:
extension
- Additional content defined by implementations- Returns:
- A reference to this Builder instance
-
extension
public NutritionOrder.Builder extension(Collection<Extension> extension)
May be used to represent additional information that is not part of the basic definition of the resource. 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 classDomainResource.Builder
- Parameters:
extension
- Additional content defined by implementations- Returns:
- A reference to this Builder instance
- Throws:
NullPointerException
- If the passed collection is null
-
modifierExtension
public NutritionOrder.Builder modifierExtension(Extension... modifierExtension)
May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.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 classDomainResource.Builder
- Parameters:
modifierExtension
- Extensions that cannot be ignored- Returns:
- A reference to this Builder instance
-
modifierExtension
public NutritionOrder.Builder modifierExtension(Collection<Extension> modifierExtension)
May be used to represent additional information that is not part of the basic definition of the resource and that modifies the understanding of the element that contains it 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 is allowed to define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension. Applications processing a resource are required to check for modifier extensions.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 classDomainResource.Builder
- Parameters:
modifierExtension
- Extensions that cannot be ignored- Returns:
- A reference to this Builder instance
- Throws:
NullPointerException
- If the passed collection is null
-
identifier
public NutritionOrder.Builder identifier(Identifier... identifier)
Identifiers assigned to this order by the order sender or by the order receiver.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
identifier
- Identifiers assigned to this order- Returns:
- A reference to this Builder instance
-
identifier
public NutritionOrder.Builder identifier(Collection<Identifier> identifier)
Identifiers assigned to this order by the order sender or by the order receiver.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:
identifier
- Identifiers assigned to this order- Returns:
- A reference to this Builder instance
- Throws:
NullPointerException
- If the passed collection is null
-
instantiatesCanonical
public NutritionOrder.Builder instantiatesCanonical(Canonical... instantiatesCanonical)
The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.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 NutritionOrder.Builder instantiatesCanonical(Collection<Canonical> instantiatesCanonical)
The URL pointing to a FHIR-defined protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.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:
NullPointerException
- If the passed collection is null
-
instantiatesUri
public NutritionOrder.Builder instantiatesUri(Uri... instantiatesUri)
The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.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 NutritionOrder.Builder instantiatesUri(Collection<Uri> instantiatesUri)
The URL pointing to an externally maintained protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.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:
NullPointerException
- If the passed collection is null
-
instantiates
public NutritionOrder.Builder instantiates(Uri... instantiates)
The URL pointing to a protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
instantiates
- Instantiates protocol or definition- Returns:
- A reference to this Builder instance
-
instantiates
public NutritionOrder.Builder instantiates(Collection<Uri> instantiates)
The URL pointing to a protocol, guideline, orderset or other definition that is adhered to in whole or in part by this NutritionOrder.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:
instantiates
- Instantiates protocol or definition- Returns:
- A reference to this Builder instance
- Throws:
NullPointerException
- If the passed collection is null
-
status
public NutritionOrder.Builder status(NutritionOrderStatus status)
The workflow status of the nutrition order/request.This element is required.
- Parameters:
status
- draft | active | on-hold | revoked | completed | entered-in-error | unknown- Returns:
- A reference to this Builder instance
-
intent
public NutritionOrder.Builder intent(NutritionOrderIntent intent)
Indicates the level of authority/intentionality associated with the NutrionOrder and where the request fits into the workflow chain.This element is required.
- Parameters:
intent
- proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option- Returns:
- A reference to this Builder instance
-
patient
public NutritionOrder.Builder patient(Reference patient)
The person (patient) who needs the nutrition order for an oral diet, nutritional supplement and/or enteral or formula feeding.This element is required.
Allowed resource types for this reference:
- Parameters:
patient
- The person who requires the diet, formula or nutritional supplement- Returns:
- A reference to this Builder instance
-
encounter
public NutritionOrder.Builder encounter(Reference encounter)
An encounter that provides additional information about the healthcare context in which this request is made.Allowed resource types for this reference:
- Parameters:
encounter
- The encounter associated with this nutrition order- Returns:
- A reference to this Builder instance
-
dateTime
public NutritionOrder.Builder dateTime(DateTime dateTime)
The date and time that this nutrition order was requested.This element is required.
- Parameters:
dateTime
- Date and time the nutrition order was requested- Returns:
- A reference to this Builder instance
-
orderer
public NutritionOrder.Builder orderer(Reference orderer)
The practitioner that holds legal responsibility for ordering the diet, nutritional supplement, or formula feedings.Allowed resource types for this reference:
- Parameters:
orderer
- Who ordered the diet, formula or nutritional supplement- Returns:
- A reference to this Builder instance
-
allergyIntolerance
public NutritionOrder.Builder allergyIntolerance(Reference... allergyIntolerance)
A link to a record of allergies or intolerances which should be included in the nutrition order.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:
allergyIntolerance
- List of the patient's food and nutrition-related allergies and intolerances- Returns:
- A reference to this Builder instance
-
allergyIntolerance
public NutritionOrder.Builder allergyIntolerance(Collection<Reference> allergyIntolerance)
A link to a record of allergies or intolerances which should be included in the nutrition order.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:
allergyIntolerance
- List of the patient's food and nutrition-related allergies and intolerances- Returns:
- A reference to this Builder instance
- Throws:
NullPointerException
- If the passed collection is null
-
foodPreferenceModifier
public NutritionOrder.Builder foodPreferenceModifier(CodeableConcept... foodPreferenceModifier)
This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
foodPreferenceModifier
- Order-specific modifier about the type of food that should be given- Returns:
- A reference to this Builder instance
-
foodPreferenceModifier
public NutritionOrder.Builder foodPreferenceModifier(Collection<CodeableConcept> foodPreferenceModifier)
This modifier is used to convey order-specific modifiers about the type of food that should be given. These can be derived from patient allergies, intolerances, or preferences such as Halal, Vegan or Kosher. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.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:
foodPreferenceModifier
- Order-specific modifier about the type of food that should be given- Returns:
- A reference to this Builder instance
- Throws:
NullPointerException
- If the passed collection is null
-
excludeFoodModifier
public NutritionOrder.Builder excludeFoodModifier(CodeableConcept... excludeFoodModifier)
This modifier is used to convey Order-specific modifier about the type of oral food or oral fluids that should not be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. While it should not be necessary to repeat allergy or intolerance information captured in the referenced AllergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient’s diet for any reason. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
excludeFoodModifier
- Order-specific modifier about the type of food that should not be given- Returns:
- A reference to this Builder instance
-
excludeFoodModifier
public NutritionOrder.Builder excludeFoodModifier(Collection<CodeableConcept> excludeFoodModifier)
This modifier is used to convey Order-specific modifier about the type of oral food or oral fluids that should not be given. These can be derived from patient allergies, intolerances, or preferences such as No Red Meat, No Soy or No Wheat or Gluten-Free. While it should not be necessary to repeat allergy or intolerance information captured in the referenced AllergyIntolerance resource in the excludeFoodModifier, this element may be used to convey additional specificity related to foods that should be eliminated from the patient’s diet for any reason. This modifier applies to the entire nutrition order inclusive of the oral diet, nutritional supplements and enteral formula feedings.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:
excludeFoodModifier
- Order-specific modifier about the type of food that should not be given- Returns:
- A reference to this Builder instance
- Throws:
NullPointerException
- If the passed collection is null
-
oralDiet
public NutritionOrder.Builder oralDiet(NutritionOrder.OralDiet oralDiet)
Diet given orally in contrast to enteral (tube) feeding.- Parameters:
oralDiet
- Oral diet components- Returns:
- A reference to this Builder instance
-
supplement
public NutritionOrder.Builder supplement(NutritionOrder.Supplement... supplement)
Oral nutritional products given in order to add further nutritional value to the patient's diet.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
supplement
- Supplement components- Returns:
- A reference to this Builder instance
-
supplement
public NutritionOrder.Builder supplement(Collection<NutritionOrder.Supplement> supplement)
Oral nutritional products given in order to add further nutritional value to the patient's diet.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:
supplement
- Supplement components- Returns:
- A reference to this Builder instance
- Throws:
NullPointerException
- If the passed collection is null
-
enteralFormula
public NutritionOrder.Builder enteralFormula(NutritionOrder.EnteralFormula enteralFormula)
Feeding provided through the gastrointestinal tract via a tube, catheter, or stoma that delivers nutrition distal to the oral cavity.- Parameters:
enteralFormula
- Enteral formula components- Returns:
- A reference to this Builder instance
-
note
public NutritionOrder.Builder note(Annotation... note)
Comments made about the {{title}} by the requester, performer, subject or other participants.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
note
- Comments- Returns:
- A reference to this Builder instance
-
note
public NutritionOrder.Builder note(Collection<Annotation> note)
Comments made about the {{title}} by the requester, performer, subject or other participants.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:
note
- Comments- Returns:
- A reference to this Builder instance
- Throws:
NullPointerException
- If the passed collection is null
-
build
public NutritionOrder build()
- Specified by:
build
in interfaceBuilder<Resource>
- Specified by:
build
in classDomainResource.Builder
- Returns:
- An immutable object of type
NutritionOrder
- Throws:
IllegalStateException
- if the current state cannot be built into a valid NutritionOrder per the base specification
-
validate
protected void validate(NutritionOrder nutritionOrder)
-
from
protected NutritionOrder.Builder from(NutritionOrder nutritionOrder)
-
-