<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Hacking at 0300 &#187; Medical Informatics</title>
	<atom:link href="http://bililite.nfshost.com/blog/category/medical/feed/" rel="self" type="application/rss+xml" />
	<link>http://bililite.nfshost.com/blog</link>
	<description>Thoughts on web design and programming from a very occasional volunteer webmaster</description>
	<lastBuildDate>Mon, 07 May 2012 14:38:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Fractions and Units in PHP</title>
		<link>http://bililite.nfshost.com/blog/2011/08/11/fractions-and-units-in-php/</link>
		<comments>http://bililite.nfshost.com/blog/2011/08/11/fractions-and-units-in-php/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 05:35:15 +0000</pubDate>
		<dc:creator>Danny</dc:creator>
				<category><![CDATA[Medical Informatics]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://bililite.nfshost.com/blog/?p=1858</guid>
		<description><![CDATA[For the bililite webservices, I kept all the data in what I would call "standard" American medical units, centimeters for height, kilograms for weight, mmHg for blood pressure, mg/dl for bilirubin. But lots of doctors use pounds and inches, and it would be nice to allow those as well. I could have separate data entry [...]]]></description>
			<content:encoded><![CDATA[<p>For the <a href="/webservices">bililite webservices</a>, I kept all the data in what I would call "standard" American medical units, centimeters for height, kilograms for weight, mmHg for blood pressure, mg/dl for bilirubin. But lots of doctors use pounds and inches, and it would be nice to allow those as well. I could have separate data entry forms for different units, but I decided it would be easier and more useful to allow units on the numbers. I could allow fractions as well (which some of my medical assistants still insist on recording; 21 5/8 instead of 21.625. My EMR blows a gasket with that, but <em>my</em> program would do better). And then, I could allow mixed units, like a weight of "6 pounds 5 1/2 ounces".</p>
<p>I didn't find anything exactly right on the web, but <a href="http://stackoverflow.com/questions/1954018/php-convert-decimal-into-fraction-and-back/1954324#1954324">symcbean on stackoverflow</a> had a clever idea for evaluating fractions: turn "2 1/2" into "2+1/2" then use <a href="http://php.net/eval"><code>eval</code></a>.</p>
<span id="more-1858"></span>
<p><a href="/blog/blogfiles/units.php">Try the code</a>.</p>
<pre><code class="language-php">function convertCK($usIn){
	// convert input numbers with optional units (pounds, inches etc.) to centimeters and kilograms
	$factors = array(
		'f' =&gt; 30.48, // feet
		"'" =&gt; 30.48,
		'i' =&gt; 2.54, // inches
		'"' =&gt; 2.54,
		'p' =&gt; 0.45359237, // pounds
		'l' =&gt; 0.45359237, // lb
		'#' =&gt; 0.45359237,
		'o' =&gt; 0.0283495231, // ounces
		'g' =&gt; 0.001 // grams
	);
	$usIn = trim($usIn);
	// turn spaces in mixed numbers to pluses, for the eval hack
	$usIn = preg_replace ('%(\d)\s+(\d)%', '$1+$2', $usIn);
	preg_match_all('%(?&lt;num&gt;[0-9./+]+)\s*(?&lt;unit&gt;\D*)%', $usIn, $values, PREG_SET_ORDER);
	$ret = 0;
	foreach ($values as $value){
		$unit = strtolower($value['unit']{0});
		$factor = isset($factors[$unit]) ? $factors[$unit] : 1;
		$ret += $factor*eval("return $value[num];");
	}
	return $ret;
}</code></pre>
<p>The code above is simplified by the fact that all the units I care about have unique first letters, but if you wanted more units you could simply add more entries in the <code>factors</code> array and make the <code class="language-php">$unit = strtolower($value['unit']{0});</code> line more sophisticated. <code>usIn</code> is used as a variable name to remind me that it is unsafe&mdash;it may come from user input and has to be sanitized with the regexp before it can be trusted.</p>
<p>It allows the American notation for tic marks for feet and inches, since getting that wrong <a href="http://www.youtube.com/watch?v=Xlf5ucFanpY">can be disastrous</a>.</p>]]></content:encoded>
			<wfw:commentRss>http://bililite.nfshost.com/blog/2011/08/11/fractions-and-units-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Predictably Unhelpful</title>
		<link>http://bililite.nfshost.com/blog/2011/01/05/predictably-unhelpful/</link>
		<comments>http://bililite.nfshost.com/blog/2011/01/05/predictably-unhelpful/#comments</comments>
		<pubDate>Wed, 05 Jan 2011 18:28:06 +0000</pubDate>
		<dc:creator>Danny</dc:creator>
				<category><![CDATA[Medical Informatics]]></category>

		<guid isPermaLink="false">http://bililite.nfshost.com/blog/?p=1449</guid>
		<description><![CDATA[A depressing but absolutely correct editorial from Dimitri Christakis of the University of Washington in this month's Archives of Pediatrics and Adolescent Medicine (behind a pay wall, unfortunately, but the full reference is there). [H]undreds of decision tools in a variety of forms—guidelines, practice parameters, prediction rules—have been generated. Some have been good, some bad; [...]]]></description>
			<content:encoded><![CDATA[A depressing but absolutely correct <a href="http://archpedi.ama-assn.org/cgi/content/short/165/1/90">editorial</a> from Dimitri Christakis of the University of Washington in this month's <i>Archives of Pediatrics and Adolescent Medicine</i> (behind a pay wall, unfortunately, but the full reference is there).</p>


<blockquote>[H]undreds of decision tools in a variety of forms—guidelines, practice parameters, prediction rules—have been generated. Some have been good, some bad; some have been validated, others not. But what they all have in common is that their overall use remains poor at best. In the meantime, those of us in academia continue to create them and those of us on editorial boards continue to vet them for methodological rigor. <strong>The cottage industry of decision tools has at least the appearance of an academic jobs program since, to clinicians in the real world, their utilities remain largely unproven</strong> [emphasis added]. For example, there are no fewer than 10 clinical prediction rules for something as common as streptococcal pharyngitis, and I would be surprised if most clinicians even use one.</blockquote>

<p>The big problem is the difference between significance and importance. <a href="http://en.wikipedia.org/wiki/Statistical_significanc">Significance</a> in statistical jargon is an estimate of how likely the results are to be true (see <a href="http://www.cmaj.ca/cgi/content/full/165/9/1226">David Sackett's article on randomized controlled trials</a>) but it says nothing about whether the results mean anything to me in real life. A test that tells me a patient has a 50% chance of having strep throat, when before I would have guessed at 20%, may have a <code><i>p</i> = 0.0001</code> (the test is consistently better than chance!). But who cares? For actual clinical practice, things that affect my decision-making need to be orders of magnitude apart, not a few percent. Similarly, a new fever-reducing medicine may have reduced the temperature by 0.1 degree with a really high <a href="http://en.wikipedia.org/wiki/Pearson%27s_chi-square_test">?<sup>2</sup></a>, but isn't going to make me prescribe it.<p>
<p>But real life is rarely so cooperative as to give you high <a href="http://en.wikipedia.org/wiki/Odds_ratio">odds ratios</a>, so guidelines based on actual data tend to be less than useful, and guidelines with advice that can actually be implemented tend to be based on "expert opinion," which is a polite way of saying "faith." ("<a href="http://www.bmj.com/content/319/7225/1618.full">Experience is the ability to make the same mistakes with greater and greater confidence</a>").</p>
<p>So what do we do? The academics would have us analyze every article ever published and determine our own statistics, but that's impossible. All we can do is read the reviews and <a href="http://jama.ama-assn.org/content/282/15/1458.abstract">guidelines</a> and make sure we know which conclusions are solid, and treat them with respect, and which are strongly-held opinions by experts in the field, and listen politely and decide if we think we know enough to overrule them. If the guideline won't tell you the difference, throw it out.</p>
<p>There's still some room out there for the art of medicine.</p>
<p>Update: A perfect example in this month's Pediatrics (<a href="http://pediatrics.aappublications.org/cgi/content/abstract/127/1/119">Taisan and Copp (2011) Pediatrics 127:119-128</a>). A review of ultrasound to look for undescended testes showed that it would change the probability of an intra-abdominal testis (requiring surgery) from 49% to 64%. It doesn't matter how significant that difference is, it isn't clinically important and therefore the ultrasound is not indicated.</p>
]]></content:encoded>
			<wfw:commentRss>http://bililite.nfshost.com/blog/2011/01/05/predictably-unhelpful/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Better Asthma Care through Technology</title>
		<link>http://bililite.nfshost.com/blog/2011/01/02/better-asthma-care-through-technology/</link>
		<comments>http://bililite.nfshost.com/blog/2011/01/02/better-asthma-care-through-technology/#comments</comments>
		<pubDate>Mon, 03 Jan 2011 03:26:04 +0000</pubDate>
		<dc:creator>Danny</dc:creator>
				<category><![CDATA[Medical Informatics]]></category>
		<category><![CDATA[Microsoft Office]]></category>

		<guid isPermaLink="false">http://bililite.nfshost.com/blog/?p=1304</guid>
		<description><![CDATA[Part of the drudgery of medicine is all the certification and paperwork, and the petty bureaucrats who need to constantly justify their existence by creating new rules. All the rules are well-intentioned, but taken together pave the road to hell&#8212;keeping us away from our patients and actually helping people. One such well-paved path is the [...]]]></description>
			<content:encoded><![CDATA[<p>Part of the drudgery of medicine is all the certification and paperwork, and the petty bureaucrats who need to constantly justify their existence by creating new rules. All the rules are well-intentioned, but taken together pave the road to hell&mdash;keeping us away from our patients and actually helping people. One such well-paved path is the <a href="http://www.abp.org">American Board of Pediatrics</a> which, over the past 20 years, turned board certification from "Take a test" to "Take a test at home every 7 years" to "Take a closed-book test in a secure environment because we can't trust you, every 7 years" to "Take a secured test every 7 years, keep your medical license (even losing it for not paying taxes means you lose your certification), do Board-approved CME, get patient-satisfaction surveys, and do Board-approved quality improvement projects, every 5 years." There's no reason to believe any of this makes me a better doctor but without it, what's the Board for? But enough griping, I may write about this more later.</p>
<p>One of the first things I tried to do when I started at the <a href="http://www.stlukes-stl.com/services/pediatric_care/">St. Lukes Pediatric Care Center</a> this fall was improve our asthma management and follow up, so my Quality Improvement project will be the Board's <a href="http://pim.abp.org/asthma/global/demo.php">Asthma Practice Improvement Module</a>. It's no different from what I'm doing anyway, with the added fun of filling out data forms online for the Board to adjudicate.</p>
<h3>Asthma Management</h3>
<p>Asthma is a <a href="http://www.cdc.gov/nchs/data/hestat/asthma/asthma.htm">growing problem in the US</a>, and the NIH has produced a huge (4 MB) <a href="http://www.nhlbi.nih.gov/guidelines/asthma/asthgdln.htm">report</a> on managing it, with lots of its own jargon. Basically it's a chronic disease that comes in attacks, which can either be <em>in control</em>&mdash;only occasional symptoms&mdash;or <em>not in control</em>&mdash;frequent symptoms. Either way, attacks are treated with <em>rescue medicines</em>, usually an inhaler that relaxes the muscles in the lungs. If your asthma is in control without any other medicines, then you have <em>intermittent</em> asthma. If not, you have <em>persistent</em> asthma and need <em>control medicines</em> to take every day to prevent attacks. The report further divides persistent asthma into grades of severity, but <a href="http://www.ncbi.nlm.nih.gov/pubmed/14665495">judging severity</a> <a href="http://www.ncbi.nlm.nih.gov/pubmed/17994399">is inconsistent</a> and largely irrelevant: if your control medicines keep you in control, good; if not, do something more.</p>
<span id="more-1304"></span>
<p>Classifying control is a long-term measure, 3 to 6 months. Every patient needs to know what to do for an attack, which means having an <a href="http://www.cdc.gov/asthma/actionplan.html">Asthma Action Plan</a>. Your condition is classified as <em>green zone</em>&mdash;no symptoms&mdash;<em>yellow zone</em>&mdash;some symptoms but you can manage them at home&mdash;or <em>red zone</em>&mdash;see a doctor or get to the emergency room. You can often judge how bad your asthma is doing by how you feel; chest tightness, wheezing and coughing are all symptoms of asthma, but the best measure is how obstructed your breathing is. Measuring that uses a <a href="http://www.aaaai.org/patients/publicedmat/tips/whatispeakflowmeter.stm">peak flow meter</a>, a device that measures how fast you can exhale and <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&#038;location=http%3A%2F%2Fwww.amazon.com%2Fs%3Fie%3DUTF8%26x%3D0%26ref_%3Dnb_sb_noss%26tag%3Dbililite20-com%26y%3D0%26field-keywords%3Dpeak%2520flow%2520meter%26url%3Dsearch-alias%253Dhpc&#038;tag=bililitecom-20&#038;linkCode=ur2&#038;camp=1789&#038;creative=390957">costs $10-$20</a><img src="https://www.assoc-amazon.com/e/ir?t=bililitecom-20&#038;l=ur2&#038;o=1" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />. Ideal peak flow <a href="http://www.ncbi.nlm.nih.gov/pubmed/479997">is dependent on lung size and height</a>.</p>
<h3>The Plan</h3>
<p>If I'm going to implement any quality improvement program, I need to document what I'm planning on doing, and have some way to measure results, so this blog post is going to be a long one. If you are reading this for the medical management side, <a href="#management">feel free to skip the programming mumbo-jumbo</a>.</p>
<h3>Enter the Programmer</h3>
<p>All this cries out for some automation, so I created an <a href="/blog/blogfiles/Asthma%20Action%20Plan-SLPCC.dot">Asthma Action Plan</a> and a set of Visual Basic routines to keep track of all this:</p>
<p><a href="/blog/blogfiles/Asthma%20Action%20Plan-SLPCC.dot"><img src="/blog/blogfiles/AAP.PNG" alt="Asthma Action Plan" /></a></p>
<p>The file is a template (.dot) file, so each time it opens a new document is created. This makes VBA a bit more complicated, since variables are associated with the template (<code>ThisDocument</code>) and the actual text is in <code>ActiveDocument</code>.</p>
<p>The office still runs on Microsoft Office 2000, so I'm not sure how it will work with a modern version. It creates a custom toolbar to fill in the data:</p>
<p><img src="/blog/blogfiles/aapbar.PNG" alt="Asthma Action Plan Toolbar" /></p>
<h3>Macros and Custom Document Properties</h3>
<p>The key to the interaction between VBA macros and the document is custom document properties in both the <a href="http://office.microsoft.com/en-us/word-help/field-codes-docproperty-field-HP005186145.aspx">document</a> and the <a href="http://msdn.microsoft.com/en-us/library/dhxe2d75%28v=VS.100%29.aspx">script</a>. For instance, one cute aspect of the document is that you can change the gender of the instructions, "his" or "hers" rather than "your child's" or "his/hers" or some such. The sex is set with code like:</p>
<pre><code class="language-vb">
Public bar As CommandBar
Public boxSex As CommandBarComboBox

Sub initialize()
    addProperty "Sex", msoPropertyTypeString, "Male"
    CustomizationContext = ActiveDocument
    Set bar = CommandBars.Add("CustomBar", msoBarTop, False, True)
    Set ThisDocument.boxSex = bar.Controls.Add(msoControlDropdown)
    With ThisDocument.boxSex
        .Width = 90 ' found by trial and error. VB needs a function that calculates this!
        .Caption = "Sex: "
        .Style = msoComboLabel
        .BeginGroup = True
        .AddItem "Male"
        .AddItem "Female"
        .ListIndex = 1
        .TooltipText = "Choose the patient's sex"
        .OnAction = "setSex"
    End With
    bar.Visible = True
End Sub

Function addProperty(theName As String, theType As MsoDocProperties, theValue As Variant) As DocumentProperty
    ' DocumentProperties has no Exists method, so we have to do it by hand
    For Each addProperty In ActiveDocument.CustomDocumentProperties
        If addProperty.Name = theName Then
            addProperty.Value = theValue
            Exit Function
        End If
    Next addProperty
    Set addProperty = ActiveDocument.CustomDocumentProperties.Add(theName, False, theType, theValue)
End Function

Sub setSex()
    ActiveDocument.CustomDocumentProperties("Sex").Value = ThisDocument.boxSex.Text
    updateFields ' reflect changes into the text
End Sub

Sub updateFields()
    Dim r As Range
    For Each r In ActiveDocument.StoryRanges
        r.Fields.Update
        Do Until r.NextStoryRange Is Nothing
            Set r = r.NextStoryRange
            r.Fields.Update
        Loop
    Next r
End Sub
</code></pre>
<p>And in the document itself: (note that the <strong>{}</strong> brackets are <em>not</em> typed brackets; they are inserted with control-F9):</p>
<pre><code>Your child should check <strong>{</strong>If <strong>{</strong>DocProperty sex<strong>}</strong> = Female her his<strong>}</strong> peak flow twice a day
</code></pre>
<p>Fill-in-the blanks that are selected with a single click so they can be over-written are created with a clever hack from Microsoft's own fax templates. The <a href="http://office.microsoft.com/en-us/word-help/field-codes-macrobutton-field-HP005186171.aspx"><code>MacroButton</code> field</a> displays its second parameter as un-editable text, and using a non-existent macro name means nothing happens when its clicked except selecting it:</p>
<pre><code>Use rescue medicine: <strong>{</strong>MacroButton NoMacro ______________________<strong>}</strong></code></pre>
<h3>Calculating Ideal Peak Flow</h3>
<p>The <a href="/webservices/pf">peak flow zones</a> are green: &gt;80% maximum; yellow: 50-80% maximum; red: &lt;50% maximum, where the maximum peak flow is ideally the patient's own peak flow when completely healthy, but <a href="http://www.ncbi.nlm.nih.gov/pubmed/479997">it can be estimated from patient height</a>:</p>
<pre><code class="language-vb">Function sngLookupPredictedPeakFlow(sngHeight As Single) As Single
' based on the regression formulas for African-American children and adolescents (based on the St. Luke's predominant ethnic mix)
' from Hsu et al. (1979)J Peds 95:14
    Select Case ActiveDocument.CustomDocumentProperties("Sex").Value
        Case "Male", "male", "M", "m"
            sngLookupPredictedPeakFlow = 0.000174 * sngHeight ^ 2.92
        Case "Female", "female", "F", "f"
            sngLookupPredictedPeakFlow = 0.000551 * sngHeight ^ 2.68
    End Select
End Function
</code></pre>
<p>Parameters for other ethnicities are available from the <a href="/webservices/pf.csv">bililite webservices</a>.</p>
<h3>Scheduling followup: Adding Appointments to Outlook</h3>
<p>The key to managing a chronic illness is followup: seeing what happens with each intervention and deciding if it was enough, too little or too much. If I've made any changes, I like to see the patient back in one month, and if everything is stable, every six months. I add a reminder to my Outlook calendar to send a letter:</p>
<pre><code class="language-vb">Public boxPt As CommandBarComboBox
Public btnAppt As CommandBarButton
Public boxMonths As CommandBarComboBox
Sub initialize()
 ...Rest of routine
    Set ThisDocument.btnAppt = bar.Controls.Add(msoControlButton)
    With ThisDocument.btnAppt
        .Caption = "Follow up appointment"
        .FaceId = 1106 ' Calendar
        .BeginGroup = True
        .OnAction = "doFollowup"
    End With
    bar.Visible = True
    
    Set ThisDocument.boxMonths = bar.Controls.Add(msoControlDropdown)
    With ThisDocument.boxMonths
        .Width = 80 ' found by trial and error. VB needs a function that calculates this!
        .Caption = "Months: "
        .Style = msoComboLabel
    End With
    Dim i As Integer
    For i = 1 To 12
        ThisDocument.boxMonths.AddItem i
    Next i
    ThisDocument.boxMonths.ListIndex = 1
...Rest of routine
End Sub

Sub doFollowup()
    Dim outlook
    Set outlook = CreateObject("Outlook.Application")
    Dim appt
    Set appt = outlook.CreateItem(1) ' new appointment
    ' My scheduling program tends to create all-capitalized names, LAST,FIRST, with no space after the comma
    ' the Replace and StrConv makes it better. Ideally I'd correct it to FIRST LAST, but this works
    appt.Subject = StrConv(Replace(ThisDocument.boxPt.Text, ",", ", "), vbProperCase) 
    appt.Start = FormatDateTime(Date + ThisDocument.boxMonths.ListIndex * 30, vbShortDate) &#038; " 9:00 AM" ' so many months from now
    appt.Duration = 1
    appt.Body = "Asthma management follow up"
    appt.AllDayEvent = True
    appt.ReminderSet = True
    appt.ReminderMinutesBeforeStart = 7 * 24 * 60 ' one week in minutes
    appt.Save
End Sub
</code></pre>
<h3 id="management">Data Collection</h3>
<p>(If you're just reading for the programming side, stop now. The rest is all medical)</p>
<p>The plan is to collect data on management (medications and guidance) on every patient with a diagnosis of asthma, and to diagnose asthma in anyone over the age of 4 with a history of 4 or more episodes of respiratory symptoms responsive to bronchodilators since the age of 1 (without any other diagnosis). The data collection form is a hybrid of the data that the Board wants and the things I think are important. It is designed to be a part of the patient's chart, and <a href="https://www.abp.org/abpwebsite/moc/performanceinpractice/approvedq1projects/asthmafaq.pdf">according to the Board</a> does not need informed consent or Institutional Review Board approval since it is part of routine patient care and none of the data is identified when entered.</p>
<p><a href="/blog/blogfiles/Asthma%20Management.pdf"><img src="/blog/blogfiles/asthma%20management.PNG" alt="Asthma Management Form" /></a></p>
<p>The data form is mostly information requested by the Board program; from my point of view I want to know what medicines (rescue and control) the patient is on, and how good their asthma control is. Most of my patients have never heard these terms before and can't remember their meds, so a lot of education happens here. If the patient is out of control, then we move up a step in control meds. If the patient has been in control for at least six months and the parent is comfortable with stepping back, we go down a step. If we've made any changes in medications, I want to see the patient back in 1 month. Otherwise, I'll see them back in six months.</p>
<p>Everyone gets their asthma action plan reviewed, and a demonstration of using inhalers and spacers correctly. Patients with persistent asthma who have had an asthma action plan for at least a year are introduced to the peak flow meter (I think there's too much other information to assimilate on the first visits).</p>
<p>The steps for control medicines are (see <a href="http://www.nhlbi.nih.gov/guidelines/asthma/asthgdln.htm">the report</a> for details on medications and doses):</p>
<ol>
<li>No control medications</li>
<li>Low-dose inhaled corticosteroid</li>
<li>Medium-dose inhaled corticosteroid (may have to change this based on <a href="http://pediatrics.aappublications.org/cgi/content/abstract/127/1/129">Zhang et al (2011) Pediatrics 127:129-138</a>)</li>
<li>Medium-dose inhaled corticosteroid plus oral leukotriene inhibitor</li>
<li>Medium-dose inhaled corticosteroid with long-acting bronchodilator plus oral leukotriene inhibitor</li>
<li>High-dose inhaled corticosteroid with long-acting bronchodilator plus oral leukotriene inhibitor and refer to pulmonologist</li>
</ol>
<p>For the purpose of the quality improvement program, I'll collect the data in 3 successive 6-month series, with the hypothesis that average control will improve as these changes are implemented.</p>
<p>I think this represents a do-able program that should not take much more time than I would otherwise be using for asthma education, and certainly billing and getting paid will be easier with adequate documentation.<p>
<h3>Future directions</h3>
<p>Things I'd still like to be able to do:</p>
<ul>
<li>Track flu vaccine status and issue reminders. Perhaps our upcoming EMR will help.</li>
<li>Do better with peak flow monitoring and even real spirometery (we have a spirometer in the closet that no one is using right now).</li>
<li>Get the whole practice on board so the patients have good follow up even if they're seeing different doctors.</li>
</ul>
<p>But for now, this seems like enough.</li>]]></content:encoded>
			<wfw:commentRss>http://bililite.nfshost.com/blog/2011/01/02/better-asthma-care-through-technology/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apple Rocks!</title>
		<link>http://bililite.nfshost.com/blog/2010/12/08/apple-rocks/</link>
		<comments>http://bililite.nfshost.com/blog/2010/12/08/apple-rocks/#comments</comments>
		<pubDate>Wed, 08 Dec 2010 23:38:37 +0000</pubDate>
		<dc:creator>Danny</dc:creator>
				<category><![CDATA[Medical Informatics]]></category>

		<guid isPermaLink="false">http://bililite.nfshost.com/blog/?p=1241</guid>
		<description><![CDATA[My ever-unreliable AT&#038;T 8525 finally had a permanent white screen of death and, rather than be a slave to AT&#038;T forever, decided to get a separate PDA and phone. I bought an iPod Touch and it is a world of difference. Sync'ing it to Microsoft Outlook was automatic (which never quite worked right with Microsoft [...]]]></description>
			<content:encoded><![CDATA[<p>My ever-unreliable <a href="http://en.wikipedia.org/wiki/HTC_TyTN">AT&#038;T 8525</a> finally had a permanent <a href="http://forum.xda-developers.com/showthread.php?t=335966">white screen of death</a> and, rather than be a slave to AT&#038;T forever, decided to get a separate PDA and phone. I bought an <a href="http://www.apple.com/ipodtouch/">iPod Touch</a> and it is a world of difference. Sync'ing it to Microsoft Outlook was automatic (which never quite worked right with Microsoft Windows Mobile!), the software is smooth and slick (everyone knows that), and it even gets daylight saving time right! <a href="http://epocrates.com">ePocrates </a> works, and there's lots of medical software out there. The only thing missing is <a href="http://kidometer.com/Home.html">Riley Kidometer</a>, which I was running under a Palm emulator. It gives age-specific parameters for things like height and weight and a ton of other pediatric-relevant information. I'm getting around it with growth charts from <a href="http://statcoder.com/">statcoder</a>. The only other things I need from that program are peak flows, which I am serving with the <a href="/webservices/pf">bililite webservices</a>, and the EKG parameters. I'll have to look those up and add them to the webservices.</p>
<p>And having an MP3 player is cool, too.</p>
<p>The best part has been Apple customer service. 2 weeks after I bought the thing, I dropped my iPod on the workshop floor. The glass shattered (I know, I should use a case and not keep it in my shirt pocket when leaning over. ??????? ???? ??? ?? ????? ???? ???? ?? ????? ??? ????? ?????&mdash;<em>Experience is the best teacher but the tuition is astronomical</em>). Made an appointment at the Apple Store, got the lecture that dropping the iPod is not covered by the warranty, and the Apple rep <em>gave me a new iPod anyway</em>. Unbelievable! They definitely have a customer for life now.</p>
<p>And restoring from backup should have been a no-brainer, but the new iPod had out-of-date system software. After plugging the new iPod in, I was offered the choice of restoring from backup. But when I selected it, I got an error message that the iPod software had to be updated first, which meant setting it up as a new iPod (one click), naming it (a few keystrokes), updating (one click), "restoring to factory settings" (one click to let the iPod know I would want to restore from backup), then restore from backup (one more click). Everything, even the placement of the app icons and the web pages I was looking at, was restored. Annoying, but not difficult.</p>]]></content:encoded>
			<wfw:commentRss>http://bililite.nfshost.com/blog/2010/12/08/apple-rocks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Brilliant Online PDF Editor</title>
		<link>http://bililite.nfshost.com/blog/2010/11/17/brilliant-online-pdf-editor/</link>
		<comments>http://bililite.nfshost.com/blog/2010/11/17/brilliant-online-pdf-editor/#comments</comments>
		<pubDate>Wed, 17 Nov 2010 21:37:42 +0000</pubDate>
		<dc:creator>Danny</dc:creator>
				<category><![CDATA[Medical Informatics]]></category>

		<guid isPermaLink="false">http://bililite.nfshost.com/blog/?p=1223</guid>
		<description><![CDATA[The bane of modern medicine is the paperwork, especially for a practice like mine that is largely Medicaid. If there's anything the government loves, it's paperwork. Fortunately, most of it is available electronically. Unfortunately, most of that is in PDF form, uneditable and closed. Sometimes the bureaucrats have thought to make it a fill-in form, [...]]]></description>
			<content:encoded><![CDATA[<p>The bane of modern medicine is the paperwork, especially for a practice like mine that is largely Medicaid. If there's anything the government loves, it's paperwork. Fortunately, most of it is available electronically. Unfortunately, most of that is in PDF form, uneditable and closed. Sometimes the bureaucrats have thought to make it a fill-in form, but usually it needs to be printed and filled by hand. With my handwriting, that's a recipe for illegible disaster.</p>
<p>Comes a new website to save the day: <a href="http://www.pdfescape.com/">PDFescape</a>. It's free (Google ad-supported), all javascript-based (no Flash!), and lets you upload a PDF locally or from the web, then add text or form controls wherever you want, then save it locally. Poof, instant fill-in form! It's smooth, easy-to-use and does exactly what it claims to do. All programs/webservices should  work that well.</p>]]></content:encoded>
			<wfw:commentRss>http://bililite.nfshost.com/blog/2010/11/17/brilliant-online-pdf-editor/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WHO you calling fat?</title>
		<link>http://bililite.nfshost.com/blog/2010/10/31/who-you-calling-fat/</link>
		<comments>http://bililite.nfshost.com/blog/2010/10/31/who-you-calling-fat/#comments</comments>
		<pubDate>Sun, 31 Oct 2010 19:46:32 +0000</pubDate>
		<dc:creator>Danny</dc:creator>
				<category><![CDATA[Medical Informatics]]></category>

		<guid isPermaLink="false">http://bililite.nfshost.com/blog/?p=1224</guid>
		<description><![CDATA[The Centers for Disease Control and the American Academy of Pediatrics just recommended that pediatricians stop using the old growth charts, based on 40 years of NHANES data, and switch to new charts from the World Health Organization, for children less than 2. The NHANES study is a survey of child health from the United [...]]]></description>
			<content:encoded><![CDATA[<p>The Centers for Disease Control and the American Academy of Pediatrics just recommended that pediatricians stop using the <a href="http://www.cdc.gov/growthcharts/charts.htm">old growth charts</a>, based on 40 years of <a href="http://www.cdc.gov/nchs/nhanes.htm">NHANES</a> data, and switch to <a href="http://www.cdc.gov/growthcharts/who_charts.htm">new charts</a> from the World Health Organization, for children less than 2. The NHANES study is a survey of child health from the United States, and the original charts based on that data was <em>descriptive</em>: the charts showed what the distribution of heights and weights was for American children. That was used by pediatricians to define "normal," to say whether you were overweight or underweight. With the 2000 charts, they decided that kids were too heavy and that we couldn't call that "normal" anymore. So they effectively threw out all the recent weight data, and made the charts based on the 1970 distribution of weight (see page 16 of the <a href="http://www.cdc.gov/nchs/data/series/sr_11/sr11_246.pdf">original paper</a>) and made the charts partly <em>prescriptive</em> (telling us what they thought the distribution of <em>weight</em> should be) and partly <em>descriptive</em>.</p>
<p>Now they've gone all the way: the WHO explicitly followed an international group of babies who were "<a href="http://www.who.int/childgrowth/1_what.pdf">were raised in environments that promote healthy growth</a>", including exclusively breastfeeding to 4 months and continuing breastfeeding to 12 months, no smoking, and rich enough to be able to eat well.</p>
<p>I updated the <a href="/webservices">bililite webservices charts</a> to reflect the new charts, but I'm of two minds about the change. As a pediatrician following a kid's weight, I really do want to compare it to "healthy" rather than "common," so the change is for the better. On the other hand, it enshrines assumptions about what "healthy" means without good evidence that children who fall in the prescribed ranges actually live longer, healthier lives. We will get more recommendations for further restricting our children's lives in order to force them onto these graphs.</p>
<p>As these charts get more use, look for more press about increasing obesity, as we redefine the percentile lines downward, pushing more kids over the "overweight" 85<sup>th</sup> percentile. It's like the <a href="http://en.wikipedia.org/wiki/Alternative_minimum_tax">AMT</a> of biostatistics!</p>]]></content:encoded>
			<wfw:commentRss>http://bililite.nfshost.com/blog/2010/10/31/who-you-calling-fat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A real pain scale</title>
		<link>http://bililite.nfshost.com/blog/2010/03/25/a-real-pain-scale/</link>
		<comments>http://bililite.nfshost.com/blog/2010/03/25/a-real-pain-scale/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 20:48:55 +0000</pubDate>
		<dc:creator>Danny</dc:creator>
				<category><![CDATA[Medical Informatics]]></category>

		<guid isPermaLink="false">http://bililite.nfshost.com/blog/?p=1184</guid>
		<description><![CDATA[I usually don't blog about medical stuff here, but Allie Brosh's comments about the Wong-Baker pain scale are perfectly on-target. The Joint Commission accredits health care organizations and comes up with intrusive, well-intended but largely pointless standards that the rest of us have to uphold. A sort of "unfounded mandate." One of these is the [...]]]></description>
			<content:encoded><![CDATA[<p>I usually don't blog about medical stuff here, but <a href="http://hyperboleandahalf.blogspot.com/">Allie Brosh</a>'s <a href="http://hyperboleandahalf.blogspot.com/2010/02/boyfriend-doesnt-have-ebola-probably.html">comments</a> about the <a href="http://www.sjbhealth.org/documents/Pain%20Scale.pdf">Wong-Baker pain scale</a> <a href="http://hyperboleandahalf.blogspot.com/2010/02/boyfriend-doesnt-have-ebola-probably.html">are perfectly on-target</a>. The <a href="http://www.jointcommission.org/">Joint Commission</a> accredits health care organizations and comes up with intrusive, well-intended but largely pointless standards that the rest of us have to uphold. A sort of "unfounded mandate." One of these is the requirement that we document pain levels in every patient on a scale of one to ten. For pediatric patients, we have this "FACES" scale that starts from a big smile and doesn't even get to a frown until number six. I like Allie's much better.</p>
<p>And her comment about not eating red food when you're sick is absolutely right. Never give your kid red popsicles when they've got a stomach bug; you'll just rush into the ER worried that they're throwing up blood.</p>]]></content:encoded>
			<wfw:commentRss>http://bililite.nfshost.com/blog/2010/03/25/a-real-pain-scale/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Engauge Digitizer Tutorial</title>
		<link>http://bililite.nfshost.com/blog/2010/01/14/engauge-digitizer-tutorial/</link>
		<comments>http://bililite.nfshost.com/blog/2010/01/14/engauge-digitizer-tutorial/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 21:58:49 +0000</pubDate>
		<dc:creator>Danny</dc:creator>
				<category><![CDATA[Medical Informatics]]></category>

		<guid isPermaLink="false">http://bililite.nfshost.com/blog/?p=1152</guid>
		<description><![CDATA[A simple walkthrough to use the Engauge Digitizer to pull values off a "printed" graph There's a far more complete manual that comes with the download, but these are the steps I used to generate the data for the webservices graphs. It assumes you've got a black and white image of the graph, with continuous [...]]]></description>
			<content:encoded><![CDATA[<h3>A simple walkthrough to use the <a href="http://digitizer.sourceforge.net/">Engauge Digitizer</a> to pull values off a "printed" graph</h3>
<p>There's a far more complete manual that comes with the download, but these are the steps I used to generate the data for the
<a href="/webservices">webservices</a> graphs. It assumes you've got a black and white image of the graph, with continuous lines for the
data and orthogonal gridlines, and linear axes.</p><span id="more-1152"></span>
<p>We'll use the bilirubin risk levels from the <a href="http://aappolicy.aappublications.org/cgi/content/full/pediatrics;114/1/297">AAP bilirubin guidelines</a>:</p>
<a href="/images/bili.jpg"><img style="display: block; height: 20em" src="/images/bili.jpg" /></a>
<ol>
<li><h4>Open the digitizer</h4>
<p>You can't use <code>Open with...</code> from the context menu because the program expects filenames as part of the options;
you can read the manual to see how to modify the context menu. Click <code>Import</code>
on the toolbar:  <img src="/images/digitizer-import.PNG" alt="Import icon" /> and select your image file:</p>
<a href="/images/graph1.PNG"><img style="display: block; height: 20em" src="/images/graph1.PNG" alt="graph imported"/></a>
<p>Save your work (it's a <code>.dig</code> file) often. You don't need me to remind you.</p>
</li>
<li><h4>Set the axes</h4>
<p>Click <code>Axis Point</code> in the toolbar: <img src="/images/digitizer-axis.PNG" alt="Axis icon" /> and click on the origin
(lower left corner) of the graph and enter the x,y values for the origin in the units of the graph (not pixels!). Usually that's (0,0)
but can be anything. Click on the maximum of the y-axis (upper left corner), then the maximum  of the x-axis (lower right corner).</p>
<li><h4>Remove the grid</h4>
<p>Select <code>Grid Removal...</code> from the <code>Settings</code> menu. Select "Remove thin lines parallel to the axes" and play with
the "Minimum line thickness" until the gridlines are gone from the preview on the bottom but the real curves are still there.</p>
<a href="/images/removegrid.PNG"><img style="display: block" src="/images/removegrid.PNG" alt="remove grid window" /></a>
<p>Now the grid is gone and digitizing the curves will be easy:</p>
<a href="/images/gridremoved.PNG"><img style="display: block; height: 20em" src="/images/gridremoved.PNG" alt="graph without grid"/></a>
</li>
<li><h4>Create curves</h4>
<p>Select <code>Curves...</code> from the <code>Settings</code> menu. Create as many curves as you need (we have three). Give them descriptive
names if you like:</p>
<a href="/images/curves.PNG"><img style="display: block;" src="/images/curves.PNG" alt="curve window"/></a>
</li>
<li><h4>Digitize each curve</h4>
<p>Click <code>Segment Fill</code> in the toolbar: <img src="/images/digitizer-segment.PNG" alt="Segment icon" />. For each curve, select it
from the curve menu: <img src="/images/digitizer-curvemenu.PNG" alt="Axis icon" /> and click the points on the graph for that curve until
it is covered with points. There's no undo command. If a wrong point is included, use the <code>Select</code> tool:
<img src="/images/digitizer-select.PNG" alt="Select icon" /> to select the bad points and use the <code>Delete</code> key. To add individual points,
use the <code>Curve Point</code> tool: <img src="/images/digitizer-point.PNG" alt="Curve Point icon" />. In a few clicks, you have the fully
digitized graph:</p>
<a href="/images/curvesdigitized.PNG"><img style="display: block;height: 20em;" src="/images/curvesdigitized.PNG" alt="curve window"/></a>
</li>
<li><h4>Set up the export</h4>
<p>If you exported the data now, you'd have lots of points; probably far more than is justified from the original graph. Decide which x-axis
values should be exported (the program will interpolate appropriately if the digitized points don't land exactly). Select
<code>Grid Display...</code> from the <code>Settings</code> menu:</p>
<a href="/images/gridmesh.PNG"><img style="display: block;" src="/images/gridmesh.PNG" alt="grid window"/></a>
<p>The values to be specified are related by <code>count = (stop - start)/step</code> so you only need to specify three; select the one you
<em>don't</em> want to specify from the <code>Disable</code> dropdown menu. Make sure that the start and stop values are actually in the curve;
the program will happily extrapolate off the curve but it's probably not scientifically legitimate. Ignore the y axis grid lines.</p>
<p>Select <code>Export Setup...</code> from the <code>Settings</code> menu. In the <code>Points Selection</code> section, select
<code>Intepolate Y's at gridline X's</code>.</p>
<a href="/images/exportsettings.PNG"><img style="display: block;" src="/images/exportsettings.PNG" alt="grid window"/></a>
</li>
<li><h4>Export</h4>
<p>Click the <code>Export</code> icon in the toolbar: <img src="/images/digitizer-export.PNG" alt="Export icon" />. Pick a name and you now have a
<a href="http://en.wikipedia.org/wiki/Comma-separated_values">CSV</a> file with your data. Simple, no?</p>
</li>
</ol>]]></content:encoded>
			<wfw:commentRss>http://bililite.nfshost.com/blog/2010/01/14/engauge-digitizer-tutorial/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Digitizing graphs</title>
		<link>http://bililite.nfshost.com/blog/2010/01/10/digitizing-graphs/</link>
		<comments>http://bililite.nfshost.com/blog/2010/01/10/digitizing-graphs/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 02:55:04 +0000</pubDate>
		<dc:creator>Danny</dc:creator>
				<category><![CDATA[Medical Informatics]]></category>

		<guid isPermaLink="false">http://bililite.nfshost.com/blog/?p=1138</guid>
		<description><![CDATA[I wanted to add Down Syndrome growth charts to the bililite.com webservices, but as far as I can tell, the charts are available only as images in the AAP's guidelines (and the original paper; subscription only). The often-cited growthcharts.com has charts, and Greg Richards was generous enough to share his data with me. However, some [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to add <a href="http://en.wikipedia.org/wiki/Down_syndrome">Down Syndrome</a> growth charts to the <a href="/webservices/">bililite.com webservices</a>, but as far as I can tell, the charts are available only as images in the <a href="http://aappolicy.aappublications.org/cgi/content/full/pediatrics;107/2/442"><abbr title="American Academy of Pediatrics">AAP</abbr>'s guidelines</a> (and the <a href="http://pediatrics.aappublications.org/cgi/reprint/81/1/102">original paper</a>; subscription only). The often-cited <a href="http://growthcharts.com/charts/DS/charts.htm">growthcharts.com</a> has charts, and Greg Richards was generous enough to share his data with me. However, some of the data are from a different study, and he got his data from the original charts the old-fashioned way: with pencil, ruler, and a blown-up copy of the paper. Nothing wrong with that; that's how I got my numbers for the <a href="/webservices/bili">bilirubin chart</a>, but I wanted all my charts to match the AAP's.</p>
<p>So how to get the numbers off the graph? I emailed the lead author of the original paper, but haven't gotten any answer. I can pull the graphs as gif's from the PDF of the paper (thanks to <a href="http://www.openoffice.org/">OpenOffice.org</a> and <a href="http://extensions.services.openoffice.org/project/pdfimport">Sun's PDF importer</a>; Adobe's reader seems to get more limited with each upgrade). I was afraid I would have to digitize the graph by hand; I read the cool article on <a href="http://sudokugrab.blogspot.com/2009/07/how-does-it-all-work.html">Sudoku recognition</a> and figured I could learn about <a href="http://en.wikipedia.org/wiki/Hough_transform">Hough transforms</a> to get the graph, and <a href="http://en.wikipedia.org/wiki/Discrete_Fourier_transform#Multidimensional_DFT">2-D Fourier transforms</a> to remove the gridlines, then <a href="http://en.wikipedia.org/wiki/Blob_detection">blob detection</a> to find the lines. Turning pixels into measurements would be the trivial last step. Sounds like fun, if I had an infinite amount of free time.</p>
<p>Luckily, I found <a href="http://digitizer.sourceforge.net/">Engauge Digitizer</a>. With almost no time reading the manual, I had it removing gridlines, digitizing the curves on the graph, and exporting values at x-values that I selected into CSV files. It was close to easy. Not quite automated, but with only 4 graphs to digitize, I was done in half an hour. Highly recommended. With my remaining free time, I'll write a quick tutorial so I don't forget what I did.</p>]]></content:encoded>
			<wfw:commentRss>http://bililite.nfshost.com/blog/2010/01/10/digitizing-graphs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>bililite.com webservices</title>
		<link>http://bililite.nfshost.com/blog/2009/12/31/bililite-com-webservices/</link>
		<comments>http://bililite.nfshost.com/blog/2009/12/31/bililite-com-webservices/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 03:51:48 +0000</pubDate>
		<dc:creator>Danny</dc:creator>
				<category><![CDATA[Medical Informatics]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://bililite.nfshost.com/blog/?p=1120</guid>
		<description><![CDATA[I've been spending my project time learning how to manipulate images in PHP to let me create custom growth charts and the like, with a RESTful interface that would allow them to be used as the source of &#60;img&#62; elements. I like the way things turned out; they are available at bililite.com/webservices/. It includes height,weight, [...]]]></description>
			<content:encoded><![CDATA[<p>I've been spending my project time learning how to manipulate images in PHP to let me create custom growth charts and the like, with a <a href="http://en.wikipedia.org/wiki/Representational_State_Transfer">RESTful</a> interface that would allow them to be used as the source of &lt;img&gt; elements. I like the way things turned out; they are available at <a href="/webservices/">bililite.com/webservices/</a>. It includes height,weight, head circumference, peak expiratory flow (for managing asthma), blood pressure and bilirubin levels. While it took a fair amount of trial-and-error to get things to work, I don't think there's much that's innovative enough programming-wise to write a tutorial.</p>
<p>I want to get it to parse the Accept: header, so  users can leave out the file extensions, but it looks like <a href="http://www.newmediacampaigns.com/page/browser-rest-http-accept-headers">browsers don't implement that correctly</a>, so I'll have to keep using extensions as well.</p>
<p>I still need to learn more about caching and effectively using eTags and all the headers that go with it. It always makes my brain hurt.</p>]]></content:encoded>
			<wfw:commentRss>http://bililite.nfshost.com/blog/2009/12/31/bililite-com-webservices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

