Last change
on this file since 1726 was 628, checked in by George Lilly, 15 years ago |
initial load of FOIAVistA 6/30/08 version
|
File size:
800 bytes
|
Line | |
---|
1 | PSSBPSUT ;BIRM/MFR - BPS (ECME) Utilities ;05/14/07
|
---|
2 | ;;1.0;PHARMACY DATA MANAGEMENT;**127**;9/30/97;Build 41
|
---|
3 | ;
|
---|
4 | NCPDPQTY(DRUG,RXQTY) ; Return the NCPDP quantity (Billing Quantity)
|
---|
5 | ; Input: (r) DRUG - DRUG file (#50) IEN
|
---|
6 | ; (r) RXQTY - Quantity dispensed from the PRESCRIPTION file (#52))
|
---|
7 | ;0utput: NCPDPQTY - Billing Quantity (3 decimal places)^NCPDP Dispense Unit (EA, GM or ML)
|
---|
8 | ;
|
---|
9 | N UNIT,MULTIP
|
---|
10 | ;
|
---|
11 | S DRUG=+$G(DRUG),RXQTY=+$G(RXQTY)
|
---|
12 | ;
|
---|
13 | ; - Invalid DRUG IEN or DRUG not on file
|
---|
14 | I 'DRUG!'$D(^PSDRUG(DRUG,0)) Q "-1^INVALID DRUG"
|
---|
15 | ;
|
---|
16 | ; - Invalid NCPDP Dispense Unit
|
---|
17 | S UNIT=$$GET1^DIQ(50,DRUG,82,"I") I UNIT'="EA",UNIT'="GM",UNIT'="ML" Q RXQTY
|
---|
18 | ;
|
---|
19 | ; - Invalid NCPDP Conversion Multiplier
|
---|
20 | S MULTIP=+$$GET1^DIQ(50,DRUG,83) I MULTIP'>0 Q RXQTY_"^"_UNIT
|
---|
21 | ;
|
---|
22 | Q $J(RXQTY*MULTIP,0,3)_"^"_UNIT
|
---|
Note:
See
TracBrowser
for help on using the repository browser.