<?xml version="1.0" encoding="UTF-8"?><SubscriptionTopic xmlns="http://hl7.org/fhir">
  <id value="admission"/>
  <meta>
    <security>
      <system value="http://terminology.hl7.org/CodeSystem/v3-ActReason"/>
      <code value="HTEST"/>
      <display value="test health data"/>
    </security>
  </meta>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg">
    <valueCode value="fhir"/>
  </extension>
  <url value="http://example.org/FHIR/SubscriptionTopic/admission"/>
  <identifier>
    <system value="urn:ietf:rfc:3986"/>
    <value value="urn:uuid:915c2040-b0a8-4935-adf8-94d6e1a74052"/>
  </identifier>
  <title value="admission"/>
  <status value="active"/>
  <publisher value="HL7 International / FHIR Infrastructure"/>
  <contact>
    <telecom>
      <system value="url"/>
      <value value="http://www.hl7.org/Special/committees/fiwg"/>
    </telecom>
  </contact>
  <description value="Example admission topic"/>
  <trigger>
    <description value="Encounter resource moving to state 'in-progress' or event matching HL7v2 ADT^A01"/>
    <resource value="http://hl7.org/fhir/StructureDefinition/Encounter"/>
    <supportedInteraction value="create"/>
    <supportedInteraction value="update"/>
    <queryCriteria>
      <previous value="status:not=in-progress"/>
      <resultForCreate value="test-passes"/>
      <current value="status=in-progress"/>
      <resultForDelete value="test-fails"/>
      <requireBoth value="true"/>
    </queryCriteria>
    <fhirPathCriteria value="(%previous.id.empty() or (%previous.status != 'in-progress')) and (%current.status = 'in-progress')"/>
    <event>
      <coding>
        <system value="http://terminology.hl7.org/CodeSystem/v2-0003"/>
        <code value="A01"/>
        <display value="ADT/ACK - Admit/visit notification"/>
      </coding>
    </event>
    <canFilterBy>
      <description value="Matching based on the Patient (subject) of an Encounter or based on the Patient's group membership (in/not-in)."/>
      <resource value="Encounter"/>
      <filterParameter value="patient"/>
      <modifier value="in"/>
      <modifier value="not-in"/>
    </canFilterBy>
    <notificationShape>
      <resource value="Encounter"/>
      <include value="Encounter:patient"/>
      <include value="Encounter:practitioner"/>
      <include value="Encounter:service-provider"/>
      <include value="Encounter:account"/>
      <include value="Encounter:diagnosis"/>
      <include value="Encounter:observation"/>
      <include value="Encounter:location"/>
    </notificationShape>
  </trigger>
</SubscriptionTopic>