Argonaut Data Query Implementation Guide Version 1.0.0

This page is part of the Argonaut Data Query Implementation Guide (v1.0.0: Release) based on FHIR R2. This is the current published version in it's permanent home (it will always be available at this URL). For a full list of available versions, see the Directory of published versions

D.4.1 StructureDefinition-argo-documentreference

#### U.S. Argonaut DocumentReference Profile

Scope and Usage

This profile sets minimum expectations for searching and fetching patient documents using the DocumentReference Resource. It is inspired by ITI-68 in IHE MHD specification. It identifies the mandatory core elements, extensions, vocabularies and value sets which SHALL be present in the DocumentReference resource when using this profile.

Example Usage Scenarios:

The following are example usage scenarios for the Argonaut AllergyIntolerance profile:

  • Query for all documents belonging to a Patient
  • Query for clinical summary information about a patient (access a patient’s Continuity of Care Document (CCD))
Mandatory Data Elements and Terminology

The following data-elements are mandatory (i.e data MUST be present). These are presented below in a simple human-readable explanation. Profile specific guidance and examples are provided as well. The Formal Profile Definition below provides the formal summary, definitions, and terminology requirements.

Each DocumentReference must have:

  1. a patient
  2. a code describing the type of document
  3. when the reference was created
  4. a status
  5. an https address where the document can be retrieved
  6. a code identifying the specific details about the format of the document — over and above the content’s MIME type

In addition it should have ( if available) :

  1. an identifier
  2. a document creation date
  3. the patient encounter date that is being referenced

Profile specific implementation guidance:

For a C-CDA Clinical Summary of Care (CCD):

  • The document type code is the LOINC code 34133-9 Summary of episode note.
  • The format code is urn:hl7-org:sdwg:ccda-structuredBody:2.1
  • The https address may refer to a FHIR Binary Resource (i.e. [base]/Binary/[id]) address on the server
  • The https address may have a parameter that identifies the patient (e.g. GET [url]?patient=[id]). Argonaut servers SHOULD not require this parameter, but for IHE compatibility reasons SHALL allow it to be provided, and SHALL check that it is correct if it is provided.

Examples

D.4.1.1 Formal Views of Profile Content

The official URL for this profile is:

http://fhir.org/guides/argonaut/StructureDefinition/argo-documentreference

This profile builds on DocumentReference.

This profile was published on Tue Oct 18 00:00:00 AEDT 2016 as a draft by Argonaut Project.

Description of Profiles, Differentials, Snapshots, and how the XML and JSON presentations work.

Summary of the Mandatory Requirements

  1. One reference to a patient in DocumentReference.subject
  2. One document type code in DocumentReference.type which is bound to Document Type Value Set
  3. One dateTime value in DocumentReference.indexed
  4. One status in DocumentReference.status
  5. One url of the document in DocumentReference.content.attachment
    • a mime type in DocumentReference.content.attachment.contentType which is bound to MimeType value set (code set)
    • a url of the document in DocumentReference.content.attachment.url
  6. One format code in DocumentReference.content.format with an extensible binding to DocumentReference Format Code Set

SHOULD have:

  1. One identifier in DocumentReference.identifier
  2. One dateTime value in DocumentReference.created
  3. One time period value in DocumentReference.context.period
