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

SDOQMPST.m

Go to the documentation of this file.
  1. SDOQMPST ;ALB/SCK - Performance Measure Post-Init ; 7/25/96
  1. ;;5.3;SCHEDULING;**47,1015**;AUG 13,1993;Build 21
  1. ;
  1. START ;
  1. I 'XPDQUES("POST001") S XPDABORT=1 Q
  1. ;
  1. D BMES^XPDUTL("Beginning Post-Install")
  1. ;
  1. I '$$NEWCP^XPDUTL("POST_1","OPT1^SDOQMPST",0) D
  1. . D BMES^XPDUTL("Error creating checkpoint OPT1")
  1. ;
  1. I '$$NEWCP^XPDUTL("POST_2","OPT2^SDOQMPST",0) D
  1. . D BMES^XPDUTL("Error creating checkpoint OPT2")
  1. ;
  1. I '$$NEWCP^XPDUTL("POST_3","MAIL1^SDOQMPST",0) D
  1. . D BMES^XPDUTL("Error creating checkpoint MAIL1")
  1. ;
  1. I '$$NEWCP^XPDUTL("POST_4","NET^SDOQMPST",0) D
  1. . D BMES^XPDUTL("Error creating checkpoint for Domain Name")
  1. QUIT Q
  1. ;
  1. OPT1 ;
  1. N SDIEN,SDSIEN,SCERR,MSG,SDFLAG,DIFROM
  1. ;
  1. S SDIEN="",SDIEN=$O(^DIC(19,"B","SDOQM PM NIGHTLY JOB",SDIEN))
  1. I SDIEN']"" D Q
  1. . S MSG(1)="Error: the SDOQM PM NIGHTLY JOB option was not loaded during the"
  1. . S MSG(2)="KIDs install. This option will need to be created."
  1. . D MES^XPDUTL(.MSG) K MSG
  1. ;
  1. S (SDFLAG,SDSIEN)="",SDSIEN=$O(^DIC(19.2,"B",SDIEN,SDSIEN))
  1. S:SDSIEN']"" SDFLAG="L"
  1. ;
  1. I SDSIEN]"",+$P($G(^DIC(19.2,SDSIEN,0)),U,2)>0 S Y=$P(^(0),U,2) D Q
  1. . D DD^%DT
  1. . D BMES^XPDUTL("The SDOQM PM NIGHTLY JOB is already scheduled for "_Y)
  1. ;
  1. D RESCH^XUTMOPT("SDOQM PM NIGHTLY JOB","","","1D",SDFLAG)
  1. S SDSIEN="",SDSIEN=$O(^DIC(19.2,"B",SDIEN,SDSIEN))
  1. I SDSIEN']"" D Q
  1. . K MSG
  1. . S MSG(1)="The SDOQM PM NIGHTLY JOB scheduling option was not created."
  1. . S MSG(2)="You will need to create this entry in the OPTION SCHEDULING ile"
  1. . S MSG(3)="manually."
  1. . D MES^XPDUTL(.MSG)
  1. ;
  1. Q
  1. ;
  1. OPT2 ;
  1. N SDIEN
  1. S SDIEN="",SDIEN=$O(^DIC(19,"B","SDOQM CLINIC NEXT AVAIL REPORT",SDIEN))
  1. I SDIEN']"" D
  1. . D BMES^XPDUTL("Error: the SDOQM CLINIC NEXT AVAIL REPORT option was not loaded")
  1. Q
  1. ;
  1. MAIL1 ;
  1. N SDMIEN,DES,MSG,SDMAIL
  1. ;
  1. D BMES^XPDUTL("Creating local mail group for PM nightly job...")
  1. ;
  1. S SDMAIL="SD PM NOTIFICATION"
  1. S SDMIEN="",SDMIEN=$O(^XMB(3.8,"B",SDMAIL,SDMIEN))
  1. I SDMIEN']"" D Q
  1. . S DES(0)="Mail group for local receipt of Performance Measure access extracts."
  1. . S X=$$MG^XMBGRP(SDMAIL,0,$S(+$G(DUZ)>0:DUZ,1:.5),0,"",.DES,1)
  1. . I 'X D Q
  1. .. D BMES^XPDUTL("There was an error setting up the Mail group.")
  1. . S MSG(0)="The SD PM NOTIFICATION mail group has been created."
  1. . S MSG(1)="After this install is completed, you will need to add"
  1. . S MSG(2)="the appropriate members who need to receive the PM"
  1. . S MSG(3)="confirmation messages from the server."
  1. . D MES^XPDUTL(.MSG)
  1. ;
  1. I SDMIEN]"" D
  1. . D BMES^XPDUTL("Mail group already exists, please make sure appropriate members are added.")
  1. ;
  1. Q
  1. NET ;
  1. N MSG
  1. ;
  1. I '$D(^XMB("NETNAME")) D Q
  1. . S MSG(0)="The Domain Name for this server is not defined. You will not"
  1. . S MSG(1)="be able to receive the PM confirmation messages from the data collection server."
  1. . S MSG(2)="Please contact your IRM staff for assistance."
  1. . D MES^XPDUTL(.MSG)
  1. ;
  1. D BMES^XPDUTL("Domain Name OK")
  1. Q