DocumentReference
Limitations
At the moment the “content” field may only have one attachment.
Reading back attachments
When the resource is read back, the Attachments data is never contained in the resource, instead DocumentReference.content.attachment.url is given and the content may be downloaded from the given URL.
More information about attachments
Please read Dealing with binary content for more information.
Semantical type
The “type” field of the resource is used to determine the semantical type of the resource. If the field is not present the resource type will be used. Look at the List of registered codes for a complete list of codes registered in MIDATA. Include the required codes into your applications access filter if you need to use this resource.
Resource owner
If the resource contains a subject which is a Patient or Practitioner that user is the owner of the resource. Otherwise the creator of the resource is the owner.
Default value for “subject”
If a resource with no subject field is send to MIDATA, the backend will set the subject to the current user.
Read
Read a single DocumentReference by id.
Request:
[GET] /fhir/DocumentReference/<id>
Read specific version
Read a specific version of a single DocumentReference by id.
Request:
[GET] /fhir/DocumentReference/<id>/_history/<version>
Retrieve history
Retrieve all versions of a single resource.
Request:
[GET] /fhir/DocumentReference/<id>/_history
Search
Search for resources of type DocumentReference
Request:
[GET] /fhir/DocumentReference?searchParams
List of supported search parameters:
Supported query parameters:
Name | Type | Description |
---|---|---|
_id | string | The ID of the resource |
_lastUpdated | date | Only return resources which were last updated as specified by the given range |
_page | string | |
authenticator | reference | Who/what authenticated the document |
author | reference | Who and/or what authored the document |
category | token | Categorization of document |
contenttype | token | Mime type of the content, with charset etc. |
custodian | reference | Organization which maintains the document |
date | date | When this document reference was created |
description | string | Human-readable description |
encounter | reference | Context of the document content |
event | token | Main clinical acts documented |
facility | token | Kind of facility where patient was seen |
format | token | Format/content rules for the document |
identifier | token | Master Version Specific Identifier |
language | token | Human language of the content (BCP-47) |
location | uri | Uri where the data can be found |
patient | reference | Who/what is the subject of the document |
period | date | Time of service that is being documented |
related | reference | Related identifiers or resources |
relatesto | reference | Target of the relationship |
relation | token | replaces - transforms - signs - appends |
relationship | composite | Combination of relation and relatesTo |
security-label | token | Document security-tags |
setting | token | Additional details about where the content was created (e.g. clinical specialty) |
status | token | current - superseded - entered-in-error |
subject | reference | Who/what is the subject of the document |
type | token | Kind of document (LOINC if possible) |
Create
Create a new resource of type DocumentReference.
Request:
[POST] /fhir/DocumentReference
Update
Updates a resource of type DocumentReference.
Request:
[PUT] /fhir/DocumentReference/<id>