| Author |
Message |
TorLang
Groupie
Joined: 13 Jun 2012
Location: United States
Online Status: Offline
Posts: 50
|

Topic: Variables (on detail lines) Posted: 30 Sep 2013 at 5:42am |
|
Have a report I need to use variables on (to fetch insurance companies for a patient visit, Primary, Secondary, Tertiary) I'll just type in primary here, for simplicity.
This is how I normally set up the variables when I group on patient visit:
GH1 - suppressed: @Primary_Reset
Code: shared stringvar Primary := " ";
D - suppressed: @Primary_Variable_Declaration
Code: shared stringvar Primary; if {TPM311_VISIT_PAYOR.pyr_seq_no} = 4981 then Primary := {TPM700_PAYOR_PLAN.plan_ds};
GF1 - Data Line: @Primary_Display
Code: WhilePrintingRecords; shared stringvar Primary; Primary
This works great when I group. But in this instance I need the data on a detail line. Doing this:
Da: - suppressed - @Primary_Reset Db: - suppressed - @Primary_Variable_Declaration Dc: - data line - @Primary_Display
and when looking at the results, it looks like I am not resetting correctly, or something else is going on.
Anything I am missing here?
|
IP Logged |
|
|
|
kevlray
Admin Group
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
|

Posted: 30 Sep 2013 at 6:52am |
|
I cannot say for sure, but since you are not grouping I think you could get rid of the shared variable and just keep the formula (one detail line, unless you are doing some other calculations in the other detail lines). Example: if {TPM311_VISIT_PAYOR.pyr_seq_no} = 4981 then {TPM700_PAYOR_PLAN.plan_ds}
|
IP Logged |
|
TorLang
Groupie
Joined: 13 Jun 2012
Location: United States
Online Status: Offline
Posts: 50
|

Posted: 30 Sep 2013 at 7:12am |
|
The problem with doing that is that if there is a Secondary Insurance present on the patient account, the primary won't show in the record. if there is a tertiery insurance present, the primary or the secondary won't show up.
Edited by TorLang - 30 Sep 2013 at 7:15am
|
IP Logged |
|
kevlray
Admin Group
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
|

Posted: 30 Sep 2013 at 8:47am |
|
Not sure what is going on. I tested the concept on a database I work with and your formulas appear they should work.
|
IP Logged |
|
TorLang
Groupie
Joined: 13 Jun 2012
Location: United States
Online Status: Offline
Posts: 50
|

Posted: 03 Oct 2013 at 8:43am |
|
I "figgerd" it out. Thanks.
|
IP Logged |
|
|
|