NameFlagsCard.TypeDescription & Constraintsdoco
.. DocumentReference 0..*Argonaut DocumentReference Profile
... id Σ0..1idLogical id of this artifact
... meta Σ0..1MetaMetadata about the resource
... implicitRules ?!Σ0..1uriA set of rules under which this content was created
... language 0..1codeLanguage of the resource content
Binding: IETF BCP-47 (required)
... text I0..1NarrativeText summary of the resource, for human interpretation
... contained 0..*ResourceContained, inline Resources
... extension 0..*ExtensionAdditional Content defined by implementations
... modifierExtension ?!0..*ExtensionExtensions that cannot be ignored
... masterIdentifier Σ0..1IdentifierMaster Version Specific Identifier
... identifier S0..1IdentifierOther identifiers for the document
... subject S1..1Reference(Argonaut Patient Profile)Who/what is the subject of the document
... type S1..1CodeableConceptKind of document (LOINC if possible)
Binding: Document Type Value Set (required)
... class Σ0..1CodeableConceptCategorization of document
Binding: Document Class Value Set (example)
... author Σ0..*Reference(Practitioner), Reference(Organization), Reference(Device), Reference(Patient), Reference(RelatedPerson)Who and/or what authored the document
... custodian Σ0..1Reference(Organization)Organization which maintains the document
... authenticator Σ0..1Reference(Practitioner), Reference(Organization)Who/what authenticated the document
... created S0..1dateTimeDocument creation time
... indexed S1..1instantWhen this document reference created
... status ?!S1..1codecurrent | superseded | entered-in-error
Binding: DocumentReferenceStatus (required)
... docStatus Σ0..1CodeableConceptpreliminary | final | appended | amended | entered-in-error
Binding: CompositionStatus (required)
... relatesTo ?!Σ0..*BackboneElementRelationships to other documents
.... id 0..1idxml:id (or equivalent in JSON)
.... extension 0..*ExtensionAdditional Content defined by implementations
.... modifierExtension ?!0..*ExtensionExtensions that cannot be ignored
.... code Σ1..1codereplaces | transforms | signs | appends
Binding: DocumentRelationshipType (required)
.... target Σ1..1Reference(DocumentReference)Target of the relationship
... description Σ0..1stringHuman-readable description (title)
... securityLabel Σ0..*CodeableConceptDocument security-tags
Binding: All Security Labels (extensible)
... content S1..1BackboneElementDocument referenced
.... id 0..1idxml:id (or equivalent in JSON)
.... extension 0..*ExtensionAdditional Content defined by implementations
.... modifierExtension ?!0..*ExtensionExtensions that cannot be ignored
.... attachment S1..1AttachmentWhere to access the document
..... id 0..1idxml:id (or equivalent in JSON)
..... extension 0..*ExtensionAdditional Content defined by implementations
..... contentType S1..1codeMime type of the content, with charset etc.
Binding: IETF BCP-13 (required)
Example General': text/plain; charset=UTF-8, image/png
..... language Σ0..1codeHuman language of the content (BCP-47)
Binding: IETF BCP-47 (required)
Example General': en-AU
..... data Σ0..1base64BinaryData inline, base64ed
..... url S1..1urihttps address
Example General': http://www.acme.com/logo-small.png
..... size Σ0..1unsignedIntNumber of bytes of content (if url provided)
..... hash Σ0..1base64BinaryHash of the data (sha-1, base64ed)
..... title Σ0..1stringLabel to display in place of the data
Example General': Official Corporate Logo
..... creation Σ0..1dateTimeDate attachment was first created
.... format S1..1CodingFormat/content rules for the document
Binding: DocumentReference Format Code Set (extensible)
... context S0..1BackboneElementClinical context of document
.... id 0..1idxml:id (or equivalent in JSON)
.... extension 0..*ExtensionAdditional Content defined by implementations
.... modifierExtension ?!0..*ExtensionExtensions that cannot be ignored
.... encounter Σ0..1Reference(Encounter)Context of the document content
.... event Σ0..*CodeableConceptMain Clinical Acts Documented
Binding: v3 Code System ActCode (example)
.... period S0..1PeriodTime of service that is being documented
.... facilityType Σ0..1CodeableConceptKind of facility where patient was seen
Binding: Facility Type Code Value Set (example)
.... practiceSetting Σ0..1CodeableConceptAdditional details about where the content was created (e.g. clinical specialty)
Binding: Practice Setting Code Value Set (example)
.... sourcePatientInfo Σ0..1Reference(Patient)Patient demographics from source
.... related Σ0..*BackboneElementRelated identifiers or resources
..... id 0..1idxml:id (or equivalent in JSON)
..... extension 0..*ExtensionAdditional Content defined by implementations
..... modifierExtension ?!0..*ExtensionExtensions that cannot be ignored
..... identifier Σ0..1IdentifierIdentifier of related objects or events
..... ref Σ0..1Reference(Resource)Related Resource

doco Documentation for this format

Summary of the Mandatory Requirements

  1. One reference to a patient in DocumentReference.subject
  2. One document type code in DocumentReference.type which is bound to Document Type Value Set
  3. One dateTime value in DocumentReference.indexed
  4. One status in DocumentReference.status
  5. One url of the document in DocumentReference.content.attachment
    • a mime type in DocumentReference.content.attachment.contentType which is bound to MimeType value set (code set)
    • a url of the document in DocumentReference.content.attachment.url
  6. One format code in DocumentReference.content.format with an extensible binding to DocumentReference Format Code Set

