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

DGYSPOST.m

Go to the documentation of this file.
  1. DGYSPOST ;ALB/MLI - POST-INIT FOR PATCH DG*5.3*54 ; 10 APRIL 95
  1. ;;5.3;Registration;**54,1015**;Aug 13, 1993;Build 21
  1. ;
  1. ; This is the post-init routine for patch DG*5.3*54.
  1. ;
  1. EN ; entry point
  1. N I,X
  1. W !! F I=1:1 S X=$P($T(TEXT+I),";;",2) Q:X="QUIT" W !,X
  1. S ZTRTN="DQ^DGYSPOST",ZTIO="",ZTDESC="Patch DG*5.3*54 post-init"
  1. D ^%ZTLOAD
  1. I $D(ZTSK) W !,"Task queued: ",ZTSK
  1. E W "...RUNNING IMMEDIATELY" D DQ W !,"Done!"
  1. K ZTDESC,ZTIO,ZTRTN,ZTSK
  1. Q
  1. ;
  1. ;
  1. DQ ; called to begin processing
  1. N DGSTART
  1. S DGSTART=$$NOW^XLFDT()
  1. D SSNXREF,ARMCLN,MAIL
  1. Q
  1. ;
  1. ;
  1. SSNXREF ; update SSN x-ref in ^DPT if not currently set
  1. N DFN,X
  1. I '$D(ZTQUEUED) W !,">> Resetting SSN cross-reference on PATIENT file (#2)..."
  1. F DFN=0:0 S DFN=$O(^DPT(DFN)) Q:'DFN D
  1. . I '(DFN#1000),'$D(ZTQUEUED) W "."
  1. . S X=$P($G(^DPT(DFN,0)),"^",9)
  1. . I X]"",'$D(^DPT("SSN",X,DFN)) S ^(DFN)=""
  1. Q
  1. ;
  1. ;
  1. ARMCLN ; loop through ^DGPM("ARM" and make sure entries are valid
  1. N CT,DFN,I,J
  1. I '$D(ZTQUEUED) W !,">> Checking ARM cross-reference on PATIENT MOVEMENT file (#405)..."
  1. S (CT,I)=0
  1. F S I=$O(^DGPM("ARM",I)) Q:I']"" F J=0:0 S J=$O(^DGPM("ARM",I,J)) Q:'J D
  1. . S CT=CT+1
  1. . S DFN=$P($G(^DGPM(J,0)),"^",3)
  1. . I $G(^DPT(+DFN,.108))'=I K ^DGPM("ARM",I,J)
  1. . I '$D(ZTQUEUED),'(CT#50) W "."
  1. Q
  1. ;
  1. ;
  1. MAIL ; generate an e-mail bulletin when done
  1. N DIFROM
  1. S DGCOUNT=0
  1. D LINE("The post-init for patch DG*5.3*54 has run to completion."),LINE("")
  1. D LINE(" Start Time: "_DGSTART)
  1. D LINE(" End Time: "_$$NOW^XLFDT()),LINE("")
  1. D LINE("Please remove routine DGYSPOST from all systems at this time.")
  1. S XMSUB="Patch DG*5.3*54 post-init has completed",XMN=0
  1. S XMTEXT="DGTEXT("
  1. S XMDUZ=.5,XMY(DUZ)=""
  1. D ^XMD
  1. K DGCOUNT,DGTEXT,XMDUZ,XMN,XMSUB,XMTEXT,XMY
  1. Q
  1. ;
  1. ;
  1. LINE(TEXT) ; add text to mail message
  1. S DGCOUNT=DGCOUNT+1,DGTEXT(DGCOUNT)=TEXT
  1. Q
  1. ;
  1. ;
  1. TEXT ; text to display
  1. ;;You will now be asked for a time to queue the cross-reference
  1. ;;clean-up. We recommend you respond NOW as this update can be done
  1. ;;with users on the system. It is being queued in order to make the
  1. ;;initialization finish faster. Once the clean-up has finished, you
  1. ;;will receive an e-mail message.
  1. ;;
  1. ;;Please note, if you exit (^) without answering the 'Requested Start
  1. ;;Time: NOW//' prompt, the cross-reference clean-up will occur
  1. ;;immediately.
  1. ;;
  1. ;;QUIT