Class DocumentReference

  • All Implemented Interfaces:
    ca.uhn.fhir.model.api.ICompositeElement, ca.uhn.fhir.model.api.IElement, ca.uhn.fhir.model.api.IResource, ca.uhn.fhir.model.api.ISupportsUndeclaredExtensions, Serializable, org.hl7.fhir.instance.model.api.IBase, org.hl7.fhir.instance.model.api.IBaseResource

    public class DocumentReference
    extends BaseResource
    implements ca.uhn.fhir.model.api.IResource
    HAPI/FHIR DocumentReference Resource (infrastructure.documents)

    Definition: A reference to a document .

    Requirements:

    Profile Definition: http://hl7.org/fhir/profiles/DocumentReference

    See Also:
    Serialized Form
    • Field Detail

      • SP_IDENTIFIER

        public static final String SP_IDENTIFIER
        Search parameter constant for identifier

        Description:
        Type: token
        Path: DocumentReference.masterIdentifier | DocumentReference.identifier

        See Also:
        Constant Field Values
      • IDENTIFIER

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

        Description:
        Type: token
        Path: DocumentReference.masterIdentifier | DocumentReference.identifier

      • SUBJECT

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

        Description:
        Type: reference
        Path: DocumentReference.subject

      • TYPE

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

        Description:
        Type: token
        Path: DocumentReference.type

      • CLASS

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

        Description:
        Type: token
        Path: DocumentReference.class

      • AUTHOR

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

        Description:
        Type: reference
        Path: DocumentReference.author

      • CUSTODIAN

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

        Description:
        Type: reference
        Path: DocumentReference.custodian

      • AUTHENTICATOR

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

        Description:
        Type: reference
        Path: DocumentReference.authenticator

      • CREATED

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

        Description:
        Type: date
        Path: DocumentReference.created

      • INDEXED

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

        Description:
        Type: date
        Path: DocumentReference.indexed

      • STATUS

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

        Description:
        Type: token
        Path: DocumentReference.status

      • SP_RELATESTO

        public static final String SP_RELATESTO
        Search parameter constant for relatesto

        Description:
        Type: reference
        Path: DocumentReference.relatesTo.target

        See Also:
        Constant Field Values
      • RELATESTO

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

        Description:
        Type: reference
        Path: DocumentReference.relatesTo.target

      • RELATION

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

        Description:
        Type: token
        Path: DocumentReference.relatesTo.code

      • DESCRIPTION

        public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION
        Fluent Client search parameter constant for description

        Description:
        Type: string
        Path: DocumentReference.description

      • SECURITYLABEL

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

        Description:
        Type: token
        Path: DocumentReference.securityLabel

      • SP_FORMAT

        public static final String SP_FORMAT
        Search parameter constant for format

        Description:
        Type: token
        Path: DocumentReference.content.format

        See Also:
        Constant Field Values
      • FORMAT

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

        Description:
        Type: token
        Path: DocumentReference.content.format

      • SP_LANGUAGE

        public static final String SP_LANGUAGE
        Search parameter constant for language

        Description:
        Type: token
        Path: DocumentReference.content.attachment.language

        See Also:
        Constant Field Values
      • LANGUAGE

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

        Description:
        Type: token
        Path: DocumentReference.content.attachment.language

      • SP_LOCATION

        public static final String SP_LOCATION
        Search parameter constant for location

        Description:
        Type: uri
        Path: DocumentReference.content.attachment.url

        See Also:
        Constant Field Values
      • LOCATION

        public static final ca.uhn.fhir.rest.gclient.UriClientParam LOCATION
        Fluent Client search parameter constant for location

        Description:
        Type: uri
        Path: DocumentReference.content.attachment.url

      • SP_EVENT

        public static final String SP_EVENT
        Search parameter constant for event

        Description:
        Type: token
        Path: DocumentReference.context.event

        See Also:
        Constant Field Values
      • EVENT

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

        Description:
        Type: token
        Path: DocumentReference.context.event

      • SP_PERIOD

        public static final String SP_PERIOD
        Search parameter constant for period

        Description:
        Type: date
        Path: DocumentReference.context.period

        See Also:
        Constant Field Values
      • PERIOD

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

        Description:
        Type: date
        Path: DocumentReference.context.period

      • SP_FACILITY

        public static final String SP_FACILITY
        Search parameter constant for facility

        Description:
        Type: token
        Path: DocumentReference.context.facilityType

        See Also:
        Constant Field Values
      • FACILITY

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

        Description:
        Type: token
        Path: DocumentReference.context.facilityType

      • PATIENT

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

        Description:
        Type: reference
        Path: DocumentReference.subject

      • SP_SETTING

        public static final String SP_SETTING
        Search parameter constant for setting

        Description:
        Type: token
        Path: DocumentReference.context.practiceSetting

        See Also:
        Constant Field Values
      • SETTING

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

        Description:
        Type: token
        Path: DocumentReference.context.practiceSetting

      • SP_RELATED_ID

        public static final String SP_RELATED_ID
        Search parameter constant for related-id

        Description:
        Type: token
        Path: DocumentReference.context.related.identifier

        See Also:
        Constant Field Values
      • RELATED_ID

        public static final ca.uhn.fhir.rest.gclient.TokenClientParam RELATED_ID
        Fluent Client search parameter constant for related-id

        Description:
        Type: token
        Path: DocumentReference.context.related.identifier

      • SP_RELATED_REF

        public static final String SP_RELATED_REF
        Search parameter constant for related-ref

        Description:
        Type: reference
        Path: DocumentReference.context.related.ref

        See Also:
        Constant Field Values
      • RELATED_REF

        public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RELATED_REF
        Fluent Client search parameter constant for related-ref

        Description:
        Type: reference
        Path: DocumentReference.context.related.ref

      • SP_ENCOUNTER

        public static final String SP_ENCOUNTER
        Search parameter constant for encounter

        Description:
        Type: reference
        Path: DocumentReference.context.encounter

        See Also:
        Constant Field Values
      • ENCOUNTER

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

        Description:
        Type: reference
        Path: DocumentReference.context.encounter

      • SP_RELATESTO_RELATION

        public static final String SP_RELATESTO_RELATION
        Search parameter constant for relatesto-relation

        Description: Combination of relation and relatesTo
        Type: composite
        Path: relatesto & relation

        See Also:
        Constant Field Values
      • RELATESTO_RELATION

        public static final ca.uhn.fhir.rest.gclient.CompositeClientParam<ca.uhn.fhir.rest.gclient.ReferenceClientParam,​ca.uhn.fhir.rest.gclient.TokenClientParam> RELATESTO_RELATION
        Fluent Client search parameter constant for relatesto-relation

        Description: Combination of relation and relatesTo
        Type: composite
        Path: relatesto & relation

      • INCLUDE_AUTHENTICATOR

        public static final ca.uhn.fhir.model.api.Include INCLUDE_AUTHENTICATOR
        Constant for fluent queries to be used to add include statements. Specifies the path value of "DocumentReference:authenticator".
      • INCLUDE_AUTHOR

        public static final ca.uhn.fhir.model.api.Include INCLUDE_AUTHOR
        Constant for fluent queries to be used to add include statements. Specifies the path value of "DocumentReference:author".
      • INCLUDE_CUSTODIAN

        public static final ca.uhn.fhir.model.api.Include INCLUDE_CUSTODIAN
        Constant for fluent queries to be used to add include statements. Specifies the path value of "DocumentReference:custodian".
      • INCLUDE_ENCOUNTER

        public static final ca.uhn.fhir.model.api.Include INCLUDE_ENCOUNTER
        Constant for fluent queries to be used to add include statements. Specifies the path value of "DocumentReference:encounter".
      • 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 "DocumentReference:patient".
      • INCLUDE_RELATED_REF

        public static final ca.uhn.fhir.model.api.Include INCLUDE_RELATED_REF
        Constant for fluent queries to be used to add include statements. Specifies the path value of "DocumentReference:related-ref".
      • INCLUDE_RELATESTO

        public static final ca.uhn.fhir.model.api.Include INCLUDE_RELATESTO
        Constant for fluent queries to be used to add include statements. Specifies the path value of "DocumentReference:relatesto".
      • 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 "DocumentReference:subject".
    • Method Detail

      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface org.hl7.fhir.instance.model.api.IBase
      • getAllPopulatedChildElementsOfType

        public <T extends ca.uhn.fhir.model.api.IElement> List<T> getAllPopulatedChildElementsOfType​(Class<T> theType)
        Specified by:
        getAllPopulatedChildElementsOfType in interface ca.uhn.fhir.model.api.ICompositeElement
      • getMasterIdentifier

        public IdentifierDt getMasterIdentifier()
        Gets the value(s) for masterIdentifier (id). creating it if it does not exist. Will not return null.

        Definition: Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document

      • setMasterIdentifier

        public DocumentReference setMasterIdentifier​(IdentifierDt theValue)
        Sets the value(s) for masterIdentifier (id)

        Definition: Document identifier as assigned by the source of the document. This identifier is specific to this version of the document. This unique identifier may be used elsewhere to identify this version of the document

      • getIdentifier

        public List<IdentifierDtgetIdentifier()
        Gets the value(s) for identifier (id). creating it if it does not exist. Will not return null.

        Definition: Other identifiers associated with the document, including version independent identifiers

      • addIdentifier

        public IdentifierDt addIdentifier()
        Adds and returns a new value for identifier (id)

        Definition: Other identifiers associated with the document, including version independent identifiers

      • addIdentifier

        public DocumentReference addIdentifier​(IdentifierDt theValue)
        Adds a given new value for identifier (id)

        Definition: Other identifiers associated with the document, including version independent identifiers

        Parameters:
        theValue - The identifier to add (must not be null)
      • getIdentifierFirstRep

        public IdentifierDt getIdentifierFirstRep()
        Gets the first repetition for identifier (id), creating it if it does not already exist.

        Definition: Other identifiers associated with the document, including version independent identifiers

      • getSubject

        public ResourceReferenceDt getSubject()
        Gets the value(s) for subject (who.focus). creating it if it does not exist. Will not return null.

        Definition: Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure)

      • setSubject

        public DocumentReference setSubject​(ResourceReferenceDt theValue)
        Sets the value(s) for subject (who.focus)

        Definition: Who or what the document is about. The document can be about a person, (patient or healthcare practitioner), a device (e.g. a machine) or even a group of subjects (such as a document about a herd of farm animals, or a set of patients that share a common exposure)

      • getType

        public CodeableConceptDt getType()
        Gets the value(s) for type (class). creating it if it does not exist. Will not return null.

        Definition: Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.

      • setType

        public DocumentReference setType​(CodeableConceptDt theValue)
        Sets the value(s) for type (class)

        Definition: Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.

      • getClassElement

        public CodeableConceptDt getClassElement()
        Gets the value(s) for class (class). creating it if it does not exist. Will not return null.

        Definition: A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type

      • setClassElement

        public DocumentReference setClassElement​(CodeableConceptDt theValue)
        Sets the value(s) for class (class)

        Definition: A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type

      • getAuthor

        public List<ResourceReferenceDtgetAuthor()
        Gets the value(s) for author (who.author). creating it if it does not exist. Will not return null.

        Definition: Identifies who is responsible for adding the information to the document

      • addAuthor

        public ResourceReferenceDt addAuthor()
        Adds and returns a new value for author (who.author)

        Definition: Identifies who is responsible for adding the information to the document

      • getCustodian

        public ResourceReferenceDt getCustodian()
        Gets the value(s) for custodian (). creating it if it does not exist. Will not return null.

        Definition: Identifies the organization or group who is responsible for ongoing maintenance of and access to the document

      • setCustodian

        public DocumentReference setCustodian​(ResourceReferenceDt theValue)
        Sets the value(s) for custodian ()

        Definition: Identifies the organization or group who is responsible for ongoing maintenance of and access to the document

      • getAuthenticator

        public ResourceReferenceDt getAuthenticator()
        Gets the value(s) for authenticator (who.witness). creating it if it does not exist. Will not return null.

        Definition: Which person or organization authenticates that this document is valid

      • getCreatedElement

        public ca.uhn.fhir.model.primitive.DateTimeDt getCreatedElement()
        Gets the value(s) for created (when.done). creating it if it does not exist. Will not return null.

        Definition: When the document was created

      • getCreated

        public Date getCreated()
        Gets the value(s) for created (when.done). creating it if it does not exist. This method may return null.

        Definition: When the document was created

      • setCreated

        public DocumentReference setCreated​(ca.uhn.fhir.model.primitive.DateTimeDt theValue)
        Sets the value(s) for created (when.done)

        Definition: When the document was created

      • setCreated

        public DocumentReference setCreated​(Date theDate,
                                            ca.uhn.fhir.model.api.TemporalPrecisionEnum thePrecision)
        Sets the value for created (when.done)

        Definition: When the document was created

      • getIndexedElement

        public ca.uhn.fhir.model.primitive.InstantDt getIndexedElement()
        Gets the value(s) for indexed (when.recorded). creating it if it does not exist. Will not return null.

        Definition: When the document reference was created

      • getIndexed

        public Date getIndexed()
        Gets the value(s) for indexed (when.recorded). creating it if it does not exist. This method may return null.

        Definition: When the document reference was created

      • setIndexed

        public DocumentReference setIndexed​(ca.uhn.fhir.model.primitive.InstantDt theValue)
        Sets the value(s) for indexed (when.recorded)

        Definition: When the document reference was created

      • setIndexed

        public DocumentReference setIndexed​(Date theDate,
                                            ca.uhn.fhir.model.api.TemporalPrecisionEnum thePrecision)
        Sets the value for indexed (when.recorded)

        Definition: When the document reference was created

      • getStatusElement

        public ca.uhn.fhir.model.primitive.BoundCodeDt<DocumentReferenceStatusEnumgetStatusElement()
        Gets the value(s) for status (status). creating it if it does not exist. Will not return null.

        Definition: The status of this document reference

      • getStatus

        public String getStatus()
        Gets the value(s) for status (status). creating it if it does not exist. This method may return null.

        Definition: The status of this document reference

      • getDocStatus

        public CodeableConceptDt getDocStatus()
        Gets the value(s) for docStatus (status). creating it if it does not exist. Will not return null.

        Definition: The status of the underlying document

      • getRelatesTo

        public List<DocumentReference.RelatesTogetRelatesTo()
        Gets the value(s) for relatesTo (). creating it if it does not exist. Will not return null.

        Definition: Relationships that this document has with other document references that already exist

      • addRelatesTo

        public DocumentReference.RelatesTo addRelatesTo()
        Adds and returns a new value for relatesTo ()

        Definition: Relationships that this document has with other document references that already exist

      • addRelatesTo

        public DocumentReference addRelatesTo​(DocumentReference.RelatesTo theValue)
        Adds a given new value for relatesTo ()

        Definition: Relationships that this document has with other document references that already exist

        Parameters:
        theValue - The relatesTo to add (must not be null)
      • getRelatesToFirstRep

        public DocumentReference.RelatesTo getRelatesToFirstRep()
        Gets the first repetition for relatesTo (), creating it if it does not already exist.

        Definition: Relationships that this document has with other document references that already exist

      • getDescriptionElement

        public ca.uhn.fhir.model.primitive.StringDt getDescriptionElement()
        Gets the value(s) for description (). creating it if it does not exist. Will not return null.

        Definition: Human-readable description of the source document. This is sometimes known as the \"title\"

      • getDescription

        public String getDescription()
        Gets the value(s) for description (). creating it if it does not exist. This method may return null.

        Definition: Human-readable description of the source document. This is sometimes known as the \"title\"

      • setDescription

        public DocumentReference setDescription​(ca.uhn.fhir.model.primitive.StringDt theValue)
        Sets the value(s) for description ()

        Definition: Human-readable description of the source document. This is sometimes known as the \"title\"

      • setDescription

        public DocumentReference setDescription​(String theString)
        Sets the value for description ()

        Definition: Human-readable description of the source document. This is sometimes known as the \"title\"

      • getSecurityLabel

        public List<CodeableConceptDtgetSecurityLabel()
        Gets the value(s) for securityLabel (). creating it if it does not exist. Will not return null.

        Definition: A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the \"reference\" to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to

      • setSecurityLabel

        public DocumentReference setSecurityLabel​(List<CodeableConceptDt> theValue)
        Sets the value(s) for securityLabel ()

        Definition: A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the \"reference\" to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to

      • addSecurityLabel

        public CodeableConceptDt addSecurityLabel()
        Adds and returns a new value for securityLabel ()

        Definition: A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the \"reference\" to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to

      • addSecurityLabel

        public DocumentReference addSecurityLabel​(CodeableConceptDt theValue)
        Adds a given new value for securityLabel ()

        Definition: A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the \"reference\" to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to

        Parameters:
        theValue - The securityLabel to add (must not be null)
      • getSecurityLabelFirstRep

        public CodeableConceptDt getSecurityLabelFirstRep()
        Gets the first repetition for securityLabel (), creating it if it does not already exist.

        Definition: A set of Security-Tag codes specifying the level of privacy/security of the Document. Note that DocumentReference.meta.security contains the security labels of the \"reference\" to the document, while DocumentReference.securityLabel contains a snapshot of the security labels on the document the reference refers to

      • getContent

        public List<DocumentReference.ContentgetContent()
        Gets the value(s) for content (). creating it if it does not exist. Will not return null.

        Definition: The document and format referenced. There may be multiple content element repetitions, each with a different format.

      • addContent

        public DocumentReference.Content addContent()
        Adds and returns a new value for content ()

        Definition: The document and format referenced. There may be multiple content element repetitions, each with a different format.

      • addContent

        public DocumentReference addContent​(DocumentReference.Content theValue)
        Adds a given new value for content ()

        Definition: The document and format referenced. There may be multiple content element repetitions, each with a different format.

        Parameters:
        theValue - The content to add (must not be null)
      • getContentFirstRep

        public DocumentReference.Content getContentFirstRep()
        Gets the first repetition for content (), creating it if it does not already exist.

        Definition: The document and format referenced. There may be multiple content element repetitions, each with a different format.

      • getContext

        public DocumentReference.Context getContext()
        Gets the value(s) for context (). creating it if it does not exist. Will not return null.

        Definition: The clinical context in which the document was prepared

      • getResourceName

        public String getResourceName()
        Specified by:
        getResourceName in interface ca.uhn.fhir.model.api.IResource
      • getStructureFhirVersionEnum

        public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum()
        Specified by:
        getStructureFhirVersionEnum in interface org.hl7.fhir.instance.model.api.IBaseResource
        Specified by:
        getStructureFhirVersionEnum in interface ca.uhn.fhir.model.api.IResource