Class Media

All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement, Serializable, org.hl7.fhir.instance.model.api.IAnyResource, org.hl7.fhir.instance.model.api.IBase, org.hl7.fhir.instance.model.api.IBaseHasExtensions, org.hl7.fhir.instance.model.api.IBaseHasModifierExtensions, org.hl7.fhir.instance.model.api.IBaseResource, org.hl7.fhir.instance.model.api.IDomainResource

public class Media extends DomainResource
A photo, video, or audio recording acquired or used in healthcare. The actual content may be inline or provided by direct reference.
See Also:
  • Field Details

    • 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.
    • basedOn

      protected List<Reference> basedOn
      A procedure that is fulfilled in whole or in part by the creation of this media.
    • basedOnTarget

      The actual objects that are the target of the reference (A procedure that is fulfilled in whole or in part by the creation of this media.)
    • type

      Whether the media is a photo (still image), an audio recording, or a video recording.
    • subtype

      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.
    • view

      protected CodeableConcept view
      The name of the imaging view e.g. Lateral or Antero-posterior (AP).
    • subject

      protected Reference subject
      Who/What this Media is a record of.
    • subjectTarget

      The actual object that is the target of the reference (Who/What this Media is a record of.)
    • context

      protected Reference context
      The encounter or episode of care that establishes the context for this media.
    • contextTarget

      The actual object that is the target of the reference (The encounter or episode of care that establishes the context for this media.)
    • occurrence

      protected Type occurrence
      The date and time(s) at which the media was collected.
    • operator

      protected Reference operator
      The person who administered the collection of the image.
    • operatorTarget

      The actual object that is the target of the reference (The person who administered the collection of the image.)
    • reasonCode

      Describes why the event occurred in coded or textual form.
    • bodySite

      Indicates the site on the subject's body where the media was collected (i.e. the target site).
    • device

      protected Reference device
      The device used to collect the media.
    • deviceTarget

      The actual object that is the target of the reference (The device used to collect the media.)
    • height

      Height of the image in pixels (photo/video).
    • width

      Width of the image in pixels (photo/video).
    • 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.
    • duration

      The duration of the recording in seconds - for audio and video.
    • content

      protected Attachment content
      The actual content of the media - inline or by direct reference to the media source file.
    • note

      protected List<Annotation> note
      Comments made about the media by the performer, subject or other participants.
    • SP_DATE

      public static final String SP_DATE
      Search parameter: date

      Description: When Media was collected
      Type: date
      Path: Media.occurrence[x]

      See Also:
    • DATE

      public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE
      Fluent Client search parameter constant for date

      Description: When Media was collected
      Type: date
      Path: Media.occurrence[x]

    • SP_IDENTIFIER

      public static final String SP_IDENTIFIER
      Search parameter: identifier

      Description: Identifier(s) for the image
      Type: token
      Path: Media.identifier

      See Also:
    • IDENTIFIER

      public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER
      Fluent Client search parameter constant for identifier

      Description: Identifier(s) for the image
      Type: token
      Path: Media.identifier

    • SP_CREATED

      public static final String SP_CREATED
      Search parameter: created

      Description: Date attachment was first created
      Type: date
      Path: Media.content.creation

      See Also:
    • CREATED

      public static final ca.uhn.fhir.rest.gclient.DateClientParam CREATED
      Fluent Client search parameter constant for created

      Description: Date attachment was first created
      Type: date
      Path: Media.content.creation

    • SP_SUBJECT

      public static final String SP_SUBJECT
      Search parameter: subject

      Description: Who/What this Media is a record of
      Type: reference
      Path: Media.subject

      See Also:
    • SUBJECT

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam SUBJECT
      Fluent Client search parameter constant for subject

      Description: Who/What this Media is a record of
      Type: reference
      Path: Media.subject

    • INCLUDE_SUBJECT

      public static final ca.uhn.fhir.model.api.Include INCLUDE_SUBJECT
      Constant for fluent queries to be used to add include statements. Specifies the path value of "Media:subject".
    • SP_TYPE

      public static final String SP_TYPE
      Search parameter: type

      Description: photo | video | audio
      Type: token
      Path: Media.type

      See Also:
    • TYPE

      public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE
      Fluent Client search parameter constant for type

      Description: photo | video | audio
      Type: token
      Path: Media.type

    • SP_OPERATOR

      public static final String SP_OPERATOR
      Search parameter: operator

      Description: The person who generated the image
      Type: reference
      Path: Media.operator

      See Also:
    • OPERATOR

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam OPERATOR
      Fluent Client search parameter constant for operator

      Description: The person who generated the image
      Type: reference
      Path: Media.operator

    • INCLUDE_OPERATOR

      public static final ca.uhn.fhir.model.api.Include INCLUDE_OPERATOR
      Constant for fluent queries to be used to add include statements. Specifies the path value of "Media:operator".
    • SP_VIEW

      public static final String SP_VIEW
      Search parameter: view

      Description: Imaging view, e.g. Lateral or Antero-posterior
      Type: token
      Path: Media.view

      See Also:
    • VIEW

      public static final ca.uhn.fhir.rest.gclient.TokenClientParam VIEW
      Fluent Client search parameter constant for view

      Description: Imaging view, e.g. Lateral or Antero-posterior
      Type: token
      Path: Media.view

    • SP_SITE

      public static final String SP_SITE
      Search parameter: site

      Description: Body part in media
      Type: token
      Path: Media.bodySite

      See Also:
    • SITE

      public static final ca.uhn.fhir.rest.gclient.TokenClientParam SITE
      Fluent Client search parameter constant for site

      Description: Body part in media
      Type: token
      Path: Media.bodySite

    • SP_BASED_ON

      public static final String SP_BASED_ON
      Search parameter: based-on

      Description: Procedure that caused this media to be created
      Type: reference
      Path: Media.basedOn

      See Also:
    • BASED_ON

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam BASED_ON
      Fluent Client search parameter constant for based-on

      Description: Procedure that caused this media to be created
      Type: reference
      Path: Media.basedOn

    • INCLUDE_BASED_ON

      public static final ca.uhn.fhir.model.api.Include INCLUDE_BASED_ON
      Constant for fluent queries to be used to add include statements. Specifies the path value of "Media:based-on".
    • SP_SUBTYPE

      public static final String SP_SUBTYPE
      Search parameter: subtype

      Description: The type of acquisition equipment/process
      Type: token
      Path: Media.subtype

      See Also:
    • SUBTYPE

      public static final ca.uhn.fhir.rest.gclient.TokenClientParam SUBTYPE
      Fluent Client search parameter constant for subtype

      Description: The type of acquisition equipment/process
      Type: token
      Path: Media.subtype

    • SP_PATIENT

      public static final String SP_PATIENT
      Search parameter: patient

      Description: Who/What this Media is a record of
      Type: reference
      Path: Media.subject

      See Also:
    • PATIENT

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam PATIENT
      Fluent Client search parameter constant for patient

      Description: Who/What this Media is a record of
      Type: reference
      Path: Media.subject

    • INCLUDE_PATIENT

      public static final ca.uhn.fhir.model.api.Include INCLUDE_PATIENT
      Constant for fluent queries to be used to add include statements. Specifies the path value of "Media:patient".
    • SP_CONTEXT

      public static final String SP_CONTEXT
      Search parameter: context

      Description: Encounter / Episode associated with media
      Type: reference
      Path: Media.context

      See Also:
    • CONTEXT

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam CONTEXT
      Fluent Client search parameter constant for context

      Description: Encounter / Episode associated with media
      Type: reference
      Path: Media.context

    • INCLUDE_CONTEXT

      public static final ca.uhn.fhir.model.api.Include INCLUDE_CONTEXT
      Constant for fluent queries to be used to add include statements. Specifies the path value of "Media:context".
    • SP_DEVICE

      public static final String SP_DEVICE
      Search parameter: device

      Description: Observing Device
      Type: reference
      Path: Media.device

      See Also:
    • DEVICE

      public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DEVICE
      Fluent Client search parameter constant for device

      Description: Observing Device
      Type: reference
      Path: Media.device

    • INCLUDE_DEVICE

      public static final ca.uhn.fhir.model.api.Include INCLUDE_DEVICE
      Constant for fluent queries to be used to add include statements. Specifies the path value of "Media:device".
  • Constructor Details

  • Method Details

    • getIdentifier

      Returns:
      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.)
    • setIdentifier

      public Media setIdentifier(List<Identifier> theIdentifier)
      Returns:
      Returns a reference to this for easy method chaining
    • hasIdentifier

      public boolean hasIdentifier()
    • addIdentifier

    • addIdentifier

    • getIdentifierFirstRep

      Returns:
      The first repetition of repeating field identifier, creating it if it does not already exist
    • getBasedOn

      Returns:
      basedOn (A procedure that is fulfilled in whole or in part by the creation of this media.)
    • setBasedOn

      public Media setBasedOn(List<Reference> theBasedOn)
      Returns:
      Returns a reference to this for easy method chaining
    • hasBasedOn

      public boolean hasBasedOn()
    • addBasedOn

    • addBasedOn

    • getBasedOnFirstRep

      Returns:
      The first repetition of repeating field basedOn, creating it if it does not already exist
    • getBasedOnTarget

      Deprecated.
      Use Reference#setResource(IBaseResource) instead
    • addBasedOnTarget

      Deprecated.
      Use Reference#setResource(IBaseResource) instead
    • getTypeElement

      Returns:
      type (Whether the media is a photo (still image), an audio recording, or a video recording.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
    • hasTypeElement

      public boolean hasTypeElement()
    • hasType

      public boolean hasType()
    • setTypeElement

      Parameters:
      value - type (Whether the media is a photo (still image), an audio recording, or a video recording.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
    • getType

      Returns:
      Whether the media is a photo (still image), an audio recording, or a video recording.
    • setType

      Parameters:
      value - Whether the media is a photo (still image), an audio recording, or a video recording.
    • getSubtype

      Returns:
      subtype (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.)
    • hasSubtype

      public boolean hasSubtype()
    • setSubtype

      Parameters:
      value - subtype (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.)
    • getView

      Returns:
      view (The name of the imaging view e.g. Lateral or Antero-posterior (AP).)
    • hasView

      public boolean hasView()
    • setView

      public Media setView(CodeableConcept value)
      Parameters:
      value - view (The name of the imaging view e.g. Lateral or Antero-posterior (AP).)
    • getSubject

      Returns:
      subject (Who/What this Media is a record of.)
    • hasSubject

      public boolean hasSubject()
    • setSubject

      public Media setSubject(Reference value)
      Parameters:
      value - subject (Who/What this Media is a record of.)
    • getSubjectTarget

      Returns:
      subject The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Who/What this Media is a record of.)
    • setSubjectTarget

      Parameters:
      value - subject The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Who/What this Media is a record of.)
    • getContext

      Returns:
      context (The encounter or episode of care that establishes the context for this media.)
    • hasContext

      public boolean hasContext()
    • setContext

      public Media setContext(Reference value)
      Parameters:
      value - context (The encounter or episode of care that establishes the context for this media.)
    • getContextTarget

      Returns:
      context The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The encounter or episode of care that establishes the context for this media.)
    • setContextTarget

      Parameters:
      value - context The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The encounter or episode of care that establishes the context for this media.)
    • getOccurrence

      public Type getOccurrence()
      Returns:
      occurrence (The date and time(s) at which the media was collected.)
    • getOccurrenceDateTimeType

      public DateTimeType getOccurrenceDateTimeType() throws org.hl7.fhir.exceptions.FHIRException
      Returns:
      occurrence (The date and time(s) at which the media was collected.)
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • hasOccurrenceDateTimeType

      public boolean hasOccurrenceDateTimeType()
    • getOccurrencePeriod

      public Period getOccurrencePeriod() throws org.hl7.fhir.exceptions.FHIRException
      Returns:
      occurrence (The date and time(s) at which the media was collected.)
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • hasOccurrencePeriod

      public boolean hasOccurrencePeriod()
    • hasOccurrence

      public boolean hasOccurrence()
    • setOccurrence

      public Media setOccurrence(Type value) throws org.hl7.fhir.exceptions.FHIRFormatError
      Parameters:
      value - occurrence (The date and time(s) at which the media was collected.)
      Throws:
      org.hl7.fhir.exceptions.FHIRFormatError
    • getOperator

      Returns:
      operator (The person who administered the collection of the image.)
    • hasOperator

      public boolean hasOperator()
    • setOperator

      public Media setOperator(Reference value)
      Parameters:
      value - operator (The person who administered the collection of the image.)
    • getOperatorTarget

      Returns:
      operator The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The person who administered the collection of the image.)
    • setOperatorTarget

      Parameters:
      value - operator The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The person who administered the collection of the image.)
    • getReasonCode

      Returns:
      reasonCode (Describes why the event occurred in coded or textual form.)
    • setReasonCode

      public Media setReasonCode(List<CodeableConcept> theReasonCode)
      Returns:
      Returns a reference to this for easy method chaining
    • hasReasonCode

      public boolean hasReasonCode()
    • addReasonCode

    • addReasonCode

    • getReasonCodeFirstRep

      Returns:
      The first repetition of repeating field reasonCode, creating it if it does not already exist
    • getBodySite

      Returns:
      bodySite (Indicates the site on the subject's body where the media was collected (i.e. the target site).)
    • hasBodySite

      public boolean hasBodySite()
    • setBodySite

      Parameters:
      value - bodySite (Indicates the site on the subject's body where the media was collected (i.e. the target site).)
    • getDevice

      public Reference getDevice()
      Returns:
      device (The device used to collect the media.)
    • hasDevice

      public boolean hasDevice()
    • setDevice

      public Media setDevice(Reference value)
      Parameters:
      value - device (The device used to collect the media.)
    • getDeviceTarget

      Returns:
      device The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (The device used to collect the media.)
    • setDeviceTarget

      public Media setDeviceTarget(Resource value)
      Parameters:
      value - device The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (The device used to collect the media.)
    • getHeightElement

      Returns:
      height (Height of the image in pixels (photo/video).). This is the underlying object with id, value and extensions. The accessor "getHeight" gives direct access to the value
    • hasHeightElement

      public boolean hasHeightElement()
    • hasHeight

      public boolean hasHeight()
    • setHeightElement

      Parameters:
      value - height (Height of the image in pixels (photo/video).). This is the underlying object with id, value and extensions. The accessor "getHeight" gives direct access to the value
    • getHeight

      public int getHeight()
      Returns:
      Height of the image in pixels (photo/video).
    • setHeight

      public Media setHeight(int value)
      Parameters:
      value - Height of the image in pixels (photo/video).
    • getWidthElement

      Returns:
      width (Width of the image in pixels (photo/video).). This is the underlying object with id, value and extensions. The accessor "getWidth" gives direct access to the value
    • hasWidthElement

      public boolean hasWidthElement()
    • hasWidth

      public boolean hasWidth()
    • setWidthElement

      Parameters:
      value - width (Width of the image in pixels (photo/video).). This is the underlying object with id, value and extensions. The accessor "getWidth" gives direct access to the value
    • getWidth

      public int getWidth()
      Returns:
      Width of the image in pixels (photo/video).
    • setWidth

      public Media setWidth(int value)
      Parameters:
      value - Width of the image in pixels (photo/video).
    • getFramesElement

      Returns:
      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.). This is the underlying object with id, value and extensions. The accessor "getFrames" gives direct access to the value
    • hasFramesElement

      public boolean hasFramesElement()
    • hasFrames

      public boolean hasFrames()
    • setFramesElement

      Parameters:
      value - 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.). This is the underlying object with id, value and extensions. The accessor "getFrames" gives direct access to the value
    • getFrames

      public int getFrames()
      Returns:
      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.
    • setFrames

      public Media setFrames(int value)
      Parameters:
      value - 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.
    • getDurationElement

      Returns:
      duration (The duration of the recording in seconds - for audio and video.). This is the underlying object with id, value and extensions. The accessor "getDuration" gives direct access to the value
    • hasDurationElement

      public boolean hasDurationElement()
    • hasDuration

      public boolean hasDuration()
    • setDurationElement

      Parameters:
      value - duration (The duration of the recording in seconds - for audio and video.). This is the underlying object with id, value and extensions. The accessor "getDuration" gives direct access to the value
    • getDuration

      public int getDuration()
      Returns:
      The duration of the recording in seconds - for audio and video.
    • setDuration

      public Media setDuration(int value)
      Parameters:
      value - The duration of the recording in seconds - for audio and video.
    • getContent

      Returns:
      content (The actual content of the media - inline or by direct reference to the media source file.)
    • hasContent

      public boolean hasContent()
    • setContent

      public Media setContent(Attachment value)
      Parameters:
      value - content (The actual content of the media - inline or by direct reference to the media source file.)
    • getNote

      public List<Annotation> getNote()
      Returns:
      note (Comments made about the media by the performer, subject or other participants.)
    • setNote

      public Media setNote(List<Annotation> theNote)
      Returns:
      Returns a reference to this for easy method chaining
    • hasNote

      public boolean hasNote()
    • addNote

      public Annotation addNote()
    • addNote

      public Media addNote(Annotation t)
    • getNoteFirstRep

      Returns:
      The first repetition of repeating field note, creating it if it does not already exist
    • listChildren

      protected void listChildren(List<Property> children)
      Overrides:
      listChildren in class DomainResource
    • getNamedProperty

      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      getNamedProperty in class DomainResource
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • getProperty

      public Base[] getProperty(int hash, String name, boolean checkValid) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      getProperty in class DomainResource
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • setProperty

      public Base setProperty(int hash, String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      setProperty in class DomainResource
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • setProperty

      public Base setProperty(String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      setProperty in class DomainResource
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • makeProperty

      public Base makeProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      makeProperty in class DomainResource
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • getTypesForProperty

      public String[] getTypesForProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      getTypesForProperty in class DomainResource
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • addChild

      public Base addChild(String name) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      addChild in class DomainResource
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • fhirType

      public String fhirType()
      Specified by:
      fhirType in interface org.hl7.fhir.instance.model.api.IBase
      Overrides:
      fhirType in class DomainResource
    • copy

      public Media copy()
      Specified by:
      copy in class DomainResource
    • typedCopy

      protected Media typedCopy()
    • equalsDeep

      public boolean equalsDeep(Base other_)
      Overrides:
      equalsDeep in class DomainResource
    • equalsShallow

      public boolean equalsShallow(Base other_)
      Overrides:
      equalsShallow in class DomainResource
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface org.hl7.fhir.instance.model.api.IBase
      Overrides:
      isEmpty in class DomainResource
    • getResourceType

      Specified by:
      getResourceType in class Resource