In: Computer Science
• Based on the following code snippet and plan attributes, provide the output for Plan A, Plan B and Plan C.
Code Snippet
• {{IF:[Copay]=Not Covered && [Coinsurance]=Not Covered,
show ‘Not covered’}}
• {{IF:[Copay]!=$0.00 && [Copay]!=Blank, show value from
{{Copay}} copayment}}
• {{IIF:[Copay]!=$0.00 && [CopayFrequency]!=Blank, show
{{Copay}} copayment/{{CopayFrequency}}}}
• {{IF:[CopayMax]=$0.00 OR [Copay]=$0.00, show No Charge}}
• {{IF:[[CopayMax]!=$0.00 && [CopayMax] contains ‘$’
&& [Coinsurance] contains ‘%’ &&
[CopayMaxFrequency]=Blank, show {{CopayMax}} copayment then
{{Coinsurance}} coinsurance]}}
Plan
Copay
CopayFrequency
CopayMax
CopayMaxFrequency
Coinsurance
Plan A
$10.00
Per Visit
$50.00
Per Visit
Not Covered
Plan B
$0.00
Not Applicable
$0.00
Not Applicable
Not Covered
Plan C
$50.00
$50.00
Per Session
10%
i. {{IF:[Copay]=Not Covered && [Coinsurance]=Not Covered, show ‘Not covered’}}
Conditions: The code checks if Copay is NotCovered and Coinsurance is Not Covered, the result should be Not Covered
Output: The above code will have below output:
None of the plan meets the condition in code, thus Show will not display anything for any plan.
ii. {{IF:[Copay]!=$0.00 && [Copay]!=Blank, show value from {{Copay}} copayment}}
Conditions: The code checks if Copay is not 0 and blank , the result should show Copay value.
Output: The above code will have below output:
Plan A and C meet the condition in code, thus Show below values :
Plan | Copay | CopayFrequency | CopayMax | CopayMaxFrequency | Coinsurance | Show |
Plan A | $ 10.00 | Per Visit | $ 50.00 | Per Visit | Not Covered | $ 10.00 |
Plan C | $ 50.00 | $ 50.00 | Per Session | 10% | $ 50.00 |
iii. {{IIF:[Copay]!=$0.00 && [CopayFrequency]!=Blank, show {{Copay}} copayment/{{CopayFrequency}}}}
Conditions: The code checks if Copay is not 0 and CopayFrequency is not blank , if both conditions are true, the result should show Copay/Frequency value.
Output: The above code will have below output:
Plan A meets the condition in code, thus Show below values :
Plan | Copay | CopayFrequency | CopayMax | CopayMaxFrequency | Coinsurance | Show |
Plan A | $ 10.00 | Per Visit | $ 50.00 | Per Visit | Not Covered | $ 10/Per visit |
iv. {{IF:[CopayMax]=$0.00 OR [Copay]=$0.00, show No Charge}}
Conditions: The code checks if CopaMaxy is 0 OR Copay is 0, if any of the conditions is true, the result should show ‘No Charge’ value.
Output: The above code will have below output:
Plan B meets the condition in code, thus Show below values:
Plan | Copay | CopayFrequency | CopayMax | CopayMaxFrequency | Coinsurance | Show |
Plan B | $0.00 | Not Applicable | $0.00 | Not Applicable | Not Covered | No Charges |
v. {{IF:[[CopayMax]!=$0.00 && [CopayMax] contains ‘$’ && [Coinsurance] contains ‘%’ && [CopayMaxFrequency]=Blank, show {{CopayMax}} copayment then {{Coinsurance}} coinsurance]}}
Conditions: The code has combination of conditions where it checks if
a. CopaMaxy AND CopayMax has $
b. AND Coinsurance has %
c. AND CopayMaxFrequency is Blank
If all conditions a, b, c are true, then show copaymax value then coinsurance value.
Output: The above code will have below output:
Let’s consider the sub conditions,
a. Is satisfied for all plans
b. Is satisfied for Plan C (as it has %)
c. Is not satisfied for any plan as each plan has a value for this
Thus no plan meets the condition and result nothing.