[EpiData-list] Managing two related unique IDs in data entry

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Mon Jul 11 12:29:42 CDT 2011


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?



More information about the EpiData-list mailing list