- IVMBULK1 ;ALB/KCL - IVM/ENROLLMENT Extract Con't ; 18-AUG-1997
- ;;2.0;INCOME VERIFICATION MATCH;**9,11,15**; 21-OCT-94
- ;
- ;
- GOGO ; --
- ; Description: This entry point will be the main driver for enrollment data extract.
- ;
- ; Input:
- ; IVMCONST - as local array containing extract input parameters
- ; (constants), pass by reference
- ; IVMARRY1 - as local array containing extract input parameters
- ; (variable), pass by reference
- ;
- ; Output: None
- ;
- ; Perform enrollment data extract
- D BULK(.IVMCONST,.IVMARRY1)
- ;
- ; Send extract notification message
- D DOMAIL
- ;
- ; If enrollment events not on, turn on enrollment events
- I '$$ON^IVMUPAR1() D SETON^IVMUPAR1
- ;
- Q
- ;
- ;
- BULK(IVMCONST,IVMARRY1) ; --
- ; Description: This entry point will perform the enrollment data extract.
- ;
- ; Input:
- ; IVMCONST - as local array containing extract input parameters
- ; (constants), pass by reference
- ; IVMARRY1 - as local array containing extract input parameters
- ; (variable), pass by reference
- ;
- ; Output: None
- ;
- ; initilize varibles
- N DFN,POP,Z
- K IVMQUERY("LTD"),IVMQUERY("OVIS")
- D INIT^IVMUFNC ; HL7 vars
- S (IVMARRY1("ERROR"),IVMARRY1("TERM"))=""
- S IVMARRY1("HOST")=$S(IVMARRY1("HOST")'="":IVMARRY1("HOST"),1:IVMCONST("HOST"))
- S IVMARRY1("PROC")=$G(IVMARRY1("PROC")),IVMARRY1("EXTRACT")=$G(IVMARRY1("EXTRACT")) ; extract statistic counters
- S IVMARRY1("START")=$$NOW^XLFDT ; current date/time job started
- S IVMARRY1("TASK")=$G(ZTSK)
- ;
- ; store processing info
- I $$STORE^IVMBULK2(.IVMARRY1)
- ;
- ; open host file, if error quit
- D OPEN^%ZISH("FILE1",IVMARRY1("DIR"),IVMARRY1("HOST")_"_"_(1+(IVMARRY1("EXTRACT")\IVMCONST("MSGMAX"))),"A")
- I POP S IVMARRY1("ERROR")="Could not create host file in specified directory." G BULKQ
- ;
- ; loop through patients in Patient (#2) file
- S DFN=+IVMARRY1("LASTPAT")
- F S DFN=$O(^DPT(DFN)) Q:'DFN D Q:IVMARRY1("ERROR")'=""
- .;
- .; - # of patients processed/checked
- .S IVMARRY1("PROC")=IVMARRY1("PROC")+1
- .;
- .; - quit if patient does not pass selection criteria
- .Q:'$$CRITERIA(DFN,IVMCONST("BEGDT"),DT)
- .;
- .; - kill ^TMP global containing previous HL7 msg
- .K ^TMP("HLS",$J,HLSDT)
- .;
- .; - build HL7 full data transmission msg for patient
- .D BUILD^IVMPTRN8(DFN,$$LD^IVMUFNC4(DFN),0,.IVMQUERY)
- .;
- .; - write HL7 full data transmission message to host file
- .D HOST(HLSDT)
- .;
- .; - # of patients extracted
- .S IVMARRY1("EXTRACT")=IVMARRY1("EXTRACT")+1
- .;
- .; - check if host file has reached max size limit
- .I IVMARRY1("EXTRACT")#IVMCONST("MSGMAX")=0 D Q:IVMARRY1("ERROR")'=""
- ..;
- ..; -- close host file, max limit reached
- ..D CLOSE^%ZISH("FILE1")
- ..;
- ..; -- open next host file
- ..D OPEN^%ZISH("FILE1",IVMARRY1("DIR"),IVMARRY1("HOST")_"_"_(1+(IVMARRY1("EXTRACT")\IVMCONST("MSGMAX"))),"A")
- ..I POP S IVMARRY1("ERROR")="Could not open host file." Q
- .;
- .; - for every 100 patients processed, check if task stopped
- .I IVMARRY1("PROC")#100=0 D
- ..; -- check if task has been stopped
- ..I $$S^%ZTLOAD S IVMARRY1("ERROR")="Queued job stopped prior to completion.",IVMARRY1("TERM")=1,IVMARRY1("LASTPAT")=DFN
- ..; -- update IVM EXTRACT MANAGEMENT file
- ..I $$STORE^IVMBULK2(.IVMARRY1)
- ;
- ;Close the last treatment date search and the outpt visit queries
- F Z="LTD","OVIS" I $G(IVMQUERY(Z)) D CLOSE^SDQ(IVMQUERY(Z)) K IVMQUERY(Z)
- ; close host file
- D CLOSE^%ZISH("FILE1")
- ;
- ;
- BULKQ ; set up final extract statistics
- I $G(DFN)'>0 S IVMARRY1("LASTPAT")=""
- S IVMARRY1("STOP")=$$NOW^XLFDT ; current date/time job stopped
- S IVMARRY1("FILES")=(1+(IVMARRY1("EXTRACT")\IVMCONST("MSGMAX"))) ; # of host files
- ;
- ; store processing info for extract in IVM Extract Management file
- I $$STORE^IVMBULK2(.IVMARRY1)
- ;
- ; unlock IVM EXTRACT MANAGEMENT file
- D UNLOCK^IVMBULK2(1)
- ;
- ; kill hl7 temp array
- K ^TMP("HLS",$J,HLSDT)
- ;
- ; Cleanup HL7/IVM vars (as defined by call to INIT^IVMUFNC)
- D CLEAN^IVMUFNC
- ;
- Q
- ;
- ;
- CRITERIA(DFN,IVMDT1,IVMDT2) ; --
- ; Description: This function will determine if the patient meets the enrollment initial data extract selection criteria for a specific date range.
- ;
- ; Input:
- ; DFN - pointer to patient in Patient (#2) file
- ; IVMDT1 - as start date to use when looking for episodes of care
- ; IVMDT2 - as end date to use when looking for episodes of care
- ;
- ; Output:
- ; Function Value - Does patient meet the selection criteria?
- ; Return 1 if successful, otherwise 0
- ;
- N IVMCRIT,IVMCUREN
- S IVMCRIT=0
- ;
- ; get enrollment status from patient's current enrollment
- S IVMCUREN=$$STATUS^DGENA(DFN),IVMCUREN=$G(IVMCUREN)
- ; is status unverified, verified, or pending
- I IVMCUREN,(IVMCUREN=1!(IVMCUREN=2)!(IVMCUREN=9)) S IVMCRIT=1 G CRITQ
- ;
- ; if patient is not a veteran, exit
- I '$$VET^DGENPTA(DFN) G CRITQ
- ;
- ; is veteran a current inpatient?
- I $$CURINPAT^DGENPTA(DFN) S IVMCRIT=1 G CRITQ
- ;
- ; was veteran an inpatient?
- I $$INPAT^DGENPTA(DFN,IVMDT1,IVMDT2) S IVMCRIT=1 G CRITQ
- ;
- ; does veteran have a checked-out encounter (outpatient)?
- I $$OUTPAT^DGENPTA(DFN,IVMDT1,IVMDT2) S IVMCRIT=1 G CRITQ
- ;
- CRITQ Q IVMCRIT
- ;
- ;
- HOST(HLSDT) ; --
- ; Description: Take HL7 message contained in temporary array and write to host file.
- ;
- ; Input:
- ; IO - name of opened host file in the format to
- ; to use for the 'M' USE command
- ; ^TMP("HLS",$J,HLSDT) - global array containing all segments of the
- ; HL7 message for a patient. The HLSDT
- ; variable is a flag that indicates that data
- ; is to be stored in the ^TMP("HLS") global
- ; array. The IVMCT variable is a sequential
- ; number starting at 0 and incremented by 1.
- ;
- ; Output: None
- ;
- N IVMSUB
- ;
- ; use host file
- U IO
- ;
- ; used to delineate begining of new HL7 message
- W "{",!
- ;
- ; write message segments to host file
- S IVMSUB="" F S IVMSUB=$O(^TMP("HLS",$J,HLSDT,IVMSUB)) Q:IVMSUB'>0 D
- .W $G(^TMP("HLS",$J,HLSDT,IVMSUB)),!
- ;
- ; used to delineate end of HL7 message
- W "}",!
- ;
- Q
- ;
- ;
- DOMAIL ; --
- ; Description: This function will generate a MailMan message contianing the results of the enrollment data extract.
- ;
- ; Input: None
- ;
- ; Output: None
- ;
- K XMZ
- N DIFROM,IVMCON1,IVMMSG,IVMPRCNT,IVMSITE,XMTEXT,XMSUB,XMDUZ,XMY
- ;
- ; init mail variables
- S IVMSITE=$$SITE^VASITE
- S XMSUB="Enrollment Extract Results "_"("_$P(IVMSITE,"^",3)_")"
- S XMDUZ=.5,XMY(DUZ)="",XMY(.5)=""
- S XMTEXT="IVMMSG("
- ;
- ; if error creating message text, exit
- I '$$FINAL(.IVMMSG) G DOMAILQ
- ;
- ; get extract constants
- I $$GETCONST^IVMBULK2(.IVMCON1)
- ;
- ; HEC mail group
- I IVMARRY1("ERROR")']"" S XMY(IVMCON1("MAILGRP"))=""
- ;
- ; send msg
- D ^XMD
- ;
- DOMAILQ Q
- ;
- ;
- FINAL(IVMTXT) ; --
- ; Description: Places message text into local IVMTXT array.
- ;
- ; Input: None
- ;
- ; Output:
- ; Function Value - returns 1 if success, 0 if failure
- ; IVMTXT - as local array containing mail message text,
- ; pass by reference
- ;
- N SUCCESS,IVMSITE,IVMARRY2
- S SUCCESS=0
- ;
- ; if obtaining IVM Extract Management record unsuccessful, exit
- I '$$GET^IVMBULK2(.IVMARRY2) G FINALQ
- ;
- S IVMSITE=$$SITE^VASITE
- ;
- S IVMTXT(1)=" > > > > > > > > > > ENROLLMENT DATA EXTRACT RESULTS < < < < < < < < < <"
- S IVMTXT(2)=""
- S IVMTXT(3)=" Facility Name: "_$P(IVMSITE,"^",2)
- S IVMTXT(4)=" Station Number: "_$P(IVMSITE,"^",3)
- S IVMTXT(5)=""
- S IVMTXT(6)=" Date/Time job started: "_$$FMTE^XLFDT(IVMARRY2("START"),"1P")
- S IVMTXT(7)=" Date/Time job stopped: "_$$FMTE^XLFDT(IVMARRY2("STOP"),"1P")
- S IVMTXT(8)=""
- S IVMTXT(9)=" Total patients processed: "_IVMARRY2("PROC")
- S IVMTXT(10)=" Total patients extracted: "_IVMARRY2("EXTRACT")
- S IVMTXT(11)=" Percentage extracted: "_$S($G(IVMARRY2("PROC")):$P(IVMARRY2("EXTRACT")/IVMARRY2("PROC")*100,".")_"%",1:"")
- S IVMTXT(12)=""
- S IVMTXT(13)=" Host file directory: "_IVMARRY2("DIR")
- S IVMTXT(14)=" Host file name: "_IVMARRY2("HOST")
- S IVMTXT(15)=" Number of host files: "_IVMARRY2("FILES")
- ;
- ; if ERROR, set error into msg text
- I IVMARRY2("ERROR")]"" D
- .S IVMTXT(16)=""
- .S IVMTXT(17)=" * * * * E R R O R E N C O U N T E R E D * * * *"
- .S IVMTXT(18)=""
- .S IVMTXT(19)=" Error Message: "_IVMARRY2("ERROR")
- .S IVMTXT(20)=" Task Number: "_IVMARRY2("TASK")
- ;
- S SUCCESS=1
- ;
- FINALQ Q SUCCESS
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIVMBULK1 8854 printed Feb 18, 2025@23:26:44 Page 2
- IVMBULK1 ;ALB/KCL - IVM/ENROLLMENT Extract Con't ; 18-AUG-1997
- +1 ;;2.0;INCOME VERIFICATION MATCH;**9,11,15**; 21-OCT-94
- +2 ;
- +3 ;
- GOGO ; --
- +1 ; Description: This entry point will be the main driver for enrollment data extract.
- +2 ;
- +3 ; Input:
- +4 ; IVMCONST - as local array containing extract input parameters
- +5 ; (constants), pass by reference
- +6 ; IVMARRY1 - as local array containing extract input parameters
- +7 ; (variable), pass by reference
- +8 ;
- +9 ; Output: None
- +10 ;
- +11 ; Perform enrollment data extract
- +12 DO BULK(.IVMCONST,.IVMARRY1)
- +13 ;
- +14 ; Send extract notification message
- +15 DO DOMAIL
- +16 ;
- +17 ; If enrollment events not on, turn on enrollment events
- +18 IF '$$ON^IVMUPAR1()
- DO SETON^IVMUPAR1
- +19 ;
- +20 QUIT
- +21 ;
- +22 ;
- BULK(IVMCONST,IVMARRY1) ; --
- +1 ; Description: This entry point will perform the enrollment data extract.
- +2 ;
- +3 ; Input:
- +4 ; IVMCONST - as local array containing extract input parameters
- +5 ; (constants), pass by reference
- +6 ; IVMARRY1 - as local array containing extract input parameters
- +7 ; (variable), pass by reference
- +8 ;
- +9 ; Output: None
- +10 ;
- +11 ; initilize varibles
- +12 NEW DFN,POP,Z
- +13 KILL IVMQUERY("LTD"),IVMQUERY("OVIS")
- +14 ; HL7 vars
- DO INIT^IVMUFNC
- +15 SET (IVMARRY1("ERROR"),IVMARRY1("TERM"))=""
- +16 SET IVMARRY1("HOST")=$SELECT(IVMARRY1("HOST")'="":IVMARRY1("HOST"),1:IVMCONST("HOST"))
- +17 ; extract statistic counters
- SET IVMARRY1("PROC")=$GET(IVMARRY1("PROC"))
- SET IVMARRY1("EXTRACT")=$GET(IVMARRY1("EXTRACT"))
- +18 ; current date/time job started
- SET IVMARRY1("START")=$$NOW^XLFDT
- +19 SET IVMARRY1("TASK")=$GET(ZTSK)
- +20 ;
- +21 ; store processing info
- +22 IF $$STORE^IVMBULK2(.IVMARRY1)
- +23 ;
- +24 ; open host file, if error quit
- +25 DO OPEN^%ZISH("FILE1",IVMARRY1("DIR"),IVMARRY1("HOST")_"_"_(1+(IVMARRY1("EXTRACT")\IVMCONST("MSGMAX"))),"A")
- +26 IF POP
- SET IVMARRY1("ERROR")="Could not create host file in specified directory."
- GOTO BULKQ
- +27 ;
- +28 ; loop through patients in Patient (#2) file
- +29 SET DFN=+IVMARRY1("LASTPAT")
- +30 FOR
- SET DFN=$ORDER(^DPT(DFN))
- if 'DFN
- QUIT
- Begin DoDot:1
- +31 ;
- +32 ; - # of patients processed/checked
- +33 SET IVMARRY1("PROC")=IVMARRY1("PROC")+1
- +34 ;
- +35 ; - quit if patient does not pass selection criteria
- +36 if '$$CRITERIA(DFN,IVMCONST("BEGDT"),DT)
- QUIT
- +37 ;
- +38 ; - kill ^TMP global containing previous HL7 msg
- +39 KILL ^TMP("HLS",$JOB,HLSDT)
- +40 ;
- +41 ; - build HL7 full data transmission msg for patient
- +42 DO BUILD^IVMPTRN8(DFN,$$LD^IVMUFNC4(DFN),0,.IVMQUERY)
- +43 ;
- +44 ; - write HL7 full data transmission message to host file
- +45 DO HOST(HLSDT)
- +46 ;
- +47 ; - # of patients extracted
- +48 SET IVMARRY1("EXTRACT")=IVMARRY1("EXTRACT")+1
- +49 ;
- +50 ; - check if host file has reached max size limit
- +51 IF IVMARRY1("EXTRACT")#IVMCONST("MSGMAX")=0
- Begin DoDot:2
- +52 ;
- +53 ; -- close host file, max limit reached
- +54 DO CLOSE^%ZISH("FILE1")
- +55 ;
- +56 ; -- open next host file
- +57 DO OPEN^%ZISH("FILE1",IVMARRY1("DIR"),IVMARRY1("HOST")_"_"_(1+(IVMARRY1("EXTRACT")\IVMCONST("MSGMAX"))),"A")
- +58 IF POP
- SET IVMARRY1("ERROR")="Could not open host file."
- QUIT
- End DoDot:2
- if IVMARRY1("ERROR")'=""
- QUIT
- +59 ;
- +60 ; - for every 100 patients processed, check if task stopped
- +61 IF IVMARRY1("PROC")#100=0
- Begin DoDot:2
- +62 ; -- check if task has been stopped
- +63 IF $$S^%ZTLOAD
- SET IVMARRY1("ERROR")="Queued job stopped prior to completion."
- SET IVMARRY1("TERM")=1
- SET IVMARRY1("LASTPAT")=DFN
- +64 ; -- update IVM EXTRACT MANAGEMENT file
- +65 IF $$STORE^IVMBULK2(.IVMARRY1)
- End DoDot:2
- End DoDot:1
- if IVMARRY1("ERROR")'=""
- QUIT
- +66 ;
- +67 ;Close the last treatment date search and the outpt visit queries
- +68 FOR Z="LTD","OVIS"
- IF $GET(IVMQUERY(Z))
- DO CLOSE^SDQ(IVMQUERY(Z))
- KILL IVMQUERY(Z)
- +69 ; close host file
- +70 DO CLOSE^%ZISH("FILE1")
- +71 ;
- +72 ;
- BULKQ ; set up final extract statistics
- +1 IF $GET(DFN)'>0
- SET IVMARRY1("LASTPAT")=""
- +2 ; current date/time job stopped
- SET IVMARRY1("STOP")=$$NOW^XLFDT
- +3 ; # of host files
- SET IVMARRY1("FILES")=(1+(IVMARRY1("EXTRACT")\IVMCONST("MSGMAX")))
- +4 ;
- +5 ; store processing info for extract in IVM Extract Management file
- +6 IF $$STORE^IVMBULK2(.IVMARRY1)
- +7 ;
- +8 ; unlock IVM EXTRACT MANAGEMENT file
- +9 DO UNLOCK^IVMBULK2(1)
- +10 ;
- +11 ; kill hl7 temp array
- +12 KILL ^TMP("HLS",$JOB,HLSDT)
- +13 ;
- +14 ; Cleanup HL7/IVM vars (as defined by call to INIT^IVMUFNC)
- +15 DO CLEAN^IVMUFNC
- +16 ;
- +17 QUIT
- +18 ;
- +19 ;
- CRITERIA(DFN,IVMDT1,IVMDT2) ; --
- +1 ; Description: This function will determine if the patient meets the enrollment initial data extract selection criteria for a specific date range.
- +2 ;
- +3 ; Input:
- +4 ; DFN - pointer to patient in Patient (#2) file
- +5 ; IVMDT1 - as start date to use when looking for episodes of care
- +6 ; IVMDT2 - as end date to use when looking for episodes of care
- +7 ;
- +8 ; Output:
- +9 ; Function Value - Does patient meet the selection criteria?
- +10 ; Return 1 if successful, otherwise 0
- +11 ;
- +12 NEW IVMCRIT,IVMCUREN
- +13 SET IVMCRIT=0
- +14 ;
- +15 ; get enrollment status from patient's current enrollment
- +16 SET IVMCUREN=$$STATUS^DGENA(DFN)
- SET IVMCUREN=$GET(IVMCUREN)
- +17 ; is status unverified, verified, or pending
- +18 IF IVMCUREN
- IF (IVMCUREN=1!(IVMCUREN=2)!(IVMCUREN=9))
- SET IVMCRIT=1
- GOTO CRITQ
- +19 ;
- +20 ; if patient is not a veteran, exit
- +21 IF '$$VET^DGENPTA(DFN)
- GOTO CRITQ
- +22 ;
- +23 ; is veteran a current inpatient?
- +24 IF $$CURINPAT^DGENPTA(DFN)
- SET IVMCRIT=1
- GOTO CRITQ
- +25 ;
- +26 ; was veteran an inpatient?
- +27 IF $$INPAT^DGENPTA(DFN,IVMDT1,IVMDT2)
- SET IVMCRIT=1
- GOTO CRITQ
- +28 ;
- +29 ; does veteran have a checked-out encounter (outpatient)?
- +30 IF $$OUTPAT^DGENPTA(DFN,IVMDT1,IVMDT2)
- SET IVMCRIT=1
- GOTO CRITQ
- +31 ;
- CRITQ QUIT IVMCRIT
- +1 ;
- +2 ;
- HOST(HLSDT) ; --
- +1 ; Description: Take HL7 message contained in temporary array and write to host file.
- +2 ;
- +3 ; Input:
- +4 ; IO - name of opened host file in the format to
- +5 ; to use for the 'M' USE command
- +6 ; ^TMP("HLS",$J,HLSDT) - global array containing all segments of the
- +7 ; HL7 message for a patient. The HLSDT
- +8 ; variable is a flag that indicates that data
- +9 ; is to be stored in the ^TMP("HLS") global
- +10 ; array. The IVMCT variable is a sequential
- +11 ; number starting at 0 and incremented by 1.
- +12 ;
- +13 ; Output: None
- +14 ;
- +15 NEW IVMSUB
- +16 ;
- +17 ; use host file
- +18 USE IO
- +19 ;
- +20 ; used to delineate begining of new HL7 message
- +21 WRITE "{",!
- +22 ;
- +23 ; write message segments to host file
- +24 SET IVMSUB=""
- FOR
- SET IVMSUB=$ORDER(^TMP("HLS",$JOB,HLSDT,IVMSUB))
- if IVMSUB'>0
- QUIT
- Begin DoDot:1
- +25 WRITE $GET(^TMP("HLS",$JOB,HLSDT,IVMSUB)),!
- End DoDot:1
- +26 ;
- +27 ; used to delineate end of HL7 message
- +28 WRITE "}",!
- +29 ;
- +30 QUIT
- +31 ;
- +32 ;
- DOMAIL ; --
- +1 ; Description: This function will generate a MailMan message contianing the results of the enrollment data extract.
- +2 ;
- +3 ; Input: None
- +4 ;
- +5 ; Output: None
- +6 ;
- +7 KILL XMZ
- +8 NEW DIFROM,IVMCON1,IVMMSG,IVMPRCNT,IVMSITE,XMTEXT,XMSUB,XMDUZ,XMY
- +9 ;
- +10 ; init mail variables
- +11 SET IVMSITE=$$SITE^VASITE
- +12 SET XMSUB="Enrollment Extract Results "_"("_$PIECE(IVMSITE,"^",3)_")"
- +13 SET XMDUZ=.5
- SET XMY(DUZ)=""
- SET XMY(.5)=""
- +14 SET XMTEXT="IVMMSG("
- +15 ;
- +16 ; if error creating message text, exit
- +17 IF '$$FINAL(.IVMMSG)
- GOTO DOMAILQ
- +18 ;
- +19 ; get extract constants
- +20 IF $$GETCONST^IVMBULK2(.IVMCON1)
- +21 ;
- +22 ; HEC mail group
- +23 IF IVMARRY1("ERROR")']""
- SET XMY(IVMCON1("MAILGRP"))=""
- +24 ;
- +25 ; send msg
- +26 DO ^XMD
- +27 ;
- DOMAILQ QUIT
- +1 ;
- +2 ;
- FINAL(IVMTXT) ; --
- +1 ; Description: Places message text into local IVMTXT array.
- +2 ;
- +3 ; Input: None
- +4 ;
- +5 ; Output:
- +6 ; Function Value - returns 1 if success, 0 if failure
- +7 ; IVMTXT - as local array containing mail message text,
- +8 ; pass by reference
- +9 ;
- +10 NEW SUCCESS,IVMSITE,IVMARRY2
- +11 SET SUCCESS=0
- +12 ;
- +13 ; if obtaining IVM Extract Management record unsuccessful, exit
- +14 IF '$$GET^IVMBULK2(.IVMARRY2)
- GOTO FINALQ
- +15 ;
- +16 SET IVMSITE=$$SITE^VASITE
- +17 ;
- +18 SET IVMTXT(1)=" > > > > > > > > > > ENROLLMENT DATA EXTRACT RESULTS < < < < < < < < < <"
- +19 SET IVMTXT(2)=""
- +20 SET IVMTXT(3)=" Facility Name: "_$PIECE(IVMSITE,"^",2)
- +21 SET IVMTXT(4)=" Station Number: "_$PIECE(IVMSITE,"^",3)
- +22 SET IVMTXT(5)=""
- +23 SET IVMTXT(6)=" Date/Time job started: "_$$FMTE^XLFDT(IVMARRY2("START"),"1P")
- +24 SET IVMTXT(7)=" Date/Time job stopped: "_$$FMTE^XLFDT(IVMARRY2("STOP"),"1P")
- +25 SET IVMTXT(8)=""
- +26 SET IVMTXT(9)=" Total patients processed: "_IVMARRY2("PROC")
- +27 SET IVMTXT(10)=" Total patients extracted: "_IVMARRY2("EXTRACT")
- +28 SET IVMTXT(11)=" Percentage extracted: "_$SELECT($GET(IVMARRY2("PROC")):$PIECE(IVMARRY2("EXTRACT")/IVMARRY2("PROC")*100,".")_"%",1:"")
- +29 SET IVMTXT(12)=""
- +30 SET IVMTXT(13)=" Host file directory: "_IVMARRY2("DIR")
- +31 SET IVMTXT(14)=" Host file name: "_IVMARRY2("HOST")
- +32 SET IVMTXT(15)=" Number of host files: "_IVMARRY2("FILES")
- +33 ;
- +34 ; if ERROR, set error into msg text
- +35 IF IVMARRY2("ERROR")]""
- Begin DoDot:1
- +36 SET IVMTXT(16)=""
- +37 SET IVMTXT(17)=" * * * * E R R O R E N C O U N T E R E D * * * *"
- +38 SET IVMTXT(18)=""
- +39 SET IVMTXT(19)=" Error Message: "_IVMARRY2("ERROR")
- +40 SET IVMTXT(20)=" Task Number: "_IVMARRY2("TASK")
- End DoDot:1
- +41 ;
- +42 SET SUCCESS=1
- +43 ;
- FINALQ QUIT SUCCESS