DICOM PS3.18 2019c - Web Services

5 Conventions (Current)
Prev |  | Next

# 5 Conventions

This section defines conventions used throughout the rest of this Part of the Standard.

## 5.1 Message Syntax

The syntax of the request and response messages for transactions are defined using the ABNF Grammar used in [RFC7230], which is based on the ABNF defined in [RFC5234]. This Part of the Standard also uses the ABNF extensions in [RFC7405], which defines '%s' prefix for denoting case sensitive strings.

The syntax rules defined herein are valid for the US-ASCII character set or character sets that are supersets of US-ASCII, e.g., Unicode UTF-8.

In the ABNF used to define the syntax of messages, the following conventions are used:

1. Syntactic variables are lowercase.

2. Terminal rules are uppercase. For example, 'SP' stands for the US-ASCII space (0x20) literal character, and 'CRLF' stands for the ASCII carriage return (0xD) and line feed (0xA) literal characters.

3. Header Field names are capitalized and quotation marks that denote literal strings for header field names are omitted. The Header Field names are the only capitalized names used in the grammar. See [RFC7231] Section 1.2. For example:

       Accept: media-type CRLF

   is equivalent to

       "Accept:" media-type CRLF

In this Part of the Standard, as with HTTP in general, resources are identified by URIs [RFC3986]. Each service defines the resources it manages, and the URI Templates used to define the structure of the URIs that reference them.

In HTTP RFCs, ABNF rules for obs-text and obs-fold denote "obsolete" grammar rules that appear for historical reasons. These rules are not used in DICOM Web Services syntax definitions.

See Annex A for the Combined ABNF for DICOM Web Services.

### 5.1.1 Common Syntactic Rules For Data Types

Table 5.1-1 defines the syntax of some common rules used in defining data values in this Part of the Standard.

Table 5.1-1. ABNF for Common Syntactic Values

Name | Rule
--- | ---
    int
    = [+ / -] 1*DIGIT
    ; An integer
    uint
    = 1*DIGIT
    ; An unsigned integer
    pos-int
    = NON-ZERO-DIGIT *DIGIT
    ; An integer greater than zero
    decimal
    =int ["." uint] [("E" / "e") int]
    ; a fixed- or floating-point number with at most 16 characters
    string
    = %s 1*QCHAR
    ; A case sensitive string
    base64
    ; Use base64 defined in [RFC4648] Section 5
    uid
    = uid-root 1*("." uid-part)
    uid-root
    = "0" / "1" / "2"
    uid-part
    = "0" / pos-int

### 5.1.2 URI Templates

The URI Template [RFC6570] syntax has been extended to allow case sensitive variable names. This has been done by modifying the varchar production (see [RFC6570] Section 2.3) as follows:

    varchar = %x20-21 / %x23-7E / pct-encoded

### 5.1.3 List Rule('#')

The ABNF has been extended with the List Rule, which is used to define comma-separated lists. It does not allow empty lists, empty list elements, or the legacy list rules defined in [RFC7230] Section 7.

    1#element = element *(OWS "," OWS element)

    #element = 1#element

    <n>#<m>element = element <n-1>*<m-1> (OWS "," OWS element)

Where

    n >= 1 and m > n

Prev |  | Next
4 Symbols and Abbreviated Terms | Home | 5.2 Web Service Section Structure

DICOM PS3.18 2019c - Web Services