Based on work documented in previous post, I then decided to allow the user to configure whether multiple selections made within one multiselect field should be related to each other by OR or AND, for example to allow
remedy = bloodletting AND purge
as well as
remedy = bloodletting OR purge
The operator within each field works independently of the control for the existing operator between fields, so any of these queries is now doable:
(examiner = smith) OR (remedy = bloodletting OR purge)
(examiner = smith) AND (remedy = bloodletting OR purge)
(examiner = smith) OR (remedy = bloodletting AND purge)
(examiner = smith) AND (remedy = bloodletting AND purge)
I had to extend the code modifications described before, and add a pair of radio buttons to the interface of the popup window to allow the user to specify. Entailed changes to a javascript file, lib.php and libsql.php, search.php and datalist.php by the time all was done.
MLH told me that if he did queries involving more than one choice in a multiselect field, the results coming back were wrong. For example,
If I search for remedy = bloodletting, I get 23 results
If I search for remedy = purge, I get 52 results
Before, when I searched for remedy = bloodletting OR purge I got 0 hits.
Problem was with code that generates the where clause in the SQL query, in particular where that code has to search 2 fields. It was generating a clause like this:
((remedy1 = "bloodletting OR purge") OR (remedy2 = "bloodletting OR purge"))
and so I corrected it to create a clause like this:
(((remedy1 = "bloodletting") OR (remedy1 = "purge")) OR ((remedy2 = "bloodletting") OR (remedy2 = "purge")))
Now, when I search for remedy = bloodletting OR purge, I get 58 hits.
MH asked to be able to query large blocks of text in the condition field. I gave him controls so that he could try:
"Condition begins with"
"Condition any word begins with"
"Condition contains"
"Condition also contains"
"Condition does not contain"
For now, the query just returns the same results as all the other types of query. Once he's settled on the type of query interface he wants, I'll likely implement it on a separate page and have a different presentation of the report.
substituted the "Approved Measure" field in place of the Document ID (and omitted the Document ID out--MH doesn't want it there
In the initial search display, moved the results for "Bathing and "Res. Care" that are now in the Exam detail and put them in the initial display of search results
:: Next Page >>
This project will create an xml-based database of medical exam reports from the 16th through 19th centuries in Germany. The database will allow researchers to query medical practices in that time and to infer changes in the administration of medical care and other social changes.
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| << < | > >> | |||||
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 | |