Category: Activity log

24/06/10

Permalink 09:55:37 am, by sarneil, 152 words, 468 views   English (CA)
Categories: Activity log; Mins. worked: 180

allow for AND or OR operator within multiselect fields

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.

Permalink 09:46:58 am, by sarneil, 127 words, 453 views   English (CA)
Categories: Activity log; Mins. worked: 120

query fails when more than one item selected in multiselect fields

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.

20/04/10

Permalink 12:30:20 pm, by sarneil, 300 words, 558 views   English (CA)
Categories: Activity log; Mins. worked: 180

add filter for Has Nurse or Support Care

ML asked to be able to filter search results based on whether either of two boolean values in a record were true. Took a couple of tries to figure out how checkboxes behave with regard to the POST array, but I finally figured it out with help from Greg and Martin 1) To report the status of a checkbox in the POST array and use that in PHP to set the state when the page reloads itself. If the checkbox is not checked, then no value is sent in the POST array, so the PHP that checks has to check not the value, but if isset($_POST[checkbox_element_id]). If that returns true, then write 'checked="checked"' into the page and if it returns false, then write nothing. If the PHP writes 'checked=""' or includes the checked attribute at all, then the checkbox is checked. In search.php: $is_nurse_or_support_care_checked = ''; if (isset($_POST['is_nurse_or_support_care_checked'])) { $is_nurse_or_support_care_checked = "yes"; } In includes/searchformbasic.inc: <label for="is_nurse_or_support_care_checked">Has Nurse or Support Care</label> <input name="is_nurse_or_support_care_checked" type="checkbox" id="is_nurse_or_support_care_checked" <?php if ($is_nurse_or_support_care_checked == 'yes') {echo ' checked="checked"'; } ?> value="checked" ></input> To modify the where clause to include only those records in which either of the two affected fields have the value 1 (as opposed to the only other possible value, which is 0) in search.php: if (!empty($is_nurse_or_support_care_checked)) { if (!empty($where)) {$where .= " " . $combine_fields_using_value . " ";} $where .= "("; $where .= "(exams.food_rest = '1') "; $where .= "OR (exams.nursing_care = '1') "; $where .= ")"; }

08/03/10

Permalink 01:56:40 pm, by sarneil, 57 words, 527 views   English (CA)
Categories: Activity log; Mins. worked: 90

add another search, one still to go

Added a text search on the "Miscellaneous" textbox? Started work on this request, but it will take some more doing: Search those entries which get a * for either nursing or support care under the search display of Remedies. Add that search under "Residential Care" in the Examination search box (just a menu with "yes/checked" and "no").

16/12/09

Permalink 10:32:02 am, by sarneil, 53 words, 555 views   English (CA)
Categories: Activity log; Mins. worked: 30

update order-by control

Noticed that the values in the order-by control were based on the original fields in the line that's always visible for each record. Updated that to reconcile with current fields in that line. Had to update the order-by table in the db and update the switch($order_by_1_text) statement in search.php.
Permalink 10:29:10 am, by sarneil, 50 words, 548 views   English (CA)
Categories: Activity log; Mins. worked: 150

Add search of treatments textarea

MH asked to be able to query large blocks of text in the treatments field, similar to what I gave him for the conditions, namely: "Treatment any word begins with" "Treatment contains" "Treatment also contains" "Treatment does not contain" My first implementation had a bug resulting from a copy-and-paste error.

27/11/09

Permalink 04:38:31 pm, by sarneil, 84 words, 543 views   English (CA)
Categories: Activity log; Mins. worked: 90

Add search of conditions textarea, new report presentation to follow

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.

Permalink 04:35:32 pm, by sarneil, 51 words, 494 views   English (CA)
Categories: Activity log; Mins. worked: 90

change which fields appear in 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

Permalink 04:32:13 pm, by sarneil, 30 words, 458 views   English (CA)
Categories: Activity log; Mins. worked: 60

fix couple of bugs in sql

MH reported problems with a couple of specific query settings. Caused by bugs introduced by me in overhauling things a couple of weeks ago. Fixed the bugs and tested them.
Permalink 04:25:58 pm, by sarneil, 35 words, 501 views   English (CA)
Categories: Activity log; Mins. worked: 60

fix errors in dropdown lists

Fixed GUI problems in the popup window that displays lists of options, also fixed inconsistencies in a couple of the lists on the add, edit and search pages to reconcile them. Tested and confirmed working

:: Next Page >>

German Medical Exams

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.

Reports

Categories

April 2014
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      

XML Feeds