source: FOIAVistA/tag/r/DRUG_ACCOUNTABILITY-PSA/PSAVERA2.m@ 628

Last change on this file since 628 was 628, checked in by George Lilly, 14 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.9 KB
Line 
1PSAVERA2 ;BHM/DB - Edit previously verified invoices #2;21DEC99
2 ;;3.0;DRUG ACCOUNTABILITY/INVENTORY INTERFACE;**21,49**; 10/24/97
3 ;References to ^PSDRUG( are covered by IA #2095
4 ;
5ASKDRUG ;Change drug
6 S PSAGAIN=0,PSABEFOR=PSADRG,DIC(0)="AEQMZ",DIC="^PSDRUG(" D ^DIC K DIC
7 I $G(DTOUT)!($G(DUOUT)) S PSAOUT=1 Q
8 S PSADJFLD="D",PSAREA="",PSASUPP=0
9 I +Y=-1 D Q:PSASUPP!(PSAOUT)
10 .S PSAVER=1 D SUPPLY^PSANDF Q:PSAOUT I 'PSASUPP S PSAGAIN=1 Q
11 .S PSA50IEN=0,PSADJ=PSAREA,PSAREA=""
12 .D RECORD
13 G:$G(PSAGAIN) ASKDRUG
14 S (PSA50IEN,PSADJ,PSADRG)=+Y D RECORD,VERDISP^PSAUTL4
15 I PSANDC'="",$O(^PSDRUG("C",PSANDC,PSA50IEN,0)) D
16 .S PSASUB=+$O(^PSDRUG("C",PSANDC,PSA50IEN,0)),$P(^PSD(58.811,PSAIEN,1,PSAIEN1,2),"^",3)=PSASUB
17 .I '+$P($G(^PSDRUG(PSA50IEN,1,PSASUB,0)),"^",7) D DUOU^PSAVER2 Q
18 .I +$P($G(^PSDRUG(PSA50IEN,1,PSASUB,0)),"^",7),+$P($G(^PSDRUG(PSA50IEN,1,PSASUB,0)),"^",7)'=+$P($G(^PSDRUG(PSABEFOR,1,PSASUB,0)),"^",7) D DUOU^PSAVER2
19 W !,"Decrementing balance of "_PSABAL_" from "_$P($G(^PSDRUG(PSADRG,0)),"^")
20 W !,"Increasing balance of "_PSANEWD_" by "_PSABAL_"."
21 Q
22 W !!,"Note that if you change the drug on this line item, the balances will be",!,"updated."
23LOCATION ;Change pharmacy location
24 W !,"If the location is changed, the balances will be decremented from the original",!,"location, the transaction file will record the proper changes.",!
25LST ;List all data associated with location/drug
26 ;get data from 58.8 & 58.81
27 ;Show allsysnonym data from drug file.
28RECORD ;Add adjusted data to DA Orders file
29 K PSASUBB
30 W !,"ok, we'll update the files now at RECORD"
31 S PSABFR=0 F S PSABFR=$O(^PSDRUG(PSABEFOR,1,PSABFR)) Q:PSABFR=$G(PSASUB) Q:PSABFR'>0 S PSASUBB=PSABFR
32 I $G(PSASUBB) S PREVDATA=$G(^PSDRUG(PSABEFOR,1,PSASUBB,0)) D
33 .W !,"Will update old drug data with previous synonym data of : ",!,?20,PREVDATA
34 I '$G(PSASUBB) W !,"Could not find previous sysnonym data, therefore the prices will remain as",!,"they are.",!
Note: See TracBrowser for help on using the repository browser.