AZXRVP1A ;PAO/IHS/JHL;VISITS BY PROVIDERS[ 08/31/93 11:22 AM ]
;Version 1;VISITS BY PROVIDERS;;****;DATE OF RELEASE HERE
;JOHN H. LYNCH
;
;ALLOWS THE USER TO INPUT THE FACILITY, DATE RANGES,
;CLINIC STOPS, AFFILIATIONS, PRIMARY PROVIDERS, AND
;COVERAGE TYPES TO RECEIVE BACK ALL VISITS BY PROVIDERS.
;
;AZXRVP1A, INPUT PROGRAM 1 OF 4.
;THE ROUTINES THAT CALL AZXRVP1A:
;NONE
;THE ROUTINES THAT AZXRVP1A CALLS:
;AZXRVP1B, 2nd input program.
;^DIC, Fileman Lookup.
;Variable List
;DTIME= Default timeout on all prompts.
;DIC= Global root of file for Fileman Lookup.
;DIC(0)= Fileman Lookup parameters.
;DIC("A")= Fileman Lookup default prompt.
;AZXRBCK= Flags whether user wants to back up one prompt.
;AZXRFAC= [1]Facility in external form^[2]DFN from LOCATION file.
;AZXRQUIT= Flag to check if ^AZXRTMP1 is locked.
;X= Lookup value from user input.
;Y= Returned lookup value from ^DIC.
MAIN ;AZXRVP1A PROGRAM CONTROL
S DTIME="60" ;DEFAULT TIMEOUT ON PROMPTS
D VPCHK ;ONLY ONE REPORT CAN RUN
I AZXRQUIT="Y" K DTIME,AZXRQUIT Q ;KILL LOCAL VARS AND QUIT
D INPUT ;GET USER INPUTS
D KILL ;KILL OFF ALL LOCAL VARIABLES
Q
VPCHK ;ONLY ONE REPORT CAN RUN AT A TIME
S AZXRQUIT="N" ;INIT AZXRQUIT
I $D(^AZXRTMP1(0,0)) W !!,?21,"This report is already being run.",!,?21,"Please try again later." S AZXRQUIT="Y" H 3 Q
;CHK IF TEMP GLOBAL LOCKED
S ^AZXRTMP1(0,0)="GLOBAL LOCKED^KILL THIS NODE IF NEEDED TO BE UNLOCKED"
;LOCK GLOBAL
Q
INPUT ;ASK USER FOR THE FACILITY TO USE FOR REPORT
;THEN CALL AZXRFDT ROUTINE
W @IOF ;CLEAR SCREEN
W !!!,"Visits by Providers...",!!
FACILITY ;CALL FILEMAN LOOKUP FOR FACILITY
;SET LOCAL VARIABLES
S DIC="^AUTTLOC(" ;GLOBAL ROOT OF LOCATION FILE
;USED FOR LOOKUP
S DIC(0)="AEQZ" ;DIC(0)= LOOKUP VALUES
; A= ASK USER FOR INPUT
; E= ECHO ANSWER
; Q= QUESTION ERRONEOUS INPUT
; Z= ZERO NODE RETURNED IN
; Y(0) AND EXTERNAL FORM
; IN Y(0,0)
S DIC("A")="Enter Facility: " ;DIC("A")= DEFAULT PROMPT FOR
; LOOKUP
D ^DIC
I (X="^")!(X="")!($D(DTOUT)) K DTOUT,^AZXRTMP1(0,0) Q
;X= USER INPUT VALUE FROM ^DIC
; OR A TIMEOUT HAS OCCURRED
; TIME TO QUIT PROGRAM
; CLEAR LOCK ON TEMP GLOBAL
S $P(AZXRFAC,U,2)=Y(0,0) ;AZXRFAC= FACILITY IN EXTERNAL
; FORM
S $P(AZXRFAC,U)=$P(Y,U,1) ;AZXRFAC= INTERNAL NUMBER IN
; LOCATION FILE
D FDATE^AZXRVP1B ;CALL INPUT ROUTINE 2,
;AZXRVP1B
G:AZXRBCK="Y" FACILITY ;USER WANTS TO BACKUP "^"
Q
KILL ;KILL LOCAL VARIABLES AND EXIT ROUTINE AZXRVP1A
K DTIME,DIC,X,AZXRFAC,Y,AZXRBCK,%DT,AZXRFDT,AZXRTDT
K J,K,L,AZXROK,AZXRCLNC,AZXRAFF,AZXRAFFN,AZXRAFOK
K AZXRPROV,AZXRCOV,%ZIS,%IS,AZXRAFFS,DINUM
Q
AZXRVP1A ;PAO/IHS/JHL;VISITS BY PROVIDERS[ 08/31/93 11:22 AM ]
+1 ;Version 1;VISITS BY PROVIDERS;;****;DATE OF RELEASE HERE
+2 ;JOHN H. LYNCH
+3 ;
+4 ;ALLOWS THE USER TO INPUT THE FACILITY, DATE RANGES,
+5 ;CLINIC STOPS, AFFILIATIONS, PRIMARY PROVIDERS, AND
+6 ;COVERAGE TYPES TO RECEIVE BACK ALL VISITS BY PROVIDERS.
+7 ;
+8 ;AZXRVP1A, INPUT PROGRAM 1 OF 4.
+9 +10 ;THE ROUTINES THAT CALL AZXRVP1A:
+11 ;NONE
+12 +13 ;THE ROUTINES THAT AZXRVP1A CALLS:
+14 ;AZXRVP1B, 2nd input program.
+15 ;^DIC, Fileman Lookup.
+16 +17 ;Variable List
+18 ;DTIME= Default timeout on all prompts.
+19 ;DIC= Global root of file for Fileman Lookup.
+20 ;DIC(0)= Fileman Lookup parameters.
+21 ;DIC("A")= Fileman Lookup default prompt.
+22 ;AZXRBCK= Flags whether user wants to back up one prompt.
+23 ;AZXRFAC= [1]Facility in external form^[2]DFN from LOCATION file.
+24 ;AZXRQUIT= Flag to check if ^AZXRTMP1 is locked.
+25 ;X= Lookup value from user input.
+26 ;Y= Returned lookup value from ^DIC.
+27 +28 MAIN ;AZXRVP1A PROGRAM CONTROL
+1 ;DEFAULT TIMEOUT ON PROMPTS
SET DTIME="60"
+2 ;ONLY ONE REPORT CAN RUN
DO VPCHK
+3 ;KILL LOCAL VARS AND QUIT
IF AZXRQUIT="Y"
KILL DTIME,AZXRQUIT
QUIT
+4 +5 ;GET USER INPUTS
DO INPUT
+6 ;KILL OFF ALL LOCAL VARIABLES
DO KILL
+7 QUIT
+8 VPCHK ;ONLY ONE REPORT CAN RUN AT A TIME
+1 ;INIT AZXRQUIT
SET AZXRQUIT="N"
+2 IF $DATA(^AZXRTMP1(0,0))
WRITE !!,?21,"This report is already being run.",!,?21,"Please try again later."
SET AZXRQUIT="Y"
HANG 3
QUIT
+3 ;CHK IF TEMP GLOBAL LOCKED
+4 SET ^AZXRTMP1(0,0)="GLOBAL LOCKED^KILL THIS NODE IF NEEDED TO BE UNLOCKED"
+5 ;LOCK GLOBAL
+6 QUIT
+7 INPUT ;ASK USER FOR THE FACILITY TO USE FOR REPORT
+1 ;THEN CALL AZXRFDT ROUTINE
+2 +3 ;CLEAR SCREEN
WRITE @IOF
+4 +5 WRITE !!!,"Visits by Providers...",!!
+6 FACILITY ;CALL FILEMAN LOOKUP FOR FACILITY
+1 ;SET LOCAL VARIABLES
+2 ;GLOBAL ROOT OF LOCATION FILE
SET DIC="^AUTTLOC("
+3 ;USED FOR LOOKUP
+4 +5 ;DIC(0)= LOOKUP VALUES
SET DIC(0)="AEQZ"
+6 ; A= ASK USER FOR INPUT
+7 ; E= ECHO ANSWER
+8 ; Q= QUESTION ERRONEOUS INPUT
+9 ; Z= ZERO NODE RETURNED IN
+10 ; Y(0) AND EXTERNAL FORM
+11 ; IN Y(0,0)
+12 +13 ;DIC("A")= DEFAULT PROMPT FOR
SET DIC("A")="Enter Facility: "
+14 ; LOOKUP
+15 DO ^DIC
+16 +17 IF (X="^")!(X="")!($DATA(DTOUT))
KILL DTOUT,^AZXRTMP1(0,0)
QUIT
+18 ;X= USER INPUT VALUE FROM ^DIC
+19 ; OR A TIMEOUT HAS OCCURRED
+20 ; TIME TO QUIT PROGRAM
+21 ; CLEAR LOCK ON TEMP GLOBAL
+22 +23 ;AZXRFAC= FACILITY IN EXTERNAL
SET $PIECE(AZXRFAC,U,2)=Y(0,0)
+24 ; FORM
+25 +26 ;AZXRFAC= INTERNAL NUMBER IN
SET $PIECE(AZXRFAC,U)=$PIECE(Y,U,1)
+27 ; LOCATION FILE
+28 +29 ;CALL INPUT ROUTINE 2,
DO FDATE^AZXRVP1B
+30 ;AZXRVP1B
+31 +32 ;USER WANTS TO BACKUP "^"
IF AZXRBCK="Y"
GOTO FACILITY
+33 QUIT
+34 KILL ;KILL LOCAL VARIABLES AND EXIT ROUTINE AZXRVP1A
+1 KILL DTIME,DIC,X,AZXRFAC,Y,AZXRBCK,%DT,AZXRFDT,AZXRTDT
+2 KILL J,K,L,AZXROK,AZXRCLNC,AZXRAFF,AZXRAFFN,AZXRAFOK
+3 KILL AZXRPROV,AZXRCOV,%ZIS,%IS,AZXRAFFS,DINUM
+4 QUIT