DocumentReference search-type

When querying for this resource, one of the following sets of parameters must always be sent. Additional parameters may be sent at any time.
  • _id
  • identifier
  • patient
Request Fields and Example
type
[string]

Kind of document

category
[string]

The categorization of the document. Pass urn:redox:document_kind|CDA to retrieve XML-formatted CDA documents.

patient
[string]

Who is the subject of the document

patient.identifier
[string]

One or more external identifiers for the patient

date
[string]

The date/time this document reference was created

encounter-identifier
[string]

Identifier for encounter associated with documents

identifier
[string]

A master version specific identifier for the document reference

period
[string]

The time of service that is being documented

_elements
[string]

A comma-separated list of DocumentReference field names to return. This is helpful in reducing the initial response size, especially for DocumentReferences resources where content can carry binary data.

Redox recommends passing subject,masterIdentifier,date,type,context to retrieve meaningful fields while still omitting the content which can be retrieved via subsequent searches or GET operations.

post/DocumentReference/_search
Response Fields and Example
Any of:

Response to a DocumentReference search operation for CDA documents (category=urn:redox:document_kind|CDA)

resourceType
required, string

Identifies the type of the resource

Value: Bundle
type
required, string

Identifies this bundle as a response to a search

Value: searchset
total
required, number

The total number of matches

entry
[DocumentReference, Other]

A resource matching the search criteria or related to a matching resource

Any of:
resource
required, object

A CDA XML document stored in Base64 encoded format

resourceType
required, string

Identifies the type of the resource

Value: DocumentReference
status
required, string

The status of this document reference.

Possible Values: current, superseded, entered-in-error
category
required, [object]

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.

coding
[object]

A reference to a code defined by a terminology system.

system
required, string

The identification of the code system that defines the meaning of the symbol in the code.

Value: urn:redox:document_kind
code
required, string

A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).

Value: CDA
text
string

A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.

content
required, [object]

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

attachment
required, object

The document or URL of the document along with critical metadata to prove content has integrity.

contentType
string

Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.

Value: text/xml
data
string

The actual data of the attachment - a sequence of bytes, base64 encoded.

id
string

The logical id of the resource, as used in the URL for the resource. Once assigned, this value never changes.

masterIdentifier
object

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.

extension
[Boolean, String, CodeableConcept, Coding, HumanName, Reference]

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.

One of:
url
required, string

Source of the definition for the extension code - a logical name or a URL.

valueBoolean
boolean

A single value for the extension.

use
string

The purpose of this identifier.

Possible Values: usual, official, temp, secondary, old (If known)
system
string

Establishes the namespace for the value - that is, a URL that describes a set values that are unique.

value
string

The portion of the identifier typically relevant to the user and which is unique within the context of the system.

type
object

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.

coding
[object]

A reference to a code defined by a terminology system.

system
string

The identification of the code system that defines the meaning of the symbol in the code.

code
string

A symbol in syntax defined by the system. The symbol may be a predefined code or an expression in a syntax defined by the coding system (e.g. post-coordination).

text
string

A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.

subject
object

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).

Must reference one of the following types of resources:

  • Patient
  • Practitioner
  • Group
  • Device
reference
string

A reference to another resource. This is typically either a relative reference which includes the resource type and ID, or an internal reference which starts with # and refers to a contained resource.

date
string

When the document reference was created.

description
string

Human-readable description of the source document.

context
object

The clinical context in which the document was prepared.

encounter
[object]

Describes the clinical encounter or type of care that the document content is associated with.

Must reference one of the following types of resources:

  • Encounter
  • EpisodeOfCare
identifier
object

An identifier for the target resource. This is used when there is no way to reference the other resource directly, either because the entity it represents is not available through a FHIR server, or because there is no way for the author of the resource to convert a known identifier to an actual location. There is no requirement that a Reference.identifier point to something that is actually exposed as a FHIR instance, but it SHALL point to a business concept that would be expected to be exposed as a FHIR instance, and that instance would need to be of a FHIR resource type allowed by the reference.

extension
[Boolean, String, CodeableConcept, Coding, HumanName, Reference]

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.

One of:
url
required, string

Source of the definition for the extension code - a logical name or a URL.

valueBoolean
boolean

A single value for the extension.

use
string

The purpose of this identifier.

Possible Values: usual, official, temp, secondary, old (If known)
system
string

Establishes the namespace for the value - that is, a URL that describes a set values that are unique.

value
string

The portion of the identifier typically relevant to the user and which is unique within the context of the system.

period
object

The time period over which the service that is described by the document was provided.

start
string

The start of the period. The boundary is inclusive.

end
string

The end of the period. If the end of the period is missing, it means no end was known or planned at the time the instance was created. The start may be in the past, and the end date in the future, which means that period is expected/planned to end at that time.

search
required, object

Information about the search process that lead to the creation of this entry.

mode
required, string

Identifies the DocumentReference as matching the search parameters

Value: match