[EpiData-list] Need help: Check codes truncated

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Mon Jul 11 18:58:54 CDT 2011


The other problem which could influence this is that the built in visual 
adopt and edit chk files (epidata entry 3.1) is not fully compatible 
with the possibilities if you open the chk file to edit directly.

Another known problem is the way "backup" command is handled by the 
visual chk file editor (add/revise button),.

Just avoid using the visual "add/revise" part and edit directly in the 
editor.

regards
Jens Lauritsen
EpiData Association

On 2011-07-11 19:40, epidata-list at lists.umanitoba.ca wrote:
> You will need to split this up into nested IF blocks. As well, you really should have parentheses to group the conditions between ANDs, to be sure the logic is what you want. You cannot be sure what order the AND and OR operators are applied.
>
> For example, you might try something like this.
>
> if (sex=2 and (msex=0 or msex=9 or msex=99) and (fsex=0 or fsex=9 or fsex=99) then
>    if (idu=0 or idu=9 or idu=99) and (cfac=0 or cfac=9 or cfac=99) then
>      if ... then
>        risk="OtherMedExp-10"
>      endif
>    endif
> endif
>
> I would put all of the related fields/values in one if. I don't know whether there is a limit to the number of nested IF blocks, but you probably won't have a problem. This works as long as logically you want AND between the IF blocks. I think that is the case here.
>
> Jamie
>
> On 2011-07-11, Bijay wrote:
>
>>     IF (Sex=2) AND (Msex=0) OR (Msex=9) OR (Msex=99) AND (Fsex=0)
>> OR(Fsex=9) (Fsex=99)
>> AND (IDU=0) OR (IDU=9) OR (IDU=99) AND (CFac=0) OR (CFac=9) OR
>> (CFac=99) AND(Trans=0)
>> OR (Trans=9) OR (Trans=99) OR  (coag=0) OR  (coag=9) OR  (coag=99)
>> OR(HetSexEND=0)
>> OR  (HetSexEND=9) OR (HetSexEND=99) OR (ConSusHIV=0)  OR (ConSusHIV=9)
>> OR(ConSusHIV=99)
>> AND (OccuExp=0) OR (OccuExp=9) OR (OccuExp=99) AND (OthMedExp=1)
>> OR(OthMedExp=0)
>> OR (OthMedExp=9) OR (OthMedExp=99) AND (NMNOcc=1) OR (NMNOcc=0) OR(NMNOcc=9)
>> OR (NMNOcc=99) *THEN*
>>
>>      * **Risk="OtherMedExp-10"*
> _______________________________________________
> EpiData-list mailing list
> EpiData-list at lists.umanitoba.ca
> http://lists.umanitoba.ca/mailman/listinfo/epidata-list
>



More information about the EpiData-list mailing list