SHOULD have:

  1. One identifier in DocumentReference.identifier
  2. One dateTime value in DocumentReference.created
  3. One time period value in DocumentReference.context.period

Snapshot View

NameFlagsCard.TypeDescription & Constraintsdoco
.. DocumentReference 0..*Argonaut DocumentReference Profile
... id Σ0..1idLogical id of this artifact
... meta Σ0..1MetaMetadata about the resource
... implicitRules ?!Σ0..1uriA set of rules under which this content was created
... language 0..1codeLanguage of the resource content
Binding: IETF BCP-47 (required)
... text I0..1NarrativeText summary of the resource, for human interpretation
... contained 0..*ResourceContained, inline Resources
... extension 0..*ExtensionAdditional Content defined by implementations
... modifierExtension ?!0..*ExtensionExtensions that cannot be ignored
... masterIdentifier Σ0..1IdentifierMaster Version Specific Identifier
... identifier S0..1IdentifierOther identifiers for the document
... subject S1..1Reference(Argonaut Patient Profile)Who/what is the subject of the document
... type S1..1CodeableConceptKind of document (LOINC if possible)
Binding: Document Type Value Set (required)
... class Σ0..1CodeableConceptCategorization of document
Binding: Document Class Value Set (example)
... author Σ0..*Reference(Practitioner), Reference(Organization), Reference(Device), Reference(Patient), Reference(RelatedPerson)Who and/or what authored the document
... custodian Σ0..1Reference(Organization)Organization which maintains the document
... authenticator Σ0..1Reference(Practitioner), Reference(Organization)Who/what authenticated the document
... created S0..1dateTimeDocument creation time
... indexed S1..1instantWhen this document reference created
... status ?!S1..1codecurrent | superseded | entered-in-error
Binding: DocumentReferenceStatus (required)
... docStatus Σ0..1CodeableConceptpreliminary | final | appended | amended | entered-in-error
Binding: CompositionStatus (required)
... relatesTo ?!Σ0..*BackboneElementRelationships to other documents
.... id 0..1idxml:id (or equivalent in JSON)
.... extension 0..*ExtensionAdditional Content defined by implementations
.... modifierExtension ?!0..*ExtensionExtensions that cannot be ignored
.... code Σ1..1codereplaces | transforms | signs | appends
Binding: DocumentRelationshipType (required)
.... target Σ1..1Reference(DocumentReference)Target of the relationship
... description Σ0..1stringHuman-readable description (title)
... securityLabel Σ0..*CodeableConceptDocument security-tags
Binding: All Security Labels (extensible)
... content S1..1BackboneElementDocument referenced
.... id 0..1idxml:id (or equivalent in JSON)
.... extension 0..*ExtensionAdditional Content defined by implementations
.... modifierExtension ?!0..*ExtensionExtensions that cannot be ignored
.... attachment S1..1AttachmentWhere to access the document
..... id 0..1idxml:id (or equivalent in JSON)
..... extension 0..*ExtensionAdditional Content defined by implementations
..... contentType S1..1codeMime type of the content, with charset etc.
Binding: IETF BCP-13 (required)
Example General': text/plain; charset=UTF-8, image/png
..... language Σ0..1codeHuman language of the content (BCP-47)
Binding: IETF BCP-47 (required)
Example General': en-AU
..... data Σ0..1base64BinaryData inline, base64ed
..... url S1..1urihttps address
Example General': http://www.acme.com/logo-small.png
..... size Σ0..1unsignedIntNumber of bytes of content (if url provided)
..... hash Σ0..1base64BinaryHash of the data (sha-1, base64ed)
..... title Σ0..1stringLabel to display in place of the data
Example General': Official Corporate Logo
..... creation Σ0..1dateTimeDate attachment was first created
.... format S1..1CodingFormat/content rules for the document
Binding: DocumentReference Format Code Set (extensible)
... context S0..1BackboneElementClinical context of document
.... id 0..1idxml:id (or equivalent in JSON)
.... extension 0..*ExtensionAdditional Content defined by implementations
.... modifierExtension ?!0..*ExtensionExtensions that cannot be ignored
.... encounter Σ0..1Reference(Encounter)Context of the document content
.... event Σ0..*CodeableConceptMain Clinical Acts Documented
Binding: v3 Code System ActCode (example)
.... period S0..1PeriodTime of service that is being documented
.... facilityType Σ0..1CodeableConceptKind of facility where patient was seen
Binding: Facility Type Code Value Set (example)
.... practiceSetting Σ0..1CodeableConceptAdditional details about where the content was created (e.g. clinical specialty)
Binding: Practice Setting Code Value Set (example)
.... sourcePatientInfo Σ0..1Reference(Patient)Patient demographics from source
.... related Σ0..*BackboneElementRelated identifiers or resources
..... id 0..1idxml:id (or equivalent in JSON)
..... extension 0..*ExtensionAdditional Content defined by implementations
..... modifierExtension ?!0..*ExtensionExtensions that cannot be ignored
..... identifier Σ0..1IdentifierIdentifier of related objects or events
..... ref Σ0..1Reference(Resource)Related Resource

