ACHSACT ; IHS/ITSC/PMF - DOCUMENT ACTIONS ; [ 10/16/2001 8:16 AM ]
;;3.1;CONTRACT HEALTH MGMT SYSTEM;;JUN 11, 2001
;
DISP ;EP - Display actions on a document.
N ACHSDIEN,ACHSDUZ
D ^ACHSUD
Q:$D(DTOUT)!$D(DUOUT)!'$D(ACHSDIEN)
S %=$$PB^ACHS
Q:$D(DTOUT)!$D(DUOUT)
I %="B" D VIEWR^XBLM("EN^ACHSACT"),EN^XBVK("VALM") Q
EN ;EP - From List Manager.
K ^UTILITY($J,"W")
N ACHSDUZ,DA,DIWF,DIWL,DIWR
S DIWF="W",DIWL=46,DIWR=IOM-2,ACHSDUZ=DUZ,DA(1)=DUZ(2),DA=ACHSDIEN
W @IOF,!,"ACTIONS For document ",$$VAL^XBDIQ1(9002080.01,.DA,.01)," at ",$$LOC^ACHS,!,"WHEN",?22,"WHO",?45,"WHAT"
W !,$$REPEAT^XLFSTR("-",21),?22,$$REPEAT^XLFSTR("-",22),?45,$$REPEAT^XLFSTR("-",33)
S DA(1)=0
F S DA(1)=$O(^ACHSF(DUZ(2),"D",ACHSDIEN,"A",DA(1))) Q:'DA(1) D
. W !,$$FMTE^XLFDT($P($G(^ACHSF(DUZ(2),"D",ACHSDIEN,"A",DA(1),0)),U))
. S ACHSYAYA=99,DUZ=$P($G(^ACHSF(DUZ(2),"D",ACHSDIEN,"A",DA(1),0)),U,2)
. W ?22,$$USR^ACHS
. F DA=0:0 S DA=$O(^ACHSF(DUZ(2),"D",ACHSDIEN,"A",DA(1),1,DA)) Q:'DA S X=$G(^ACHSF(DUZ(2),"D",ACHSDIEN,"A",DA(1),1,DA,0)) D ^DIWP
. D ^DIWW
.Q
S ACHSYAYA=99,DUZ=ACHSDUZ
K ^UTILITY($J,"W"),ACHSYAYA
Q
;
ENTER ;EP - Enter actions on a document.
N ACHS,ACHSDIEN,DA,DIC,DIE,DR
D ^ACHSUD
Q:$D(DTOUT)!$D(DUOUT)!'$D(ACHSDIEN)
S ACHS=$$NOW^XLFDT
D ACT(ACHSDIEN,ACHS)
Q:Y<1
W !!,"Entered ",$$FMTE^XLFDT(ACHS)," by ",$$USR^ACHS
S DIE="^ACHSF(DUZ(2),""D"",ACHSDIEN,""A"",",DA=+Y,DR=1
D ^DIE
Q
;
ACT(ACHSDIEN,ACHSTIME,ACHSACT) ;EP - Non-Interactive entry of an action on a document.
N ACHS,DA,DIC,DIE,DR
I '$D(^ACHSF(DUZ(2),"D",ACHSDIEN,"A",0)) S ^ACHSF(DUZ(2),"D",ACHSDIEN,"A",0)=$$ZEROTH^ACHS(9002080.01,101)
S DIC(0)="",DIC="^ACHSF(DUZ(2),""D"",ACHSDIEN,""A"",",X=ACHSTIME,DA(2)=DUZ(2),DA(1)=ACHSDIEN,DIC("DR")=".02////"_DUZ_";1///"_$G(ACHSACT)
K DO,DD D FILE^DICN
Q
;
ACHSACT ; IHS/ITSC/PMF - DOCUMENT ACTIONS ; [ 10/16/2001 8:16 AM ]
+1 ;;3.1;CONTRACT HEALTH MGMT SYSTEM;;JUN 11, 2001
+2 ;
DISP ;EP - Display actions on a document.
+1 NEW ACHSDIEN,ACHSDUZ
+2 DO ^ACHSUD
+3 IF $DATA(DTOUT)!$DATA(DUOUT)!'$DATA(ACHSDIEN)
QUIT
+4 SET %=$$PB^ACHS
+5 IF $DATA(DTOUT)!$DATA(DUOUT)
QUIT
+6 IF %="B"
DO VIEWR^XBLM("EN^ACHSACT")
DO EN^XBVK("VALM")
QUIT
EN ;EP - From List Manager.
+1 KILL ^UTILITY($JOB,"W")
+2 NEW ACHSDUZ,DA,DIWF,DIWL,DIWR
+3 SET DIWF="W"
SET DIWL=46
SET DIWR=IOM-2
SET ACHSDUZ=DUZ
SET DA(1)=DUZ(2)
SET DA=ACHSDIEN
+4 WRITE @IOF,!,"ACTIONS For document ",$$VAL^XBDIQ1(9002080.01,.DA,.01)," at ",$$LOC^ACHS,!,"WHEN",?22,"WHO",?45,"WHAT"
+5 WRITE !,$$REPEAT^XLFSTR("-",21),?22,$$REPEAT^XLFSTR("-",22),?45,$$REPEAT^XLFSTR("-",33)
+6 SET DA(1)=0
+7 FOR
SET DA(1)=$ORDER(^ACHSF(DUZ(2),"D",ACHSDIEN,"A",DA(1)))
IF 'DA(1)
QUIT
Begin DoDot:1
+8 WRITE !,$$FMTE^XLFDT($PIECE($GET(^ACHSF(DUZ(2),"D",ACHSDIEN,"A",DA(1),0)),U))
+9 SET ACHSYAYA=99
SET DUZ=$PIECE($GET(^ACHSF(DUZ(2),"D",ACHSDIEN,"A",DA(1),0)),U,2)
+10 WRITE ?22,$$USR^ACHS
+11 FOR DA=0:0
SET DA=$ORDER(^ACHSF(DUZ(2),"D",ACHSDIEN,"A",DA(1),1,DA))
IF 'DA
QUIT
SET X=$GET(^ACHSF(DUZ(2),"D",ACHSDIEN,"A",DA(1),1,DA,0))
DO ^DIWP
+12 DO ^DIWW
+13 QUIT
End DoDot:1
+14 SET ACHSYAYA=99
SET DUZ=ACHSDUZ
+15 KILL ^UTILITY($JOB,"W"),ACHSYAYA
+16 QUIT
+17 ;
ENTER ;EP - Enter actions on a document.
+1 NEW ACHS,ACHSDIEN,DA,DIC,DIE,DR
+2 DO ^ACHSUD
+3 IF $DATA(DTOUT)!$DATA(DUOUT)!'$DATA(ACHSDIEN)
QUIT
+4 SET ACHS=$$NOW^XLFDT
+5 DO ACT(ACHSDIEN,ACHS)
+6 IF Y<1
QUIT
+7 WRITE !!,"Entered ",$$FMTE^XLFDT(ACHS)," by ",$$USR^ACHS
+8 SET DIE="^ACHSF(DUZ(2),""D"",ACHSDIEN,""A"","
SET DA=+Y
SET DR=1
+9 DO ^DIE
+10 QUIT
+11 ;
ACT(ACHSDIEN,ACHSTIME,ACHSACT) ;EP - Non-Interactive entry of an action on a document.
+1 NEW ACHS,DA,DIC,DIE,DR
+2 IF '$DATA(^ACHSF(DUZ(2),"D",ACHSDIEN,"A",0))
SET ^ACHSF(DUZ(2),"D",ACHSDIEN,"A",0)=$$ZEROTH^ACHS(9002080.01,101)
+3 SET DIC(0)=""
SET DIC="^ACHSF(DUZ(2),""D"",ACHSDIEN,""A"","
SET X=ACHSTIME
SET DA(2)=DUZ(2)
SET DA(1)=ACHSDIEN
SET DIC("DR")=".02////"_DUZ_";1///"_$GET(ACHSACT)
+4 KILL DO,DD
DO FILE^DICN
+5 QUIT
+6 ;