{"contact":[{"telecom":[{"system":"url","value":"http://www.hl7.org/Special/committees/fiwg"}]}],"date":"2019-01-01","description":"Example topic for completed encounters","extension":[{"url":"http://hl7.org/fhir/StructureDefinition/structuredefinition-wg","valueCode":"fhir"}],"id":"example","identifier":[{"system":"urn:ietf:rfc:3986","value":"urn:uuid:1caa02ba-051b-4602-8856-65921748ae76"}],"publisher":"HL7 International / FHIR Infrastructure","resourceType":"SubscriptionTopic","status":"draft","title":"example","trigger":[{"canFilterBy":[{"description":"Filter based on the subject of an encounter.","filterParameter":"subject","resource":"Encounter"},{"description":"Filter based on the group membership of the subject of an encounter.","filterParameter":"_in","resource":"Encounter"},{"comparator":["gt","lt","ge","le"],"description":"Filter based on the length of an encounter.","filterParameter":"length","resource":"Encounter"},{"description":"Filter based on the account for billing an encounter.","filterParameter":"account","modifier":["missing","not","identifier"],"resource":"Encounter"}],"description":"An Encounter has been completed","fhirPathCriteria":"(%previous.empty() | (%previous.status != 'completed')) and (%current.status = 'completed')","notificationShape":[{"include":["Encounter:patient&iterate=Patient.link","Encounter:practitioner","Encounter:service-provider","Encounter:account","Encounter:diagnosis","Encounter:observation","Encounter:location"],"relatedQuery":[{"query":"Patient?_include:iterate=Patient:link"},{"query":"$current-providers","queryType":{"code":"current-providers","system":"http://example.org/fhir/CodeSystem-patient-queries"}}],"resource":"Encounter"}],"queryCriteria":{"current":"status=completed","previous":"status:not=completed","requireBoth":true,"resultForCreate":"test-passes","resultForDelete":"test-fails"},"resource":"http://hl7.org/fhir/StructureDefinition/Encounter","supportedInteraction":["update"]}],"url":"http://example.org/FHIR/SubscriptionTopic/example","version":"1.0.0-beta.1"}