- DG53P379 ;ALB/RPM,RBS - Patch DG*5.3*379 Install Utility Routine ; 2/4/02 12:38pm
- ;;5.3;Registration;**379,1015**;Aug 13, 1993;Build 21
- ;
- ; This routine will provide the following:
- ; 1. The MST HISTORY file (#29.11) will have a new field added.
- ; - Field (#6) - Site Determining Status
- ; 2. Create a New-Style compound Cross-Reference "APDT" in the MST
- ; HISTORY file (#29.11) using Fields (#.01) and (#2).
- ; 3. Setup TaskMan Job for background processing
- ; 4. The most current patient MST info will be queued for
- ; transmission to the HEC via the Enrollment HL7 Z07 processing.
- ; * NOTE: ALPHA Test Sites will not re-send HL7 msg's to the HEC.
- ; 5. Generate a mail message to the User that ran the install.
- ;
- ENV ;Main entry point for Environment check point.
- ;
- S XPDABORT=""
- D PROGCHK(.XPDABORT) ;checks programmer variables
- Q:+XPDABORT
- ;
- ; Check for the initial CPRS Synchronization run date
- D CPRS(.XPDABORT)
- ;
- I XPDABORT="" K XPDABORT
- Q
- ;
- PRE ;Main entry point for Pre-init items.
- ;
- Q
- ;
- POST ;Main entry point for Post-init items.
- ;
- D POST1 ;remove traditional APDT xref from .01 & 2
- D POST2 ;re-create "APDT" cross reference
- D POST3 ;Setup TaskMan Job
- ; ;enter local station number in new SITE field (#6)
- Q
- ;
- POST1 ;Delete the broken "APDT" traditional MUMPS xref from the data
- ; dictionary.
- ;Kill the "APDT" index from the MST HISTORY file(#29.11) to prepare
- ; for the 'new' style "APDT" xref and re-index.
- ;
- ;Check Data Dictionary to see if already changed to New Style xref
- I '$D(^DD(29.11,.01,1,2)),'$D(^DD(29.11,2,1,1)) D Q
- .D BMES^XPDUTL(" NO Traditional 'APDT' x-ref found in the MST HISTORY file(#29.11) to Delete.")
- ;
- D BMES^XPDUTL(" Deleting the Traditional 'APDT' cross reference from the")
- D MES^XPDUTL(" MST HISTORY file(#29.11) to prepare for the 'New Style'")
- D MES^XPDUTL(" 'APDT' cross reference installation.")
- D DELIX^DDMOD(29.11,.01,2)
- D DELIX^DDMOD(29.11,2,1)
- I '$D(^DD(29.11,.01,1,2)),'$D(^DD(29.11,2,1,1)) D
- .K ^DGMS(29.11,"APDT") ;FileMan won't kill all of "APDT" nodes.
- .D BMES^XPDUTL(" Traditional 'APDT' cross reference successfully removed.")
- Q
- ;
- POST2 ;This POST install routine will re-create the "APDT" cross
- ; reference by re-indexing field .01.
- ;
- I $D(^DGMS(29.11,"APDT")) D Q ;don't re-index if found
- .D BMES^XPDUTL(" NO re-indexing necessary for the MST HISTORY file(#29.11) 'APDT' x-ref.")
- ;
- N DIK,X
- D BMES^XPDUTL(" Please be patient while I re-create the 'APDT' cross reference.")
- S DIK="^DGMS(29.11,",DIK(1)=".01^APDT"
- D ENALL^DIK
- I $D(^DGMS(29.11,"APDT")) D Q
- .D BMES^XPDUTL(" The MST HISTORY file(#29.11) 'APDT' x-ref was successfully re-created.")
- Q
- ;
- POST3 ;Set up TaskMan to process in the background
- ;
- N DGDFN,ZTDESC,ZTDTH,ZTIO,ZTQUEUED,ZTREQ,ZTRTN,ZTSAVE,ZTSK
- S ZTRTN="SCAN^DG53P379"
- S ZTDESC="Process MST records for DG*5.3*379"
- ;Queue Task to start in 60 seconds
- S ZTDTH=$$SCH^XLFDT("60S",$$NOW^XLFDT)
- S ZTIO=""
- I $G(^XTMP("DG53P379","LASTDFN"))>0 D
- . S DGDFN=^XTMP("DG53P379","LASTDFN"),ZTSAVE("DGDFN")=""
- D ^%ZTLOAD
- D BMES^XPDUTL("*****")
- D
- . I $D(ZTSK)[0 D Q
- . . D MES^XPDUTL("TaskMan run to Process MST records for DG*5.3*379 was not started.")
- . . D MES^XPDUTL("Re-run Post Install routine POST3^DG53P379.")
- . I $D(ZTSK("D")) D
- . . I '$D(DGDFN) D Q
- . . . D MES^XPDUTL("Task will start at "_$$HTE^XLFDT(ZTSK("D")))
- . . D MES^XPDUTL("Task will re-start with DFN: "_DGDFN_" at "_$$HTE^XLFDT(ZTSK("D")))
- D MES^XPDUTL("*****")
- Q
- ;
- SCAN ;This POST install routine will load the local site's station number
- ; as a pointer to the INSTITUTION file (#4) in the SITE field (#6) of
- ; the MST HISTORY file (#29.11).
- ;
- N DGDAT,DGFDA,DGERR,DGMSG
- N DGSTART ;Job start date/time
- N DGQUIT ;Job control flag
- N DGIEN ;MST HISTORY file IEN
- N DGOSITE ;existing SITE field data
- N DGSITE ;SITE value to be stuffed
- N DGCNT ;counter of records
- N DGTCNT ;number of patients scanned
- ;
- I +$G(DGDFN)'>0 S DGDFN=0
- S DGSTART=$$NOW^XLFDT,ZTREQ="@" ;START dt/delete task when finished
- S (DGCNT,DGTCNT,DGQUIT,DGMSG)=0
- S ^XTMP("DG53P379",0)=$$FMADD^XLFDT(""_DT_"",60)_U_DT_U_"MST BASELINE SEEDING"
- ;
- S DGSITE=$P($$SITE^VASITE,U)
- I +DGSITE'>0 D Q ;*** ERROR CONDITION ***
- .S DGMSG=2
- .S DGMSG(1)=" Invalid Station number - Stopping Taskman Job"
- .S DGMSG(2)=" Re-run Post Install routine POST3^DG53P379."
- .D MSG(DGSTART,DGTCNT,DGCNT,.DGMSG)
- ;
- F S DGDFN=$O(^DGMS(29.11,"APDT",DGDFN)) Q:'DGDFN D Q:DGQUIT
- .S DGTCNT=DGTCNT+1
- .I DGTCNT#60=0,$$S^%ZTLOAD D Q
- ..S DGMSG=2
- ..S DGMSG(1)=" Patch DG*5.3*379 MST Task "_ZTSK_" Stopped by User"
- ..S DGMSG(2)=" Re-run Post Install routine POST3^DG53P379."
- ..D MSG(DGSTART,DGTCNT,DGCNT,.DGMSG)
- ..S (ZTSTOP,DGQUIT)=1
- .S DGDAT=0
- .F S DGDAT=$O(^DGMS(29.11,"APDT",DGDFN,DGDAT)) Q:'DGDAT D
- ..S DGIEN=0
- ..F S DGIEN=$O(^DGMS(29.11,"APDT",DGDFN,DGDAT,DGIEN)) Q:'DGIEN D
- ...K DGERR,DGFDA
- ...S DGOSITE=$$GET1^DIQ(29.11,DGIEN_",",6,"I","",.DGERR)
- ...Q:$D(DGERR)
- ...I DGOSITE="" D ;site FIELD not setup ***
- ....S DGFDA(29.11,DGIEN_",",6)=DGSITE
- ....D FILE^DIE("I","DGFDA","DGERR") ;file site pointer to (#29.11)
- .; *** Don't re-queue entry for HEC HL7 if Alpha Test Site: ***
- .; (437) FARGO VAMRO
- .; (537) CHICAGO HCS
- .; (612) NORTHERN CALIFORNIA HCS
- .I ",437,537,612,"'[(","_$P($$SITE^VASITE,U,3)_",") D XMIT(DGDFN)
- .S ^XTMP("DG53P379","LASTDFN")=DGDFN
- ;
- I 'DGQUIT D MSG(DGSTART,DGTCNT,DGCNT,"") ;create mailman msg to user
- Q
- ;
- XMIT(DGDFN) ; Queue entry to ^IVM(301.5,#) for HEC HL7 processing
- ;Call API routine to determine the most current MST Status data for
- ; each veteran in the (#29.11) file.
- ;Queue entry for HL7 Z07 message to be sent to the HEC.
- ; Input:
- ; DGDFN - IEN of PATIENT file (#2)
- ; Output:
- ; Queue entry to ^IVM(301.5,#) file
- N DGMST ;MST data from MST HISTORY file (#29.11)
- S DGMST=$$GETSTAT^DGMSTAPI(DGDFN)
- Q:+DGMST<1
- S DGCNT=DGCNT+1
- D SEND^DGMSTL1(DGDFN,"Z07")
- Q
- ;
- MSG(DGSTART,DGTCNT,DGCNT,DGMESS) ; Send e-mail to user
- ;Generate a mailman message with total number of patients scanned
- ; and total patients queued for transmission to the HEC.
- ; Input:
- ; DGSTART - Job start d/t
- ; DGTCNT - Total records scanned
- ; DGCNT - Total records queued
- ; DGMESS - error message (if any...)
- ; Output:
- ; User e-mail message
- ;
- N DIFROM,DGSITE,DGMAIL,DGI
- N XMY,XMDUZ,XMSUB,XMTEXT,XMDUN,XMZ
- S DGSITE=$$SITE^VASITE
- I +DGSITE'>0 S DGSITE="NO SITE#"
- S XMDUZ=.5,(XMY(DUZ),XMY(XMDUZ))=""
- S XMSUB="Patch DG*5.3*379 MST Baseline ("_$P(DGSITE,U,3)_")"
- S XMTEXT="DGMAIL("
- S DGMAIL(1)=""
- S DGMAIL(2)=" Facility Name: "_$P(DGSITE,U,2)
- S DGMAIL(3)=" Station Number: "_$P(DGSITE,U,3)
- S DGMAIL(4)=""
- S DGMAIL(5)="Date/Time Baseline job started: "_$$FMTE^XLFDT(DGSTART)
- S DGMAIL(6)="Date/Time Baseline job stopped: "_$$HTE^XLFDT($H)
- S DGMAIL(7)=""
- S DGMAIL(8)="Total patient's scanned in MST HISTORY file: "_DGTCNT
- S DGMAIL(9)="Total patient's queued for HEC transmission: "_DGCNT
- S DGMAIL(10)=""
- I $G(DGMESS) D
- .S DGMAIL(11)=" * * * E R R O R E N C O U N T E R E D * * *"
- .S DGMAIL(12)=""
- . F DGI=1:1:DGMESS D
- . . S DGMAIL(12+DGI)="*** "_$E($G(DGMESS(DGI)),1,65)
- ;
- D ^XMD
- Q
- ;
- PROGCHK(XPDABORT) ;checks for necessary programmer variables
- ;
- I '$G(DUZ)!($G(DUZ(0))'="@")!('$G(DT))!($G(U)'="^") DO
- .D BMES^XPDUTL("*****")
- .D MES^XPDUTL("Your programming variables are not set up properly.")
- .D MES^XPDUTL("Installation aborted.")
- .D MES^XPDUTL("*****")
- .S XPDABORT=2
- Q
- ;
- CPRS(XPDABORT) ; Check for the CPRS initial MST Synchronization run date
- ;
- I '+$$GSYINFO^PXRMMST("I") D
- .D BMES^XPDUTL("*****")
- .D MES^XPDUTL("The CPRS initial MST Synchronization has not been run.")
- .D MES^XPDUTL("Installation aborted.")
- .D MES^XPDUTL("*****")
- .S XPDABORT=2 ;Abort all transport globals in distribution but leave
- Q ; them in ^XTMP().
- DG53P379 ;ALB/RPM,RBS - Patch DG*5.3*379 Install Utility Routine ; 2/4/02 12:38pm
- +1 ;;5.3;Registration;**379,1015**;Aug 13, 1993;Build 21
- +2 ;
- +3 ; This routine will provide the following:
- +4 ; 1. The MST HISTORY file (#29.11) will have a new field added.
- +5 ; - Field (#6) - Site Determining Status
- +6 ; 2. Create a New-Style compound Cross-Reference "APDT" in the MST
- +7 ; HISTORY file (#29.11) using Fields (#.01) and (#2).
- +8 ; 3. Setup TaskMan Job for background processing
- +9 ; 4. The most current patient MST info will be queued for
- +10 ; transmission to the HEC via the Enrollment HL7 Z07 processing.
- +11 ; * NOTE: ALPHA Test Sites will not re-send HL7 msg's to the HEC.
- +12 ; 5. Generate a mail message to the User that ran the install.
- +13 ;
- ENV ;Main entry point for Environment check point.
- +1 ;
- +2 SET XPDABORT=""
- +3 ;checks programmer variables
- DO PROGCHK(.XPDABORT)
- +4 IF +XPDABORT
- QUIT
- +5 ;
- +6 ; Check for the initial CPRS Synchronization run date
- +7 DO CPRS(.XPDABORT)
- +8 ;
- +9 IF XPDABORT=""
- KILL XPDABORT
- +10 QUIT
- +11 ;
- PRE ;Main entry point for Pre-init items.
- +1 ;
- +2 QUIT
- +3 ;
- POST ;Main entry point for Post-init items.
- +1 ;
- +2 ;remove traditional APDT xref from .01 & 2
- DO POST1
- +3 ;re-create "APDT" cross reference
- DO POST2
- +4 ;Setup TaskMan Job
- DO POST3
- +5 ; ;enter local station number in new SITE field (#6)
- +6 QUIT
- +7 ;
- POST1 ;Delete the broken "APDT" traditional MUMPS xref from the data
- +1 ; dictionary.
- +2 ;Kill the "APDT" index from the MST HISTORY file(#29.11) to prepare
- +3 ; for the 'new' style "APDT" xref and re-index.
- +4 ;
- +5 ;Check Data Dictionary to see if already changed to New Style xref
- +6 IF '$DATA(^DD(29.11,.01,1,2))
- IF '$DATA(^DD(29.11,2,1,1))
- Begin DoDot:1
- +7 DO BMES^XPDUTL(" NO Traditional 'APDT' x-ref found in the MST HISTORY file(#29.11) to Delete.")
- End DoDot:1
- QUIT
- +8 ;
- +9 DO BMES^XPDUTL(" Deleting the Traditional 'APDT' cross reference from the")
- +10 DO MES^XPDUTL(" MST HISTORY file(#29.11) to prepare for the 'New Style'")
- +11 DO MES^XPDUTL(" 'APDT' cross reference installation.")
- +12 DO DELIX^DDMOD(29.11,.01,2)
- +13 DO DELIX^DDMOD(29.11,2,1)
- +14 IF '$DATA(^DD(29.11,.01,1,2))
- IF '$DATA(^DD(29.11,2,1,1))
- Begin DoDot:1
- +15 ;FileMan won't kill all of "APDT" nodes.
- KILL ^DGMS(29.11,"APDT")
- +16 DO BMES^XPDUTL(" Traditional 'APDT' cross reference successfully removed.")
- End DoDot:1
- +17 QUIT
- +18 ;
- POST2 ;This POST install routine will re-create the "APDT" cross
- +1 ; reference by re-indexing field .01.
- +2 ;
- +3 ;don't re-index if found
- IF $DATA(^DGMS(29.11,"APDT"))
- Begin DoDot:1
- +4 DO BMES^XPDUTL(" NO re-indexing necessary for the MST HISTORY file(#29.11) 'APDT' x-ref.")
- End DoDot:1
- QUIT
- +5 ;
- +6 NEW DIK,X
- +7 DO BMES^XPDUTL(" Please be patient while I re-create the 'APDT' cross reference.")
- +8 SET DIK="^DGMS(29.11,"
- SET DIK(1)=".01^APDT"
- +9 DO ENALL^DIK
- +10 IF $DATA(^DGMS(29.11,"APDT"))
- Begin DoDot:1
- +11 DO BMES^XPDUTL(" The MST HISTORY file(#29.11) 'APDT' x-ref was successfully re-created.")
- End DoDot:1
- QUIT
- +12 QUIT
- +13 ;
- POST3 ;Set up TaskMan to process in the background
- +1 ;
- +2 NEW DGDFN,ZTDESC,ZTDTH,ZTIO,ZTQUEUED,ZTREQ,ZTRTN,ZTSAVE,ZTSK
- +3 SET ZTRTN="SCAN^DG53P379"
- +4 SET ZTDESC="Process MST records for DG*5.3*379"
- +5 ;Queue Task to start in 60 seconds
- +6 SET ZTDTH=$$SCH^XLFDT("60S",$$NOW^XLFDT)
- +7 SET ZTIO=""
- +8 IF $GET(^XTMP("DG53P379","LASTDFN"))>0
- Begin DoDot:1
- +9 SET DGDFN=^XTMP("DG53P379","LASTDFN")
- SET ZTSAVE("DGDFN")=""
- End DoDot:1
- +10 DO ^%ZTLOAD
- +11 DO BMES^XPDUTL("*****")
- +12 Begin DoDot:1
- +13 IF $DATA(ZTSK)[0
- Begin DoDot:2
- +14 DO MES^XPDUTL("TaskMan run to Process MST records for DG*5.3*379 was not started.")
- +15 DO MES^XPDUTL("Re-run Post Install routine POST3^DG53P379.")
- End DoDot:2
- QUIT
- +16 IF $DATA(ZTSK("D"))
- Begin DoDot:2
- +17 IF '$DATA(DGDFN)
- Begin DoDot:3
- +18 DO MES^XPDUTL("Task will start at "_$$HTE^XLFDT(ZTSK("D")))
- End DoDot:3
- QUIT
- +19 DO MES^XPDUTL("Task will re-start with DFN: "_DGDFN_" at "_$$HTE^XLFDT(ZTSK("D")))
- End DoDot:2
- End DoDot:1
- +20 DO MES^XPDUTL("*****")
- +21 QUIT
- +22 ;
- SCAN ;This POST install routine will load the local site's station number
- +1 ; as a pointer to the INSTITUTION file (#4) in the SITE field (#6) of
- +2 ; the MST HISTORY file (#29.11).
- +3 ;
- +4 NEW DGDAT,DGFDA,DGERR,DGMSG
- +5 ;Job start date/time
- NEW DGSTART
- +6 ;Job control flag
- NEW DGQUIT
- +7 ;MST HISTORY file IEN
- NEW DGIEN
- +8 ;existing SITE field data
- NEW DGOSITE
- +9 ;SITE value to be stuffed
- NEW DGSITE
- +10 ;counter of records
- NEW DGCNT
- +11 ;number of patients scanned
- NEW DGTCNT
- +12 ;
- +13 IF +$GET(DGDFN)'>0
- SET DGDFN=0
- +14 ;START dt/delete task when finished
- SET DGSTART=$$NOW^XLFDT
- SET ZTREQ="@"
- +15 SET (DGCNT,DGTCNT,DGQUIT,DGMSG)=0
- +16 SET ^XTMP("DG53P379",0)=$$FMADD^XLFDT(""_DT_"",60)_U_DT_U_"MST BASELINE SEEDING"
- +17 ;
- +18 SET DGSITE=$PIECE($$SITE^VASITE,U)
- +19 ;*** ERROR CONDITION ***
- IF +DGSITE'>0
- Begin DoDot:1
- +20 SET DGMSG=2
- +21 SET DGMSG(1)=" Invalid Station number - Stopping Taskman Job"
- +22 SET DGMSG(2)=" Re-run Post Install routine POST3^DG53P379."
- +23 DO MSG(DGSTART,DGTCNT,DGCNT,.DGMSG)
- End DoDot:1
- QUIT
- +24 ;
- +25 FOR
- SET DGDFN=$ORDER(^DGMS(29.11,"APDT",DGDFN))
- IF 'DGDFN
- QUIT
- Begin DoDot:1
- +26 SET DGTCNT=DGTCNT+1
- +27 IF DGTCNT#60=0
- IF $$S^%ZTLOAD
- Begin DoDot:2
- +28 SET DGMSG=2
- +29 SET DGMSG(1)=" Patch DG*5.3*379 MST Task "_ZTSK_" Stopped by User"
- +30 SET DGMSG(2)=" Re-run Post Install routine POST3^DG53P379."
- +31 DO MSG(DGSTART,DGTCNT,DGCNT,.DGMSG)
- +32 SET (ZTSTOP,DGQUIT)=1
- End DoDot:2
- QUIT
- +33 SET DGDAT=0
- +34 FOR
- SET DGDAT=$ORDER(^DGMS(29.11,"APDT",DGDFN,DGDAT))
- IF 'DGDAT
- QUIT
- Begin DoDot:2
- +35 SET DGIEN=0
- +36 FOR
- SET DGIEN=$ORDER(^DGMS(29.11,"APDT",DGDFN,DGDAT,DGIEN))
- IF 'DGIEN
- QUIT
- Begin DoDot:3
- +37 KILL DGERR,DGFDA
- +38 SET DGOSITE=$$GET1^DIQ(29.11,DGIEN_",",6,"I","",.DGERR)
- +39 IF $DATA(DGERR)
- QUIT
- +40 ;site FIELD not setup ***
- IF DGOSITE=""
- Begin DoDot:4
- +41 SET DGFDA(29.11,DGIEN_",",6)=DGSITE
- +42 ;file site pointer to (#29.11)
- DO FILE^DIE("I","DGFDA","DGERR")
- End DoDot:4
- End DoDot:3
- End DoDot:2
- +43 ; *** Don't re-queue entry for HEC HL7 if Alpha Test Site: ***
- +44 ; (437) FARGO VAMRO
- +45 ; (537) CHICAGO HCS
- +46 ; (612) NORTHERN CALIFORNIA HCS
- +47 IF ",437,537,612,"'[(","_$PIECE($$SITE^VASITE,U,3)_",")
- DO XMIT(DGDFN)
- +48 SET ^XTMP("DG53P379","LASTDFN")=DGDFN
- End DoDot:1
- IF DGQUIT
- QUIT
- +49 ;
- +50 ;create mailman msg to user
- IF 'DGQUIT
- DO MSG(DGSTART,DGTCNT,DGCNT,"")
- +51 QUIT
- +52 ;
- XMIT(DGDFN) ; Queue entry to ^IVM(301.5,#) for HEC HL7 processing
- +1 ;Call API routine to determine the most current MST Status data for
- +2 ; each veteran in the (#29.11) file.
- +3 ;Queue entry for HL7 Z07 message to be sent to the HEC.
- +4 ; Input:
- +5 ; DGDFN - IEN of PATIENT file (#2)
- +6 ; Output:
- +7 ; Queue entry to ^IVM(301.5,#) file
- +8 ;MST data from MST HISTORY file (#29.11)
- NEW DGMST
- +9 SET DGMST=$$GETSTAT^DGMSTAPI(DGDFN)
- +10 IF +DGMST<1
- QUIT
- +11 SET DGCNT=DGCNT+1
- +12 DO SEND^DGMSTL1(DGDFN,"Z07")
- +13 QUIT
- +14 ;
- MSG(DGSTART,DGTCNT,DGCNT,DGMESS) ; Send e-mail to user
- +1 ;Generate a mailman message with total number of patients scanned
- +2 ; and total patients queued for transmission to the HEC.
- +3 ; Input:
- +4 ; DGSTART - Job start d/t
- +5 ; DGTCNT - Total records scanned
- +6 ; DGCNT - Total records queued
- +7 ; DGMESS - error message (if any...)
- +8 ; Output:
- +9 ; User e-mail message
- +10 ;
- +11 NEW DIFROM,DGSITE,DGMAIL,DGI
- +12 NEW XMY,XMDUZ,XMSUB,XMTEXT,XMDUN,XMZ
- +13 SET DGSITE=$$SITE^VASITE
- +14 IF +DGSITE'>0
- SET DGSITE="NO SITE#"
- +15 SET XMDUZ=.5
- SET (XMY(DUZ),XMY(XMDUZ))=""
- +16 SET XMSUB="Patch DG*5.3*379 MST Baseline ("_$PIECE(DGSITE,U,3)_")"
- +17 SET XMTEXT="DGMAIL("
- +18 SET DGMAIL(1)=""
- +19 SET DGMAIL(2)=" Facility Name: "_$PIECE(DGSITE,U,2)
- +20 SET DGMAIL(3)=" Station Number: "_$PIECE(DGSITE,U,3)
- +21 SET DGMAIL(4)=""
- +22 SET DGMAIL(5)="Date/Time Baseline job started: "_$$FMTE^XLFDT(DGSTART)
- +23 SET DGMAIL(6)="Date/Time Baseline job stopped: "_$$HTE^XLFDT($HOROLOG)
- +24 SET DGMAIL(7)=""
- +25 SET DGMAIL(8)="Total patient's scanned in MST HISTORY file: "_DGTCNT
- +26 SET DGMAIL(9)="Total patient's queued for HEC transmission: "_DGCNT
- +27 SET DGMAIL(10)=""
- +28 IF $GET(DGMESS)
- Begin DoDot:1
- +29 SET DGMAIL(11)=" * * * E R R O R E N C O U N T E R E D * * *"
- +30 SET DGMAIL(12)=""
- +31 FOR DGI=1:1:DGMESS
- Begin DoDot:2
- +32 SET DGMAIL(12+DGI)="*** "_$EXTRACT($GET(DGMESS(DGI)),1,65)
- End DoDot:2
- End DoDot:1
- +33 ;
- +34 DO ^XMD
- +35 QUIT
- +36 ;
- PROGCHK(XPDABORT) ;checks for necessary programmer variables
- +1 ;
- +2 IF '$GET(DUZ)!($GET(DUZ(0))'="@")!('$GET(DT))!($GET(U)'="^")
- Begin DoDot:1
- +3 DO BMES^XPDUTL("*****")
- +4 DO MES^XPDUTL("Your programming variables are not set up properly.")
- +5 DO MES^XPDUTL("Installation aborted.")
- +6 DO MES^XPDUTL("*****")
- +7 SET XPDABORT=2
- End DoDot:1
- +8 QUIT
- +9 ;
- CPRS(XPDABORT) ; Check for the CPRS initial MST Synchronization run date
- +1 ;
- +2 IF '+$$GSYINFO^PXRMMST("I")
- Begin DoDot:1
- +3 DO BMES^XPDUTL("*****")
- +4 DO MES^XPDUTL("The CPRS initial MST Synchronization has not been run.")
- +5 DO MES^XPDUTL("Installation aborted.")
- +6 DO MES^XPDUTL("*****")
- +7 ;Abort all transport globals in distribution but leave
- SET XPDABORT=2
- End DoDot:1
- +8 ; them in ^XTMP().
- QUIT