Class Reference

All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement, Serializable, org.hl7.fhir.instance.model.api.IBase, org.hl7.fhir.instance.model.api.IBaseDatatype, org.hl7.fhir.instance.model.api.IBaseElement, org.hl7.fhir.instance.model.api.IBaseHasExtensions, org.hl7.fhir.instance.model.api.IBaseReference, org.hl7.fhir.instance.model.api.ICompositeType

public class Reference extends BaseReference implements org.hl7.fhir.instance.model.api.IBaseReference, org.hl7.fhir.instance.model.api.ICompositeType
A reference from one resource to another.
See Also:
  • Field Details

    • reference

      protected StringType reference
      A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.
    • display

      protected StringType display
      Plain text narrative that identifies the resource in addition to the resource reference.
  • Constructor Details

    • Reference

      public Reference()
    • Reference

      public Reference(String theReference)
      Constructor
      Parameters:
      theReference - The given reference string (e.g. "Patient/123" or "http://example.com/Patient/123")
    • Reference

      public Reference(IdType theReference)
      Constructor
      Parameters:
      theReference - The given reference as an IdType (e.g. "Patient/123" or "http://example.com/Patient/123")
    • Reference

      public Reference(org.hl7.fhir.instance.model.api.IAnyResource theResource)
      Constructor
      Parameters:
      theResource - The resource represented by this reference
  • Method Details

    • hasReferenceElement

      public boolean hasReferenceElement()
      Returns:
      reference (A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value
    • hasReference

      public boolean hasReference()
    • setReferenceElement

      Parameters:
      value - reference (A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.). This is the underlying object with id, value and extensions. The accessor "getReference" gives direct access to the value
    • getReference

      public String getReference()
      Returns:
      A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.
    • setReference

      public Reference setReference(String value)
      Specified by:
      setReference in interface org.hl7.fhir.instance.model.api.IBaseReference
      Parameters:
      value - A reference to a location at which the other resource is found. The reference may be a relative reference, in which case it is relative to the service base URL, or an absolute URL that resolves to the location where the resource is found. The reference may be version specific or not. If the reference is not to a FHIR RESTful server, then it should be assumed to be version specific. Internal fragment references (start with '#') refer to contained resources.
    • getDisplayElement

      Specified by:
      getDisplayElement in interface org.hl7.fhir.instance.model.api.IBaseReference
      Returns:
      display (Plain text narrative that identifies the resource in addition to the resource reference.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value
    • hasDisplayElement

      public boolean hasDisplayElement()
    • hasDisplay

      public boolean hasDisplay()
    • setDisplayElement

      Parameters:
      value - display (Plain text narrative that identifies the resource in addition to the resource reference.). This is the underlying object with id, value and extensions. The accessor "getDisplay" gives direct access to the value
    • getDisplay

      public String getDisplay()
      Returns:
      Plain text narrative that identifies the resource in addition to the resource reference.
    • setDisplay

      public Reference setDisplay(String value)
      Specified by:
      setDisplay in interface org.hl7.fhir.instance.model.api.IBaseReference
      Parameters:
      value - Plain text narrative that identifies the resource in addition to the resource reference.
    • listChildren

      protected void listChildren(List<Property> childrenList)
      Overrides:
      listChildren in class Element
    • setProperty

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

      public Base addChild(String name) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      addChild in class Element
      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 Element
    • copy

      public Reference copy()
      Overrides:
      copy in class Type
    • typedCopy

      protected Reference typedCopy()
      Specified by:
      typedCopy in class Type
    • equalsDeep

      public boolean equalsDeep(Base other)
      Overrides:
      equalsDeep in class Element
    • equalsShallow

      public boolean equalsShallow(Base other)
      Overrides:
      equalsShallow in class Element
    • isEmpty

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