SDES930P ;ALB/RN - SD*5.3*930 Post Init Routine ; MAR 03, 2026
;;5.3;SCHEDULING;**930**;AUG 13, 1993;Build 4
;;Per VHA Directive 6402, this routine should not be modified
;;
Q
;
EN ; ; Report of Clinics with Default Appointment type of "WORLD WAR II"
D TASK
Q
;
TASK ;
D MES^XPDUTL("")
D MES^XPDUTL(" SD*5.3*930 Post-Install creates a Report of Clinics")
D MES^XPDUTL(" that have WORLD WAR II as default appointment type.")
D MES^XPDUTL(" Job is queued to run in the background. Once it finishes")
D MES^XPDUTL(" a MailMan message will be sent to Chad Mitchell, Katherine")
D MES^XPDUTL(" and Siobhan to provide them the Clinic Report details.")
D MES^XPDUTL("")
N ZTDESC,ZTRTN,ZTIO,ZTSK,X,ZTDTH,ZTSAVE
S ZTDESC="SD*5.3*930 Post Install Routine"
D NOW^%DTC S ZTDTH=X,ZTIO="",ZTRTN="WWIITYPLST^SDES930P",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
;
WWIITYPLST ; Report of Clinics with Default Appointment type of "WORLD WAR II"
K ^XTMP("SDES930P")
N CIEN,DEFAPTTYP,COUNT,CLINICNAME
S CIEN=0,COUNT=1
F S CIEN=$O(^SC(CIEN)) Q:'CIEN D
.Q:$$INACTIVE^SDES2UTIL(CIEN)
.S DEFAPTTYP=$$GET1^DIQ(44,CIEN,2507)
.I DEFAPTTYP="WORLD WAR II" D
..S CLINICNAME=$$GET1^DIQ(44,CIEN,.01,"E")
..S COUNT=COUNT+1
..S ^XTMP("SDES930P",COUNT)=CIEN_"^"_CLINICNAME_"^"_DEFAPTTYP
;
S ^XTMP("SDES930P",0)=$$FMADD^XLFDT(DT,30)_"^"_DT_"^SD*5.3*930"
S ^XTMP("SDES930P",1)="CLINIC IEN^CLINIC NAME^DEFAULT APPOINTMENT TYPE"
S COUNT=COUNT+1
S ^XTMP("SDES930P",COUNT)="A total of "_(COUNT-2)_" records were identified."
I COUNT=2 S ^XTMP("SDES930P",1)="No Clinics found with Default Appointment Type WORLD WAR II."
S ^XTMP("SDES930P",COUNT+1)=""
S ^XTMP("SDES930P",COUNT+2)="SDES930P post install Appt type WORLD WAR II (VSE-114488) has run to completion."
D MAIL
K ^XTMP("SDES930P")
Q
;
MAIL ;
N STANUM,MESS1,XMTEXT,XMSUB,XMY,XMDUZ,DIFROM,%,D,D0,D1,D2,DG,DIC,DICR,DIW,XMDUN,XMZ
S STANUM=$$KSP^XUPARAM("INST")_","
S STANUM=$$GET1^DIQ(4,STANUM,99)
S MESS1="Station: "_STANUM_" - "
S XMDUZ=DUZ
S XMTEXT="^XTMP(""SDES930P"","
S XMSUB=MESS1_"SD*5.3*930 - Post Install Data Report"
S XMDUZ=.5,XMY(DUZ)="",XMY(XMDUZ)=""
S XMY("siobhan.kirkpatrick@domain.ext")=""
S XMY("Chad.Mitchell@domain.ext")=""
S XMY("Katherine.Shelor@domain.ext")=""
D ^XMD
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSDES930P 2566 printed May 25, 2026@13:00:32 Page 2
SDES930P ;ALB/RN - SD*5.3*930 Post Init Routine ; MAR 03, 2026
+1 ;;5.3;SCHEDULING;**930**;AUG 13, 1993;Build 4
+2 ;;Per VHA Directive 6402, this routine should not be modified
+3 ;;
+4 QUIT
+5 ;
EN ; ; Report of Clinics with Default Appointment type of "WORLD WAR II"
+1 DO TASK
+2 QUIT
+3 ;
TASK ;
+1 DO MES^XPDUTL("")
+2 DO MES^XPDUTL(" SD*5.3*930 Post-Install creates a Report of Clinics")
+3 DO MES^XPDUTL(" that have WORLD WAR II as default appointment type.")
+4 DO MES^XPDUTL(" Job is queued to run in the background. Once it finishes")
+5 DO MES^XPDUTL(" a MailMan message will be sent to Chad Mitchell, Katherine")
+6 DO MES^XPDUTL(" and Siobhan to provide them the Clinic Report details.")
+7 DO MES^XPDUTL("")
+8 NEW ZTDESC,ZTRTN,ZTIO,ZTSK,X,ZTDTH,ZTSAVE
+9 SET ZTDESC="SD*5.3*930 Post Install Routine"
+10 DO NOW^%DTC
SET ZTDTH=X
SET ZTIO=""
SET ZTRTN="WWIITYPLST^SDES930P"
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
+18 ;
WWIITYPLST ; Report of Clinics with Default Appointment type of "WORLD WAR II"
+1 KILL ^XTMP("SDES930P")
+2 NEW CIEN,DEFAPTTYP,COUNT,CLINICNAME
+3 SET CIEN=0
SET COUNT=1
+4 FOR
SET CIEN=$ORDER(^SC(CIEN))
if 'CIEN
QUIT
Begin DoDot:1
+5 if $$INACTIVE^SDES2UTIL(CIEN)
QUIT
+6 SET DEFAPTTYP=$$GET1^DIQ(44,CIEN,2507)
+7 IF DEFAPTTYP="WORLD WAR II"
Begin DoDot:2
+8 SET CLINICNAME=$$GET1^DIQ(44,CIEN,.01,"E")
+9 SET COUNT=COUNT+1
+10 SET ^XTMP("SDES930P",COUNT)=CIEN_"^"_CLINICNAME_"^"_DEFAPTTYP
End DoDot:2
End DoDot:1
+11 ;
+12 SET ^XTMP("SDES930P",0)=$$FMADD^XLFDT(DT,30)_"^"_DT_"^SD*5.3*930"
+13 SET ^XTMP("SDES930P",1)="CLINIC IEN^CLINIC NAME^DEFAULT APPOINTMENT TYPE"
+14 SET COUNT=COUNT+1
+15 SET ^XTMP("SDES930P",COUNT)="A total of "_(COUNT-2)_" records were identified."
+16 IF COUNT=2
SET ^XTMP("SDES930P",1)="No Clinics found with Default Appointment Type WORLD WAR II."
+17 SET ^XTMP("SDES930P",COUNT+1)=""
+18 SET ^XTMP("SDES930P",COUNT+2)="SDES930P post install Appt type WORLD WAR II (VSE-114488) has run to completion."
+19 DO MAIL
+20 KILL ^XTMP("SDES930P")
+21 QUIT
+22 ;
MAIL ;
+1 NEW STANUM,MESS1,XMTEXT,XMSUB,XMY,XMDUZ,DIFROM,%,D,D0,D1,D2,DG,DIC,DICR,DIW,XMDUN,XMZ
+2 SET STANUM=$$KSP^XUPARAM("INST")_","
+3 SET STANUM=$$GET1^DIQ(4,STANUM,99)
+4 SET MESS1="Station: "_STANUM_" - "
+5 SET XMDUZ=DUZ
+6 SET XMTEXT="^XTMP(""SDES930P"","
+7 SET XMSUB=MESS1_"SD*5.3*930 - Post Install Data Report"
+8 SET XMDUZ=.5
SET XMY(DUZ)=""
SET XMY(XMDUZ)=""
+9 SET XMY("siobhan.kirkpatrick@domain.ext")=""
+10 SET XMY("Chad.Mitchell@domain.ext")=""
+11 SET XMY("Katherine.Shelor@domain.ext")=""
+12 DO ^XMD
+13 QUIT
+14 ;