ACDCINV ;IHS/ADC/EDE/KML - DATA ENTER/EDIT FOR INTERVENTION;
;;4.1;CHEMICAL DEPENDENCY MIS;;MAY 11, 1998
;*****************************************************************
;The CDMIS program file walks to ^ACDINTV via a backward program
;pointer field inintervention file. This is the screen when selecting
;visits. FM only displays visits matching this pointer to the program
;i.e any user can only see what is in their signon facility
;
;Note, the intervention data in ^ACDINTV is purged with
;the purge option at the facility level. The data, however,
;is not deleted at the area or hq level with the Delete option.
;This is because the delete option is only used to prep a system
;for a re-import and intervention data is not exportedZS (EXTRACTED)
;********************************************************************
;
EN ;EP Input for Interventions
;//[ACD INTERVENTION ADD]
S ACDDUZZ=DUZ(2)
W @IOF,"Signon Program is : ",$P(^DIC(4,DUZ(2),0),U)
W !,"Records that may be added are: THOSE WITHIN YOUR SIGNIN PROGRAM.",!
W !,"ADDING CDMIS INTERVENTION RECORDS...",!!
D ^ACDCINV2
Q
;
EN1 ;EP Edit for CDMIS interventions
;//[ACD INTERVENTION EDIT]
S ACDDUZ(2)=DUZ(2)
W @IOF,"Signon Program is : ",$P(^DIC(4,DUZ(2),0),U)
W !,"Editable Records are: THOSE NOT EXTRACTED."
W !," THOSE WITHIN YOUR SIGNIN PROGRAM.",!
W !,"EDITING CDMIS INTERVENTION RECORDS...",!!
S DIE="^ACDF5PI(",DA=DUZ(2),DR="[ACD INTERVENTION EDIT]" D ^DIE S DUZ(2)=ACDDUZ(2)
; Above template shifts to CDMIS INTERVENTIONS. Incremental lock
; and unlock done in template.
Q
;
EN3 ;EP Delete a intervention entry - interactive
;//[ACD INTERVENTION DELETE]
W @IOF,"Signon Program is : ",$P(^DIC(4,DUZ(2),0),U)
W !,"Prevention records to Delete are: THOSE NOT EXTRACTED."
W !," THOSE WITHIN YOUR SIGNIN PROGRAM.",!
W !,"DELETING CDMIS INTERVENTION RECORDS...",!!
S DIC("S")="I $P(^(0),U,17)=DUZ(2)"
S:'$D(ACDH(1)) $P(ACDH(1),"=",79)="=" S DIC(0)="AEQ",DIC="^ACDINTV(" D ^DIC G:Y<0 K S ACDVISP=+Y
S:'$D(ACD80) $P(ACD80,"=",79)="=" W !,ACD80
F S %=2 W !,"Are You Sure You wish to DELETE this ENTRY" D YN^DICN W:%=0 " Answer Yes or No" Q:%=2!(%=-1) I %=1 D DEL G K
W " No action taken...."
Q
DEL ;Delete incomplete/incorrect entries
Q:'$D(ACDVISP)
S:'$D(ACDH(1)) $P(ACDH(1),"=",79)="=" W !!!,ACDH(1)
S DA=+ACDVISP,DIK="^ACDINTV(" D ^DIK W !,"** INCOMPLETE or INCORRECT INTERVENTION deleted. **",!,ACDH(1)
W !!?4,"Intervention Deletion Complete...."
Q
;
K ;
K DIC,DIE,DA,ACDTOUT,ACDCOMC,ACDDA,ACDDFNP,DR,ACDDR,ACDIO,ACDX,ACDDOV,ACD80,ACDRPC,ACDOK,ACDN0,ACDAGE,ACDDUZZ,ACDLINE,ACDHS,ACDAGE,ACDCAGE,ACDSEX,ACDVET,ACDTRB,ACDTRBN,ACDTRBNM,ACDTRBCD,ACDSTA,ACDATSN,ACDSTANM,ACDSTACD
ACDCINV ;IHS/ADC/EDE/KML - DATA ENTER/EDIT FOR INTERVENTION;
+1 ;;4.1;CHEMICAL DEPENDENCY MIS;;MAY 11, 1998
+2 ;*****************************************************************
+3 ;The CDMIS program file walks to ^ACDINTV via a backward program
+4 ;pointer field inintervention file. This is the screen when selecting
+5 ;visits. FM only displays visits matching this pointer to the program
+6 ;i.e any user can only see what is in their signon facility
+7 ;
+8 ;Note, the intervention data in ^ACDINTV is purged with
+9 ;the purge option at the facility level. The data, however,
+10 ;is not deleted at the area or hq level with the Delete option.
+11 ;This is because the delete option is only used to prep a system
+12 ;for a re-import and intervention data is not exportedZS (EXTRACTED)
+13 ;********************************************************************
+14 ;
EN ;EP Input for Interventions
+1 ;//[ACD INTERVENTION ADD]
+2 SET ACDDUZZ=DUZ(2)
+3 WRITE @IOF,"Signon Program is : ",$PIECE(^DIC(4,DUZ(2),0),U)
+4 WRITE !,"Records that may be added are: THOSE WITHIN YOUR SIGNIN PROGRAM.",!
+5 WRITE !,"ADDING CDMIS INTERVENTION RECORDS...",!!
+6 DO ^ACDCINV2
+7 QUIT
+8 ;
EN1 ;EP Edit for CDMIS interventions
+1 ;//[ACD INTERVENTION EDIT]
+2 SET ACDDUZ(2)=DUZ(2)
+3 WRITE @IOF,"Signon Program is : ",$PIECE(^DIC(4,DUZ(2),0),U)
+4 WRITE !,"Editable Records are: THOSE NOT EXTRACTED."
+5 WRITE !," THOSE WITHIN YOUR SIGNIN PROGRAM.",!
+6 WRITE !,"EDITING CDMIS INTERVENTION RECORDS...",!!
+7 SET DIE="^ACDF5PI("
SET DA=DUZ(2)
SET DR="[ACD INTERVENTION EDIT]"
DO ^DIE
SET DUZ(2)=ACDDUZ(2)
+8 ; Above template shifts to CDMIS INTERVENTIONS. Incremental lock
+9 ; and unlock done in template.
+10 QUIT
+11 ;
EN3 ;EP Delete a intervention entry - interactive
+1 ;//[ACD INTERVENTION DELETE]
+2 WRITE @IOF,"Signon Program is : ",$PIECE(^DIC(4,DUZ(2),0),U)
+3 WRITE !,"Prevention records to Delete are: THOSE NOT EXTRACTED."
+4 WRITE !," THOSE WITHIN YOUR SIGNIN PROGRAM.",!
+5 WRITE !,"DELETING CDMIS INTERVENTION RECORDS...",!!
+6 SET DIC("S")="I $P(^(0),U,17)=DUZ(2)"
+7 IF '$DATA(ACDH(1))
SET $PIECE(ACDH(1),"=",79)="="
SET DIC(0)="AEQ"
SET DIC="^ACDINTV("
DO ^DIC
IF Y<0
GOTO K
SET ACDVISP=+Y
+8 IF '$DATA(ACD80)
SET $PIECE(ACD80,"=",79)="="
WRITE !,ACD80
+9 FOR
SET %=2
WRITE !,"Are You Sure You wish to DELETE this ENTRY"
DO YN^DICN
IF %=0
WRITE " Answer Yes or No"
IF %=2!(%=-1)
QUIT
IF %=1
DO DEL
GOTO K
+10 WRITE " No action taken...."
+11 QUIT
DEL ;Delete incomplete/incorrect entries
+1 IF '$DATA(ACDVISP)
QUIT
+2 IF '$DATA(ACDH(1))
SET $PIECE(ACDH(1),"=",79)="="
WRITE !!!,ACDH(1)
+3 SET DA=+ACDVISP
SET DIK="^ACDINTV("
DO ^DIK
WRITE !,"** INCOMPLETE or INCORRECT INTERVENTION deleted. **",!,ACDH(1)
+4 WRITE !!?4,"Intervention Deletion Complete...."
+5 QUIT
+6 ;
K ;
+1 KILL DIC,DIE,DA,ACDTOUT,ACDCOMC,ACDDA,ACDDFNP,DR,ACDDR,ACDIO,ACDX,ACDDOV,ACD80,ACDRPC,ACDOK,ACDN0,ACDAGE,ACDDUZZ,ACDLINE,ACDHS,ACDAGE,ACDCAGE,ACDSEX,ACDVET,ACDTRB,ACDTRBN,ACDTRBNM,ACDTRBCD,ACDSTA,ACDATSN,ACDSTANM,ACDSTACD