1 | IVMCUPL ;ALB/KCL - INCOME TEST UPLOAD UTILITIES ; 04-MAY-98
|
---|
2 | ;;2.0;INCOME VERIFICATION MATCH;**17**;21-OCT-94
|
---|
3 | ;
|
---|
4 | ;
|
---|
5 | GETLOCKS(DFN) ;
|
---|
6 | ; Description: Locks first the income test upload, then the local
|
---|
7 | ; income test. Used to synchronize the income test upload with
|
---|
8 | ; local income test options.
|
---|
9 | ;
|
---|
10 | ; Input: DFN - ien of record in PATIENT file
|
---|
11 | ; Output: none
|
---|
12 | ;
|
---|
13 | N COUNT
|
---|
14 | F COUNT=1:1:720 Q:$$BEGUPLD(DFN)
|
---|
15 | F COUNT=1:1:720 Q:$$LOCK^DGMTUTL(DFN)
|
---|
16 | Q
|
---|
17 | ;
|
---|
18 | ;
|
---|
19 | RELLOCKS(DFN) ;
|
---|
20 | ; Description: Release the locks obtained by GETLOCKS().
|
---|
21 | ; Used to synchronize the income test upload with local income
|
---|
22 | ; test options.
|
---|
23 | ;
|
---|
24 | ; Input: DFN - ien of record in PATIENT file
|
---|
25 | ; Output: none
|
---|
26 | ;
|
---|
27 | D ENDUPLD(DFN)
|
---|
28 | D UNLOCK^DGMTUTL(DFN)
|
---|
29 | Q
|
---|
30 | ;
|
---|
31 | ;
|
---|
32 | BEGUPLD(DFN) ;
|
---|
33 | ; Description: Sets a lock used to determine if an income test upload
|
---|
34 | ; is in progress.
|
---|
35 | ;
|
---|
36 | ; Input:
|
---|
37 | ; DFN - ien of record in PATIENT file
|
---|
38 | ;
|
---|
39 | ; Output:
|
---|
40 | ; Function value - returns 1 if the lock was obtained, 0 otherwise.
|
---|
41 | ;
|
---|
42 | Q:'$G(DFN) 1
|
---|
43 | L +^IVM("INCOME TEST UPLOAD",DFN):5
|
---|
44 | Q $T
|
---|
45 | ;
|
---|
46 | ;
|
---|
47 | ENDUPLD(DFN) ;
|
---|
48 | ; Description: Release the lock obtained by calling $$BEGUPLD(DFN).
|
---|
49 | ;
|
---|
50 | ; Input: DFN - ien of record in PATIENT file
|
---|
51 | ; Output: none
|
---|
52 | ;
|
---|
53 | Q:'$G(DFN)
|
---|
54 | L -^IVM("INCOME TEST UPLOAD",DFN)
|
---|
55 | Q
|
---|
56 | ;
|
---|
57 | ;
|
---|
58 | CKUPLOAD(DFN) ;
|
---|
59 | ; Description: Checks if an income test upload is in progress. If so,
|
---|
60 | ; it pauses until it is completed. If the lock is not obtained
|
---|
61 | ; initially, it is assumed that the upload is in progress, and a
|
---|
62 | ; message is displayed to the user.
|
---|
63 | ;
|
---|
64 | ; Input: DFN - ien of record in PATIENT file
|
---|
65 | ; Output: none
|
---|
66 | ;
|
---|
67 | N I
|
---|
68 | I '$$BEGUPLD(DFN) D
|
---|
69 | .W !!,"Upload of income test is in progress ..."
|
---|
70 | .F I=1:1:60 Q:$$BEGUPLD(DFN) W "."
|
---|
71 | .W !,"Upload of income test completed.",!
|
---|
72 | D ENDUPLD(DFN)
|
---|
73 | Q
|
---|