Class AllergyIntolerance.Builder
- java.lang.Object
-
- org.linuxforhealth.fhir.model.builder.AbstractBuilder<Resource>
-
- org.linuxforhealth.fhir.model.resource.Resource.Builder
-
- org.linuxforhealth.fhir.model.resource.DomainResource.Builder
-
- org.linuxforhealth.fhir.model.resource.AllergyIntolerance.Builder
-
- Enclosing class:
- AllergyIntolerance
public static class AllergyIntolerance.Builder extends DomainResource.Builder
-
-
Field Summary
-
Fields inherited from class org.linuxforhealth.fhir.model.resource.DomainResource.Builder
contained, extension, modifierExtension, text
-
Fields inherited from class org.linuxforhealth.fhir.model.resource.Resource.Builder
id, implicitRules, language, meta
-
Fields inherited from class org.linuxforhealth.fhir.model.builder.AbstractBuilder
validating
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AllergyIntolerance.Builder
asserter(Reference asserter)
The source of the information about the allergy that is recorded.AllergyIntolerance
build()
Build theAllergyIntolerance
AllergyIntolerance.Builder
category(java.util.Collection<AllergyIntoleranceCategory> category)
Category of the identified substance.AllergyIntolerance.Builder
category(AllergyIntoleranceCategory... category)
Category of the identified substance.AllergyIntolerance.Builder
clinicalStatus(CodeableConcept clinicalStatus)
The clinical status of the allergy or intolerance.AllergyIntolerance.Builder
code(CodeableConcept code)
Code for an allergy or intolerance statement (either a positive or a negated/excluded statement).AllergyIntolerance.Builder
contained(java.util.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.AllergyIntolerance.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.AllergyIntolerance.Builder
criticality(AllergyIntoleranceCriticality criticality)
Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance.AllergyIntolerance.Builder
encounter(Reference encounter)
The encounter when the allergy or intolerance was asserted.AllergyIntolerance.Builder
extension(java.util.Collection<Extension> extension)
May be used to represent additional information that is not part of the basic definition of the resource.AllergyIntolerance.Builder
extension(Extension... extension)
May be used to represent additional information that is not part of the basic definition of the resource.protected AllergyIntolerance.Builder
from(AllergyIntolerance allergyIntolerance)
AllergyIntolerance.Builder
id(java.lang.String id)
The logical id of the resource, as used in the URL for the resource.AllergyIntolerance.Builder
identifier(java.util.Collection<Identifier> identifier)
Business identifiers assigned to this AllergyIntolerance by the performer or other systems which remain constant as the resource is updated and propagates from server to server.AllergyIntolerance.Builder
identifier(Identifier... identifier)
Business identifiers assigned to this AllergyIntolerance by the performer or other systems which remain constant as the resource is updated and propagates from server to server.AllergyIntolerance.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.AllergyIntolerance.Builder
language(Code language)
The base language in which the resource is written.AllergyIntolerance.Builder
lastOccurrence(DateTime lastOccurrence)
Represents the date and/or time of the last known occurrence of a reaction event.AllergyIntolerance.Builder
meta(Meta meta)
The metadata about the resource.AllergyIntolerance.Builder
modifierExtension(java.util.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.AllergyIntolerance.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.AllergyIntolerance.Builder
note(java.util.Collection<Annotation> note)
Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.AllergyIntolerance.Builder
note(Annotation... note)
Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.AllergyIntolerance.Builder
onset(java.lang.String onset)
Convenience method for settingonset
with choice type String.AllergyIntolerance.Builder
onset(Element onset)
Estimated or actual date, date-time, or age when allergy or intolerance was identified.AllergyIntolerance.Builder
patient(Reference patient)
The patient who has the allergy or intolerance.AllergyIntolerance.Builder
reaction(java.util.Collection<AllergyIntolerance.Reaction> reaction)
Details about each adverse reaction event linked to exposure to the identified substance.AllergyIntolerance.Builder
reaction(AllergyIntolerance.Reaction... reaction)
Details about each adverse reaction event linked to exposure to the identified substance.AllergyIntolerance.Builder
recordedDate(DateTime recordedDate)
The recordedDate represents when this particular AllergyIntolerance record was created in the system, which is often a system-generated date.AllergyIntolerance.Builder
recorder(Reference recorder)
Individual who recorded the record and takes responsibility for its content.AllergyIntolerance.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.AllergyIntolerance.Builder
type(AllergyIntoleranceType type)
Identification of the underlying physiological mechanism for the reaction risk.protected void
validate(AllergyIntolerance allergyIntolerance)
AllergyIntolerance.Builder
verificationStatus(CodeableConcept verificationStatus)
Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).-
Methods inherited from class org.linuxforhealth.fhir.model.resource.DomainResource.Builder
from, validate
-
Methods inherited from class org.linuxforhealth.fhir.model.resource.Resource.Builder
from, validate
-
Methods inherited from class org.linuxforhealth.fhir.model.builder.AbstractBuilder
isValidating, setValidating
-
-
-
-
Method Detail
-
id
public AllergyIntolerance.Builder id(java.lang.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 AllergyIntolerance.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 AllergyIntolerance.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 AllergyIntolerance.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 AllergyIntolerance.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 AllergyIntolerance.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 AllergyIntolerance.Builder contained(java.util.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:
java.lang.NullPointerException
- If the passed collection is null
-
extension
public AllergyIntolerance.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 AllergyIntolerance.Builder extension(java.util.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:
java.lang.NullPointerException
- If the passed collection is null
-
modifierExtension
public AllergyIntolerance.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 AllergyIntolerance.Builder modifierExtension(java.util.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:
java.lang.NullPointerException
- If the passed collection is null
-
identifier
public AllergyIntolerance.Builder identifier(Identifier... identifier)
Business identifiers assigned to this AllergyIntolerance by the performer or other systems which remain constant as the resource is updated and propagates from server to server.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
identifier
- External ids for this item- Returns:
- A reference to this Builder instance
-
identifier
public AllergyIntolerance.Builder identifier(java.util.Collection<Identifier> identifier)
Business identifiers assigned to this AllergyIntolerance by the performer or other systems which remain constant as the resource is updated and propagates from server to server.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
- External ids for this item- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
clinicalStatus
public AllergyIntolerance.Builder clinicalStatus(CodeableConcept clinicalStatus)
The clinical status of the allergy or intolerance.- Parameters:
clinicalStatus
- active | inactive | resolved- Returns:
- A reference to this Builder instance
-
verificationStatus
public AllergyIntolerance.Builder verificationStatus(CodeableConcept verificationStatus)
Assertion about certainty associated with the propensity, or potential risk, of a reaction to the identified substance (including pharmaceutical product).- Parameters:
verificationStatus
- unconfirmed | confirmed | refuted | entered-in-error- Returns:
- A reference to this Builder instance
-
type
public AllergyIntolerance.Builder type(AllergyIntoleranceType type)
Identification of the underlying physiological mechanism for the reaction risk.- Parameters:
type
- allergy | intolerance - Underlying mechanism (if known)- Returns:
- A reference to this Builder instance
-
category
public AllergyIntolerance.Builder category(AllergyIntoleranceCategory... category)
Category of the identified substance.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
category
- food | medication | environment | biologic- Returns:
- A reference to this Builder instance
-
category
public AllergyIntolerance.Builder category(java.util.Collection<AllergyIntoleranceCategory> category)
Category of the identified substance.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:
category
- food | medication | environment | biologic- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
criticality
public AllergyIntolerance.Builder criticality(AllergyIntoleranceCriticality criticality)
Estimate of the potential clinical harm, or seriousness, of the reaction to the identified substance.- Parameters:
criticality
- low | high | unable-to-assess- Returns:
- A reference to this Builder instance
-
code
public AllergyIntolerance.Builder code(CodeableConcept code)
Code for an allergy or intolerance statement (either a positive or a negated/excluded statement). This may be a code for a substance or pharmaceutical product that is considered to be responsible for the adverse reaction risk (e.g., "Latex"), an allergy or intolerance condition (e.g., "Latex allergy"), or a negated/excluded code for a specific substance or class (e.g., "No latex allergy") or a general or categorical negated statement (e.g., "No known allergy", "No known drug allergies"). Note: the substance for a specific reaction may be different from the substance identified as the cause of the risk, but it must be consistent with it. For instance, it may be a more specific substance (e.g. a brand medication) or a composite product that includes the identified substance. It must be clinically safe to only process the 'code' and ignore the 'reaction.substance'. If a receiving system is unable to confirm that AllergyIntolerance.reaction.substance falls within the semantic scope of AllergyIntolerance.code, then the receiving system should ignore AllergyIntolerance.reaction.substance.- Parameters:
code
- Code that identifies the allergy or intolerance- Returns:
- A reference to this Builder instance
-
patient
public AllergyIntolerance.Builder patient(Reference patient)
The patient who has the allergy or intolerance.This element is required.
Allowed resource types for this reference:
- Parameters:
patient
- Who the sensitivity is for- Returns:
- A reference to this Builder instance
-
encounter
public AllergyIntolerance.Builder encounter(Reference encounter)
The encounter when the allergy or intolerance was asserted.Allowed resource types for this reference:
- Parameters:
encounter
- Encounter when the allergy or intolerance was asserted- Returns:
- A reference to this Builder instance
-
onset
public AllergyIntolerance.Builder onset(java.lang.String onset)
Convenience method for settingonset
with choice type String.- Parameters:
onset
- When allergy or intolerance was identified- Returns:
- A reference to this Builder instance
- See Also:
onset(Element)
-
onset
public AllergyIntolerance.Builder onset(Element onset)
Estimated or actual date, date-time, or age when allergy or intolerance was identified.This is a choice element with the following allowed types:
- Parameters:
onset
- When allergy or intolerance was identified- Returns:
- A reference to this Builder instance
-
recordedDate
public AllergyIntolerance.Builder recordedDate(DateTime recordedDate)
The recordedDate represents when this particular AllergyIntolerance record was created in the system, which is often a system-generated date.- Parameters:
recordedDate
- Date first version of the resource instance was recorded- Returns:
- A reference to this Builder instance
-
recorder
public AllergyIntolerance.Builder recorder(Reference recorder)
Individual who recorded the record and takes responsibility for its content.Allowed resource types for this reference:
- Parameters:
recorder
- Who recorded the sensitivity- Returns:
- A reference to this Builder instance
-
asserter
public AllergyIntolerance.Builder asserter(Reference asserter)
The source of the information about the allergy that is recorded.Allowed resource types for this reference:
- Parameters:
asserter
- Source of the information about the allergy- Returns:
- A reference to this Builder instance
-
lastOccurrence
public AllergyIntolerance.Builder lastOccurrence(DateTime lastOccurrence)
Represents the date and/or time of the last known occurrence of a reaction event.- Parameters:
lastOccurrence
- Date(/time) of last known occurrence of a reaction- Returns:
- A reference to this Builder instance
-
note
public AllergyIntolerance.Builder note(Annotation... note)
Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
note
- Additional text not captured in other fields- Returns:
- A reference to this Builder instance
-
note
public AllergyIntolerance.Builder note(java.util.Collection<Annotation> note)
Additional narrative about the propensity for the Adverse Reaction, not captured in other fields.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
- Additional text not captured in other fields- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
reaction
public AllergyIntolerance.Builder reaction(AllergyIntolerance.Reaction... reaction)
Details about each adverse reaction event linked to exposure to the identified substance.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
reaction
- Adverse Reaction Events linked to exposure to substance- Returns:
- A reference to this Builder instance
-
reaction
public AllergyIntolerance.Builder reaction(java.util.Collection<AllergyIntolerance.Reaction> reaction)
Details about each adverse reaction event linked to exposure to the identified substance.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:
reaction
- Adverse Reaction Events linked to exposure to substance- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
build
public AllergyIntolerance build()
- Specified by:
build
in interfaceBuilder<Resource>
- Specified by:
build
in classDomainResource.Builder
- Returns:
- An immutable object of type
AllergyIntolerance
- Throws:
java.lang.IllegalStateException
- if the current state cannot be built into a valid AllergyIntolerance per the base specification
-
validate
protected void validate(AllergyIntolerance allergyIntolerance)
-
from
protected AllergyIntolerance.Builder from(AllergyIntolerance allergyIntolerance)
-
-