Class Dosage.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.type.Dosage.Builder
-
- Enclosing class:
- Dosage
public static class Dosage.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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Dosage.BuilderadditionalInstruction(CodeableConcept... additionalInstruction)Supplemental instructions to the patient on how to take the medication (e.g.Dosage.BuilderadditionalInstruction(Collection<CodeableConcept> additionalInstruction)Supplemental instructions to the patient on how to take the medication (e.g.Dosage.BuilderasNeeded(Element asNeeded)Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).Dosagebuild()Build theDosageDosage.BuilderdoseAndRate(Dosage.DoseAndRate... doseAndRate)The amount of medication administered.Dosage.BuilderdoseAndRate(Collection<Dosage.DoseAndRate> doseAndRate)The amount of medication administered.Dosage.Builderextension(Extension... extension)May be used to represent additional information that is not part of the basic definition of the element.Dosage.Builderextension(Collection<Extension> extension)May be used to represent additional information that is not part of the basic definition of the element.protected Dosage.Builderfrom(Dosage dosage)Dosage.Builderid(String id)Unique id for the element within a resource (for internal references).Dosage.BuildermaxDosePerAdministration(SimpleQuantity maxDosePerAdministration)Upper limit on medication per administration.Dosage.BuildermaxDosePerLifetime(SimpleQuantity maxDosePerLifetime)Upper limit on medication per lifetime of the patient.Dosage.BuildermaxDosePerPeriod(Ratio maxDosePerPeriod)Upper limit on medication per unit of time.Dosage.Buildermethod(CodeableConcept method)Technique for administering medication.Dosage.BuildermodifierExtension(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.Dosage.BuildermodifierExtension(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.Dosage.BuilderpatientInstruction(String patientInstruction)Instructions in terms that are understood by the patient or consumer.Dosage.Builderroute(CodeableConcept route)How drug should enter body.Dosage.Buildersequence(Integer sequence)Indicates the order in which the dosage instructions should be applied or interpreted.Dosage.Buildersite(CodeableConcept site)Body site to administer to.Dosage.Buildertext(String text)Free text dosage instructions e.g.Dosage.Buildertiming(Timing timing)When medication should be administered.-
Methods inherited from class com.ibm.fhir.model.type.BackboneElement.Builder
from
-
Methods inherited from class com.ibm.fhir.model.type.Element.Builder
from
-
-
-
-
Method Detail
-
id
public Dosage.Builder id(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:
idin classBackboneElement.Builder- Parameters:
id- Unique id for inter-element referencing- Returns:
- A reference to this Builder instance
-
extension
public Dosage.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
- Overrides:
extensionin classBackboneElement.Builder- Parameters:
extension- Additional content defined by implementations- Returns:
- A reference to this Builder instance
-
extension
public Dosage.Builder extension(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
- Overrides:
extensionin classBackboneElement.Builder- Parameters:
extension- Additional content defined by implementations- Returns:
- A reference to this Builder instance
-
modifierExtension
public Dosage.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
- Overrides:
modifierExtensionin classBackboneElement.Builder- Parameters:
modifierExtension- Extensions that cannot be ignored even if unrecognized- Returns:
- A reference to this Builder instance
-
modifierExtension
public Dosage.Builder modifierExtension(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
- Overrides:
modifierExtensionin classBackboneElement.Builder- Parameters:
modifierExtension- Extensions that cannot be ignored even if unrecognized- Returns:
- A reference to this Builder instance
-
sequence
public Dosage.Builder sequence(Integer sequence)
Indicates the order in which the dosage instructions should be applied or interpreted.- Parameters:
sequence- The order of the dosage instructions- Returns:
- A reference to this Builder instance
-
text
public Dosage.Builder text(String text)
Free text dosage instructions e.g. SIG.- Parameters:
text- Free text dosage instructions e.g. SIG- Returns:
- A reference to this Builder instance
-
additionalInstruction
public Dosage.Builder additionalInstruction(CodeableConcept... additionalInstruction)
Supplemental instructions to the patient on how to take the medication (e.g. "with meals" or"take half to one hour before food") or warnings for the patient about the medication (e.g. "may cause drowsiness" or "avoid exposure of skin to direct sunlight or sunlamps").Adds new element(s) to the existing list
- Parameters:
additionalInstruction- Supplemental instruction or warnings to the patient - e.g. "with meals", "may cause drowsiness"- Returns:
- A reference to this Builder instance
-
additionalInstruction
public Dosage.Builder additionalInstruction(Collection<CodeableConcept> additionalInstruction)
Supplemental instructions to the patient on how to take the medication (e.g. "with meals" or"take half to one hour before food") or warnings for the patient about the medication (e.g. "may cause drowsiness" or "avoid exposure of skin to direct sunlight or sunlamps").Replaces the existing list with a new one containing elements from the Collection
- Parameters:
additionalInstruction- Supplemental instruction or warnings to the patient - e.g. "with meals", "may cause drowsiness"- Returns:
- A reference to this Builder instance
-
patientInstruction
public Dosage.Builder patientInstruction(String patientInstruction)
Instructions in terms that are understood by the patient or consumer.- Parameters:
patientInstruction- Patient or consumer oriented instructions- Returns:
- A reference to this Builder instance
-
timing
public Dosage.Builder timing(Timing timing)
When medication should be administered.- Parameters:
timing- When medication should be administered- Returns:
- A reference to this Builder instance
-
asNeeded
public Dosage.Builder asNeeded(Element asNeeded)
Indicates whether the Medication is only taken when needed within a specific dosing schedule (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).This is a choice element with the following allowed types:
- Parameters:
asNeeded- Take "as needed" (for x)- Returns:
- A reference to this Builder instance
-
site
public Dosage.Builder site(CodeableConcept site)
Body site to administer to.- Parameters:
site- Body site to administer to- Returns:
- A reference to this Builder instance
-
route
public Dosage.Builder route(CodeableConcept route)
How drug should enter body.- Parameters:
route- How drug should enter body- Returns:
- A reference to this Builder instance
-
method
public Dosage.Builder method(CodeableConcept method)
Technique for administering medication.- Parameters:
method- Technique for administering medication- Returns:
- A reference to this Builder instance
-
doseAndRate
public Dosage.Builder doseAndRate(Dosage.DoseAndRate... doseAndRate)
The amount of medication administered.Adds new element(s) to the existing list
- Parameters:
doseAndRate- Amount of medication administered- Returns:
- A reference to this Builder instance
-
doseAndRate
public Dosage.Builder doseAndRate(Collection<Dosage.DoseAndRate> doseAndRate)
The amount of medication administered.Replaces the existing list with a new one containing elements from the Collection
- Parameters:
doseAndRate- Amount of medication administered- Returns:
- A reference to this Builder instance
-
maxDosePerPeriod
public Dosage.Builder maxDosePerPeriod(Ratio maxDosePerPeriod)
Upper limit on medication per unit of time.- Parameters:
maxDosePerPeriod- Upper limit on medication per unit of time- Returns:
- A reference to this Builder instance
-
maxDosePerAdministration
public Dosage.Builder maxDosePerAdministration(SimpleQuantity maxDosePerAdministration)
Upper limit on medication per administration.- Parameters:
maxDosePerAdministration- Upper limit on medication per administration- Returns:
- A reference to this Builder instance
-
maxDosePerLifetime
public Dosage.Builder maxDosePerLifetime(SimpleQuantity maxDosePerLifetime)
Upper limit on medication per lifetime of the patient.- Parameters:
maxDosePerLifetime- Upper limit on medication per lifetime of the patient- Returns:
- A reference to this Builder instance
-
build
public Dosage build()
Build theDosage- Specified by:
buildin interfaceBuilder<Element>- Specified by:
buildin classBackboneElement.Builder- Returns:
- An immutable object of type
Dosage - Throws:
IllegalStateException- if the current state cannot be built into a valid Dosage per the base specification
-
from
protected Dosage.Builder from(Dosage dosage)
-
-