Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: SD53622P

SD53622P.m

Go to the documentation of this file.
  1. SD53622P ;ALB/CR - SD*5.3*622 INSTALL UTILITY ;10/15/14
  1. ;;5.3;Scheduling;**622**;Aug 13, 1993;Build 30
  1. ; -------------------------------------------------------------------
  1. ; utility to create a mail group used by the Clinic Inactivation
  1. ; option. Sites will need to populate the mail group with the users
  1. ; tasked with taking action to complete a clinic inactivation.
  1. ; -------------------------------------------------------------------
  1. ; ICR #1146 - allows Mailman API use of $$MG^XMBGRP
  1. ;
  1. ; post-install
  1. POST N SDIEN,SDDUZ,SDGROUP,SDSELF,SDTEXT,SDTYPE,SDQUIET,SDXMY
  1. S SDGROUP="SD CLINIC INACTIVATE REMINDER"
  1. S SDSELF=0 ; don't allow self-enrollment
  1. S SDTYPE=0 ; public group (default)
  1. S SDQUIET=1 ; silent flag (default)
  1. S SDXMY(.5)="" ; use Postmaster as the first member of the group
  1. ;
  1. ; group description
  1. S SDTEXT(1)="This mail group is organized to inform Scheduling users"
  1. S SDTEXT(2)="whenever a clinic is inactivated either on the current"
  1. S SDTEXT(3)="date or on a future date. If this group is not populated"
  1. S SDTEXT(4)="with the corresponding users, or if it is deleted, the"
  1. S SDTEXT(5)="clinic inactivation messages will error out. The routine"
  1. S SDTEXT(6)="SDNACT needs this mail group in order to work properly."
  1. ;
  1. S SDIEN=$$FIND1^DIC(3.8,"","X",SDGROUP,"B")
  1. S SDDUZ=$S(+$G(DUZ)>0:DUZ,1:.5) ; group organizer, otherwise Postmaster
  1. I $G(SDIEN)>0 D Q
  1. . D BMES^XPDUTL("The mail group "_SDGROUP_" exists.")
  1. . D MES^XPDUTL("Please make sure that is is populated.")
  1. ;
  1. I $G(SDIEN)=0 D
  1. . D BMES^XPDUTL("The mail group "_SDGROUP_" needs to be created. Please wait...")
  1. ;
  1. S SDIEN=$$MG^XMBGRP(SDGROUP,SDTYPE,SDDUZ,SDSELF,.SDXMY,.SDTEXT,SDQUIET)
  1. I $G(SDIEN)>0 D Q
  1. . D BMES^XPDUTL(" ******************************")
  1. . D MES^XPDUTL(" Mail group "_SDGROUP_" created.")
  1. . D MES^XPDUTL(" After the patch installation, please add other members from Scheduling.")
  1. . D MES^XPDUTL(" ******************************")
  1. E D BMES^XPDUTL(" Unable to create new mail group")
  1. Q