Solved

HELP WITH CRITERIA SELECTION

Posted on 2008-10-30
17
492 Views
Last Modified: 2011-10-19
I am attaching the code that I used in this report.  I would like the following information in the procedure code field:  Only those patients who were charged for a 99213 and a 52000 or 99212 and 5200 only.  

In my report I am seeing patients that have JUST a 99212 or 99213 only and patient that have a 5200 and 99212 or 5200 and 99213.  I want someone that has the combination. See Acct # 27039.  I know that the problem is that i selected IS ONE OF for my formula but I don't know how to fix.  Some suggested doing a DO WHILE command but I don't kow how to use that.


Kate
{Archrg99.Chrg_PVID} = "DJS" and

{@DOS} in Date (2007, 01, 01) to Date (2008, 10, 18) and

{Archrg99.Proc_Code} in ["52000", "99212", "99213"]

Open in new window

0
Comment
Question by:kvrogers
  • 6
  • 4
  • 3
  • +2
17 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 22848239
You can't use a record selection formula for this.  Record selection rules work on individual records and not on groups of records so the rules can't refer to the content of other records in the same group.
You could use a group selection rule in CR.  To do this you would have to have separate formulas which counted the number of "52000"'s, "99212"'s,  and "99213"' in the group and then base the group selection on the results of those formula fields.
You can achieve the same thing using the Add Command option to select the data for your report, where you could write a sql statement using 'groupBy' and 'Having' clauses.

If an account has all 3 values in the group is the account to be included or excluded?
0
 
LVL 17

Expert Comment

by:MIKE
ID: 22850719
Try using the SELECTION FORMULAS >> GROUP

Put your logic there....
0
 

Author Comment

by:kvrogers
ID: 22869101
I am sorry but I am a real novice to all of the programing formula elements. Could you be a little more specific on how to achieve this.  Sorry!

This brings me to another question.  If I would like to learn how to use the formulas and understand them better, what kind of a course at a local college should I take?  Javascript??  

Kate
0
 
LVL 17

Expert Comment

by:MIKE
ID: 22869124
for some REAL good papers on FORMULAS go to....WWW.KENHAMADY.COM

He has some of the best priced....informative formula manuals that you'll find online.

0
 
LVL 17

Expert Comment

by:MIKE
ID: 22869164
INCLUDE all data then use formulas to extract ONLY data needed for display....
0
 
LVL 1

Expert Comment

by:H0P5
ID: 22905861
Hi
On the right hand of the screen under the list of database fields you will find formula field.
right click and make a new one.

Your formula will be something like
If (some field) = x and (some other field) = y then "Good Record" else "Bad Record"
Then in your select expert you can use the formula you just made and filter for only "good record"

Best of luck!
0
 

Author Comment

by:kvrogers
ID: 22917695
Ok this is the formula I created and it's not working:

If ({Archrg99.Proc_Code} = "99213" and {Archrg99.Proc_Code}= "5200")  or
({Archrg99.Proc_Code}= "99212" and {Archrg99.Proc_Code} = "5200") then "Good Record"
Else "Bad Record"

then I set Select Record to GOOD RECORD only.  

Put when I do this I get nothing.

Remember I want patients that were bill for a 99213 and 52000 or 99212 and 52000.  

Kate
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 22918978
You will always get nothing wuth that formula.  

The field {Archrg99.Proc_Code} cannot equal 2 values on the same record.

mlmcc
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 1

Expert Comment

by:H0P5
ID: 22920297
Could you attach some sample data at all?

0
 

Author Comment

by:kvrogers
ID: 22926789
Thanks HOP5.  Wasn't sure what format so I picked XLS.

When you  look at the file noticed that Acct # 27039 shows the criteria I am looking for.  His criteria was that on 09/30 he was charged for a procedure code of 99213 and 52000.

Also see Acct #23560 that account was charged on 08/26 for a 99212 and a 52000.  

Thanks for all your help in advance.

Kate
procedure-5200-with-99212-or-992.xls
0
 
LVL 1

Expert Comment

by:H0P5
ID: 22928734
This is the best I can do, but alas I am no real expert to be honest.

Group all data by Account, then by date.
This will allow you to consider what orders each account placed on each day.

Make a few formula
if account = "52000" then 1
if account = "99212 then 1
Then another one to add these two together. Call it "summary" or something
Place all of these formulas on each individual line of data. Thats 3 formula on each line.
Then in the group footer for date, the second grouping level, add a sum of "summary"
Records where this "summary" are greater than 2 are of interest.
Right click on this summary in the date footer and select "select Group Expert"
This is like the selection expert but you can exclude groups, instead of single records. Exclude groups with that summary of less than 1.

It works for what you have, although its not a glamorous solution and might fall over should you have multiple orders of the same item on the same date, but its the best i can do!

Best of luck!

0
 
LVL 100

Expert Comment

by:mlmcc
ID: 22934008
Can a person have multiple for either type?

Will they always be on the same date?

mlmcc
0
 

Author Comment

by:kvrogers
ID: 22939435
mlmcc:  Yes you can have individual codes for each person based on DOS(date of service - see below) but I only want the combination of 52000 & 99212 OR 52000 & 99213 and what my report is showing me is all the individual codes and then the combination I am looking for.  All by Date of Service which is what I want. So reports looks like this:

Date of Service      Acct #      Procedure Code
3/25/2008                           27039      52000

6/3/2008                          27039      99213
            
9/30/2008                          27039      99213
                          27039      52000
      
All I really want to show on my report is the one for DOS:  09/30/2008 where the patient was billed for the codes 99213 and 52000.  I need my report to show this combination
or  the combination of  99212 and 52000 like this one:

8/26/2008      23560      99212
      23560      52000

Thanks,
Kate


0
 
LVL 100

Expert Comment

by:mlmcc
ID: 22944737
That is what I thought you wanted.

mlmcc
0
 

Author Comment

by:kvrogers
ID: 23009448
Hop5: I created the formulat for 52000 = 1 and 9213 = 1 and the summary for adding both and added to the footer but when you say:
Right click on this summary in the date footer and select "select Group Expert"
This is like the selection expert but you can exclude groups, instead of single records. Exclude groups with that summary of less than 1.
When I right mouse click I do not get the option of "select Group Expert" but I selected from the toolbar but I don't understand how to type in the exclusion part.
 
Kate
0
 
LVL 1

Accepted Solution

by:
H0P5 earned 500 total points
ID: 23011145
If you right click on the actual formula field you placed in the actual footer you can get into this group select expert.
0
 

Author Comment

by:kvrogers
ID: 23017042
Well I finally got it.  I left my formula as before see snippet below but in the Date group footer I added a summary of distinct count of ARCHRG.PROC_CODE and then I used select expert and select "is equal to" 2.00 and suppressed that footer.  
 
That gave me what I wanted.  Thanks  to every one.  Especially Hop5 your answer was what I concentrated on the most.
Kate

{@DOS} in Date (2007, 01, 01) to Date (2008, 10, 18) and

{Archrg99.Chrg_PVID} = "DJS" and

{Archrg99.Proc_Code} in ["52000", "99212", "99213"]

Open in new window

0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now