Analysis User Interface

The cohort builder is very useful and intuitive for some purposes. But since it's the only tool we have for getting sets of patients, it ends up being used for other purposes as well, and as a result many users don't really like it.

A pretty common case is that of a data officer who wants to quickly select a group of patients, and run a report on that group. They will generally not be doing complicated boolean expressions based on individual subqueries. They want to do something more like "print the consult sheets for Rwinkwavu Group 3".

Here's a mockup of how the UI might look.

This can easily be programmed in a way that makes it completely configurable by a site's administrator:

  • Each check box represents applying a pre-generated saved cohort definition
  • All checked boxes within a fieldset would be OR'd together
  • All fieldsets would be AND'd together.
  • I.e. checking Rwinkwavu, Kirehe, and Male means "(Rwinkwavu OR Kirehe) AND Male".
  • You can imagine configuring this via a spec like this:
Demographics
 Location=Rwinkwavu,Kirehe,Mulindi
 Sex=Female,Male
 Age=[Adult (>15)|Adult],[Child (<15)|Child)],0-5,5-15
HIV Program
 ARV Treatment Group=Group 1,Group 2,Group 3,Group 4,...
 ... 

Where:

  • Demographics, HIV Program, etc are enduser-defined strings and can be anything (just box labels)
  • Location, Sex, Age, ARV Treatment Group are also enduser-defined strings and can be anything (just box labels)
  • Rwinkwavu, Kirehe, Mulindi, Female, Male, Adult, Child, 0-5, 5-15, Group 1, Group 2, Group 3, Group 4 are all names of Cohort objects?

I used Balsamiq for the mockup. Here's how:

