FHIR Chat · Parsing Conditional Queries · hapi

Stream: hapi

Topic: Parsing Conditional Queries


view this post on Zulip Keith Boone (Dec 07 2016 at 08:02):

@James Agnew For Conditional Create, Update and Delete, we'd rather not rewrite query parsing, but would prefer to use the same query parsing code that HAPI uses so that we could call the Query methods we already have. Is there a way to either invoke a query through the server (whilst inside a create/delete/update operation), or at least using HAPI parameter parsing tools to facilitate the parsing of the conditional query?

view this post on Zulip James Agnew (Dec 07 2016 at 16:06):

Hi Keith- The method BaseHapiFhirDao#translateMatchUrl(FhirContext, String, RuntimeResourceDefinition) (source here) is the method the server itself uses for this.

It's a static method so you should be able to call it from wherever. It probably should be moved out of the JPA module though- you'd need to import the JPA JAR currently in order to get to it. Not neccesarily a problem since you wouldn't need to use the rest of the JPA module but it's an annoyingly big dependency.


Last updated: Apr 12 2022 at 19:14 UTC