doco Documentation for this format

Downloads: StructureDefinition: (XML, JSON, CSV), Schema: XML Schematron

 

D.4.1.2 Quick Start

Below is an overview of the required search and read operations for this profile. See the Conformance requirements for the Argonaut Data Query implementation guide server for a complete list of supported RESTful operations and search parameters for this IG.

Typically, DocumentReference resources are used with document indexing systems, such as IHE XDS. However, document references may also may be created “on-the-fly” in response to a Document Query request. In other words there MAY NOT be pre-existing index of references to a patient’s documents at the FHIR endpoint. This results in an empty bundle being returned when searching using a normal FHIR Query. Therefore, the $docref operation has been defined to both create and fetch patient DocumentReference Resources.

The following search criteria describe fetching pre-indexed documents and those created “on-the-fly”.

Searching pre-indexed documents:


GET [base]/DocumentReference?patient=[id]

Example:

GET https://fhir-open-api-dstu2.smarthealthit.org/DocumentReference?patient=2169591

Support: Mandatory to support search by patient.

Implementation Notes: Search for all documents for a patient. Fetches a bundle of all DocumentReference resources for the specified patient (how to search by reference).

Response Class:

  • (Status 200): successful operation
  • (Status 400): invalid parameter
  • (Status 401/4xx): unauthorized request
  • (Status 403): insufficient scope

GET [base]/DocumentReference?patient=[id]&type=[type]&period=[date]

Example:

GET https://fhir-open-api-dstu2.smarthealthit.org/DocumentReference?patient=2169591&type=34133-9&period=ge2016-01-01

Support: Optional to support search by patient and type and date range.

Implementation Notes: Fetches a bundle of all DocumentReference resources for the specified patient for a given time period and document type. (how to search by reference), (how to search by token), and (how to search by date).

Response Class:

  • (Status 200): successful operation
  • (Status 400): invalid parameter
  • (Status 401/4xx): unauthorized request
  • (Status 403): insufficient scope

Searching documents using the $docref operation:

Functional behavior of Server when responding to the $docref operation:

  1. SHALL return at least a reference to CCD document, if available, but MAY provide references to other document types as well.
  2. If a context date range is supplied the server SHOULD provide references to any document that falls within the date range
  3. If no date range is supplied, then the server SHALL provide references to last or current encounter

GET [base]/DocumentReference/$docref?patient=[id]

Example:

todo

Support: Mandatory to support search by patient.

Implementation Notes: Search for CCD documents from the last encounter and MAY search for other document types from the last encounter as well. Fetches a bundle of DocumentReference resources for the specified patient (how to search by reference).

Response Class:

  • (Status 200): successful operation
  • (Status 400): invalid parameter
  • (Status 401/4xx): unauthorized request
  • (Status 403): insufficient scope

Example:

todo


GET [base]/DocumentReference?patient=[id]&type=[type]&period=[date]

Example:

todo

Support: Optional to support search by patient and type and date range.

Implementation Notes: Search for the specified document types from the context period for a patient. Server returns at least CCD document references and MAY search for other document types as well. Fetches a bundle of all DocumentReference resources for the specified patient for a given time period and document type. (how to search by reference), (how to search by token), and (how to search by date).

Response Class:

  • (Status 200): successful operation
  • (Status 400): invalid parameter
  • (Status 401/4xx): unauthorized request
  • (Status 403): insufficient scope