> Given 2 concepts ID’s .. .I want to query for RELATIONSHIP records where
>
> CONCEPTID1 is the same, and CONCEPTID2 matches the 2 ID’s I have.
..
> xdmp:directory("/SNOMED/relationships/")//RELATIONSHIP[CONCEPTID1 eq
> $cid][CONCEPTID2 = ($d1,$d2)]
The = operator will return true if any items on the left are equal to
any of the items on the right, so CONCEPTID2 = ($d1,$d2) will return
true if either $d1 or $d2 match any of the CONCEPTID2 elements.
Do you expect there to be 2 CONCEPTID2 elements, and you want to test
that they both match $d1 and $d2 respectively? If so then you want
either:
not(CONCEPTID2 != ($d1, $d2))
or
CONCEPTID2[1] = ($d1, $d2) and CONCEPTID2[2] = ($d1, $d2)
however neither of those ensures that both CONCEPTID2 elements are
different, so you may need to add an additional check for that.
--
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general