Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Logic Based on Multiple Conditions
Message
From
19/08/2008 15:14:42
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Logic Based on Multiple Conditions
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01340078
Message ID:
01340078
Views:
56
I have the following possible conditions. There can only be one Patient.EligRule and only one InsCarr.RuleType. The goal is determine whether to do a validation. Is there a clear way to handle the different scenarios?

Some examples:

EligRule is 2 then validate.
EligRule is 1 and RuleType is 'N' then do not validate.
EligRule is 3 then do not validate.

Etc...

Should this be a couple of CASE statements? The first determines the patient, then depending on that, run through the Carrier conditions?
* Patient Table
Patient.EligRule = 1 && Use Carrier Rule
Patient.EligRule = 2 && Always Validate
Patient.EligRule = 3 && Do Not Validate

* Carrier Table
InsCarr.RuleType = 'V' && Always Validate
InsCarr.RuleType = 'N' && Never Validate
InsCarr.RuleType = 'A' && Use Anniversary
InsCarr.RuleType = 'M' && Through End of Month
Next
Reply
Map
View

Click here to load this message in the networking platform