It consists of four sets:
In addition, there is a special transaction defined for user agent to retrieve a machine-readable description of the service(s) implemented by an origin server called Retrieve Capabilities transaction (HTTP OPTION call on a resource).
The Studies resource enables a user agent to store, retrieve, update, and search an origin server for DICOM Studies, Series, and Instances, along with their /metadata, /rendered, and /thumbnail variants; as well as frames, bulk data and pixel data.
The Retrieve transaction of this service is also known as WADO-RS. The Store transaction of this service is also known as STOW-RS. The Search transaction of this service is also known as QIDO-RS. All Studies services require support for Retrieve Capabilities Transaction.
Resources (Study, Series, Instances, Frames, Metadata, Bulkdata, PixelData, Thumbnail, Rendered) and transactions (store, retrieve, search, etc.). For a full list of resources, refer to 10.1.1 Resource Descriptions.
Studies Web Service transaction
Query is perform using HTTP GET method (aka QIDO-RS).
Retrieve DICOM instance (DICOM part 10 file or Rendered representation) - HTTP Method GET. (aka WADO-RS).
Store-HTTP Method POST (STOW-RS) – This is only support DICOM resources as a single instance, or as separate Metadata and Bulkdata. Target resource are "/studies" or "/studies/{study instance UID}".
Discover services – Retrieve Capabilities transaction at each resource level (HTTP method is OPTIONS).
A machine-readable Capabilities Description of the service(s) implemented by an origin server. All RESTful services are required to implement this transaction. Capabilities Description describes the transactions, resources, representations, etc. that are supported by the service(s). Making the HTTP OPTIONS query against an end-point, and a WADL response will be returned explaining the various options and that are supported.
This allows for client application (user agent) to programmatically interrogate the capabilities of origin server for a specific resource level or resource instance level. For example, if the user want to check if a server supports retrieval of DICOM instance metadata as DICOM XML (without the bulk data) for a specific SOP instance, the following must be sent:
OPTIONS http://www.hospital-stmarco/radiology/studies/1.2.250.1.59.40211.12345678.678910 /series/1.2.250.1.59.40211.789001276.14556172.67789 /instances/1.2.250.1.59.40211.2678810.87991027.899772.2/metadata HTTP/1.1
Host: www.hospital-stmarco
Accept: multipart/related; type="application/dicom+xml"
Origin: http://localhost:65232
The request shall have the following syntax:
OPTIONS SP / SP version CRLF
Accept: 1#media-type CRLF
*(header-field CRLF)
CRLF
The Target Resource for this transaction is an origin server (e.g. Base URI ("/") for the service). If the capabilities transaction is requested for target resource baseURL/Studies, the origin server should responds with all the capabilities it supports at that resources level and lower level resources, such as series, series/metadata, Instance, instance/metadata, or frame level. For the full list of target resources, refer to 10.1.1 Resource Descriptions.
No Query Parameters.
Name | Values | User Agent | Origin Server | Description |
---|---|---|---|---|
Accept | media-type | M | M | The Acceptable Media Types for the response payload. |
Accept-Charset | charset | O | O | The Acceptable Character Sets of the response payload. |
No payload.
Origin server shall return a Capabilities Description, as defined in Annex H, in an Acceptable Media Type. The WADL document shall contain one top-level "application" element and it should contain one "resources" element whose "base" attribute value is the base URL for the service. Additionally, the WADL content shall include a "resource" element for the Target Resource specified in the request describing all methods and child resources for the specified resource and each of its children.
Origin server support of Retrieve Capabilities transaction should support the following use cases for a client application:
The response shall have the following syntax:
version SP status-code SP reason-phrase CRLF
[Content-Type: media-type CRLF]
[(Content-Length: uint) / (Transfer-Encoding: encoding) CRLF]
*(header-field CRLF)
CRLF
[payload / status-report]
Name | Value | Origin Server Usage | Description |
---|---|---|---|
Content-Type | media-type | M | The media-type of the payload. |
Content-Length | uint | C | Shall be present if a transfer encoding has not been applied to the payload. |
Transfer-Encoding | encoding | C | Shall be present if a transfer encoding has been applied to the payload. |
Media types supported by the Retrieve Capabilities service are application/vnd.sun.wadl+xml (Web Application Description Language) or application/json.
Check for Capability of Retrieving Metadata as XML:
OPTIONS http://www.hospital-stmarco/radiology/studies/1.2.250.1.59.40211.12345678.678910 /series/1.2.250.1.59.40211.789001276.14556172.67789 /instances/1.2.250.1.59.40211.2678810.87991027.899772.2/metadata HTTP/1.1
Host: www.hospital-stmarco
Accept: multipart/related; type="application/dicom+xml"
Origin: http://localhost:65232
This Transaction uses the GET method. The media type in the response payload will depend on the Target URI and the Query Parameters. For example, Instances as application/dicom, Metadata as application/dicom+json or application/dicom+xml and rendered Instances as application/jpeg images.
The request shall have the following syntax:
GET SP "/" {/resource} {?parameter*} SP version CRLF
Accept: 1#media-type CRLF
*(header-field CRLF)
CRLF
Where parameter
is one of the Query Parameters defined for the Target Resource below:
Instance Resources
The following Instance Resources are used to retrieve instances.
Instance Resources | URI Template |
---|---|
Study Instances | /studies/{study} |
Series Instances | /studies/{study}/series/{series} |
Instance | /studies/{study}/series/{series}/instances/{instance} |
Metadata Resources
Used to retrieve the metadata of instances without retrieving bulk data. Retrieving a Series Metadata resource retrieves all the metadata for all individual instances contained in the Series. Retrieving a Study Metadata resource retrieves all the metadata for all individual instances contained in all the Series.
An implementation interested in just study level or series level metadata, should use Search Transaction on the All Studies or Study's Series resources, matching against the Study Instance UID and using &includefield to specify the metadata of interest (e.g., tags to include).
Retrieve Transaction Metadata Resources
Resources | URI Template |
---|---|
Study Metadata | /studies/{study}/metadata |
Series Metadata | /studies/{study}/series/{series}/metadata |
Instance Metadata | /studies/{study}/series/{series}/instances/{instance}/metadata |
Don't include Group 0002 File Meta Information Data Elements.
Rendered Resources
Used to retrieve representations of a DICOM Resource rendered as appropriate images, videos, text documents, or other representations. Its primary use case is to provide user agents with a simple means to display medical images and related documents, without requiring deep knowledge of DICOM data structures and encodings.
Thumbnail Resources
Used to retrieve a rendered representation appropriate to stand for its parent DICOM resource.
Bulkdata Resources
Used to retrieve data elements (typically containing large data, such as pixel data) extracted from DICOM instances.
Note: Bulkdata resources that contain pixel data can be retrieved equivalently using Pixel Data Resource.
Pixel Data Resources
Used to retrieve data elements containing top-level pixel data from DICOM instances.
Note: Frame Pixel Data is inherently pixel data so a /pixeldata sub resource is not needed in the URI Template.
Key | Resources | User Agent | Origin Server |
---|---|---|---|
accept | All Resources | O | M |
charset | Metadata Resources | O | M |
annotation | Rendered Resources | O | M |
quality | Rendered Resources | O | M |
viewport | Rendered Resources | O | M |
Thumbnail Resources | O | O | |
window | Rendered Resources | O | M |
iccprofile | Rendered Resources | O | O |
Name | Values | User Agent | Origin Server | Description |
---|---|---|---|---|
Accept | media-type | M | M | The Acceptable Media Types of the response payload. |
Accept-Charset | charset | O | M | Acceptable Character Sets of the response payload. |
No payload.
Origin server shall prepare representation(s) of the Target Resource in the Selected Media Type.
The response shall have the following syntax:
version SP status-code SP reason-phrase CRLF
[Content-Type: media-type CRLF]
[(Content-Length: uint / Transfer-Encoding: encoding) CRLF]
[Content-Location: url CRLF]
*(header-field CRLF)
CRLF
payload / status-report
The media type of the payload is required if response has a payload.
The origin server shall support the media types specified as default or required in PS3.18 Table 10.4.4-1.
Refer to 10.4.3.1 Status Codes.
This transaction uses the POST method to Store representations of Studies, Series, and Instances contained in the request payload.
Note: Implementation should add hooks for reconciliation (Patient Name, Patient ID, and Accession Number) as uploaded studies could be originated in another organization will have different PID.
The request shall have the following syntax:
POST SP "/" {/resource} SP version CRLF
Accept: 1#media-type CRLF
Content-Type: dicom-media-type CRLF
(Content-Length: uint / Transfer-Encoding: encoding) CRLF
*(header-field CRLF)
CRLF
payload
No Query Parameters.
Name | Value | User Agent | Origin Server |
---|---|---|---|
Content-Type | media-type | M | M |
Content-Length | uint | C | M |
Transfer-Encoding | encoding | C | M |
The payload shall consist of either:
The response shall have the following syntax:
version SP status-code SP reason-phrase CRLF
[Content-Type: media-type CRLF]
[(Content-Length: uint CRLF / Transfer-Encoding: encoding CRLF)]
*(header-field CRLF)
CRLF
store-instances-response-module
The origin server shall support header fields as required in Table 10.5.3-2.
The origin server shall support the default and required media types as specified in Table 10.5.4-1.
Success
Failure
This transaction uses the GET method to search for Studies, Series, and Instances managed by the origin server.
The request shall have the following syntax:
GET SP "/" {/resource} {?search*} SP version CRLF
Accept: 1#search-media-type CRLF
*(header-field CRLF)
CRLF
Where search-media-type =multipart/related; type="application/dicom+xml"/ dicom-json
The Target Resource Path component of the Target URI specifies the collection of resources that is the target of the search.
The user agent shall supply Query Parameters as required in Table 8.3.4-1.
Term | Value | User Agent | Origin Server | Description |
---|---|---|---|---|
search | = match / fuzzymatching / includefield / limit / offset | O | M | |
match | ; See attribute matching rules below | O | M | Section 8.3.4.1 |
fuzzymatching | = "fuzzymatching" "=" true / false | O | M | Section 8.3.4.2 |
includefield | = "includefield" "=" 1#attribute / "all" | O | M | Section 8.3.4.3 |
limit | = "limit" "=" uint ; Maximum number of results | O | M | Section 8.3.4.4 |
offset | = "offset" "=" uint ; Number of skipped results | O | M | Section 8.3.4.4 |
Attribute/Value Pair Requirements - The user agent may include the following Attributes in the request:
Attribute Matching – The syntax of the match Query Parameter:
match = normal-match / uid-list-matchnormal-match = 1*("&" attribute "=" value)uid-list-match = 1*("&" attribute "=" 1#value)attribute = (attribute-id) *("." attribute-id)attribute-id = tag *("." tag) / keyword *("." keyword)tag = 8HEXDIG
keyword= ; A keyword from Table 6-1 "Registry of DICOM Data Elements" in PS3.6.
DICOM Attribute/Values pairs satisfy the following requirements:
Matching Rules:
"false"
. fuzzymatching = "fuzzymatching" "=" ("true" / "false")."true"
and the origin server does not support Fuzzy Matching, then search shall be performed without Fuzzy Matching and response shall include the following HTTP Warning header:Attributes to include in the Response.
"all"
, which means that all available attributes of the object should be included in the response. Examples of Search URIs with valid Attribute/value pairs:
/studies?PatientID=11235813
/studies?PatientID=11235813&StudyDate=20130509
/studies?00100010=SMITH*&00101002.00100020=11235813&limit=25
/studies?00100010=SMITH*&OtherPatientIDsSequence.00100020=11235813
/studies?PatientID=11235813&includefield=00081048,00081049,00081060
/studies?PatientID=11235813&includefield=00081048&includefield=00081049&includefield=00081060
/studies?PatientID=11235813&StudyDate=20130509-20130510
/studies?StudyInstanceUID=1.2.392.200036.9116.2.2.2.2162893313.1029997326.94587,1.2.392.200036.9116.2.2.2.2162893313.1029997326.94583
/studies?00230010=AcmeCompany&includefield=00231002&includefield=00231003
/studies?00230010=AcmeCompany&00231001=001239&includefield=00231002&includefield=00231003
No payload.
The response shall have the following syntax:
version SP status-code SP reason-phrase CRLF
[Content-Type: media-type CRLF]
[Content-Location: url CRLF]
[(Content-Length: uint / Transfer-Encoding: encoding) CRLF]
*(header-field CRLF)
CRLF
[payload / status-report]
Refer to Table 10.6.3-2. Response Header Fields.
A failure response payload may contain a Status Report describing any failures, warnings, or other useful information.
Response Payload at target resource level
Series Resources Search Response Payload
Instance Resources Search Response Payload
The origin server shall support the default and required media types as specified in Table 10.6.4-1.
Notes on Implementation
Origin server does not need to support all resources at all level. For example, Study level resources instances (/studies/{study}) such as /metadata, /bulkdata, /rendered, /pixeldata or /thumbnail representations are ambiguous and use cases are not clear. Also, it will put heavy burden on server side resource and connection may timeout when dealing with a large CT or MR studies. Same argument applies to Series instances (/studies/{study}/series/{series}).
Origin server should support capabilities transactions (OPTIONS) for each resources level. It should return proper WADL encoded response (or JSON) for all resource it support at the target resource level and level below. For example, OPTIONS with target resource of /studies/{study} should return all capabilities for Studies, Series and Instance level and related resources (e.g. metadata, bulkdata, thumbnail, pixeldata, etc.) Similarly, if the target is a SOP instance (/studies/{study}/series/{series}/instances/{instance}), it should respond based what we support for the instance level (e.g. DICOM SR instance, rendered to HTML or PDF, Encapsulated PDF as mimetype PDF or Structured Display instance to rendered study).
WADL document shall contain one top-level "application" element and it should contain one "resources" element whose "base" attribute value is the base URL for the service. Additionally, the WADL content shall include a "resource" element for the Target Resource specified in the request describing all methods and child resources for the specified resource and each of its children.
Success with 304 (not Modified) response should be returned for all standard defined resources that are not supported by an implementation. That means a configuration option should be defined on the origin server either to support or not some resources (don't support render study or study bulkdata).
Origin Server support of Retrieve Capabilities transaction should support the following use cases for a client application:
PACS Admin needs to configure a DICOMweb client (a viewer) based on capabilities supported by the origin server. This is using Studies resource as target.
Since GET call to same target resource is used for search and retrieve, DICOM standard is no longer using QIDO-RS, and WADO-RS is target to distinguish the call type and rout to appropriate handler, then the following logic can be used:
There should be an option for any DICOM instance that our proxy retrieves from the remote PACS or the remote DICOMweb origin server, to be added to the storage server database and webservices cache.
Query result should be ordered and cached on the server side to support limit and offset. Unfortunately, there is no term in the standard that servers the client to supply a transaction UID to link the query with the original search result. In order to utilize caching, the server should use the specific set of parameters used in the query as key for cache lookup.
Time range or datetime should pay attention to Timezone Offset From UTC (0008,0201) during the query process.
The server should have a configuration option to limit the number of query response. If the number of results exceeds the maximum supported by the server, the server shall return the maximum supported results and the response shall include the following HTTP/1.1 warning header:
Warning: 299 {SERVICE}: "The number of results exceeded the maximum supported by the server. Additional results can be requested.
Not covered in this document are as follows:
Defines a RESTful interface to the unified procedure step service SOP classes defined in Section B.26 "Unified Procedure Step IOD" in PS3.3 and Section CC "Unified Procedure Step Service and SOP Classes (Normative)" in PS3.4, in which UPS behavior is specified.
The following resources are defined:
The URI Templates defined by this service are specified in Table 11.1.1-1.
The Worklist service consists of transactions in Table 11.3-1.
Enables a user agent to retrieve, store, and search an origin server for instances that are not related to an individual patient.
The following NPI resources are defined in the standard:
The following transactions are defined for the above resources:
Search
This enables a user agent to request the safekeeping of instances on an origin server. It corresponds to the DIMSE Storage Commitment Service Class as defined in Section J "Storage Commitment Service Class (Normative)" in PS3.4 and has the same semantics.
As committing to storage of instances is often a long-running operation on the origin server, the use of this service may be split into two transactions, at the discretion of the origin server: 1. requesting the commitment, and - when the origin server cannot give the result yet - 2. checking for the result, in line with the Asynchronous Request-Reply (ARR) pattern [Ekuan].
The Storage Commitment request shall have the following syntax:
POST SP /commitment-requests/{transactionUID} SP version CRLF
Accept: 1#media-type CRLF
*(header-field CRLF)
CRLF
/commitment-requests.
The Result Check Transaction shall have following syntax:
GET SP /commitment-requests/{transactionUID} SP version CRLF
Accept: 1#media-type CRLF
*(header-field CRLF)
CRLF