Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: IVMCUPL

IVMCUPL.m

Go to the documentation of this file.
  1. IVMCUPL ;ALB/KCL - INCOME TEST UPLOAD UTILITIES ; 04-MAY-98
  1. ;;2.0;INCOME VERIFICATION MATCH;**17**;21-OCT-94
  1. ;
  1. ;
  1. GETLOCKS(DFN) ;
  1. ; Description: Locks first the income test upload, then the local
  1. ; income test. Used to synchronize the income test upload with
  1. ; local income test options.
  1. ;
  1. ; Input: DFN - ien of record in PATIENT file
  1. ; Output: none
  1. ;
  1. N COUNT
  1. F COUNT=1:1:720 Q:$$BEGUPLD(DFN)
  1. F COUNT=1:1:720 Q:$$LOCK^DGMTUTL(DFN)
  1. Q
  1. ;
  1. ;
  1. RELLOCKS(DFN) ;
  1. ; Description: Release the locks obtained by GETLOCKS().
  1. ; Used to synchronize the income test upload with local income
  1. ; test options.
  1. ;
  1. ; Input: DFN - ien of record in PATIENT file
  1. ; Output: none
  1. ;
  1. D ENDUPLD(DFN)
  1. D UNLOCK^DGMTUTL(DFN)
  1. Q
  1. ;
  1. ;
  1. BEGUPLD(DFN) ;
  1. ; Description: Sets a lock used to determine if an income test upload
  1. ; is in progress.
  1. ;
  1. ; Input:
  1. ; DFN - ien of record in PATIENT file
  1. ;
  1. ; Output:
  1. ; Function value - returns 1 if the lock was obtained, 0 otherwise.
  1. ;
  1. Q:'$G(DFN) 1
  1. L +^IVM("INCOME TEST UPLOAD",DFN):5
  1. Q $T
  1. ;
  1. ;
  1. ENDUPLD(DFN) ;
  1. ; Description: Release the lock obtained by calling $$BEGUPLD(DFN).
  1. ;
  1. ; Input: DFN - ien of record in PATIENT file
  1. ; Output: none
  1. ;
  1. Q:'$G(DFN)
  1. L -^IVM("INCOME TEST UPLOAD",DFN)
  1. Q
  1. ;
  1. ;
  1. CKUPLOAD(DFN) ;
  1. ; Description: Checks if an income test upload is in progress. If so,
  1. ; it pauses until it is completed. If the lock is not obtained
  1. ; initially, it is assumed that the upload is in progress, and a
  1. ; message is displayed to the user.
  1. ;
  1. ; Input: DFN - ien of record in PATIENT file
  1. ; Output: none
  1. ;
  1. N I
  1. I '$$BEGUPLD(DFN) D
  1. .W !!,"Upload of income test is in progress ..."
  1. .F I=1:1:60 Q:$$BEGUPLD(DFN) W "."
  1. .W !,"Upload of income test completed.",!
  1. D ENDUPLD(DFN)
  1. Q