- SD53622P ;ALB/CR - SD*5.3*622 INSTALL UTILITY ;10/15/14
- ;;5.3;Scheduling;**622**;Aug 13, 1993;Build 30
- ; -------------------------------------------------------------------
- ; utility to create a mail group used by the Clinic Inactivation
- ; option. Sites will need to populate the mail group with the users
- ; tasked with taking action to complete a clinic inactivation.
- ; -------------------------------------------------------------------
- ; ICR #1146 - allows Mailman API use of $$MG^XMBGRP
- ;
- ; post-install
- POST N SDIEN,SDDUZ,SDGROUP,SDSELF,SDTEXT,SDTYPE,SDQUIET,SDXMY
- S SDGROUP="SD CLINIC INACTIVATE REMINDER"
- S SDSELF=0 ; don't allow self-enrollment
- S SDTYPE=0 ; public group (default)
- S SDQUIET=1 ; silent flag (default)
- S SDXMY(.5)="" ; use Postmaster as the first member of the group
- ;
- ; group description
- S SDTEXT(1)="This mail group is organized to inform Scheduling users"
- S SDTEXT(2)="whenever a clinic is inactivated either on the current"
- S SDTEXT(3)="date or on a future date. If this group is not populated"
- S SDTEXT(4)="with the corresponding users, or if it is deleted, the"
- S SDTEXT(5)="clinic inactivation messages will error out. The routine"
- S SDTEXT(6)="SDNACT needs this mail group in order to work properly."
- ;
- S SDIEN=$$FIND1^DIC(3.8,"","X",SDGROUP,"B")
- S SDDUZ=$S(+$G(DUZ)>0:DUZ,1:.5) ; group organizer, otherwise Postmaster
- I $G(SDIEN)>0 D Q
- . D BMES^XPDUTL("The mail group "_SDGROUP_" exists.")
- . D MES^XPDUTL("Please make sure that is is populated.")
- ;
- I $G(SDIEN)=0 D
- . D BMES^XPDUTL("The mail group "_SDGROUP_" needs to be created. Please wait...")
- ;
- S SDIEN=$$MG^XMBGRP(SDGROUP,SDTYPE,SDDUZ,SDSELF,.SDXMY,.SDTEXT,SDQUIET)
- I $G(SDIEN)>0 D Q
- . D BMES^XPDUTL(" ******************************")
- . D MES^XPDUTL(" Mail group "_SDGROUP_" created.")
- . D MES^XPDUTL(" After the patch installation, please add other members from Scheduling.")
- . D MES^XPDUTL(" ******************************")
- E D BMES^XPDUTL(" Unable to create new mail group")
- Q
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSD53622P 2060 printed Apr 23, 2025@18:59:49 Page 2
- SD53622P ;ALB/CR - SD*5.3*622 INSTALL UTILITY ;10/15/14
- +1 ;;5.3;Scheduling;**622**;Aug 13, 1993;Build 30
- +2 ; -------------------------------------------------------------------
- +3 ; utility to create a mail group used by the Clinic Inactivation
- +4 ; option. Sites will need to populate the mail group with the users
- +5 ; tasked with taking action to complete a clinic inactivation.
- +6 ; -------------------------------------------------------------------
- +7 ; ICR #1146 - allows Mailman API use of $$MG^XMBGRP
- +8 ;
- +9 ; post-install
- POST NEW SDIEN,SDDUZ,SDGROUP,SDSELF,SDTEXT,SDTYPE,SDQUIET,SDXMY
- +1 SET SDGROUP="SD CLINIC INACTIVATE REMINDER"
- +2 ; don't allow self-enrollment
- SET SDSELF=0
- +3 ; public group (default)
- SET SDTYPE=0
- +4 ; silent flag (default)
- SET SDQUIET=1
- +5 ; use Postmaster as the first member of the group
- SET SDXMY(.5)=""
- +6 ;
- +7 ; group description
- +8 SET SDTEXT(1)="This mail group is organized to inform Scheduling users"
- +9 SET SDTEXT(2)="whenever a clinic is inactivated either on the current"
- +10 SET SDTEXT(3)="date or on a future date. If this group is not populated"
- +11 SET SDTEXT(4)="with the corresponding users, or if it is deleted, the"
- +12 SET SDTEXT(5)="clinic inactivation messages will error out. The routine"
- +13 SET SDTEXT(6)="SDNACT needs this mail group in order to work properly."
- +14 ;
- +15 SET SDIEN=$$FIND1^DIC(3.8,"","X",SDGROUP,"B")
- +16 ; group organizer, otherwise Postmaster
- SET SDDUZ=$SELECT(+$GET(DUZ)>0:DUZ,1:.5)
- +17 IF $GET(SDIEN)>0
- Begin DoDot:1
- +18 DO BMES^XPDUTL("The mail group "_SDGROUP_" exists.")
- +19 DO MES^XPDUTL("Please make sure that is is populated.")
- End DoDot:1
- QUIT
- +20 ;
- +21 IF $GET(SDIEN)=0
- Begin DoDot:1
- +22 DO BMES^XPDUTL("The mail group "_SDGROUP_" needs to be created. Please wait...")
- End DoDot:1
- +23 ;
- +24 SET SDIEN=$$MG^XMBGRP(SDGROUP,SDTYPE,SDDUZ,SDSELF,.SDXMY,.SDTEXT,SDQUIET)
- +25 IF $GET(SDIEN)>0
- Begin DoDot:1
- +26 DO BMES^XPDUTL(" ******************************")
- +27 DO MES^XPDUTL(" Mail group "_SDGROUP_" created.")
- +28 DO MES^XPDUTL(" After the patch installation, please add other members from Scheduling.")
- +29 DO MES^XPDUTL(" ******************************")
- End DoDot:1
- QUIT
- +30 IF '$TEST
- DO BMES^XPDUTL(" Unable to create new mail group")
- +31 QUIT