liveBook · Manning

Sequence pattern

As explained in Event Processing in Action

An event processing pattern satisfied when instances of listed event types occur in the specified order.

A sequence pattern is a temporal event pattern satisfied when instances of every listed event type occur in the specified order. Its matching set contains one event instance for each listed type. section 9.3.1

To test a sequence pattern:

  • Treat the relevant event types list as ordered, and the participant event set as totally ordered. section 9.3.1
  • Match every listed type in order; the matching instances need not be consecutive among participant events. section 9.3.1

Hospital readmission

The pattern <patient discharge, patient admission> is satisfied when a patient is discharged and then readmitted within 48 hours for the same reason. section 9.3.1

Figure 9.7. A sequence pattern example—a patient who is readmitted to the hospital within 48 hours of having been discharged

Use the diagram to see the discharge-then-readmission example. section 9.3.1

How Event Processing in Action covers it

How deep it goes
Defines matching conditions, ordered event sets, and nonconsecutive matches, with a hospital example.
Examples
Uses hospital discharge followed by readmission within 48 hours for the same reason.
What you can do after
Evaluate whether participant events match all listed types in the required order.
How it connects
Relates sequence patterns to temporal patterns and the all pattern.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Event Processing in Action. The section links point to the parts of the book it draws on.