PatientId(value, type), which matches if the message lists a patient having an ID of the given value and type in the PID-2, PID-3, or PID-4 segments; for example PatientId("123456", "MRN")

labels.x, a string value of the label with key x as set using the Message.labels map, for example labels."priority"="high". The operator :* can be used to assert the existence of a label, for example labels."priority":*.

Limitations on conjunctions:

Negation on the patient ID function or the labels field is not supported, for example these queries are invalid: NOT PatientId("123456", "MRN"), NOT labels."tag1":*, NOT labels."tag2"="val2".

Conjunction of multiple patient ID functions is not supported, for example this query is invalid: PatientId("123456", "MRN") AND PatientId("456789", "MRN").

Conjunction of multiple labels fields is also not supported, for example this query is invalid: labels."tag1":* AND labels."tag2"="val2".

Conjunction of one patient ID function, one labels field and conditions on other fields is supported, for example this query is valid: PatientId("123456", "MRN") AND labels."tag1":* AND messageType = "ADT".

The HasLabel(x) and Label(x) syntax from previous API versions are deprecated; replaced by the labels.x syntax.