IVMCUPL ;ALB/KCL - INCOME TEST UPLOAD UTILITIES ; 04-MAY-98
;;2.0;INCOME VERIFICATION MATCH;**17**;21-OCT-94
;
;
GETLOCKS(DFN) ;
; Description: Locks first the income test upload, then the local
; income test. Used to synchronize the income test upload with
; local income test options.
;
; Input: DFN - ien of record in PATIENT file
; Output: none
;
N COUNT
F COUNT=1:1:720 Q:$$BEGUPLD(DFN)
F COUNT=1:1:720 Q:$$LOCK^DGMTUTL(DFN)
Q
;
;
RELLOCKS(DFN) ;
; Description: Release the locks obtained by GETLOCKS().
; Used to synchronize the income test upload with local income
; test options.
;
; Input: DFN - ien of record in PATIENT file
; Output: none
;
D ENDUPLD(DFN)
D UNLOCK^DGMTUTL(DFN)
Q
;
;
BEGUPLD(DFN) ;
; Description: Sets a lock used to determine if an income test upload
; is in progress.
;
; Input:
; DFN - ien of record in PATIENT file
;
; Output:
; Function value - returns 1 if the lock was obtained, 0 otherwise.
;
Q:'$G(DFN) 1
L +^IVM("INCOME TEST UPLOAD",DFN):5
Q $T
;
;
ENDUPLD(DFN) ;
; Description: Release the lock obtained by calling $$BEGUPLD(DFN).
;
; Input: DFN - ien of record in PATIENT file
; Output: none
;
Q:'$G(DFN)
L -^IVM("INCOME TEST UPLOAD",DFN)
Q
;
;
CKUPLOAD(DFN) ;
; Description: Checks if an income test upload is in progress. If so,
; it pauses until it is completed. If the lock is not obtained
; initially, it is assumed that the upload is in progress, and a
; message is displayed to the user.
;
; Input: DFN - ien of record in PATIENT file
; Output: none
;
N I
I '$$BEGUPLD(DFN) D
.W !!,"Upload of income test is in progress ..."
.F I=1:1:60 Q:$$BEGUPLD(DFN) W "."
.W !,"Upload of income test completed.",!
D ENDUPLD(DFN)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIVMCUPL 1820 printed Dec 13, 2024@02:01:40 Page 2
IVMCUPL ;ALB/KCL - INCOME TEST UPLOAD UTILITIES ; 04-MAY-98
+1 ;;2.0;INCOME VERIFICATION MATCH;**17**;21-OCT-94
+2 ;
+3 ;
GETLOCKS(DFN) ;
+1 ; Description: Locks first the income test upload, then the local
+2 ; income test. Used to synchronize the income test upload with
+3 ; local income test options.
+4 ;
+5 ; Input: DFN - ien of record in PATIENT file
+6 ; Output: none
+7 ;
+8 NEW COUNT
+9 FOR COUNT=1:1:720
if $$BEGUPLD(DFN)
QUIT
+10 FOR COUNT=1:1:720
if $$LOCK^DGMTUTL(DFN)
QUIT
+11 QUIT
+12 ;
+13 ;
RELLOCKS(DFN) ;
+1 ; Description: Release the locks obtained by GETLOCKS().
+2 ; Used to synchronize the income test upload with local income
+3 ; test options.
+4 ;
+5 ; Input: DFN - ien of record in PATIENT file
+6 ; Output: none
+7 ;
+8 DO ENDUPLD(DFN)
+9 DO UNLOCK^DGMTUTL(DFN)
+10 QUIT
+11 ;
+12 ;
BEGUPLD(DFN) ;
+1 ; Description: Sets a lock used to determine if an income test upload
+2 ; is in progress.
+3 ;
+4 ; Input:
+5 ; DFN - ien of record in PATIENT file
+6 ;
+7 ; Output:
+8 ; Function value - returns 1 if the lock was obtained, 0 otherwise.
+9 ;
+10 if '$GET(DFN)
QUIT 1
+11 LOCK +^IVM("INCOME TEST UPLOAD",DFN):5
+12 QUIT $TEST
+13 ;
+14 ;
ENDUPLD(DFN) ;
+1 ; Description: Release the lock obtained by calling $$BEGUPLD(DFN).
+2 ;
+3 ; Input: DFN - ien of record in PATIENT file
+4 ; Output: none
+5 ;
+6 if '$GET(DFN)
QUIT
+7 LOCK -^IVM("INCOME TEST UPLOAD",DFN)
+8 QUIT
+9 ;
+10 ;
CKUPLOAD(DFN) ;
+1 ; Description: Checks if an income test upload is in progress. If so,
+2 ; it pauses until it is completed. If the lock is not obtained
+3 ; initially, it is assumed that the upload is in progress, and a
+4 ; message is displayed to the user.
+5 ;
+6 ; Input: DFN - ien of record in PATIENT file
+7 ; Output: none
+8 ;
+9 NEW I
+10 IF '$$BEGUPLD(DFN)
Begin DoDot:1
+11 WRITE !!,"Upload of income test is in progress ..."
+12 FOR I=1:1:60
if $$BEGUPLD(DFN)
QUIT
WRITE "."
+13 WRITE !,"Upload of income test completed.",!
End DoDot:1
+14 DO ENDUPLD(DFN)
+15 QUIT