ACHSAOPO ; IHS/ITSC/PMF - AREA PURCHASE ORDER FILE UTILITIES ; [ 10/16/2001 8:16 AM ]
;;3.1;CONTRACT HEALTH MGMT SYSTEM;;JUN 11, 2001
;
ADD(ACHSP,ACHST,ACHSV) ;EP - Make entry into Area PO transaction file, PO,Type,Value.
N DIC,DLAYGO,DA,DR,X,Y
S X=ACHSP,DIC="^ACHSAOPO(",DIC(0)="L",DLAYGO=9002068
D ^DIC
I +Y<1 Q
I '$D(^ACHSAOPO(+Y,1,0)) S ^ACHSAOPO(+Y,1,0)=$$ZEROTH^ACHS(9002068,1)
S X=$$NOW^XLFDT,DA(1)=+Y,DIC="^ACHSAOPO("_DA(1)_",1,",DIC("DR")=".02///"_ACHST_";1///"_ACHSV
D ^DIC
K DLAYGO,DIC,DIE,DA,DR
Q
;
DISP ;EP - Display transactions for a PO.
N DIC,L,FLDS,BY,FR,TO,DHD
S DIC="^ACHSAOPO(",DIC(0)="AEMNO"
D ^DIC
Q:+Y<1
S L=0,FLDS="[CAPTIONED]",BY="@.01",(FR,TO)=$$VAL^XBDIQ1(DIC,+Y,.01),DHD="Transactions for P.O. "_FR
D EN1^DIP
Q
;
ACHSAOPO ; IHS/ITSC/PMF - AREA PURCHASE ORDER FILE UTILITIES ; [ 10/16/2001 8:16 AM ]
+1 ;;3.1;CONTRACT HEALTH MGMT SYSTEM;;JUN 11, 2001
+2 ;
ADD(ACHSP,ACHST,ACHSV) ;EP - Make entry into Area PO transaction file, PO,Type,Value.
+1 NEW DIC,DLAYGO,DA,DR,X,Y
+2 SET X=ACHSP
SET DIC="^ACHSAOPO("
SET DIC(0)="L"
SET DLAYGO=9002068
+3 DO ^DIC
+4 IF +Y<1
QUIT
+5 IF '$DATA(^ACHSAOPO(+Y,1,0))
SET ^ACHSAOPO(+Y,1,0)=$$ZEROTH^ACHS(9002068,1)
+6 SET X=$$NOW^XLFDT
SET DA(1)=+Y
SET DIC="^ACHSAOPO("_DA(1)_",1,"
SET DIC("DR")=".02///"_ACHST_";1///"_ACHSV
+7 DO ^DIC
+8 KILL DLAYGO,DIC,DIE,DA,DR
+9 QUIT
+10 ;
DISP ;EP - Display transactions for a PO.
+1 NEW DIC,L,FLDS,BY,FR,TO,DHD
+2 SET DIC="^ACHSAOPO("
SET DIC(0)="AEMNO"
+3 DO ^DIC
+4 IF +Y<1
QUIT
+5 SET L=0
SET FLDS="[CAPTIONED]"
SET BY="@.01"
SET (FR,TO)=$$VAL^XBDIQ1(DIC,+Y,.01)
SET DHD="Transactions for P.O. "_FR
+6 DO EN1^DIP
+7 QUIT
+8 ;