Thank you for the quick reply. May be you can help me find a way of doing it in CEP.
If any of the patient vitals received in the last 24 hours are out of range, I want to set the state as SIRS.
In the sample code, I implement a Filter Function that identifies if the vital is out of range. In reality, patient 3 should not be added to SIRS (his temperature vital is already recorded or another record came in where the temperature is still high which should be invalidated as well). Is there a different way of achieving this? I cannot have a separate filter for each vital as the order of vitals can be random.