pretty code

2009年8月15日 星期六

Attribute Matching(PS 3.4-2007 Page 41)

The following types of matching may be performed on Key Attributes
in the Query/Retrieve Service Class:

— Single Value Matching
— List of UID Matching
— Universal Matching
— Wild Card Matching
— Range Matching
— Sequence Matching

Matching requires special characters ( i.e. “*”,”?”,”-”, and “\”)
character repertoire for the VR of the Key Attributes.
Notes: 1.For example, the “-“ character is not valid for the DA, DT
and TM Vrs but is used for range matching.

The total length of the Key Attribute may exceed the length as
specified in the VR in PS 3.5. The Value Multiplicity (VM) may
be larger than the VM specified in PS 3.6 for the Key Attribute,
as defined for particular Matching Type.

難怪CFind or WorkList查詢時,明明是DA的VR,卻填上"20070101-20070103",又不受VR的
長度限制,這Dicom果然還真複雜。

補充一下Range Matching:

In the absence of extended negotiation, if the Attribute is a date, then:
a) A string of the form “ - ”, where is less or
equal to , shall match all occurrences of dates which fall
between and inclusive.
b) A string of the form “- ” shall match all occurrences of
dates prior to and including .
c) A string of the form “ -“ shall match all occurrences of
and subsequent dates.

In the absence of extended negotiation, if the Attribute is a time, then:
a) A string of the form “ - ”, where is less or
equal to , shall match all occurrences of times which fall
between and inclusive.
b) A string of the form “- ” shall match all occurrences of
times prior to and including .
c) A string of the form “ -“ shall match all occurrences of
and subsequent times.

If the Attribute is a datetime, then:
a) A string of the form “ - ”, where
is less or equal to , shall match all moments in time
which fall between and inclusive.
b) A string of the form “- ” shall match all moments in
time prior to and including .
c) A string of the form “ -“ shall match all moments in
time subsequent to and including .
d) The offset from Universal Coordinated Time, if present in the
Value of the Attribute, shall be taken into account for the
purposes of the match.

If extended negotiation of combined datetime matching is successful,
then a pair of Attributes that are a date and a time, both of which
specify the same form of range matching, shall have the concatenated
string values of each range matching component matched as if they were
a single datetime Attribute.

Note: For example, a Study Date of “20060705-20060707” and a Study Time
of “1000-1800” will match the time period of July 5, 10am until July 7,
6pm, rather than the three time periods of 10am until 6pm on each of
July 5, July 6 and July 7, as would be the case without extended
negotiation.

Range matching is not defined for types of Attributes other than
dates and times.

沒有留言: