<?xml version="1.0" encoding="utf-8"?><!-- generator="b2evolution/7.2.3-stable" -->
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>German Medical Exams</title>
		<link>https://hcmc.uvic.ca/blogs/index.php?blog=39</link>
		<atom:link rel="self" type="application/rss+xml" href="https://hcmc.uvic.ca/blogs/index.php?blog=39&#38;tempskin=_rss2" />
		<description></description>
		<language>en-CA</language>
		<docs>http://blogs.law.harvard.edu/tech/rss</docs>
		<admin:generatorAgent rdf:resource="http://b2evolution.net/?v=7.2.3-stable"/>
		<ttl>60</ttl>
				<item>
			<title>allow for AND or OR operator within multiselect fields</title>
			<link>https://hcmc.uvic.ca/blogs/index.php/allow_for_and_or_or_operator_within_mult?blog=39</link>
			<pubDate>Thu, 24 Jun 2010 16:55:37 +0000</pubDate>			<dc:creator>Stewart</dc:creator>
			<category domain="main">Activity log</category>			<guid isPermaLink="false">6848@https://hcmc.uvic.ca/blogs/</guid>
						<description>&lt;p&gt;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&lt;br /&gt;
remedy = bloodletting AND purge&lt;br /&gt;
as well as&lt;br /&gt;
remedy = bloodletting OR purge&lt;br /&gt;
The operator within each field works independently of the control for the existing operator between fields, so any of these queries is now doable:&lt;br /&gt;
(examiner = smith) OR (remedy = bloodletting OR purge)&lt;br /&gt;
(examiner = smith) AND (remedy = bloodletting OR purge)&lt;br /&gt;
(examiner = smith) OR (remedy = bloodletting AND purge)&lt;br /&gt;
(examiner = smith) AND (remedy = bloodletting AND purge)&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;https://hcmc.uvic.ca/blogs/index.php/allow_for_and_or_or_operator_within_mult?blog=39&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>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<br />
remedy = bloodletting AND purge<br />
as well as<br />
remedy = bloodletting OR purge<br />
The operator within each field works independently of the control for the existing operator between fields, so any of these queries is now doable:<br />
(examiner = smith) OR (remedy = bloodletting OR purge)<br />
(examiner = smith) AND (remedy = bloodletting OR purge)<br />
(examiner = smith) OR (remedy = bloodletting AND purge)<br />
(examiner = smith) AND (remedy = bloodletting AND purge)</p>

<p>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.</p><div class="item_footer"><p><small><a href="https://hcmc.uvic.ca/blogs/index.php/allow_for_and_or_or_operator_within_mult?blog=39">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>https://hcmc.uvic.ca/blogs/index.php/allow_for_and_or_or_operator_within_mult?blog=39#comments</comments>
			<wfw:commentRss>https://hcmc.uvic.ca/blogs/index.php?blog=39&#38;tempskin=_rss2&#38;disp=comments&#38;p=6848</wfw:commentRss>
		</item>
				<item>
			<title>query fails when more than one item selected in multiselect fields</title>
			<link>https://hcmc.uvic.ca/blogs/index.php/query_fails_when_more_than_one_item_sele?blog=39</link>
			<pubDate>Thu, 24 Jun 2010 16:46:58 +0000</pubDate>			<dc:creator>Stewart</dc:creator>
			<category domain="main">Activity log</category>			<guid isPermaLink="false">6847@https://hcmc.uvic.ca/blogs/</guid>
						<description>&lt;p&gt;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, &lt;br /&gt;
If I search for remedy = bloodletting, I get 23 results&lt;br /&gt;
If I search for remedy = purge, I get 52 results&lt;br /&gt;
Before, when I searched for remedy = bloodletting OR purge I got 0 hits.&lt;/p&gt;

&lt;p&gt;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:&lt;br /&gt;
((remedy1 = &quot;bloodletting OR purge&quot;) OR (remedy2 = &quot;bloodletting OR purge&quot;))&lt;br /&gt;
and so I corrected it to create a clause like this:&lt;br /&gt;
(((remedy1 = &quot;bloodletting&quot;) OR (remedy1 = &quot;purge&quot;)) OR ((remedy2 = &quot;bloodletting&quot;) OR (remedy2 = &quot;purge&quot;)))&lt;/p&gt;

&lt;p&gt;Now, when I search for remedy = bloodletting OR purge, I get 58 hits. &lt;/p&gt;&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;https://hcmc.uvic.ca/blogs/index.php/query_fails_when_more_than_one_item_sele?blog=39&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>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, <br />
If I search for remedy = bloodletting, I get 23 results<br />
If I search for remedy = purge, I get 52 results<br />
Before, when I searched for remedy = bloodletting OR purge I got 0 hits.</p>

<p>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:<br />
((remedy1 = "bloodletting OR purge") OR (remedy2 = "bloodletting OR purge"))<br />
and so I corrected it to create a clause like this:<br />
(((remedy1 = "bloodletting") OR (remedy1 = "purge")) OR ((remedy2 = "bloodletting") OR (remedy2 = "purge")))</p>

<p>Now, when I search for remedy = bloodletting OR purge, I get 58 hits. </p><div class="item_footer"><p><small><a href="https://hcmc.uvic.ca/blogs/index.php/query_fails_when_more_than_one_item_sele?blog=39">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>https://hcmc.uvic.ca/blogs/index.php/query_fails_when_more_than_one_item_sele?blog=39#comments</comments>
			<wfw:commentRss>https://hcmc.uvic.ca/blogs/index.php?blog=39&#38;tempskin=_rss2&#38;disp=comments&#38;p=6847</wfw:commentRss>
		</item>
				<item>
			<title>add filter for Has Nurse or Support Care</title>
			<link>https://hcmc.uvic.ca/blogs/index.php/add_filter_for_has_nurse_or_support_care?blog=39</link>
			<pubDate>Tue, 20 Apr 2010 19:30:20 +0000</pubDate>			<dc:creator>Stewart</dc:creator>
			<category domain="main">Activity log</category>			<guid isPermaLink="false">6500@https://hcmc.uvic.ca/blogs/</guid>
						<description>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 &#039;checked=&quot;checked&quot;&#039; into the page and if it returns false, then write nothing. If the PHP writes &#039;checked=&quot;&quot;&#039; or includes the checked attribute at all, then the checkbox is checked.
In search.php:
$is_nurse_or_support_care_checked = &#039;&#039;;
if (isset($_POST[&#039;is_nurse_or_support_care_checked&#039;])) {
	$is_nurse_or_support_care_checked = &quot;yes&quot;;
} 
In includes/searchformbasic.inc:
&amp;lt;label for=&quot;is_nurse_or_support_care_checked&quot;&amp;gt;Has Nurse or Support Care&amp;lt;/label&amp;gt;
&amp;lt;input name=&quot;is_nurse_or_support_care_checked&quot; type=&quot;checkbox&quot; id=&quot;is_nurse_or_support_care_checked&quot; &amp;lt;?php if ($is_nurse_or_support_care_checked == &#039;yes&#039;) {echo &#039; checked=&quot;checked&quot;&#039;; } ?&amp;gt; value=&quot;checked&quot; &amp;gt;&amp;lt;/input&amp;gt;


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 .= &quot; &quot; . $combine_fields_using_value . &quot; &quot;;}
  $where .= &quot;(&quot;;
  $where .= &quot;(exams.food_rest = &#039;1&#039;) &quot;;
  $where .= &quot;OR (exams.nursing_care = &#039;1&#039;) &quot;; 
  $where .= &quot;)&quot;;
}
&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;https://hcmc.uvic.ca/blogs/index.php/add_filter_for_has_nurse_or_support_care?blog=39&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[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:
&lt;label for="is_nurse_or_support_care_checked"&gt;Has Nurse or Support Care&lt;/label&gt;
&lt;input name="is_nurse_or_support_care_checked" type="checkbox" id="is_nurse_or_support_care_checked" &lt;?php if ($is_nurse_or_support_care_checked == 'yes') {echo ' checked="checked"'; } ?&gt; value="checked" &gt;&lt;/input&gt;


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 .= ")";
}
<div class="item_footer"><p><small><a href="https://hcmc.uvic.ca/blogs/index.php/add_filter_for_has_nurse_or_support_care?blog=39">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>https://hcmc.uvic.ca/blogs/index.php/add_filter_for_has_nurse_or_support_care?blog=39#comments</comments>
			<wfw:commentRss>https://hcmc.uvic.ca/blogs/index.php?blog=39&#38;tempskin=_rss2&#38;disp=comments&#38;p=6500</wfw:commentRss>
		</item>
				<item>
			<title>add another search, one still to go</title>
			<link>https://hcmc.uvic.ca/blogs/index.php/add_another_search_one_still_to_go?blog=39</link>
			<pubDate>Mon, 08 Mar 2010 21:56:40 +0000</pubDate>			<dc:creator>Stewart</dc:creator>
			<category domain="main">Activity log</category>			<guid isPermaLink="false">6299@https://hcmc.uvic.ca/blogs/</guid>
						<description>Added a text search on the &quot;Miscellaneous&quot; 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 &quot;Residential Care&quot; in the Examination search box (just a menu
with &quot;yes/checked&quot; and &quot;no&quot;). &lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;https://hcmc.uvic.ca/blogs/index.php/add_another_search_one_still_to_go?blog=39&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[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"). <div class="item_footer"><p><small><a href="https://hcmc.uvic.ca/blogs/index.php/add_another_search_one_still_to_go?blog=39">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>https://hcmc.uvic.ca/blogs/index.php/add_another_search_one_still_to_go?blog=39#comments</comments>
			<wfw:commentRss>https://hcmc.uvic.ca/blogs/index.php?blog=39&#38;tempskin=_rss2&#38;disp=comments&#38;p=6299</wfw:commentRss>
		</item>
				<item>
			<title>update order-by control</title>
			<link>https://hcmc.uvic.ca/blogs/index.php/update_order_by_control?blog=39</link>
			<pubDate>Wed, 16 Dec 2009 18:32:02 +0000</pubDate>			<dc:creator>Stewart</dc:creator>
			<category domain="main">Activity log</category>			<guid isPermaLink="false">5921@https://hcmc.uvic.ca/blogs/</guid>
						<description>Noticed that the values in the order-by control were based on the original fields in the line that&#039;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. &lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;https://hcmc.uvic.ca/blogs/index.php/update_order_by_control?blog=39&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[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. <div class="item_footer"><p><small><a href="https://hcmc.uvic.ca/blogs/index.php/update_order_by_control?blog=39">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>https://hcmc.uvic.ca/blogs/index.php/update_order_by_control?blog=39#comments</comments>
			<wfw:commentRss>https://hcmc.uvic.ca/blogs/index.php?blog=39&#38;tempskin=_rss2&#38;disp=comments&#38;p=5921</wfw:commentRss>
		</item>
				<item>
			<title>Add search of treatments textarea</title>
			<link>https://hcmc.uvic.ca/blogs/index.php/add_search_of_treatments_textarea?blog=39</link>
			<pubDate>Wed, 16 Dec 2009 18:29:10 +0000</pubDate>			<dc:creator>Stewart</dc:creator>
			<category domain="main">Activity log</category>			<guid isPermaLink="false">5920@https://hcmc.uvic.ca/blogs/</guid>
						<description>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:

&quot;Treatment any word begins with&quot;
&quot;Treatment contains&quot;
&quot;Treatment also contains&quot;
&quot;Treatment does not contain&quot;

My first implementation had a bug resulting from a copy-and-paste error.
&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;https://hcmc.uvic.ca/blogs/index.php/add_search_of_treatments_textarea?blog=39&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[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.
<div class="item_footer"><p><small><a href="https://hcmc.uvic.ca/blogs/index.php/add_search_of_treatments_textarea?blog=39">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>https://hcmc.uvic.ca/blogs/index.php/add_search_of_treatments_textarea?blog=39#comments</comments>
			<wfw:commentRss>https://hcmc.uvic.ca/blogs/index.php?blog=39&#38;tempskin=_rss2&#38;disp=comments&#38;p=5920</wfw:commentRss>
		</item>
				<item>
			<title>Add search of conditions textarea, new report presentation to follow</title>
			<link>https://hcmc.uvic.ca/blogs/index.php/add_search_of_conditions_textarea_new_re?blog=39</link>
			<pubDate>Sat, 28 Nov 2009 00:38:31 +0000</pubDate>			<dc:creator>Stewart</dc:creator>
			<category domain="main">Activity log</category>			<guid isPermaLink="false">5832@https://hcmc.uvic.ca/blogs/</guid>
						<description>&lt;p&gt;MH asked to be able to query large blocks of text in the condition field. I gave him controls so that he could try:&lt;/p&gt;

&lt;p&gt;&quot;Condition begins with&quot;&lt;br /&gt;
&quot;Condition any word begins with&quot;&lt;br /&gt;
&quot;Condition contains&quot;&lt;br /&gt;
&quot;Condition also contains&quot;&lt;br /&gt;
&quot;Condition does not contain&quot;&lt;/p&gt;

&lt;p&gt;For now, the query just returns the same results as all the other types of query. Once he&#039;s settled on the type of query interface he wants, I&#039;ll likely implement it on a separate page and have a different presentation of the report. &lt;/p&gt;
&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;https://hcmc.uvic.ca/blogs/index.php/add_search_of_conditions_textarea_new_re?blog=39&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>MH asked to be able to query large blocks of text in the condition field. I gave him controls so that he could try:</p>

<p>"Condition begins with"<br />
"Condition any word begins with"<br />
"Condition contains"<br />
"Condition also contains"<br />
"Condition does not contain"</p>

<p>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. </p>
<div class="item_footer"><p><small><a href="https://hcmc.uvic.ca/blogs/index.php/add_search_of_conditions_textarea_new_re?blog=39">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>https://hcmc.uvic.ca/blogs/index.php/add_search_of_conditions_textarea_new_re?blog=39#comments</comments>
			<wfw:commentRss>https://hcmc.uvic.ca/blogs/index.php?blog=39&#38;tempskin=_rss2&#38;disp=comments&#38;p=5832</wfw:commentRss>
		</item>
				<item>
			<title>change which fields appear in report</title>
			<link>https://hcmc.uvic.ca/blogs/index.php/change_which_fields_appear_in_report?blog=39</link>
			<pubDate>Sat, 28 Nov 2009 00:35:32 +0000</pubDate>			<dc:creator>Stewart</dc:creator>
			<category domain="main">Activity log</category>			<guid isPermaLink="false">5831@https://hcmc.uvic.ca/blogs/</guid>
						<description>&lt;p&gt;substituted the &quot;Approved Measure&quot; field in place of the Document ID (and omitted the Document ID out--MH doesn&#039;t want it there&lt;/p&gt;

&lt;p&gt;In the initial search display, moved the results for &quot;Bathing and &quot;Res. Care&quot; that are now in the Exam detail and put them in the initial display of search results&lt;/p&gt;
&lt;div class=&quot;item_footer&quot;&gt;&lt;p&gt;&lt;small&gt;&lt;a href=&quot;https://hcmc.uvic.ca/blogs/index.php/change_which_fields_appear_in_report?blog=39&quot;&gt;Original post&lt;/a&gt; blogged on &lt;a href=&quot;http://b2evolution.net/&quot;&gt;b2evolution&lt;/a&gt;.&lt;/small&gt;&lt;/p&gt;&lt;/div&gt;</description>
			<content:encoded><![CDATA[<p>substituted the "Approved Measure" field in place of the Document ID (and omitted the Document ID out--MH doesn't want it there</p>

<p>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</p>
<div class="item_footer"><p><small><a href="https://hcmc.uvic.ca/blogs/index.php/change_which_fields_appear_in_report?blog=39">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>]]></content:encoded>
								<comments>https://hcmc.uvic.ca/blogs/index.php/change_which_fields_appear_in_report?blog=39#comments</comments>
			<wfw:commentRss>https://hcmc.uvic.ca/blogs/index.php?blog=39&#38;tempskin=_rss2&#38;disp=comments&#38;p=5831</wfw:commentRss>
		</item>
			</channel>
</rss>
