Stream: hapi
Topic: Searching with :not parameter
Jean Duteau (Jan 27 2022 at 21:02):
I'm sure I'm missing something simple, but I'm trying to create a search query for any Conditions where the status is NOT entered-in-error. here is what I have so far:
client.search().forResource(Condition.class).
where(Condition.PATIENT.hasChainedProperty(
Patient.IDENTIFIER.exactly().systemAndIdentifier(COMMON_KEY_SYSTEM, commonKey))).
and(Condition.CATEGORY.exactly().code("problem-list-item")).
**and(Condition.VERIFICATION_STATUS.exactly().code("entered-in-error")).**
returnBundle(Bundle.class).execute();
The highlighted line is obviously the exact opposite of what I want to say, but I can't see how to specify the 'not'. I certainly don't want to list all of the other codes that exist if I can help it.
Last updated: Apr 12 2022 at 19:14 UTC