Class Composition.Section.Builder
- java.lang.Object
-
- com.ibm.fhir.model.builder.AbstractBuilder<Element>
-
- com.ibm.fhir.model.type.Element.Builder
-
- com.ibm.fhir.model.type.BackboneElement.Builder
-
- com.ibm.fhir.model.resource.Composition.Section.Builder
-
- Enclosing class:
- Composition.Section
public static class Composition.Section.Builder extends BackboneElement.Builder
-
-
Field Summary
-
Fields inherited from class com.ibm.fhir.model.type.BackboneElement.Builder
modifierExtension
-
Fields inherited from class com.ibm.fhir.model.type.Element.Builder
extension, id
-
Fields inherited from class com.ibm.fhir.model.builder.AbstractBuilder
validating
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Composition.Section.Builder
author(Reference... author)
Identifies who is responsible for the information in this section, not necessarily who typed it in.Composition.Section.Builder
author(java.util.Collection<Reference> author)
Identifies who is responsible for the information in this section, not necessarily who typed it in.Composition.Section
build()
Build theComposition.Section
Composition.Section.Builder
code(CodeableConcept code)
A code identifying the kind of content contained within the section.Composition.Section.Builder
emptyReason(CodeableConcept emptyReason)
If the section is empty, why the list is empty.Composition.Section.Builder
entry(Reference... entry)
A reference to the actual resource from which the narrative in the section is derived.Composition.Section.Builder
entry(java.util.Collection<Reference> entry)
A reference to the actual resource from which the narrative in the section is derived.Composition.Section.Builder
extension(Extension... extension)
May be used to represent additional information that is not part of the basic definition of the element.Composition.Section.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.Composition.Section.Builder
focus(Reference focus)
The actual focus of the section when it is not the subject of the composition, but instead represents something or someone associated with the subject such as (for a patient subject) a spouse, parent, fetus, or donor.protected Composition.Section.Builder
from(Composition.Section section)
Composition.Section.Builder
id(java.lang.String id)
Unique id for the element within a resource (for internal references).Composition.Section.Builder
mode(SectionMode mode)
How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.Composition.Section.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.Composition.Section.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.Composition.Section.Builder
orderedBy(CodeableConcept orderedBy)
Specifies the order applied to the items in the section entries.Composition.Section.Builder
section(Composition.Section... section)
A nested sub-section within this section.Composition.Section.Builder
section(java.util.Collection<Composition.Section> section)
A nested sub-section within this section.Composition.Section.Builder
text(Narrative text)
A human-readable narrative that contains the attested content of the section, used to represent the content of the resource to a human.Composition.Section.Builder
title(String title)
The label for this particular section.Composition.Section.Builder
title(java.lang.String title)
Convenience method for settingtitle
.protected void
validate(Composition.Section section)
-
Methods inherited from class com.ibm.fhir.model.type.BackboneElement.Builder
from, validate
-
Methods inherited from class com.ibm.fhir.model.type.Element.Builder
from, validate
-
Methods inherited from class com.ibm.fhir.model.builder.AbstractBuilder
isValidating, setValidating
-
-
-
-
Method Detail
-
id
public Composition.Section.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 Composition.Section.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 Composition.Section.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 Composition.Section.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 Composition.Section.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
-
title
public Composition.Section.Builder title(java.lang.String title)
Convenience method for settingtitle
.- Parameters:
title
- Label for section (e.g. for ToC)- Returns:
- A reference to this Builder instance
- See Also:
title(com.ibm.fhir.model.type.String)
-
title
public Composition.Section.Builder title(String title)
The label for this particular section. This will be part of the rendered content for the document, and is often used to build a table of contents.- Parameters:
title
- Label for section (e.g. for ToC)- Returns:
- A reference to this Builder instance
-
code
public Composition.Section.Builder code(CodeableConcept code)
A code identifying the kind of content contained within the section. This must be consistent with the section title.- Parameters:
code
- Classification of section (recommended)- Returns:
- A reference to this Builder instance
-
author
public Composition.Section.Builder author(Reference... author)
Identifies who is responsible for the information in this section, not necessarily who typed it in.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:
author
- Who and/or what authored the section- Returns:
- A reference to this Builder instance
-
author
public Composition.Section.Builder author(java.util.Collection<Reference> author)
Identifies who is responsible for the information in this section, not necessarily who typed it in.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:
author
- Who and/or what authored the section- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
focus
public Composition.Section.Builder focus(Reference focus)
The actual focus of the section when it is not the subject of the composition, but instead represents something or someone associated with the subject such as (for a patient subject) a spouse, parent, fetus, or donor. If not focus is specified, the focus is assumed to be focus of the parent section, or, for a section in the Composition itself, the subject of the composition. Sections with a focus SHALL only include resources where the logical subject (patient, subject, focus, etc.) matches the section focus, or the resources have no logical subject (few resources).- Parameters:
focus
- Who/what the section is about, when it is not about the subject of composition- Returns:
- A reference to this Builder instance
-
text
public Composition.Section.Builder text(Narrative text)
A human-readable narrative that contains the attested content of the section, 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.- Parameters:
text
- Text summary of the section, for human interpretation- Returns:
- A reference to this Builder instance
-
mode
public Composition.Section.Builder mode(SectionMode mode)
How the entry list was prepared - whether it is a working list that is suitable for being maintained on an ongoing basis, or if it represents a snapshot of a list of items from another source, or whether it is a prepared list where items may be marked as added, modified or deleted.- Parameters:
mode
- working | snapshot | changes- Returns:
- A reference to this Builder instance
-
orderedBy
public Composition.Section.Builder orderedBy(CodeableConcept orderedBy)
Specifies the order applied to the items in the section entries.- Parameters:
orderedBy
- Order of section entries- Returns:
- A reference to this Builder instance
-
entry
public Composition.Section.Builder entry(Reference... entry)
A reference to the actual resource from which the narrative in the section is derived.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
entry
- A reference to data that supports this section- Returns:
- A reference to this Builder instance
-
entry
public Composition.Section.Builder entry(java.util.Collection<Reference> entry)
A reference to the actual resource from which the narrative in the section is derived.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:
entry
- A reference to data that supports this section- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
emptyReason
public Composition.Section.Builder emptyReason(CodeableConcept emptyReason)
If the section is empty, why the list is empty. An empty section typically has some text explaining the empty reason.- Parameters:
emptyReason
- Why the section is empty- Returns:
- A reference to this Builder instance
-
section
public Composition.Section.Builder section(Composition.Section... section)
A nested sub-section within this section.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
section
- Nested Section- Returns:
- A reference to this Builder instance
-
section
public Composition.Section.Builder section(java.util.Collection<Composition.Section> section)
A nested sub-section within this section.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:
section
- Nested Section- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
build
public Composition.Section build()
Build theComposition.Section
- Specified by:
build
in interfaceBuilder<Element>
- Specified by:
build
in classBackboneElement.Builder
- Returns:
- An immutable object of type
Composition.Section
- Throws:
java.lang.IllegalStateException
- if the current state cannot be built into a valid Section per the base specification
-
validate
protected void validate(Composition.Section section)
-
from
protected Composition.Section.Builder from(Composition.Section section)
-
-