<?xml version="1.0" encoding="UTF-8"?>
<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
    xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0">
    <s:Header>
        <a:Action>http://docs.oasis-open.org/wsn/bw- 2/NotificationProducer/SubscribeRequest</a:Action>
        <a:MessageID>382dcdc7-8e84-9fdc-8443-48fd83bca938</a:MessageID>
        <a:To s:mustUnderstand="1">http://localhost:8080/services/initiatingGateway/query</a:To>
    </s:Header>
    <s:Body>
        <wsnt:Subscribe>
            <wsnt:ConsumerReference>
                <!-- Die Mail Address für die Benachrichtigungen wenn der Filter anschlägt -->
                <a:Address>gdaMail@provider.at</a:Address>
            </wsnt:ConsumerReference>
            
            <wsnt:Filter>
                <!-- The Mail Address to send notifications to -->
                <wsnt:TopicExpression Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple">ihe:FullDocumentEntry</wsnt:TopicExpression>
                <rim:AdhocQuery id="urn:uuid:aa2332d0-f8fe-11e0-be50-0800200c9a66">
                    
                    <!-- mandatory filter for patient id --> 
                    <rim:Slot name="$XDSDocumentEntryPatientId">
                        <rim:ValueList>
                            <rim:Value>'bPK-GH oder LPID im CX Format'</rim:Value>
                        </rim:ValueList>
                    </rim:Slot>
                    
                    <!-- optional Filter for class codes -->
                    <rim:Slot name="$XDSDocumentEntryClassCode">
                        <rim:ValueList>
                            <rim:Value>('code^^schema')</rim:Value>
                        </rim:ValueList>
                    </rim:Slot>
                    
                    <!-- optional Filter for the reference ID list -->
                    <rim:Slot name="$XDSDocumentEntryReferenceIdList">
                        <rim:ValueList>
                            <rim:Value>('refIdToFilter')</rim:Value>
                        </rim:ValueList>
                    </rim:Slot>
                    
                    <!-- optional NON IHE ELGA specific query attribute -->
                    <rim:Slot name="$XDSDocumentEntryHomeCommunityId">
                        <rim:ValueList>
                            <rim:Value>('ELGA Bereichs HCID')</rim:Value>
                        </rim:ValueList>
                    </rim:Slot>
                    
                    <!-- optional NON IHE ELGA specific query attribute - kann nur mit der AuthorInstitution kombiniert werden -->
                    <rim:Slot name="$ELGAKbsNotify">
                        <rim:ValueList>
                            <rim:Value>('true')</rim:Value>
                        </rim:ValueList>
                    </rim:Slot>
                    
                </rim:AdhocQuery>
            </wsnt:Filter>
            <wsnt:InitialTerminationTime>2010-05-31T00:00:00.00000Z</wsnt:InitialTerminationTime>
        </wsnt:Subscribe>
    </s:Body>
</s:Envelope>
