Emulating check boxes in Epidata Entry
I have been working on a data entry form that was previously in Access. It has a lot of check box fields in Access (boolean fields that are represented on the screen by a box that alternates between being checked (true) and empty (false) when clicked.
There is a way to do this in Epidata, which can be useful when presenting a long list of symptoms/signs or exposures to be completed. The trick to doing this is to create Yes/No fields that cannot be entered using the tab or cursor keys. They can, however, be entered using the mouse. In this example, clicking in one of these fields will toggle the value of the field between "Y" and missing.
Perhaps others will find this useful.
Jamie Hockin
11 1 VLAB _label1 1 1 30 0 0 0 0 112 Emulate check boxes #id 1 3 30 4 3 12 5 112 id #age 1 5 30 5 5 0 2 112 age _sex 1 6 30 5 6 3 1 112 sex _label2 1 8 30 0 0 0 0 112 Check as many boxes as you want _a 1 10 30 3 10 5 1 112 a _b 6 10 30 9 10 5 1 112 b _c 12 10 30 15 10 5 1 112 c #xnotused 1 12 30 10 12 0 1 112 xnotused #action 1 14 30 8 14 0 1 112 action _label3 9 14 30 0 0 0 0 112 Anything to finish up 1 12M Y ! 2 11FY Y ! 3 10MYY !
* Emulate check boxes age range 0 99 end sex comment legal M Male F Female end * this is the last field before the check boxes * jump to the field beyond the check boxes goto action end
* this is a checkbox field that can only be entered * by clicking the cursor * If Epidata gets to this field, it must be that the * user has clicked in the field. This means that the * value of the field is toggled between Y and missing. * Note that any other cycle of changes is possible * Y to N to Y, Y to N to blank to Y, etc * Just program the nested if ... then ... endif blocks * These blocks MUST be NESTED and not sequential.
a before entry if a = "Y" then a = . else if a = . then a = "Y" endif endif goto action end end
b before entry if b = "Y" then b = . else if b = . then b = "Y" endif endif goto action end end
c before entry if c = "Y" then c = . else if c = . then c = "Y" endif endif goto action end end
* This field is used to block going to field c * with the cursor. Cursor UP from field ACTION will * come here and immediately go back to field ACTION
xnotused before entry goto action end end
Emulate check boxes
id <idnum>
age ## sex <A>
Check as many boxes as you want
a <Y> b <Y> c <Y>
xnotused #
action # Anything to finish up
participants (1)
-
epidata-list@lists.umanitoba.ca