Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Hi,

I have the following tables:

Visits[VisitID,PatientID]

Prescriptions [VisitID,DrugId,Amount]

DrugDetail [DrugID,DrugName,Category]

On the "Visits" layout I am trying to put a chart that on Axis X will show the drug Category, and on Axis Y the total amount for that category..

I've been trying for hours with all the possible combinations but all my efforts didn't help :confused:

Any suggestion?

This is not a charting problem. Unless you define some additional relationships and calculations, you cannot see sub-summarized child (Prescriptions) data from the parent (Visit) record.

It's much easier to produce such chart on a layout of Prescriptions.

  • Author

Hi,

tnx or your reply.

I know it is easier on the prescription layout...but I need it on the Visits layout...that is the problem.

I tried to define all sort of relationships and calcs but still to no use...

what am I missing with this chart?

What do you want to do with categories for which the total is zero? Do you want to display them as zero, or omit them altogether?

  • Author

omit...there shouldn't be zero's anyways...

See the attached for one way to look at it. In your situation it might be best to lookup the category into the prescription, otherwise you'll need more relationships.

Another option is to script the process and trigger the script on record load. Or perhaps use a custom function along the lines of:

http://www.briandunning.com/cf/894

The bottom line here is that you cannot chart data that you cannot display.

SubSummarizeChildUgo.zip

  • Author

The custom function did it !!!

tnx :P

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.