Hi Sheryl,
On Oct 12, 2011, at 5:54 PM, Sheryl John wrote:
> Hi,
>
> I'm facing some weird issue with the DIS-style queries I'm sending while
> using xmlps.
>
> Case:
>
> DIS-style query2:
> prod?q=RETURN = mrn AND RETURN = birth_dt_tm AND loc_nurse_unit_cd_desc_1 =
> 'PICU' OR loc_nurse_unit_cd_desc_1 = 'PICU2'
This isn't a valid DIS-tyle query. Note that you can't do RETURN = a *AND* b.
It's RETURN = a AND RETURN = b.
>
> Converted SQL-query:
> SELECT person.mrn as mrn,person.birth_dt_tm as birth_dt_tm FROM encounter
> INNER JOIN person ON person.person_id = encounter.person_id INNER JOIN
> encntr_loc_hist ON encntr_loc_hist.encntr_id = encounter.encntr_id WHERE
> (encntr_loc_hist.loc_nurse_unit_cd_desc = PICU2 AND
> encntr_loc_hist.loc_nurse_unit_cd_desc = 'PICU')
>
> ----------
> DIS-style query3: Added parenthesis to DIS-style query2
> prod?q=RETURN = mrn AND RETURN = birth_dt_tm AND {loc_nurse_unit_cd_desc_1 =
> 'PICU' OR loc_nurse_unit_cd_desc_1 = 'PICU2'}
>
[...snip...]
> I tried the above cases with LIKE and the single quotes still does not
> appear. Is there a proper way of defining the DIS-style queries to correct
> this?
Yep, see my example above. I think that'll fix it.
Here's two good tutorials for DIS-style queries:
http://oodt.apache.org/components/maven/profile/querying/
http://oodt.apache.org/components/maven/xmlquery/disquery/
HTH,
Chris
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Chris Mattmann, Ph.D.
Senior Computer Scientist
NASA Jet Propulsion Laboratory Pasadena, CA 91109 USA
Office: 171-266B, Mailstop: 171-246
Email: [email protected]
WWW: http://sunset.usc.edu/~mattmann/
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Adjunct Assistant Professor, Computer Science Department
University of Southern California, Los Angeles, CA 90089 USA
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++