Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Expression for Pharmacist Initiated Medicines

I have the following table:

Drug Name

Doctor Name

BROMOCRIPTINE 2.5MG TABLET

PEDZISAI

CAL-C-VITA ORIGINAL 10`S#

PEDZISAI

SERETIDE ACCUHALER 50/250MCG

PFUMOJENA

TENOFOVIR+ LAMIVUDINE TABLET

PFUMOJENA

LOPINAVIR/RITONAVIR 200MG/50MG (ALLTERA) TABS

PFUMOJENA

FLUCONAZOLE 50MG CAPSULES

PHILIPPA MARETT

CIPROFLOXACIN 500MG

PHIRI

DICLOFENAC 50MG TABLETS

PHIRI

AMOXYCILLIN 125MG/5ML SUSP 100MLS

PHIRI

PONSTAN SUSPENSION 100ML

PHIRI

AMLODIPINE 5MG TABLET

PHIRI

DICLOFENAC 50MG TABLETS

PID

ACTRAPHANE INSULIN 100IU/ML 10ML

PID

BLOOD GLUCOSE TEST

PID

MICONAZOLE TOPICAL CREAM 2%

PID

CLOTRIMAZOLE CANDID V GEL 2%

PID

PREGNON 2 TABLETS

PID

CLOTRIMAZOLE CANDID V GEL 2%

PID

CETIRIZINE 10MG TABLETS

PID

BP CHECK

PIM

CLOTRIMAZOLE TOPICAL CREAM 1% 20G

PIM

CLOXACILLIN 250MG CAPSULE

PIM

PREGNON 2 TABLETS

PIM

PREGNON 2 TABLETS

PIM

MICONAZOLE + HYDROCORTISONE 2%:1%

PIM

MICONAZOLE ORAL GEL 2%

PIM

PREGNON 2 TABLETS

PIM

SALBUTAMOL (ASTHALIN) INHALER 100MCG

PIM

The table has fields [Drug Name] and [Doctor Name].  I want an expression to end up with a table which shows only records where the [Doctor Name] is PID and PIM.  How can this be done?

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I figured it out, herewith my expression to give the table with quantities and [Drug Name] as a dimension:

sum({<[Doctor Name]={'PIM'}>} QTY) + sum({<[Doctor Name]={'PID'}>} QTY)

Regards

Chris

View solution in original post

6 Replies
Anonymous
Not applicable
Author

in your load statement for the table, use the where clause....something like:

load

....

...

from ....

where match ([Doctor Name], 'PID', 'PIM')

;

Not applicable
Author

you can do as following:

LOAD Doctor_NAME FROM Table_Name

WHERE Doctor_NAME ='PID' OR Doctor_NAME = 'PIM';

-Akshay

Anonymous
Not applicable
Author

Many thanks, what if i want to do it within the application because i want this table to be part of my reports which can be subject to further analysis?

Regards.

Anonymous
Not applicable
Author

Many thanks, please se my comments above

Anonymous
Not applicable
Author

I figured it out, herewith my expression to give the table with quantities and [Drug Name] as a dimension:

sum({<[Doctor Name]={'PIM'}>} QTY) + sum({<[Doctor Name]={'PID'}>} QTY)

Regards

Chris

Anonymous
Not applicable
Author

That works...or you can combine them both into one function...sum({<[Doctor Name]={'PIM'}+{'PID'}>}QTY)

+ in the set analysis is union...you can do intersection, etc. as well.