cancel
Showing results for 
Search instead for 
Did you mean: 

Formula question

Former Member
0 Kudos

I need help creating a formula for this situation.  Whenever someone "mistakenly" labels a patient as the wrong kind of visit, the database still shows these records.  (I cannot change the database).  See example:

DatePatientVisit Type
2/1/2015John DoeNew Patient
2/1/2015John DoeEstablished Patient

How can I create a formula that will count "John Doe" as 1 visit?  Perhaps renaming this visit as "Unknown Type", so we can separate these in the report?

I have a Crystal Report showing the number of new patient visits/month and the number of established patients/month.

I already have a formula field grouping the patient name and date, so I can get an accurate count, no matter how many visits a patient has in a month.

Thanks for any help.

Accepted Solutions (1)

Accepted Solutions (1)

DellSC
Active Contributor
0 Kudos

Do you have a group in your report on the patient name/date formula or are you just using it to create your count?  If you're just using it for the counts, how is your data grouped?

How are you doing your counts - in formulas, summaries, or running totals?  If it's in formulas, please post them here.

I know of a way to do this, but I need the above information to tailor it so that it works with what you have.

-Dell

Former Member
0 Kudos

I am using formula fields in a crosstab.

I created a formula field called "PatientCount" to group the patient name, date and visit type:

{TaskSummary_csv.Patient) & {TaskSummary.csv.Date} & {@VisitType}

Then I use this formula field in my Crosstab as the summarized cell and choose "DistinctCount"

This has been working well for me with the exception of the example shown in my original question.

The @VisitType formula is just an "If then else" grouping of all appointment types with the results of "New Patient", "Established Patient" or "TaskSummary.csv.Type".

DellSC
Active Contributor
0 Kudos

The method that I'm thinking of probably won't work with a Crosstab. 

At the very least you'll have to remove the "visit type" from the formula, but there are other things that might be possible.

Would it be possible for you to save your report with some dummy data in it (I don't want you to post anything with real patient data!) and then attach it here?  To attach you'll need to do the following:

1.  Change the file extension on the .rpt file from ".rpt" to ".txt" (the uploader here won't "see" .rpt files...)

2.  Go to the advanced editor and attach the renamed file to a new response to this thread.

I can then take a look at it and see what I can do.

-Dell

Former Member
0 Kudos

Okay, Thanks Dell.  I have attached the fake report.

The Established Patient subreport is actually the crosstab I have been working on and relates directly to my question here.

I am mainly concerned with the #Patients crosstab in that report, getting the right numbers.  Then I can edit the rest of my crosstabs and report based on that "number of patients".

Also, please note "Patients 12 and 13".  They have a new patient type and a "surgery" type (and surgery is actually a follow-up or "established" patient type), thus giving me the problem stated in my original question.

Hope this isn't too confusing.

Thanks for the help!

Former Member
0 Kudos

I keep getting a "content type of this attachment is not allowed." - even after changing to txt.

Is there another way I can get this report to you?

DellSC
Active Contributor
0 Kudos

In Windows Explorer, if you have "Hide extensions for known file types" turned on, then adding ".txt" to the file name actually sets it to Filename.txt.rpt.  If this is what's happening (it's turned on by default), then in Windows Explorer, you need to go to Organize>>Folder and search options and go to the View tab.  Turn off this option and try renaming the file again to take off the ".rpt" extension.  Then try to upload the file again.

-Dell

Former Member
0 Kudos

Thanks, but I am aware of how to change a file extension, as I am an IT tech.

It is indeed a .txt document.

I tried uploading it again this morning, still getting error.  I even tried changing the extension to "jpg", still wouldn't take it.

The size is only 86 kb, so that shouldn't be an issue either.

Could it be related to the fact I have a subreport in the report??

This is strange that it won't take my file... 

Former Member
0 Kudos

Tried to upload a new "test" report as a .txt, still did not work.

Cleared out my browser's cache and restarted computer.  Still does not work.

When I attach the file, that works okay - no errors.

When I try to post the message, that is when I get the error "The content type of this attachment is not allowed.".

Could it be a permission issue for me in the forum?

Sorry, I am trying to get you this report...

Thanks.

DellSC
Active Contributor
0 Kudos

Sorry about that - a lot of the folks who post here are not IT folks.

Try this.... Go to my website - www.dellstinnett.com.  There's an "email me" link there that you can use to email the report to me.

-Dell

Former Member
0 Kudos

No apologies necessary, you would have no way of knowing that. 

Anyway, appreciate the link.  I will send you the report via email.

Appreciate the help!!

Answers (0)