[EpiData-list] Re: conditional value label look-up?

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Sat Sep 3 10:22:59 CDT 2011


We can use the following for the conditional value label look-up,

disease
  AFTER ENTRY
    IF (disease='A') THEN
      GOTO subtypeA
      EXIT
    ENDIF
    IF (disease='B') THEN
      GOTO subtypeB
    ENDIF
  END
END

subtypeA
  COMMENT LEGAL USE label_subtypea SHOW
  TYPE COMMENT
END

subtypeB
  COMMENT LEGAL USE label_subtypeb SHOW
  TYPE COMMENT
END

Bijay Adhikari



On Fri, Sep 2, 2011 at 11:00 AM, <epidata-list-request at lists.umanitoba.ca>wrote:

> Send EpiData-list mailing list submissions to
>        epidata-list at lists.umanitoba.ca
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://lists.umanitoba.ca/mailman/listinfo/epidata-list
> or, via email, send a message with subject or body 'help' to
>        epidata-list-request at lists.umanitoba.ca
>
> You can reach the person managing the list at
>        epidata-list-owner at lists.umanitoba.ca
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of EpiData-list digest..."
>
>
> EpiData-list mailing list
> ___________________________________
>
> Today's Topics:
>
>   1. Re: conditional value label look-up?
>      (epidata-list at lists.umanitoba.ca)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 1 Sep 2011 20:29:35 -0400
> From: epidata-list at lists.umanitoba.ca
> Subject: Re: [EpiData-list] conditional value label look-up?
> To: epidata-list at lists.umanitoba.ca
> Message-ID: <BLU0-SMTP55572154E8DD723E0CAE91FD180 at phx.gbl>
> Content-Type: text/plain; charset="us-ascii"
>
> This is possible in the current version of EpiData. The syntax is shown in
> the help file (.chk commands --> comment legal). It only works for comment
> legal, not for legal. In my tests, it sometimes get confused. You can also
> implement it, if your lists are short (as in your example), using nested if
> ... then blocks. This may be better as the logic should be simple enough and
> it will be bullet-proof. You can also provide error messages using the help
> command.
>
> In the test version, there is not yet an equivalent way to do this, but
> here is what I would do:
>
> create 4 fields:
>
> disease
> sub1
> sub2
> subtype (string only will work)
>
> disease has jumps, to either sub1 or sub2, depending on its value
> sub1 and sub2 have appropriate legal values, ranges or value labels
> sub1 and sub2 have a calculation: subtype=sub1 in sub1 and subtype=sub2 in
> sub2
>
> subtype is NOENTER
>
> sub1 and sub2 have to jump to the field past subtype. I'm not sure whether
> an unconditional jump is implemented yet. This may be problematic.
>
> Jamie
>
> On 2011-08-31, at 4:30 PM, epidata-list at lists.umanitoba.ca wrote:
>
> > Is there a way to do a conditional value label look up in either the
> current or in the new test version of EpiData?
> >
> > For instance, if field disease equals A then field subtype has values
> 1,2,3 for selection, if field disease equals B then field subtype has values
> 4,5,6, etc.
> >
> > Thank-you, and well done to the development team for excellent progress.
>
>
>
> ------------------------------
>
> ________________________________________
> EpiData-list at lists.umanitoba.ca
> http://lists.umanitoba.ca/mailman/listinfo/epidata-list
>
>
> End of EpiData-list Digest, Vol 95, Issue 2
> *******************************************
>



-- 
Regards,
ABJ

"It is not the strongest of the species that survives, nor the most
intelligent, but the one most responsive to change."  Charles Darwin


More information about the EpiData-list mailing list