[613] | 1 | DGYSPOST ;ALB/MLI - POST-INIT FOR PATCH DG*5.3*54 ; 10 APRIL 95
|
---|
| 2 | ;;5.3;Registration;**54**;Aug 13, 1993
|
---|
| 3 | ;
|
---|
| 4 | ; This is the post-init routine for patch DG*5.3*54.
|
---|
| 5 | ;
|
---|
| 6 | EN ; entry point
|
---|
| 7 | N I,X
|
---|
| 8 | W !! F I=1:1 S X=$P($T(TEXT+I),";;",2) Q:X="QUIT" W !,X
|
---|
| 9 | S ZTRTN="DQ^DGYSPOST",ZTIO="",ZTDESC="Patch DG*5.3*54 post-init"
|
---|
| 10 | D ^%ZTLOAD
|
---|
| 11 | I $D(ZTSK) W !,"Task queued: ",ZTSK
|
---|
| 12 | E W "...RUNNING IMMEDIATELY" D DQ W !,"Done!"
|
---|
| 13 | K ZTDESC,ZTIO,ZTRTN,ZTSK
|
---|
| 14 | Q
|
---|
| 15 | ;
|
---|
| 16 | ;
|
---|
| 17 | DQ ; called to begin processing
|
---|
| 18 | N DGSTART
|
---|
| 19 | S DGSTART=$$NOW^XLFDT()
|
---|
| 20 | D SSNXREF,ARMCLN,MAIL
|
---|
| 21 | Q
|
---|
| 22 | ;
|
---|
| 23 | ;
|
---|
| 24 | SSNXREF ; update SSN x-ref in ^DPT if not currently set
|
---|
| 25 | N DFN,X
|
---|
| 26 | I '$D(ZTQUEUED) W !,">> Resetting SSN cross-reference on PATIENT file (#2)..."
|
---|
| 27 | F DFN=0:0 S DFN=$O(^DPT(DFN)) Q:'DFN D
|
---|
| 28 | . I '(DFN#1000),'$D(ZTQUEUED) W "."
|
---|
| 29 | . S X=$P($G(^DPT(DFN,0)),"^",9)
|
---|
| 30 | . I X]"",'$D(^DPT("SSN",X,DFN)) S ^(DFN)=""
|
---|
| 31 | Q
|
---|
| 32 | ;
|
---|
| 33 | ;
|
---|
| 34 | ARMCLN ; loop through ^DGPM("ARM" and make sure entries are valid
|
---|
| 35 | N CT,DFN,I,J
|
---|
| 36 | I '$D(ZTQUEUED) W !,">> Checking ARM cross-reference on PATIENT MOVEMENT file (#405)..."
|
---|
| 37 | S (CT,I)=0
|
---|
| 38 | F S I=$O(^DGPM("ARM",I)) Q:I']"" F J=0:0 S J=$O(^DGPM("ARM",I,J)) Q:'J D
|
---|
| 39 | . S CT=CT+1
|
---|
| 40 | . S DFN=$P($G(^DGPM(J,0)),"^",3)
|
---|
| 41 | . I $G(^DPT(+DFN,.108))'=I K ^DGPM("ARM",I,J)
|
---|
| 42 | . I '$D(ZTQUEUED),'(CT#50) W "."
|
---|
| 43 | Q
|
---|
| 44 | ;
|
---|
| 45 | ;
|
---|
| 46 | MAIL ; generate an e-mail bulletin when done
|
---|
| 47 | N DIFROM
|
---|
| 48 | S DGCOUNT=0
|
---|
| 49 | D LINE("The post-init for patch DG*5.3*54 has run to completion."),LINE("")
|
---|
| 50 | D LINE(" Start Time: "_DGSTART)
|
---|
| 51 | D LINE(" End Time: "_$$NOW^XLFDT()),LINE("")
|
---|
| 52 | D LINE("Please remove routine DGYSPOST from all systems at this time.")
|
---|
| 53 | S XMSUB="Patch DG*5.3*54 post-init has completed",XMN=0
|
---|
| 54 | S XMTEXT="DGTEXT("
|
---|
| 55 | S XMDUZ=.5,XMY(DUZ)=""
|
---|
| 56 | D ^XMD
|
---|
| 57 | K DGCOUNT,DGTEXT,XMDUZ,XMN,XMSUB,XMTEXT,XMY
|
---|
| 58 | Q
|
---|
| 59 | ;
|
---|
| 60 | ;
|
---|
| 61 | LINE(TEXT) ; add text to mail message
|
---|
| 62 | S DGCOUNT=DGCOUNT+1,DGTEXT(DGCOUNT)=TEXT
|
---|
| 63 | Q
|
---|
| 64 | ;
|
---|
| 65 | ;
|
---|
| 66 | TEXT ; text to display
|
---|
| 67 | ;;You will now be asked for a time to queue the cross-reference
|
---|
| 68 | ;;clean-up. We recommend you respond NOW as this update can be done
|
---|
| 69 | ;;with users on the system. It is being queued in order to make the
|
---|
| 70 | ;;initialization finish faster. Once the clean-up has finished, you
|
---|
| 71 | ;;will receive an e-mail message.
|
---|
| 72 | ;;
|
---|
| 73 | ;;Please note, if you exit (^) without answering the 'Requested Start
|
---|
| 74 | ;;Time: NOW//' prompt, the cross-reference clean-up will occur
|
---|
| 75 | ;;immediately.
|
---|
| 76 | ;;
|
---|
| 77 | ;;QUIT
|
---|