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

SCMCPST.m

Go to the documentation of this file.
  1. SCMCPST ;ALB/REW - PCMM Post-init ; 4 Feb 1996
  1. ;;5.3;Scheduling;**41,1015**;AUG 13, 1993;Build 21
  1. EN ;
  1. D MESS("PCMM Post-init Actions:","!")
  1. N SCUSR,SCVAR
  1. N SCLSEQ,SCN,SCESEQ,SCPARM,SCP,SCBEGIN,SCEND,SCINCL,SCDTS
  1. IF '$$EXTCHK D G QTEN
  1. .D MESS("...Problem with Package Environment")
  1. .D ABORT
  1. D MESS("...Environment Ok")
  1. IF '$$DEFAULT D G QTEN
  1. .D MESS("...Problem with Setting up default variables")
  1. .D ABORT
  1. D MESS("...Default setup Ok")
  1. IF '$$OKCLEAN D G QTEN
  1. .D MESS("...Problem with Cleanup")
  1. .D ABORT
  1. D MESS("... Cleanup Ok")
  1. D MESS(">>>PCMM Post-init Routine is complete","!!")
  1. QTEN Q
  1. ;
  1. EXTCHK() ;environment check
  1. D MESS(">>> Checking Package Environment","!!")
  1. N SCOK
  1. S (SCOK,SCUSR)=1
  1. S:'$$GLOBCHK SCOK=0
  1. QTEXT D:'SCOK MESS("Problem with Environment Checker. Post-init aborted")
  1. Q SCOK
  1. ;
  1. DEFAULT() ;setup system defaults
  1. N DR,DA,DIE,X,Y,SCOK
  1. S SCOK=1
  1. D MESS(">>> Setting Default System Settings","!!")
  1. D MESS(">>> SCHEDULING PARAMETER FILE (#404.91)","!?4")
  1. IF '$D(^SD(404.91,1,0))#2 D
  1. .K ^SD(404.91,1)
  1. .K DO,DD
  1. .S DIC="^SD(404.91,"
  1. .S DIC(0)="L"
  1. .S X=1
  1. .D FILE^DICN
  1. D MESS("'USE USR CLASS FUNCTIONALITY?' Field(#801)","!?8")
  1. IF $G(SCUSR) D
  1. .IF $P($G(^SD(404.91,1,"PCMM")),U,1)="" D
  1. ..S DR="801////1;802////1",DA=1,DIE="^SD(404.91," D ^DIE
  1. ..D MESS("...Set to 'YES'","?50")
  1. .ELSE D
  1. ..D MESS("...Already set - No change","?50")
  1. ELSE D
  1. .D MESS("...Needs TIU to be set","?50")
  1. .S DR="802////1",DA=1,DIE="^SD(404.91," D ^DIE
  1. Q SCOK
  1. GLOBCHK() ;
  1. N SCOK
  1. S SCOK=1
  1. D MESS(">>> Checking Globals:","!?4")
  1. F SCX=1:1 S SCGLOB=$P($T(GLOB+SCX),";;",2) Q:'$L(SCGLOB) D
  1. .S SCARR=$P(SCGLOB,"(",1)
  1. .S SCSUB=$P($P(SCGLOB,"(",2),U,1)
  1. .S SCVAR=$P(SCGLOB,U,3)
  1. .D MESS($P(SCARR_"("_SCSUB,U,2),"!?8")
  1. .IF '$D(@SCARR@(SCSUB)) D
  1. ..D MESS(" ...Missing","?50")
  1. ..S @SCVAR=0
  1. .ELSE D
  1. ..D MESS(" ...Present","?50")
  1. QTGLOB D:'SCOK MESS("Problem with Globals checking")
  1. Q SCOK
  1. ;
  1. OKCLEAN() ;
  1. D MESS(">>> Cleaning up ^TMP(""SCMC,$J,"" global","!!")
  1. N SCOK
  1. S SCOK=1
  1. K ^TMP("SCMC",$J)
  1. Q SCOK
  1. ;
  1. ABORT ;
  1. D MESS("After correcting the above mentioned problem(s), you should")
  1. D MESS("re-run the PCMM post-init routine by entering the following")
  1. D MESS("command at the programmer's prompt:")
  1. D MESS(" D EN^SCMCPST")
  1. D MESS("")
  1. D MESS("Prior to users making team, position, or staff assignments,")
  1. D MESS("the post-init may be re-run without any harm.")
  1. Q
  1. ;
  1. MESS(TEXT,FORMAT) ;
  1. S TEXT=$G(TEXT,"")
  1. S FORMAT=$G(FORMAT,"!")
  1. D EN^DDIOL(TEXT,"",FORMAT)
  1. Q
  1. ;
  1. GLOB ;
  1. ;;^USR(8930.3^SCUSR
  1. ;;^USR(8930^SCUSR
  1. ;
  1. LTRRT ; - to be used later if a/s isn't distributed with pcmm
  1. ;;USRPROV^1.0T7^Authorization/Subscription^^Feb 15, 1996^SCUSR
  1. LTRGLB ;