R6 Ballot (2nd Draft)

Publish-box (todo)

Example SubscriptionTopic/example (XML)

FHIR Infrastructure Work GroupMaturity Level: N/AStandards Status: InformativeCompartments: No defined compartments

Raw XML (canonical form + also see XML Format Specification)

Example Topic with Modifiers (id = "example")

<?xml version="1.0" encoding="UTF-8"?>

<SubscriptionTopic xmlns="http://hl7.org/fhir">
  <id value="example"/> 
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg">
    <valueCode value="fhir"/> 
  </extension> 
  <url value="http://example.org/FHIR/R5/SubscriptionTopic/example"/> 
  <identifier> 
    <system value="urn:ietf:rfc:3986"/> 
    <value value="urn:uuid:1caa02ba-051b-4602-8856-65921748ae76"/> 
  </identifier> 
  <version value="1.0.0-beta.1"/> 
  <title value="example"/> 
  <status value="draft"/> 
  <date value="2019-01-01"/> 
  <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 topic for completed encounters"/> 
  <trigger> 
    <description value="An Encounter has been completed"/> 
    <resource value="http://hl7.org/fhir/StructureDefinition/Encounter"/> 
    <supportedInteraction value="update"/> 
    <queryCriteria> 
      <previous value="status:not=completed"/> 
      <resultForCreate value="test-passes"/> 
      <current value="status=completed"/> 
      <resultForDelete value="test-fails"/> 
      <requireBoth value="true"/> 
    </queryCriteria> 
    <fhirPathCriteria value="(%previous.empty() | (%previous.status != 'completed')) and (%current.status =
     'completed')"/> 
    <canFilterBy> 
      <description value="Filter based on the subject of an encounter."/> 
      <resource value="Encounter"/> 
      <filterParameter value="subject"/> 
    </canFilterBy> 
    <canFilterBy> 
      <description value="Filter based on the group membership of the subject of an encounter."/> 
      <resource value="Encounter"/> 
      <filterParameter value="_in"/> 
    </canFilterBy> 
    <canFilterBy> 
      <description value="Filter based on the length of an encounter."/> 
      <resource value="Encounter"/> 
      <filterParameter value="length"/> 
      <comparator value="gt"/> 
      <comparator value="lt"/> 
      <comparator value="ge"/> 
      <comparator value="le"/> 
    </canFilterBy> 
    <canFilterBy> 
      <description value="Filter based on the account for billing an encounter."/> 
      <resource value="Encounter"/> 
      <filterParameter value="account"/> 
      <modifier value="missing"/> 
      <modifier value="not"/> 
      <modifier value="identifier"/> 
    </canFilterBy> 
    <notificationShape> 
      <resource value="Encounter"/> 
      <include value="Encounter:patient&amp;iterate=Patient.link"/> 
      <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"/> 
      <relatedQuery> 
        <queryType/>  
        <query value="Patient?_include:iterate=Patient:link"/> 
      </relatedQuery> 
      <relatedQuery> 
        <queryType/>  
        <query value="$current-providers"/> 
      </relatedQuery> 
    </notificationShape> 
  </trigger> 
</SubscriptionTopic> 

Usage note: every effort has been made to ensure that the examples are correct and useful, but they are not a normative part of the specification.