<mockup version="1.0" skin="sketch" measuredW="695" measuredH="509">
 <controls>
   <control controlID="15" controlTypeID="com.balsamiq.mockups::FieldSet" x="29" y="84" w="200" h="111" measuredW="200" measuredH="170" zOrder="3" locked="false" isInGroup="-1">
     <controlProperties>
       <text>Location</text>
     </controlProperties>
   </control>
   <control controlID="16" controlTypeID="com.balsamiq.mockups::FieldSet" x="29" y="207" w="200" h="82" measuredW="200" measuredH="170" zOrder="4" locked="false" isInGroup="-1">
     <controlProperties>
       <text>Sex</text>
     </controlProperties>
   </control>
   <control controlID="17" controlTypeID="com.balsamiq.mockups::FieldSet" x="29" y="300" w="200" h="123" measuredW="200" measuredH="170" zOrder="5" locked="false" isInGroup="-1">
     <controlProperties>
       <text>Age</text>
     </controlProperties>
   </control>
   <control controlID="18" controlTypeID="com.balsamiq.mockups::FieldSet" x="340" y="88" w="201" h="111" measuredW="200" measuredH="170" zOrder="6" locked="false" isInGroup="-1">
     <controlProperties>
       <text>ARV%20Treatment%20Group</text>
     </controlProperties>
   </control>
   <control controlID="20" controlTypeID="com.balsamiq.mockups::CheckBox" x="44" y="112" w="89" h="23" measuredW="89" measuredH="18" zOrder="7" locked="false" isInGroup="-1">
     <controlProperties>
       <text>Rwinkwavu</text>
     </controlProperties>
   </control>
   <control controlID="21" controlTypeID="com.balsamiq.mockups::CheckBox" x="44" y="138" w="-1" h="-1" measuredW="65" measuredH="18" zOrder="8" locked="false" isInGroup="-1">
     <controlProperties>
       <text>Kirehe</text>
     </controlProperties>
   </control>
   <control controlID="22" controlTypeID="com.balsamiq.mockups::CheckBox" x="44" y="162" w="-1" h="-1" measuredW="69" measuredH="18" zOrder="9" locked="false" isInGroup="-1">
     <controlProperties>
       <text>Mulindi</text>
     </controlProperties>
   </control>
   <control controlID="24" controlTypeID="com.balsamiq.mockups::CheckBox" x="48" y="233" w="-1" h="-1" measuredW="69" measuredH="18" zOrder="10" locked="false" isInGroup="-1">
     <controlProperties>
       <text>Female</text>
     </controlProperties>
   </control>
   <control controlID="25" controlTypeID="com.balsamiq.mockups::CheckBox" x="46" y="256" w="-1" h="-1" measuredW="55" measuredH="18" zOrder="11" locked="false" isInGroup="-1">
     <controlProperties>
       <text>Male</text>
     </controlProperties>
   </control>
   <control controlID="26" controlTypeID="com.balsamiq.mockups::CheckBox" x="39" y="324" w="-1" h="-1" measuredW="98" measuredH="18" zOrder="12" locked="false" isInGroup="-1">
     <controlProperties>
       <text>Adult%20%28%3E15%29</text>
     </controlProperties>
   </control>
   <control controlID="27" controlTypeID="com.balsamiq.mockups::CheckBox" x="38" y="347" w="-1" h="-1" measuredW="95" measuredH="18" zOrder="13" locked="false" isInGroup="-1">
     <controlProperties>
       <text>Child%20%28%3C15%29</text>
     </controlProperties>
   </control>
   <control controlID="28" controlTypeID="com.balsamiq.mockups::CheckBox" x="38" y="367" w="-1" h="-1" measuredW="49" measuredH="18" zOrder="14" locked="false" isInGroup="-1">
     <controlProperties>
       <text>0-5</text>
     </controlProperties>
   </control>
   <control controlID="29" controlTypeID="com.balsamiq.mockups::CheckBox" x="38" y="390" w="-1" h="-1" measuredW="57" measuredH="18" zOrder="15" locked="false" isInGroup="-1">
     <controlProperties>
       <text>5-15</text>
     </controlProperties>
   </control>
   <control controlID="30" controlTypeID="com.balsamiq.mockups::CheckBox" x="349" y="115" w="75" h="18" measuredW="75" measuredH="18" zOrder="16" locked="false" isInGroup="-1">
     <controlProperties>
       <text>Group%201</text>
     </controlProperties>
   </control>
   <control controlID="31" controlTypeID="com.balsamiq.mockups::CheckBox" x="349" y="141" w="75" h="18" measuredW="75" measuredH="18" zOrder="17" locked="false" isInGroup="-1">
     <controlProperties>
       <text>Group%202</text>
     </controlProperties>
   </control>
   <control controlID="32" controlTypeID="com.balsamiq.mockups::VerticalScrollBar" x="518" y="100" w="-1" h="93" measuredW="16" measuredH="100" zOrder="18" locked="false" isInGroup="-1"/>
   <control controlID="33" controlTypeID="com.balsamiq.mockups::CheckBox" x="348" y="166" w="75" h="18" measuredW="75" measuredH="18" zOrder="19" locked="false" isInGroup="-1">
     <controlProperties>
       <text>Group%203</text>
     </controlProperties>
   </control>
   <control controlID="34" controlTypeID="com.balsamiq.mockups::Title" x="11" y="12" w="-1" h="-1" measuredW="267" measuredH="62" zOrder="20" locked="false" isInGroup="-1">
     <controlProperties>
       <text>Demographics</text>
     </controlProperties>
   </control>
   <control controlID="37" controlTypeID="com.balsamiq.mockups::Title" x="326" y="12" w="-1" h="-1" measuredW="257" measuredH="62" zOrder="21" locked="false" isInGroup="-1">
     <controlProperties>
       <text>HIV%20Program</text>
     </controlProperties>
   </control>
   <control controlID="39" controlTypeID="com.balsamiq.mockups::FieldSet" x="340" y="216" w="200" h="97" measuredW="200" measuredH="170" zOrder="2" locked="false" isInGroup="-1">
     <controlProperties>
       <text>Current%20ARV%20Regimen</text>
     </controlProperties>
   </control>
   <control controlID="40" controlTypeID="com.balsamiq.mockups::CheckBox" x="351" y="258" w="119" h="18" measuredW="119" measuredH="18" zOrder="22" locked="false" isInGroup="-1">
     <controlProperties>
       <text>3TC+D4T+NVP</text>
     </controlProperties>
   </control>
   <control controlID="41" controlTypeID="com.balsamiq.mockups::CheckBox" x="350" y="279" w="117" h="18" measuredW="117" measuredH="18" zOrder="23" locked="false" isInGroup="-1">
     <controlProperties>
       <text>3TC+D4T+EFV</text>
     </controlProperties>
   </control>
   <control controlID="42" controlTypeID="com.balsamiq.mockups::FieldSet" x="340" y="328" w="200" h="99" measuredW="200" measuredH="170" zOrder="24" locked="false" isInGroup="-1">
     <controlProperties>
       <text>Lab%20Results</text>
     </controlProperties>
   </control>
   <control controlID="43" controlTypeID="com.balsamiq.mockups::CheckBox" x="349" y="354" w="126" h="18" measuredW="126" measuredH="18" zOrder="25" locked="false" isInGroup="-1">
     <controlProperties>
       <text>Last%20CD4%20%3C%20350</text>
     </controlProperties>
   </control>
   <control controlID="44" controlTypeID="com.balsamiq.mockups::CheckBox" x="348" y="375" w="-1" h="-1" measuredW="126" measuredH="18" zOrder="26" locked="false" isInGroup="-1">
     <controlProperties>
       <text>Last%20CD4%20%3C%20200</text>
     </controlProperties>
   </control>
   <control controlID="45" controlTypeID="com.balsamiq.mockups::CheckBox" x="347" y="396" w="-1" h="-1" measuredW="123" measuredH="18" zOrder="27" locked="false" isInGroup="-1">
     <controlProperties>
       <text>Any%20CD4%20%3C%20350</text>
     </controlProperties>
   </control>
   <control controlID="46" controlTypeID="com.balsamiq.mockups::CheckBox" x="350" y="234" w="49" h="18" measuredW="49" measuredH="18" zOrder="28" locked="false" isInGroup="-1">
     <controlProperties>
       <text>Any</text>
     </controlProperties>
   </control>
   <control controlID="50" controlTypeID="com.balsamiq.mockups::Button" x="278" y="471" w="-1" h="-1" measuredW="68" measuredH="28" zOrder="29" locked="false" isInGroup="-1">
     <controlProperties>
       <text>Search</text>
     </controlProperties>
   </control>
   <control controlID="52" controlTypeID="com.balsamiq.mockups::Title" x="628" y="171" w="57" h="-1" measuredW="57" measuredH="62" zOrder="30" locked="false" isInGroup="-1">
     <controlProperties>
       <text>...</text>
     </controlProperties>
   </control>
   <control controlID="53" controlTypeID="com.balsamiq.mockups::Canvas" x="4" y="11" w="307" h="430" measuredW="100" measuredH="70" zOrder="1" locked="false" isInGroup="-1"/>
   <control controlID="54" controlTypeID="com.balsamiq.mockups::Canvas" x="319" y="13" w="287" h="428" measuredW="100" measuredH="70" zOrder="0" locked="false" isInGroup="-1"/>
 </controls>
</mockup>