Class Consent.Provision.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.Consent.Provision.Builder
-
- Enclosing class:
- Consent.Provision
public static class Consent.Provision.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 Consent.Provision.Builder
action(java.util.Collection<CodeableConcept> action)
Actions controlled by this Rule.Consent.Provision.Builder
action(CodeableConcept... action)
Actions controlled by this Rule.Consent.Provision.Builder
actor(java.util.Collection<Consent.Provision.Actor> actor)
Who or what is controlled by this rule.Consent.Provision.Builder
actor(Consent.Provision.Actor... actor)
Who or what is controlled by this rule.Consent.Provision
build()
Build theConsent.Provision
Consent.Provision.Builder
clazz(java.util.Collection<Coding> clazz)
The class of information covered by this rule.Consent.Provision.Builder
clazz(Coding... clazz)
The class of information covered by this rule.Consent.Provision.Builder
code(java.util.Collection<CodeableConcept> code)
If this code is found in an instance, then the rule applies.Consent.Provision.Builder
code(CodeableConcept... code)
If this code is found in an instance, then the rule applies.Consent.Provision.Builder
data(java.util.Collection<Consent.Provision.Data> data)
The resources controlled by this rule if specific resources are referenced.Consent.Provision.Builder
data(Consent.Provision.Data... data)
The resources controlled by this rule if specific resources are referenced.Consent.Provision.Builder
dataPeriod(Period dataPeriod)
Clinical or Operational Relevant period of time that bounds the data controlled by this rule.Consent.Provision.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.Consent.Provision.Builder
extension(Extension... extension)
May be used to represent additional information that is not part of the basic definition of the element.protected Consent.Provision.Builder
from(Consent.Provision provision)
Consent.Provision.Builder
id(java.lang.String id)
Unique id for the element within a resource (for internal references).Consent.Provision.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.Consent.Provision.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.Consent.Provision.Builder
period(Period period)
The timeframe in this rule is valid.Consent.Provision.Builder
provision(java.util.Collection<Consent.Provision> provision)
Rules which provide exceptions to the base rule or subrules.Consent.Provision.Builder
provision(Consent.Provision... provision)
Rules which provide exceptions to the base rule or subrules.Consent.Provision.Builder
purpose(java.util.Collection<Coding> purpose)
The context of the activities a user is taking - why the user is accessing the data - that are controlled by this rule.Consent.Provision.Builder
purpose(Coding... purpose)
The context of the activities a user is taking - why the user is accessing the data - that are controlled by this rule.Consent.Provision.Builder
securityLabel(java.util.Collection<Coding> securityLabel)
A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception.Consent.Provision.Builder
securityLabel(Coding... securityLabel)
A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception.Consent.Provision.Builder
type(ConsentProvisionType type)
Action to take - permit or deny - when the rule conditions are met.protected void
validate(Consent.Provision provision)
-
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 Consent.Provision.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 Consent.Provision.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 Consent.Provision.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 Consent.Provision.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 Consent.Provision.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
-
type
public Consent.Provision.Builder type(ConsentProvisionType type)
Action to take - permit or deny - when the rule conditions are met. Not permitted in root rule, required in all nested rules.- Parameters:
type
- deny | permit- Returns:
- A reference to this Builder instance
-
period
public Consent.Provision.Builder period(Period period)
The timeframe in this rule is valid.- Parameters:
period
- Timeframe for this rule- Returns:
- A reference to this Builder instance
-
actor
public Consent.Provision.Builder actor(Consent.Provision.Actor... actor)
Who or what is controlled by this rule. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
actor
- Who|what controlled by this rule (or group, by role)- Returns:
- A reference to this Builder instance
-
actor
public Consent.Provision.Builder actor(java.util.Collection<Consent.Provision.Actor> actor)
Who or what is controlled by this rule. Use group to identify a set of actors by some property they share (e.g. 'admitting officers').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:
actor
- Who|what controlled by this rule (or group, by role)- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
action
public Consent.Provision.Builder action(CodeableConcept... action)
Actions controlled by this Rule.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
action
- Actions controlled by this rule- Returns:
- A reference to this Builder instance
-
action
public Consent.Provision.Builder action(java.util.Collection<CodeableConcept> action)
Actions controlled by this Rule.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:
action
- Actions controlled by this rule- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
securityLabel
public Consent.Provision.Builder securityLabel(Coding... securityLabel)
A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
securityLabel
- Security Labels that define affected resources- Returns:
- A reference to this Builder instance
-
securityLabel
public Consent.Provision.Builder securityLabel(java.util.Collection<Coding> securityLabel)
A security label, comprised of 0..* security label fields (Privacy tags), which define which resources are controlled by this exception.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:
securityLabel
- Security Labels that define affected resources- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
purpose
public Consent.Provision.Builder purpose(Coding... purpose)
The context of the activities a user is taking - why the user is accessing the data - that are controlled by this rule.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
purpose
- Context of activities covered by this rule- Returns:
- A reference to this Builder instance
-
purpose
public Consent.Provision.Builder purpose(java.util.Collection<Coding> purpose)
The context of the activities a user is taking - why the user is accessing the data - that are controlled by this rule.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:
purpose
- Context of activities covered by this rule- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
clazz
public Consent.Provision.Builder clazz(Coding... clazz)
The class of information covered by this rule. The type can be a FHIR resource type, a profile on a type, or a CDA document, or some other type that indicates what sort of information the consent relates to.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
clazz
- e.g. Resource Type, Profile, CDA, etc.- Returns:
- A reference to this Builder instance
-
clazz
public Consent.Provision.Builder clazz(java.util.Collection<Coding> clazz)
The class of information covered by this rule. The type can be a FHIR resource type, a profile on a type, or a CDA document, or some other type that indicates what sort of information the consent relates to.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:
clazz
- e.g. Resource Type, Profile, CDA, etc.- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
code
public Consent.Provision.Builder code(CodeableConcept... code)
If this code is found in an instance, then the rule applies.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
code
- e.g. LOINC or SNOMED CT code, etc. in the content- Returns:
- A reference to this Builder instance
-
code
public Consent.Provision.Builder code(java.util.Collection<CodeableConcept> code)
If this code is found in an instance, then the rule applies.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:
code
- e.g. LOINC or SNOMED CT code, etc. in the content- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
dataPeriod
public Consent.Provision.Builder dataPeriod(Period dataPeriod)
Clinical or Operational Relevant period of time that bounds the data controlled by this rule.- Parameters:
dataPeriod
- Timeframe for data controlled by this rule- Returns:
- A reference to this Builder instance
-
data
public Consent.Provision.Builder data(Consent.Provision.Data... data)
The resources controlled by this rule if specific resources are referenced.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
data
- Data controlled by this rule- Returns:
- A reference to this Builder instance
-
data
public Consent.Provision.Builder data(java.util.Collection<Consent.Provision.Data> data)
The resources controlled by this rule if specific resources are referenced.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:
data
- Data controlled by this rule- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
provision
public Consent.Provision.Builder provision(Consent.Provision... provision)
Rules which provide exceptions to the base rule or subrules.Adds new element(s) to the existing list. If any of the elements are null, calling
build()
will fail.- Parameters:
provision
- Nested Exception Rules- Returns:
- A reference to this Builder instance
-
provision
public Consent.Provision.Builder provision(java.util.Collection<Consent.Provision> provision)
Rules which provide exceptions to the base rule or subrules.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:
provision
- Nested Exception Rules- Returns:
- A reference to this Builder instance
- Throws:
java.lang.NullPointerException
- If the passed collection is null
-
build
public Consent.Provision build()
Build theConsent.Provision
- Specified by:
build
in interfaceBuilder<Element>
- Specified by:
build
in classBackboneElement.Builder
- Returns:
- An immutable object of type
Consent.Provision
- Throws:
java.lang.IllegalStateException
- if the current state cannot be built into a valid Provision per the base specification
-
validate
protected void validate(Consent.Provision provision)
-
from
protected Consent.Provision.Builder from(Consent.Provision provision)
-
-