SDES852P ;ALB/BWF - SD*5.3*852 Post Init Routine ; May 24, 2023
;;5.3;SCHEDULING;**852**;AUG 13, 1993;Build 3
;;Per VHA Directive 6402, this routine should not be modified
;
Q
;
EN ; Scheduling Consult Clean-up
D TASK
Q
;
TASK ;
D MES^XPDUTL("")
D MES^XPDUTL(" SD*5.3*852 Pre-Install is being queued to run in the background.")
D MES^XPDUTL(" This PRE-install will report consult requests for appointments that")
D MES^XPDUTL(" have been cancelled, where the consult request was not properly re-opened")
D MES^XPDUTL(" due to a <PARAMETER> error during appointment cancellation.")
D MES^XPDUTL(" This report will be sent to your Mailman Mailbox.")
D MES^XPDUTL("")
N ZTDESC,ZTRTN,ZTIO,ZTSK,X,ZTDTH,ZTSAVE
S ZTDESC="SD*5.3*852 Post Install Routine"
D NOW^%DTC S ZTDTH=X,ZTIO="",ZTRTN="FIXCONSREQS^SDES852P",ZTSAVE("*")="" D ^%ZTLOAD
I $D(ZTSK) D
. D MES^XPDUTL(" >>>Task "_ZTSK_" has been queued.")
. D MES^XPDUTL("")
I '$D(ZTSK) D
. D MES^XPDUTL(" UNABLE TO QUEUE THIS JOB.")
. D MES^XPDUTL(" Please contact the National Help Desk to report this issue.")
Q
FIXCONSREQS ; fix consult requests that were not correctly re-opened
N CANDTTM,POINTER,CONSIEN,CPRSSTAT,APPTSTARTTIME,APPTIEN,DFN,REQUESTIEN,PROVIEN,NOTE
N RESOURCE,CANBYCLINORPAT,CLINICIEN,APPTLENGTH,SDATA,RETURN,BEFOREDATA,CNT,PATNM,SDLINE,TOTCNT
N RESPAPPTIEN,SCHIEN,ORDERIEN
S (TOTCNT,CNT)=0
K ^XTMP("SDES852P")
S ^XTMP("SDES852P",0)=$$FMADD^XLFDT(DT,30)_"^"_DT_"^SD*5.3*852 Post Install Data report"
S CNT=CNT+1
S ^XTMP("SDES852P",CNT)="******************** IMPORTANT *****************************"
S CNT=CNT+1
S ^XTMP("SDES852P",CNT)="PLEASE SEND THIS REPORT TO YOUR LOCAL SCHEDULING STAFF TO"
S CNT=CNT+1
S ^XTMP("SDES852P",CNT)="RESOLVE ACTIVE CONSULTS AND CONSULTS IN A SCHEDULED STATUS"
S CNT=CNT+1
S ^XTMP("SDES852P",CNT)="WITHOUT A LINKED SCHEDULED APPOINTMENT."
S CNT=CNT+1
S ^XTMP("SDES852P",CNT)="****************************************************************"
S CNT=CNT+1
S ^XTMP("SDES852P",CNT)=""
;
S $P(SDLINE,"-",80)=""
S SCHIEN=$O(^ORD(100.01,"B","SCHEDULED",0)) Q:'SCHIEN
S ORDERIEN=0 F S ORDERIEN=$O(^GMR(123,"D",SCHIEN,ORDERIEN)) Q:'ORDERIEN D
.S DFN=$$GET1^DIQ(123,ORDERIEN,.02,"I") Q:'DFN
.S POINTER=ORDERIEN_";GMR(123,"
.; check if this has been re-scheduled
.S RESCHED=$$RESCHEDULED(DFN,POINTER)
.I $P(RESCHED,U)=1 Q
.; appointment responsible for the incorrect consult status
.S RESPAPPTIEN=$P(RESCHED,U,2) Q:'RESPAPPTIEN
.; SETUP REQUIRED VARIABLES
.S APPTSTARTTIME=$$GET1^DIQ(409.84,RESPAPPTIEN,.01,"I")
.S NOTE="Re-opened request - SD*5.3*852"
.S REQUESTIEN=ORDERIEN
.S CANBYCLINORPAT=$$GET1^DIQ(409.84,RESPAPPTIEN,.17,"I")
.S RESOURCE=$$GET1^DIQ(409.84,RESPAPPTIEN,.07,"I") Q:'RESOURCE
.S CLINICIEN=$$GET1^DIQ(409.831,RESOURCE,.04,"I") Q:'CLINICIEN
.; PROVIEN is not used by the api, just set to null
.S PROVIEN=""
.; only fix entries cancelled by SDESOITEAS,SRV
.I $$GET1^DIQ(409.84,RESPAPPTIEN,.121,"E")="SDESOITEAS,SRV" D
..S BEFOREDATA=$$BEFOREEVENT($G(DFN),$G(APPTSTARTTIME),$G(CLINICIEN),.SDATA)
..; re-open the consult request - cancelled appointment
..D REQSET^SDESCONSULTUPD(REQUESTIEN,PROVIEN,"",2,CANBYCLINORPAT,NOTE,APPTSTARTTIME,RESOURCE)
..; update contact main sequence upon re-open
..D UPDCONTSEQ^SDESCONTACTS($G(DFN),$G(REQUESTIEN))
..S APPTLENGTH=$$GET1^DIQ(409.84,RESPAPPTIEN,.18,"I")
..; update clinic availability
..D AVUPDT^SDEC08A(CLINICIEN,APPTSTARTTIME,APPTLENGTH)
..D AFTEREVENT($G(DFN),$G(APPTSTARTTIME),$G(CLINICIEN),$G(BEFOREDATA),.SDATA)
..; Update AMIE C&P EXAM TRACKING (#396.95) record if this appointment is a Compensation and Pension appointment
..I $$GET1^DIQ(409.84,RESPAPPTIEN,.06,"E")="COMPENSATION & PENSION" D AMIECAN^SDESCOMPPEN(.RETURN,DFN,APPTSTARTTIME)
.S TOTCNT=TOTCNT+1
.S PATNM=$$GET1^DIQ(2,DFN,.01,"E")
.S CNT=CNT+1
.S ^XTMP("SDES852P",CNT)=""
.S CNT=CNT+1
.S ^XTMP("SDES852P",CNT)="Appointment Date/Time : "_$$FMTE^XLFDT(APPTSTARTTIME)
.S CNT=CNT+1
.S ^XTMP("SDES852P",CNT)="Appointment IEN : "_RESPAPPTIEN
.S CNT=CNT+1
.S ^XTMP("SDES852P",CNT)="Consult IEN : "_ORDERIEN
.S CNT=CNT+1
.S ^XTMP("SDES852P",CNT)="Consult Status : "_$$GET1^DIQ(123,ORDERIEN,8,"E")
.I $$GET1^DIQ(409.84,RESPAPPTIEN,.12,"I") D
..S CNT=CNT+1
..S ^XTMP("SDES852P",CNT)="Canceled Date/Time : "_$$GET1^DIQ(409.84,RESPAPPTIEN,.12,"E")
..S CNT=CNT+1
..S ^XTMP("SDES852P",CNT)="Canceled By : "_$$GET1^DIQ(409.84,RESPAPPTIEN,.121,"E")
.I $$GET1^DIQ(409.84,RESPAPPTIEN,.1,"I") D
..S CNT=CNT+1
..S ^XTMP("SDES852P",CNT)="Noshow Date/Time : "_$$GET1^DIQ(409.84,RESPAPPTIEN,.101,"E")
..S CNT=CNT+1
..S ^XTMP("SDES852P",CNT)="Noshow By : "_$$GET1^DIQ(409.84,RESPAPPTIEN,.102,"E")
.S CNT=CNT+1
.S ^XTMP("SDES852P",CNT)=SDLINE
S CNT=CNT+1
S ^XTMP("SDES852P",CNT)=""
S CNT=CNT+1
S ^XTMP("SDES852P",CNT)=SDLINE
S CNT=CNT+1
S ^XTMP("SDES852P",CNT)="Total: "_TOTCNT
D MAIL
Q
RESCHEDULED(DFN,VARPTR) ;
N DTLOOP,CHECKAPTIEN,CHKPTR,RESCHED,CANDT,NOSHOWDT,LASTNOSHOWCAN,NOSHOWCANAPTIEN
K ^TMP("SDES852P",$J)
S RESCHED=0
S DTLOOP=0 F S DTLOOP=$O(^SDEC(409.84,"APTDT",DFN,DTLOOP)) Q:'DTLOOP D
.S CHECKAPTIEN=0 F S CHECKAPTIEN=$O(^SDEC(409.84,"APTDT",DFN,DTLOOP,CHECKAPTIEN)) Q:'CHECKAPTIEN D
..; only records that point to the same consult
..S CHKPTR=$$GET1^DIQ(409.84,CHECKAPTIEN,.22,"I")
..I CHKPTR'=VARPTR Q
..; cancellation date/time
..S CANDT=$$GET1^DIQ(409.84,CHECKAPTIEN,.12,"I")
..; no-show date/time
..S NOSHOWDT=$$GET1^DIQ(409.84,CHECKAPTIEN,.1,"I")
..;log cancel and no-show dates with appointmet IEN
..I CANDT S ^TMP("SDES852P",$J,CANDT,CHECKAPTIEN)=""
..I NOSHOWDT S ^TMP("SDES852P",$J,NOSHOWDT,CHECKAPTIEN)=""
..I 'CANDT,'NOSHOWDT S RESCHED=CHECKAPTIEN
I 'RESCHED D Q 0_U_$G(NOSHOWCANAPTIEN)
.S LASTNOSHOWCAN=$O(^TMP("SDES852P",$J,999999999),-1)
.I $G(LASTNOSHOWCAN) S NOSHOWCANAPTIEN=$O(^TMP("SDES852P",$J,LASTNOSHOWCAN,0))
K ^TMP("SDES852P",$J)
Q 1_U_RESCHED
;
AFTEREVENT(DFN,APPTSTARTTIME,CLINICIEN,SDDA,SDATA) ;
N SDCPHDL
S SDCPHDL=$$HANDLE^SDAMEVT(1)
S SDATA=SDDA_U_DFN_U_APPTSTARTTIME_U_CLINICIEN
D CANCEL^SDAMEVT(.SDATA,DFN,APPTSTARTTIME,CLINICIEN,SDDA,2,SDCPHDL)
Q
BEFOREEVENT(DFN,APPTSTARTTIME,CLINICIEN,SDATA) ;
N SDDA,SDCPHDL
S SDDA=$$SCIEN^SDECU2(DFN,CLINICIEN,APPTSTARTTIME)
S SDCPHDL=$$HANDLE^SDAMEVT(1),SDATA=SDDA_U_DFN_U_APPTSTARTTIME_U_CLINICIEN
D BEFORE^SDAMEVT(.SDATA,DFN,APPTSTARTTIME,CLINICIEN,SDDA,SDCPHDL)
Q $G(SDDA)
MAIL ;
; Get Station Number
;
N STANUM,MESS1,XMTEXT,XMSUB,XMY,XMDUZ,DIFROM
S STANUM=$$KSP^XUPARAM("INST")_","
S STANUM=$$GET1^DIQ(4,STANUM,99)
S MESS1="Station: "_STANUM_" - "
;
; Send MailMan message
S XMDUZ=DUZ
S XMTEXT="^XTMP(""SDES852P"","
S XMSUB=MESS1_"SD*5.3*852 post install - Re-opened Consults Report"
S XMDUZ=.5,XMY(DUZ)="",XMY(XMDUZ)=""
S XMY("DUNNAM.DAVID W@DOMAIN.EXT")=""
S XMY("REESE,DARRYL M@DOMAIN.EXT")=""
S XMY("FISHER.BRADLEY@DOMAIN.EXT")=""
D ^XMD
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSDES852P 7119 printed Dec 13, 2024@02:55:12 Page 2
SDES852P ;ALB/BWF - SD*5.3*852 Post Init Routine ; May 24, 2023
+1 ;;5.3;SCHEDULING;**852**;AUG 13, 1993;Build 3
+2 ;;Per VHA Directive 6402, this routine should not be modified
+3 ;
+4 QUIT
+5 ;
EN ; Scheduling Consult Clean-up
+1 DO TASK
+2 QUIT
+3 ;
TASK ;
+1 DO MES^XPDUTL("")
+2 DO MES^XPDUTL(" SD*5.3*852 Pre-Install is being queued to run in the background.")
+3 DO MES^XPDUTL(" This PRE-install will report consult requests for appointments that")
+4 DO MES^XPDUTL(" have been cancelled, where the consult request was not properly re-opened")
+5 DO MES^XPDUTL(" due to a <PARAMETER> error during appointment cancellation.")
+6 DO MES^XPDUTL(" This report will be sent to your Mailman Mailbox.")
+7 DO MES^XPDUTL("")
+8 NEW ZTDESC,ZTRTN,ZTIO,ZTSK,X,ZTDTH,ZTSAVE
+9 SET ZTDESC="SD*5.3*852 Post Install Routine"
+10 DO NOW^%DTC
SET ZTDTH=X
SET ZTIO=""
SET ZTRTN="FIXCONSREQS^SDES852P"
SET ZTSAVE("*")=""
DO ^%ZTLOAD
+11 IF $DATA(ZTSK)
Begin DoDot:1
+12 DO MES^XPDUTL(" >>>Task "_ZTSK_" has been queued.")
+13 DO MES^XPDUTL("")
End DoDot:1
+14 IF '$DATA(ZTSK)
Begin DoDot:1
+15 DO MES^XPDUTL(" UNABLE TO QUEUE THIS JOB.")
+16 DO MES^XPDUTL(" Please contact the National Help Desk to report this issue.")
End DoDot:1
+17 QUIT
FIXCONSREQS ; fix consult requests that were not correctly re-opened
+1 NEW CANDTTM,POINTER,CONSIEN,CPRSSTAT,APPTSTARTTIME,APPTIEN,DFN,REQUESTIEN,PROVIEN,NOTE
+2 NEW RESOURCE,CANBYCLINORPAT,CLINICIEN,APPTLENGTH,SDATA,RETURN,BEFOREDATA,CNT,PATNM,SDLINE,TOTCNT
+3 NEW RESPAPPTIEN,SCHIEN,ORDERIEN
+4 SET (TOTCNT,CNT)=0
+5 KILL ^XTMP("SDES852P")
+6 SET ^XTMP("SDES852P",0)=$$FMADD^XLFDT(DT,30)_"^"_DT_"^SD*5.3*852 Post Install Data report"
+7 SET CNT=CNT+1
+8 SET ^XTMP("SDES852P",CNT)="******************** IMPORTANT *****************************"
+9 SET CNT=CNT+1
+10 SET ^XTMP("SDES852P",CNT)="PLEASE SEND THIS REPORT TO YOUR LOCAL SCHEDULING STAFF TO"
+11 SET CNT=CNT+1
+12 SET ^XTMP("SDES852P",CNT)="RESOLVE ACTIVE CONSULTS AND CONSULTS IN A SCHEDULED STATUS"
+13 SET CNT=CNT+1
+14 SET ^XTMP("SDES852P",CNT)="WITHOUT A LINKED SCHEDULED APPOINTMENT."
+15 SET CNT=CNT+1
+16 SET ^XTMP("SDES852P",CNT)="****************************************************************"
+17 SET CNT=CNT+1
+18 SET ^XTMP("SDES852P",CNT)=""
+19 ;
+20 SET $PIECE(SDLINE,"-",80)=""
+21 SET SCHIEN=$ORDER(^ORD(100.01,"B","SCHEDULED",0))
if 'SCHIEN
QUIT
+22 SET ORDERIEN=0
FOR
SET ORDERIEN=$ORDER(^GMR(123,"D",SCHIEN,ORDERIEN))
if 'ORDERIEN
QUIT
Begin DoDot:1
+23 SET DFN=$$GET1^DIQ(123,ORDERIEN,.02,"I")
if 'DFN
QUIT
+24 SET POINTER=ORDERIEN_";GMR(123,"
+25 ; check if this has been re-scheduled
+26 SET RESCHED=$$RESCHEDULED(DFN,POINTER)
+27 IF $PIECE(RESCHED,U)=1
QUIT
+28 ; appointment responsible for the incorrect consult status
+29 SET RESPAPPTIEN=$PIECE(RESCHED,U,2)
if 'RESPAPPTIEN
QUIT
+30 ; SETUP REQUIRED VARIABLES
+31 SET APPTSTARTTIME=$$GET1^DIQ(409.84,RESPAPPTIEN,.01,"I")
+32 SET NOTE="Re-opened request - SD*5.3*852"
+33 SET REQUESTIEN=ORDERIEN
+34 SET CANBYCLINORPAT=$$GET1^DIQ(409.84,RESPAPPTIEN,.17,"I")
+35 SET RESOURCE=$$GET1^DIQ(409.84,RESPAPPTIEN,.07,"I")
if 'RESOURCE
QUIT
+36 SET CLINICIEN=$$GET1^DIQ(409.831,RESOURCE,.04,"I")
if 'CLINICIEN
QUIT
+37 ; PROVIEN is not used by the api, just set to null
+38 SET PROVIEN=""
+39 ; only fix entries cancelled by SDESOITEAS,SRV
+40 IF $$GET1^DIQ(409.84,RESPAPPTIEN,.121,"E")="SDESOITEAS,SRV"
Begin DoDot:2
+41 SET BEFOREDATA=$$BEFOREEVENT($GET(DFN),$GET(APPTSTARTTIME),$GET(CLINICIEN),.SDATA)
+42 ; re-open the consult request - cancelled appointment
+43 DO REQSET^SDESCONSULTUPD(REQUESTIEN,PROVIEN,"",2,CANBYCLINORPAT,NOTE,APPTSTARTTIME,RESOURCE)
+44 ; update contact main sequence upon re-open
+45 DO UPDCONTSEQ^SDESCONTACTS($GET(DFN),$GET(REQUESTIEN))
+46 SET APPTLENGTH=$$GET1^DIQ(409.84,RESPAPPTIEN,.18,"I")
+47 ; update clinic availability
+48 DO AVUPDT^SDEC08A(CLINICIEN,APPTSTARTTIME,APPTLENGTH)
+49 DO AFTEREVENT($GET(DFN),$GET(APPTSTARTTIME),$GET(CLINICIEN),$GET(BEFOREDATA),.SDATA)
+50 ; Update AMIE C&P EXAM TRACKING (#396.95) record if this appointment is a Compensation and Pension appointment
+51 IF $$GET1^DIQ(409.84,RESPAPPTIEN,.06,"E")="COMPENSATION & PENSION"
DO AMIECAN^SDESCOMPPEN(.RETURN,DFN,APPTSTARTTIME)
End DoDot:2
+52 SET TOTCNT=TOTCNT+1
+53 SET PATNM=$$GET1^DIQ(2,DFN,.01,"E")
+54 SET CNT=CNT+1
+55 SET ^XTMP("SDES852P",CNT)=""
+56 SET CNT=CNT+1
+57 SET ^XTMP("SDES852P",CNT)="Appointment Date/Time : "_$$FMTE^XLFDT(APPTSTARTTIME)
+58 SET CNT=CNT+1
+59 SET ^XTMP("SDES852P",CNT)="Appointment IEN : "_RESPAPPTIEN
+60 SET CNT=CNT+1
+61 SET ^XTMP("SDES852P",CNT)="Consult IEN : "_ORDERIEN
+62 SET CNT=CNT+1
+63 SET ^XTMP("SDES852P",CNT)="Consult Status : "_$$GET1^DIQ(123,ORDERIEN,8,"E")
+64 IF $$GET1^DIQ(409.84,RESPAPPTIEN,.12,"I")
Begin DoDot:2
+65 SET CNT=CNT+1
+66 SET ^XTMP("SDES852P",CNT)="Canceled Date/Time : "_$$GET1^DIQ(409.84,RESPAPPTIEN,.12,"E")
+67 SET CNT=CNT+1
+68 SET ^XTMP("SDES852P",CNT)="Canceled By : "_$$GET1^DIQ(409.84,RESPAPPTIEN,.121,"E")
End DoDot:2
+69 IF $$GET1^DIQ(409.84,RESPAPPTIEN,.1,"I")
Begin DoDot:2
+70 SET CNT=CNT+1
+71 SET ^XTMP("SDES852P",CNT)="Noshow Date/Time : "_$$GET1^DIQ(409.84,RESPAPPTIEN,.101,"E")
+72 SET CNT=CNT+1
+73 SET ^XTMP("SDES852P",CNT)="Noshow By : "_$$GET1^DIQ(409.84,RESPAPPTIEN,.102,"E")
End DoDot:2
+74 SET CNT=CNT+1
+75 SET ^XTMP("SDES852P",CNT)=SDLINE
End DoDot:1
+76 SET CNT=CNT+1
+77 SET ^XTMP("SDES852P",CNT)=""
+78 SET CNT=CNT+1
+79 SET ^XTMP("SDES852P",CNT)=SDLINE
+80 SET CNT=CNT+1
+81 SET ^XTMP("SDES852P",CNT)="Total: "_TOTCNT
+82 DO MAIL
+83 QUIT
RESCHEDULED(DFN,VARPTR) ;
+1 NEW DTLOOP,CHECKAPTIEN,CHKPTR,RESCHED,CANDT,NOSHOWDT,LASTNOSHOWCAN,NOSHOWCANAPTIEN
+2 KILL ^TMP("SDES852P",$JOB)
+3 SET RESCHED=0
+4 SET DTLOOP=0
FOR
SET DTLOOP=$ORDER(^SDEC(409.84,"APTDT",DFN,DTLOOP))
if 'DTLOOP
QUIT
Begin DoDot:1
+5 SET CHECKAPTIEN=0
FOR
SET CHECKAPTIEN=$ORDER(^SDEC(409.84,"APTDT",DFN,DTLOOP,CHECKAPTIEN))
if 'CHECKAPTIEN
QUIT
Begin DoDot:2
+6 ; only records that point to the same consult
+7 SET CHKPTR=$$GET1^DIQ(409.84,CHECKAPTIEN,.22,"I")
+8 IF CHKPTR'=VARPTR
QUIT
+9 ; cancellation date/time
+10 SET CANDT=$$GET1^DIQ(409.84,CHECKAPTIEN,.12,"I")
+11 ; no-show date/time
+12 SET NOSHOWDT=$$GET1^DIQ(409.84,CHECKAPTIEN,.1,"I")
+13 ;log cancel and no-show dates with appointmet IEN
+14 IF CANDT
SET ^TMP("SDES852P",$JOB,CANDT,CHECKAPTIEN)=""
+15 IF NOSHOWDT
SET ^TMP("SDES852P",$JOB,NOSHOWDT,CHECKAPTIEN)=""
+16 IF 'CANDT
IF 'NOSHOWDT
SET RESCHED=CHECKAPTIEN
End DoDot:2
End DoDot:1
+17 IF 'RESCHED
Begin DoDot:1
+18 SET LASTNOSHOWCAN=$ORDER(^TMP("SDES852P",$JOB,999999999),-1)
+19 IF $GET(LASTNOSHOWCAN)
SET NOSHOWCANAPTIEN=$ORDER(^TMP("SDES852P",$JOB,LASTNOSHOWCAN,0))
End DoDot:1
QUIT 0_U_$GET(NOSHOWCANAPTIEN)
+20 KILL ^TMP("SDES852P",$JOB)
+21 QUIT 1_U_RESCHED
+22 ;
AFTEREVENT(DFN,APPTSTARTTIME,CLINICIEN,SDDA,SDATA) ;
+1 NEW SDCPHDL
+2 SET SDCPHDL=$$HANDLE^SDAMEVT(1)
+3 SET SDATA=SDDA_U_DFN_U_APPTSTARTTIME_U_CLINICIEN
+4 DO CANCEL^SDAMEVT(.SDATA,DFN,APPTSTARTTIME,CLINICIEN,SDDA,2,SDCPHDL)
+5 QUIT
BEFOREEVENT(DFN,APPTSTARTTIME,CLINICIEN,SDATA) ;
+1 NEW SDDA,SDCPHDL
+2 SET SDDA=$$SCIEN^SDECU2(DFN,CLINICIEN,APPTSTARTTIME)
+3 SET SDCPHDL=$$HANDLE^SDAMEVT(1)
SET SDATA=SDDA_U_DFN_U_APPTSTARTTIME_U_CLINICIEN
+4 DO BEFORE^SDAMEVT(.SDATA,DFN,APPTSTARTTIME,CLINICIEN,SDDA,SDCPHDL)
+5 QUIT $GET(SDDA)
MAIL ;
+1 ; Get Station Number
+2 ;
+3 NEW STANUM,MESS1,XMTEXT,XMSUB,XMY,XMDUZ,DIFROM
+4 SET STANUM=$$KSP^XUPARAM("INST")_","
+5 SET STANUM=$$GET1^DIQ(4,STANUM,99)
+6 SET MESS1="Station: "_STANUM_" - "
+7 ;
+8 ; Send MailMan message
+9 SET XMDUZ=DUZ
+10 SET XMTEXT="^XTMP(""SDES852P"","
+11 SET XMSUB=MESS1_"SD*5.3*852 post install - Re-opened Consults Report"
+12 SET XMDUZ=.5
SET XMY(DUZ)=""
SET XMY(XMDUZ)=""
+13 SET XMY("DUNNAM.DAVID W@DOMAIN.EXT")=""
+14 SET XMY("REESE,DARRYL M@DOMAIN.EXT")=""
+15 SET XMY("FISHER.BRADLEY@DOMAIN.EXT")=""
+16 DO ^XMD
+17 QUIT