XUHUIMSG ;SFISC/SO- Create Mail Message Of Change ;6:27 AM 10 Jun 2002 [ 07/29/2004 9:01 AM ]
;;8.0;KERNEL;**236**;Jul 10, 1995
I XUHUIXR="AXUHUI" D M200 Q
D MKEY
Q
;
M200 ; Build message for top level file 200 stuff
N I,MTEXT,SUBJ
S I=1,MTEXT=""
S MTEXT(I)=" ",I=I+1
S MTEXT(I)="Event Change - Name or Termination Date or DOB or SSN or several of these.",I=I+1
S MTEXT(I)=" ",I=I+1
S MTEXT(I)="Orginal Name: "_XUHUIX1,I=I+1
S MTEXT(I)=" ",I=I+1
S MTEXT(I)="Old Name: "_XUHUIX1(1)_" New Name: "_XUHUIX2(1),I=I+1
S MTEXT(I)="Old Termination Date: "_XUHUIX1(2)_" New Termination Date: "_XUHUIX2(2),I=I+1
S MTEXT(I)="Old DOB: "_XUHUIX1(3)_" New DOB: "_XUHUIX2(3),I=I+1
S MTEXT(I)="Old SSN: "_XUHUIX1(4)_" New SSN: "_XUHUIX2(4)
S SUBJ="Hui Change Event (New Person)"
D SENDIT
Q
;
MKEY ; Build message for Provider Key change of status
N MTEXT,I,SUBJ,NAME,SSN
S I=1,MTEXT=""
S MTEXT(I)=" ",I=I+1
D CLEAN^DILF
S NAME=$$GET1^DIQ(200,XUHUIDA(1)_",","NAME")
S SSN=$$GET1^DIQ(200,XUHUIDA(1)_",","SSN")
D CLEAN^DILF
S MTEXT(I)="Name: "_NAME_" SSN: "_SSN,I=I+1
D CLEAN^DILF
I $P(^DIC(19.1,XUHUIX,0),U)="PROVIDER" S MTEXT(I)="Provider Key: "_$S(XUHUIA="S":"Allocated",1:"De-allocated")
S SUBJ="Hui Change Event (Provider Key)"
D SENDIT
Q
;
SENDIT ; Send the message
; Test to see if there are MEMBERS to prevent Unreferenced message
I '$$GOTLOCAL^XMXAPIG("XUHUI CHANGE EVENT") Q ;Mail Group Has No Members
; Mail Group Has Memebers so send the message
D SENDMSG^XMXAPI(DUZ,SUBJ,"MTEXT","G.XUHUI CHANGE EVENT")
Q
XUHUIMSG ;SFISC/SO- Create Mail Message Of Change ;6:27 AM 10 Jun 2002 [ 07/29/2004 9:01 AM ]
+1 ;;8.0;KERNEL;**236**;Jul 10, 1995
+2 IF XUHUIXR="AXUHUI"
DO M200
QUIT
+3 DO MKEY
+4 QUIT
+5 ;
M200 ; Build message for top level file 200 stuff
+1 NEW I,MTEXT,SUBJ
+2 SET I=1
SET MTEXT=""
+3 SET MTEXT(I)=" "
SET I=I+1
+4 SET MTEXT(I)="Event Change - Name or Termination Date or DOB or SSN or several of these."
SET I=I+1
+5 SET MTEXT(I)=" "
SET I=I+1
+6 SET MTEXT(I)="Orginal Name: "_XUHUIX1
SET I=I+1
+7 SET MTEXT(I)=" "
SET I=I+1
+8 SET MTEXT(I)="Old Name: "_XUHUIX1(1)_" New Name: "_XUHUIX2(1)
SET I=I+1
+9 SET MTEXT(I)="Old Termination Date: "_XUHUIX1(2)_" New Termination Date: "_XUHUIX2(2)
SET I=I+1
+10 SET MTEXT(I)="Old DOB: "_XUHUIX1(3)_" New DOB: "_XUHUIX2(3)
SET I=I+1
+11 SET MTEXT(I)="Old SSN: "_XUHUIX1(4)_" New SSN: "_XUHUIX2(4)
+12 SET SUBJ="Hui Change Event (New Person)"
+13 DO SENDIT
+14 QUIT
+15 ;
MKEY ; Build message for Provider Key change of status
+1 NEW MTEXT,I,SUBJ,NAME,SSN
+2 SET I=1
SET MTEXT=""
+3 SET MTEXT(I)=" "
SET I=I+1
+4 DO CLEAN^DILF
+5 SET NAME=$$GET1^DIQ(200,XUHUIDA(1)_",","NAME")
+6 SET SSN=$$GET1^DIQ(200,XUHUIDA(1)_",","SSN")
+7 DO CLEAN^DILF
+8 SET MTEXT(I)="Name: "_NAME_" SSN: "_SSN
SET I=I+1
+9 DO CLEAN^DILF
+10 IF $PIECE(^DIC(19.1,XUHUIX,0),U)="PROVIDER"
SET MTEXT(I)="Provider Key: "_$SELECT(XUHUIA="S":"Allocated",1:"De-allocated")
+11 SET SUBJ="Hui Change Event (Provider Key)"
+12 DO SENDIT
+13 QUIT
+14 ;
SENDIT ; Send the message
+1 ; Test to see if there are MEMBERS to prevent Unreferenced message
+2 ;Mail Group Has No Members
IF '$$GOTLOCAL^XMXAPIG("XUHUI CHANGE EVENT")
QUIT
+3 ; Mail Group Has Memebers so send the message
+4 DO SENDMSG^XMXAPI(DUZ,SUBJ,"MTEXT","G.XUHUI CHANGE EVENT")
+5 QUIT