Thanks for the response, Danny. Notice that I asked about applying
the same <searchable-expression> to a SET of constraints. Here's a
counter-example that demonstrates what I'd like to know how to do and
how I do not see a way to do it using <searchable-expression> and/or
<additional-query>:
<patient>
<encounters>
<encounter>
<chief-complaint>hair loss</chief-complaint>
<physician>
<lastname>Williams</lastname>
</physician>
</encounter>
<encounter>
<chief-complaint>aches</chief-complaint>
<physician>
<lastname>Carter</lastname>
</physician>
</encounter>
</encounters>
<labs>
<lab>
<category>hematology</category>
<name>RDW</name>
<value>14.6</value>
</lab>
<lab>
<category>chemistry</category>
<name>CA</name>
<value>9.2</value>
</lab>
</labs>
</patient>
The following query: "physician-lastname:williams
chief-complaint:aches test-name:rdw test-value:9.2" means to find
patients who have presented with Dr. Williams complaining of aches who
also have had an RDW test with a result value of 9.2.
I want the encounter-related constraints to be satisfied within the
SAME encounter section. I want the lab-related constraints to be
satisfied within the SAME lab section. So the document above does not
match the query.
<searchable-expression> would solve the problem IF each document only
had one section type (for example, it could be set to
"/patient/encounters/encounter" if there were only encounter
sections), but the document has multiple section types. I see no way
that <additional-query> could be used here.
In general, the problem is that my options node supports a large set
of possible constraints and I want to partition that set into a few
subsets, specifying a different searchable-expression for each *subset
of the constraints*. In my example, subsets would be: E =
{physician-lastname, chief-complaint}, L = {test-name, test-value} for
encounter constraints and lab constraints. All constraints in subset
E must be satisfied in the same encounter, etc. for all subsets.
So, am I looking for a custom constraint-based approach?
Karl
On Mon, Apr 5, 2010 at 6:38:35 pm, Danny Sokolsky wrote:
>
> Hi Karl,
>
> You can add an <additional-query> option to your search:search options node.
> If
> your additional-query is a cts:element-query, then that will constrain results
> to ones matching within that element. If you have different criteria for
> different elements, you can make the additional-query a cts:or-query of
> multiple
> element-queries.
>
> -Danny
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general