Difference between revisions of "Annotated StoredQuery Transaction"

From IHE Wiki
Jump to navigation Jump to search
Line 30: Line 30:
 
<pre>
 
<pre>
 
     <AdhocQuery id="urn:uuid:14d4debf-8f97-4251-9a74-a90016b0af0d">
 
     <AdhocQuery id="urn:uuid:14d4debf-8f97-4251-9a74-a90016b0af0d">
 +
</pre>
 +
 +
Inside the AdhocQuery element are a collection of Slots defining the parameters to the Stored Query. The specific parameters required (or optional) is defined by the individual Stored Query as documented in Technical Framework volume 2a section 3.18.4.1.2.3.7 Parameters for Required Queries. The required parameters for FindDocuments are $XDSDocumentEntryPatientId and $XDSDocumentEntryStatus as shown below. This example shows more than the minimum values for the $XDSDocumentEntryStatus parameter. The bare minumum would be 'urn:oasis:names:tc:ebxml-regrep:StatusType:Approved') requesting only Approved Document Entries.
 +
 +
<pre>
 
         <Slot name="$XDSDocumentEntryPatientId">
 
         <Slot name="$XDSDocumentEntryPatientId">
 
             <ValueList>
 
             <ValueList>

Revision as of 11:15, 25 November 2009

Annotated StoredQuery Transaction

What follows is the metadata for a Stored Query transaction as generated by a Document Consumer actor. All the XML shown, when combined, makes a valid request. This example was generated with the testing tool xdstest using testkit test 11897/objectref.

The Stored Query transaction is always carried in a SOAP over HTTP packaged formatted with SIMPLE SOAP rules. An example showing the SOAP and HTTP is found here.

The outer-most wrapper is AdhocQueryRequest which contains two elements, ResponseOption and AdhocQuery.

<query:AdhocQueryRequest xmlns:query="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0"
    xmlns="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0">

The ResponseOption controls the type of content returned from the Registry. The attributes are:

  • returnType="ObjectRef" - returnType must have one of two values: ObjectRef or LeafClass.
    • ObjectRef returns ObjectRefs which are simple a list of UUIDs of registry objects (Document Entries, Submission Sets, Folders, Associations) that match the query.
    • LeafClass returns the full metadata describing the matched registry objects. Full metadata means all the attributes submitted in a Provide and Register transaction along with some others controlled and generated by the Registry. If your query matches a large number of registry objects this format can generate really large blocks of XML.
  • returnComposedObjects="true" is submitted as shown but has no meaning in the XDS. The ebRS standard on which XDS is based uses this to control additional content which is not used in XDS. Since the schema requires the attribute be present, we include it.
    <query:ResponseOption returnComposedObjects="true" returnType="ObjectRef"/>

The id attribute of the AdhocQuery element specifies which Stored Query is invoked. The Stored Query ids are documented in the Technical Framework in volume 2a in section 3.18.4.1.2.4 and as a convience, on the web here. The id shown is for the FindDocuments Stored Query.

    <AdhocQuery id="urn:uuid:14d4debf-8f97-4251-9a74-a90016b0af0d">

Inside the AdhocQuery element are a collection of Slots defining the parameters to the Stored Query. The specific parameters required (or optional) is defined by the individual Stored Query as documented in Technical Framework volume 2a section 3.18.4.1.2.3.7 Parameters for Required Queries. The required parameters for FindDocuments are $XDSDocumentEntryPatientId and $XDSDocumentEntryStatus as shown below. This example shows more than the minimum values for the $XDSDocumentEntryStatus parameter. The bare minumum would be 'urn:oasis:names:tc:ebxml-regrep:StatusType:Approved') requesting only Approved Document Entries.

        <Slot name="$XDSDocumentEntryPatientId">
            <ValueList>
                <Value>'144ba3c4aad24e9^^^&1.3.6.1.4.1.21367.2005.3.7&ISO'</Value>
            </ValueList>
        </Slot>
        <Slot name="$XDSDocumentEntryStatus">
            <ValueList>
                <Value>('urn:oasis:names:tc:ebxml-regrep:StatusType:Approved',
                    'urn:oasis:names:tc:ebxml-regrep:StatusType:Deprecated')</Value>
            </ValueList>
        </Slot>
    </AdhocQuery>
</query:AdhocQueryRequest>