![](https://secure.gravatar.com/avatar/f174b9816ccce31bf5cdb49501b15358.jpg?s=120&d=mm&r=g)
This is already an elegant solution. I would suggest, however, that you could have both numbers typed in at enrolment and check them. Then issue a warning if they don't match your list.
before file define checksamp ### hide checksamp end
sample1 comment legal use recfile.rec type comment checksamp end
sample2 after entry if sample2 <> checksamp then help "This pair of sample numbers (@sample1, @sample2) do not match those assigned. \nPlease check and re-enter both." type=error goto sample1 endif end end
Jamie
On 2011-07-11, Pedro wrote:
If the enrollment professional recruits a patient with medical chart 19992 and gives him/her the third pair of stamps, this means that he should type 302 in the sample1 variable. I would like EpiData to fill or to check if the sample2 for this patients is 228. If not a warning should come to check these numbers. I did try using the chk command as
sample1 comment legal use recfile.rec type comment sample2 end
sample2 legal 303 168 228 197 ... end end
It looks it works nicely. But I reckon if there is any more elegant way to do it. Is there?