ACDVXMD ;IHS/ADC/EDE/KML - MAIL NOTICE FOR INCOMING DATA;
;;4.1;CHEMICAL DEPENDENCY MIS;;MAY 11, 1998
;;
;****************************************************
;//^ACDVIMP
;//^ACDVSRV1
;***************************************************
EN(ACDPARM1,ACDPARM2) ;EP
;ACDPARM1 = unix file or mail server message #
;ACDPARM2 = header values
;
S Y=$P(ACDPARM2(4),U) S ACDRNG=$$DD^ACDFUNC(Y),Y=$P(ACDPARM2(4),U,2) S ACDRNG="DATE RANGE : "_ACDRNG_" 'through' "_$$DD^ACDFUNC(Y)_"."
S XMDUZ="CDMIS V4.0 PACKAGE"
;
;Set the actual message text
;ACDOWN exists if a facility tries to import its own extract (areas)
;or the incoming data is a suspected duplicate.
;
S ACDMSG(1,0)="CDMIS FILE : "_ACDPARM1_$S($D(ACDOWN):" has been STOPPED",1:"")
;
;^ACDV1TMP will exists it I detect that the destination machine
;receiving imports has a location file corruption."
I $D(^ACDV1TMP) S ACDMSG(1,0)="CDMIS FILE: "_ACDPARM1_" has been STOPPED"
;
S ACDMSG(2,0)="DATA ORIGIN:"_ACDPARM2(2)
S ACDMSG(3,0)=ACDRNG
S ACDMSG(4,0)=" "
S ACDMSG(5,0)="This message is a AUDIT TRAIL. Do *NOT* DELETE this message."
S ACDMSG(6,0)="Save this message to a basket other than 'IN' for long term storage."
S XMTEXT="ACDMSG("
;
;
S XMSUB="DATA TRANSFER COMPLETE"
I $D(ACDOWN) S XMSUB="AREAS OWN DATA/OR DUPE DATA (IMPORT FAILED)"
I $D(^ACDV1TMP) S XMSUB="LOCATION FILE CORRUPTION (IMPORT FAILED)"
;
;User has bumped the server with a goose message. (lets get the user)
I $D(ACDGOOSE) S ACDMSG(7,0)="",ACDMSG(8,0)="WARNING...SERVER INTRUSION. * CONTACT SITE MANAGER IMMEDIATELY."
;
;Send audit message to holder of a key (postmaster by default)
K XMY S XMY(.5)="" I $D(^XUSEC("ACDZ SUPER0")) F ACDDUZ=0:0 S ACDDUZ=$O(^XUSEC("ACDZ SUPER0",ACDDUZ)) Q:'ACDDUZ S XMY(ACDDUZ)=""
;
D ^XMD
W !,"Mail message audit created.....",*7,!!
Q
K ;
ACDVXMD ;IHS/ADC/EDE/KML - MAIL NOTICE FOR INCOMING DATA;
+1 ;;4.1;CHEMICAL DEPENDENCY MIS;;MAY 11, 1998
+2 ;;
+3 ;****************************************************
+4 ;//^ACDVIMP
+5 ;//^ACDVSRV1
+6 ;***************************************************
EN(ACDPARM1,ACDPARM2) ;EP
+1 ;ACDPARM1 = unix file or mail server message #
+2 ;ACDPARM2 = header values
+3 ;
+4 SET Y=$PIECE(ACDPARM2(4),U)
SET ACDRNG=$$DD^ACDFUNC(Y)
SET Y=$PIECE(ACDPARM2(4),U,2)
SET ACDRNG="DATE RANGE : "_ACDRNG_" 'through' "_$$DD^ACDFUNC(Y)_"."
+5 SET XMDUZ="CDMIS V4.0 PACKAGE"
+6 ;
+7 ;Set the actual message text
+8 ;ACDOWN exists if a facility tries to import its own extract (areas)
+9 ;or the incoming data is a suspected duplicate.
+10 ;
+11 SET ACDMSG(1,0)="CDMIS FILE : "_ACDPARM1_$SELECT($DATA(ACDOWN):" has been STOPPED",1:"")
+12 ;
+13 ;^ACDV1TMP will exists it I detect that the destination machine
+14 ;receiving imports has a location file corruption."
+15 IF $DATA(^ACDV1TMP)
SET ACDMSG(1,0)="CDMIS FILE: "_ACDPARM1_" has been STOPPED"
+16 ;
+17 SET ACDMSG(2,0)="DATA ORIGIN:"_ACDPARM2(2)
+18 SET ACDMSG(3,0)=ACDRNG
+19 SET ACDMSG(4,0)=" "
+20 SET ACDMSG(5,0)="This message is a AUDIT TRAIL. Do *NOT* DELETE this message."
+21 SET ACDMSG(6,0)="Save this message to a basket other than 'IN' for long term storage."
+22 SET XMTEXT="ACDMSG("
+23 ;
+24 ;
+25 SET XMSUB="DATA TRANSFER COMPLETE"
+26 IF $DATA(ACDOWN)
SET XMSUB="AREAS OWN DATA/OR DUPE DATA (IMPORT FAILED)"
+27 IF $DATA(^ACDV1TMP)
SET XMSUB="LOCATION FILE CORRUPTION (IMPORT FAILED)"
+28 ;
+29 ;User has bumped the server with a goose message. (lets get the user)
+30 IF $DATA(ACDGOOSE)
SET ACDMSG(7,0)=""
SET ACDMSG(8,0)="WARNING...SERVER INTRUSION. * CONTACT SITE MANAGER IMMEDIATELY."
+31 ;
+32 ;Send audit message to holder of a key (postmaster by default)
+33 KILL XMY
SET XMY(.5)=""
IF $DATA(^XUSEC("ACDZ SUPER0"))
FOR ACDDUZ=0:0
SET ACDDUZ=$ORDER(^XUSEC("ACDZ SUPER0",ACDDUZ))
IF 'ACDDUZ
QUIT
SET XMY(ACDDUZ)=""
+34 ;
+35 DO ^XMD
+36 WRITE !,"Mail message audit created.....",*7,!!
+37 QUIT
K ;