Stream: implementers
Topic: Search expression
Grahame Grieve (Apr 12 2016 at 03:33):
so one thing we've discussed often here is that there's no way to implement a server without hand-coding the search routines.
Grahame Grieve (Apr 12 2016 at 03:34):
we've been working towards automating them for a long time, and I'm now trying to move my server to actually do this
Grahame Grieve (Apr 12 2016 at 03:34):
but it's hard work - the index declarations aren't quite strong enough to automate, so I'm having to do a lot of work as I go.
Grahame Grieve (Apr 12 2016 at 03:35):
here's a case I'm not sure how to resolve:
Grahame Grieve (Apr 12 2016 at 03:35):
onset | date "Date related onsets (dateTime and Period)" Condition.onset[x]
onset-info | string "Other onsets (boolean, age, range, string)" Condition.onset[x]
Grahame Grieve (Apr 12 2016 at 03:35):
these 2 expressions have the same path, but they are documented as being different...
Grahame Grieve (Apr 12 2016 at 03:41):
actually, there's only one way to resolve those, to write explicitly correct expressions
Brian Postlethwaite (Apr 12 2016 at 04:45):
Then there are search parameters that can't be automatically generated, like the near geo ones in location, I think I had a special case which handled the soundex style ones
Grahame Grieve (Apr 12 2016 at 04:46):
they have a type on them
Grahame Grieve (Apr 12 2016 at 04:47):
I'm cross-comparing my hand-written routines with the generated ones
Grahame Grieve (Apr 12 2016 at 04:47):
it's educational
Brian Postlethwaite (Apr 12 2016 at 04:52):
The soundex ones, yes, not the geo ones. (can't think of any other examples though)
Grahame Grieve (Apr 12 2016 at 06:33):
more about this: list.comment was changed to list.note :Annotation, with a search parmeter note, mapped to List.note. I think it should point to List.note.text
Angus Millar (Apr 12 2016 at 08:11):
Some what on this topic, are the xpath expressions as provided for the search-parameters for each resource going to remain as xpath, or now that we have FluentPath will they become FluentPaths?
So for instance we have search paths expressed like this: XPath = "f:Patient/f:telecom[system/@value='email']"
, will they remain into the future or will they become FluentPaths = Patient.telecom.Where(system='email')
I ask because I was parseing them, xpath, to ceate my database indexes, is that work now lost?
Brian Postlethwaite (Apr 12 2016 at 09:43):
The fluentpath expressions are also included in the generated code.
Brian Postlethwaite (Apr 12 2016 at 09:43):
(and in the .net model classes too)
Brian Postlethwaite (Apr 12 2016 at 09:43):
and the xpath is currently in there too
Angus Millar (Apr 12 2016 at 09:44):
Wil the xpath remain?
Angus Millar (Apr 12 2016 at 09:45):
I'm still working with DSTU 2 .Net API so don't see the fluentpaths as yet. Need to update
Brian Postlethwaite (Apr 12 2016 at 10:08):
They are already in the DSTU2 version, I know as I'm using them.
Brian Postlethwaite (Apr 12 2016 at 10:11):
In:
Model.ModelInfo.SearchParameters[0].XPath
Model.ModelInfo.SearchParameters[0].Expression
Angus Millar (Apr 12 2016 at 10:15):
Thanks Brian, yes I have those and they are what I am using as well. My question is will these remain in time or will the standard move away from these and towards a FluentPath expression style. Will the xpath and Expression properties be replaced by a new property named FluentPath
Brian Postlethwaite (Apr 12 2016 at 10:18):
Cool, no intention I know about to remove them at this point.
Angus Millar (Apr 12 2016 at 10:19):
Ok, thanks for your helps
Angus Millar (Apr 12 2016 at 10:19):
or help, lol
Brian Postlethwaite (Apr 12 2016 at 10:19):
Also note that I'm working on getting the .net fluentpath evaluator running off the model classes rather than requiring parsing out into another form. But don't have a timeline on it at the moment.
Brian Postlethwaite (Apr 12 2016 at 10:20):
We are however using it for validating QuestionnaireResponse resourcces in its current form.
Brian Postlethwaite (Apr 12 2016 at 10:22):
Since this is a discussion on search indexing (I think) jsut an FYI,
We currently have a mix of SQLXML parsing the resources in sqlserver triggers on insert/update, and some custom code.
We do however plan to move over to using the fluentpath extraction once my model based fluentpath is complete
Angus Millar (Apr 12 2016 at 10:24):
Thanks for your advice post the NEHTA connectathon, since then I have done as you suggested and now build my database structure of the .net api with templates, much better. Working on trying to do the same for the add & update routines. Would love to do the same for most of the search but that might be harder
Lloyd McKenzie (Apr 12 2016 at 15:48):
@Grahame Grieve May be worth challenging the List search parameter note. It's hard to imagine that falling within the 80%.
Grahame Grieve (Apr 12 2016 at 19:15):
Angus - at some stage I'll be investigating generating the xpath from the fluentpath. but are you really using the xpath? how? you said you're using .net api, so you don't have xslt2 support....
Josh Mandel (Apr 12 2016 at 19:54):
Do our current search param xpaths rely on xpath 2.0?
Grahame Grieve (Apr 12 2016 at 20:02):
umm no, I think none of them do. I got confused there
Brian Postlethwaite (Apr 12 2016 at 21:29):
My server is using the xpath for much of the index generation, but is done inside sqlserver, and yes, the current expressions don't have any 2.0 specific bits (thankfully)
Angus Millar (Apr 13 2016 at 05:42):
I'm doing something simular to Brian. Using the search parameter's xpath properties, for example this XPath = "f:Patient/f:telecom[system/@value='phone']"
to then navigate the .net API via it's Introspection classes to create my database index structure. I'm not using XPath as in navigating XML, i'm manualy parsing the string provided as a searchparameter path
Yunwei Wang (Apr 23 2016 at 13:59):
I want to search MedicationOrder with status active or completed. Is this correct? MedicationOrder?status=active|completed
Brian Postlethwaite (Apr 24 2016 at 03:35):
MedicationOrder?status=active,completed
http://hl7.org/fhir/search.html#escaping
Last updated: Apr 12 2022 at 19:14 UTC