Class Media.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.Media.Builder
-
- Enclosing class:
- Media
public static class Media.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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Media.Builder
basedOn(Reference... basedOn)
A procedure that is fulfilled in whole or in part by the creation of this media.Media.Builder
basedOn(Collection<Reference> basedOn)
A procedure that is fulfilled in whole or in part by the creation of this media.Media.Builder
bodySite(CodeableConcept bodySite)
Indicates the site on the subject's body where the observation was made (i.e.Media
build()
Build theMedia
Media.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.Media.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.Media.Builder
content(Attachment content)
The actual content of the media - inline or by direct reference to the media source file.Media.Builder
created(Element created)
The date and time(s) at which the media was collected.Media.Builder
device(Reference device)
The device used to collect the media.Media.Builder
deviceName(String deviceName)
The name of the device / manufacturer of the device that was used to make the recording.Media.Builder
duration(Decimal duration)
The duration of the recording in seconds - for audio and video.Media.Builder
encounter(Reference encounter)
The encounter that establishes the context for this media.Media.Builder
extension(Extension... extension)
May be used to represent additional information that is not part of the basic definition of the resource.Media.Builder
extension(Collection<Extension> extension)
May be used to represent additional information that is not part of the basic definition of the resource.Media.Builder
frames(PositiveInt frames)
The number of frames in a photo.protected Media.Builder
from(Media media)
Media.Builder
height(PositiveInt height)
Height of the image in pixels (photo/video).Media.Builder
id(String id)
The logical id of the resource, as used in the URL for the resource.Media.Builder
identifier(Identifier... identifier)
Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g.Media.Builder
identifier(Collection<Identifier> identifier)
Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g.Media.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.Media.Builder
issued(Instant issued)
The date and time this version of the media was made available to providers, typically after having been reviewed.Media.Builder
language(Code language)
The base language in which the resource is written.Media.Builder
meta(Meta meta)
The metadata about the resource.Media.Builder
modality(CodeableConcept modality)
Details of the type of the media - usually, how it was acquired (what type of device).Media.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.Media.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.Media.Builder
note(Annotation... note)
Comments made about the media by the performer, subject or other participants.Media.Builder
note(Collection<Annotation> note)
Comments made about the media by the performer, subject or other participants.Media.Builder
operator(Reference operator)
The person who administered the collection of the image.Media.Builder
partOf(Reference... partOf)
A larger event of which this particular event is a component or step.Media.Builder
partOf(Collection<Reference> partOf)
A larger event of which this particular event is a component or step.Media.Builder
reasonCode(CodeableConcept... reasonCode)
Describes why the event occurred in coded or textual form.Media.Builder
reasonCode(Collection<CodeableConcept> reasonCode)
Describes why the event occurred in coded or textual form.Media.Builder
status(MediaStatus status)
The current state of the {{title}}.Media.Builder
subject(Reference subject)
Who/What this Media is a record of.Media.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.Media.Builder
type(CodeableConcept type)
A code that classifies whether the media is an image, video or audio recording or some other media category.Media.Builder
view(CodeableConcept view)
The name of the imaging view e.g.Media.Builder
width(PositiveInt width)
Width of the image in pixels (photo/video).-
Methods inherited from class com.ibm.fhir.model.resource.DomainResource.Builder
from
-
Methods inherited from class com.ibm.fhir.model.resource.Resource.Builder
from
-
-
-
-
Method Detail
-
id
public Media.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 Media.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 Media.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 Media.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 Media.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 Media.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
- Overrides:
contained
in classDomainResource.Builder
- Parameters:
contained
- Contained, inline Resources- Returns:
- A reference to this Builder instance
-
contained
public Media.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
- Overrides:
contained
in classDomainResource.Builder
- Parameters:
contained
- Contained, inline Resources- Returns:
- A reference to this Builder instance
-
extension
public Media.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
- Overrides:
extension
in classDomainResource.Builder
- Parameters:
extension
- Additional content defined by implementations- Returns:
- A reference to this Builder instance
-
extension
public Media.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
- Overrides:
extension
in classDomainResource.Builder
- Parameters:
extension
- Additional content defined by implementations- Returns:
- A reference to this Builder instance
-
modifierExtension
public Media.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
- Overrides:
modifierExtension
in classDomainResource.Builder
- Parameters:
modifierExtension
- Extensions that cannot be ignored- Returns:
- A reference to this Builder instance
-
modifierExtension
public Media.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
- Overrides:
modifierExtension
in classDomainResource.Builder
- Parameters:
modifierExtension
- Extensions that cannot be ignored- Returns:
- A reference to this Builder instance
-
identifier
public Media.Builder identifier(Identifier... identifier)
Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers.Adds new element(s) to the existing list
- Parameters:
identifier
- Identifier(s) for the image- Returns:
- A reference to this Builder instance
-
identifier
public Media.Builder identifier(Collection<Identifier> identifier)
Identifiers associated with the image - these may include identifiers for the image itself, identifiers for the context of its collection (e.g. series ids) and context ids such as accession numbers or other workflow identifiers.Replaces the existing list with a new one containing elements from the Collection
- Parameters:
identifier
- Identifier(s) for the image- Returns:
- A reference to this Builder instance
-
basedOn
public Media.Builder basedOn(Reference... basedOn)
A procedure that is fulfilled in whole or in part by the creation of this media.Adds new element(s) to the existing list
- Parameters:
basedOn
- Procedure that caused this media to be created- Returns:
- A reference to this Builder instance
-
basedOn
public Media.Builder basedOn(Collection<Reference> basedOn)
A procedure that is fulfilled in whole or in part by the creation of this media.Replaces the existing list with a new one containing elements from the Collection
- Parameters:
basedOn
- Procedure that caused this media to be created- Returns:
- A reference to this Builder instance
-
partOf
public Media.Builder partOf(Reference... partOf)
A larger event of which this particular event is a component or step.Adds new element(s) to the existing list
- Parameters:
partOf
- Part of referenced event- Returns:
- A reference to this Builder instance
-
partOf
public Media.Builder partOf(Collection<Reference> partOf)
A larger event of which this particular event is a component or step.Replaces the existing list with a new one containing elements from the Collection
- Parameters:
partOf
- Part of referenced event- Returns:
- A reference to this Builder instance
-
status
public Media.Builder status(MediaStatus status)
The current state of the {{title}}.This element is required.
- Parameters:
status
- preparation | in-progress | not-done | on-hold | stopped | completed | entered-in-error | unknown- Returns:
- A reference to this Builder instance
-
type
public Media.Builder type(CodeableConcept type)
A code that classifies whether the media is an image, video or audio recording or some other media category.- Parameters:
type
- Classification of media as image, video, or audio- Returns:
- A reference to this Builder instance
-
modality
public Media.Builder modality(CodeableConcept modality)
Details of the type of the media - usually, how it was acquired (what type of device). If images sourced from a DICOM system, are wrapped in a Media resource, then this is the modality.- Parameters:
modality
- The type of acquisition equipment/process- Returns:
- A reference to this Builder instance
-
view
public Media.Builder view(CodeableConcept view)
The name of the imaging view e.g. Lateral or Antero-posterior (AP).- Parameters:
view
- Imaging view, e.g. Lateral or Antero-posterior- Returns:
- A reference to this Builder instance
-
subject
public Media.Builder subject(Reference subject)
Who/What this Media is a record of.Allowed resource types for this reference:
- Parameters:
subject
- Who/What this Media is a record of- Returns:
- A reference to this Builder instance
-
encounter
public Media.Builder encounter(Reference encounter)
The encounter that establishes the context for this media.Allowed resource types for this reference:
- Parameters:
encounter
- Encounter associated with media- Returns:
- A reference to this Builder instance
-
created
public Media.Builder created(Element created)
The date and time(s) at which the media was collected.This is a choice element with the following allowed types:
- Parameters:
created
- When Media was collected- Returns:
- A reference to this Builder instance
-
issued
public Media.Builder issued(Instant issued)
The date and time this version of the media was made available to providers, typically after having been reviewed.- Parameters:
issued
- Date/Time this version was made available- Returns:
- A reference to this Builder instance
-
operator
public Media.Builder operator(Reference operator)
The person who administered the collection of the image.Allowed resource types for this reference:
- Parameters:
operator
- The person who generated the image- Returns:
- A reference to this Builder instance
-
reasonCode
public Media.Builder reasonCode(CodeableConcept... reasonCode)
Describes why the event occurred in coded or textual form.Adds new element(s) to the existing list
- Parameters:
reasonCode
- Why was event performed?- Returns:
- A reference to this Builder instance
-
reasonCode
public Media.Builder reasonCode(Collection<CodeableConcept> reasonCode)
Describes why the event occurred in coded or textual form.Replaces the existing list with a new one containing elements from the Collection
- Parameters:
reasonCode
- Why was event performed?- Returns:
- A reference to this Builder instance
-
bodySite
public Media.Builder bodySite(CodeableConcept bodySite)
Indicates the site on the subject's body where the observation was made (i.e. the target site).- Parameters:
bodySite
- Observed body part- Returns:
- A reference to this Builder instance
-
deviceName
public Media.Builder deviceName(String deviceName)
The name of the device / manufacturer of the device that was used to make the recording.- Parameters:
deviceName
- Name of the device/manufacturer- Returns:
- A reference to this Builder instance
-
device
public Media.Builder device(Reference device)
The device used to collect the media.Allowed resource types for this reference:
- Parameters:
device
- Observing Device- Returns:
- A reference to this Builder instance
-
height
public Media.Builder height(PositiveInt height)
Height of the image in pixels (photo/video).- Parameters:
height
- Height of the image in pixels (photo/video)- Returns:
- A reference to this Builder instance
-
width
public Media.Builder width(PositiveInt width)
Width of the image in pixels (photo/video).- Parameters:
width
- Width of the image in pixels (photo/video)- Returns:
- A reference to this Builder instance
-
frames
public Media.Builder frames(PositiveInt frames)
The number of frames in a photo. This is used with a multi-page fax, or an imaging acquisition context that takes multiple slices in a single image, or an animated gif. If there is more than one frame, this SHALL have a value in order to alert interface software that a multi-frame capable rendering widget is required.- Parameters:
frames
- Number of frames if > 1 (photo)- Returns:
- A reference to this Builder instance
-
duration
public Media.Builder duration(Decimal duration)
The duration of the recording in seconds - for audio and video.- Parameters:
duration
- Length in seconds (audio / video)- Returns:
- A reference to this Builder instance
-
content
public Media.Builder content(Attachment content)
The actual content of the media - inline or by direct reference to the media source file.This element is required.
- Parameters:
content
- Actual Media - reference or data- Returns:
- A reference to this Builder instance
-
note
public Media.Builder note(Annotation... note)
Comments made about the media by the performer, subject or other participants.Adds new element(s) to the existing list
- Parameters:
note
- Comments made about the media- Returns:
- A reference to this Builder instance
-
note
public Media.Builder note(Collection<Annotation> note)
Comments made about the media by the performer, subject or other participants.Replaces the existing list with a new one containing elements from the Collection
- Parameters:
note
- Comments made about the media- Returns:
- A reference to this Builder instance
-
build
public Media build()
- Specified by:
build
in interfaceBuilder<Resource>
- Specified by:
build
in classDomainResource.Builder
- Returns:
- An immutable object of type
Media
- Throws:
IllegalStateException
- if the current state cannot be built into a valid Media per the base specification
-
from
protected Media.Builder from(Media media)
-
-