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

PXQMAIN.m

Go to the documentation of this file.
PXQMAIN ;ISL/JVS - DEBUGGINH MAIN ROUTINE #1;8/29/96  10:32
 ;;1.0;PCE PATIENT CARE ENCOUNTER;**4**;Aug 12, 1996
 ;
 ;
 ;
DEPEN ;--1ST OPTION
 N DFN,IEN,VISIT,ANS,I,PXBCNT,PXBHIGH
 ;--ASK FOR PATIENT
 S DFN=$$ASKPAT^PXQUTL Q:DFN<0
 ;--GET A LIST OF VISITS
 S (IEN,VISIT)=$$VISITLST^PXQGVST(DFN,"","","","X") Q:IEN<0
 I $G(IEN)'<1 S ^DISV(DUZ,"PXQREP3")="`"_$G(IEN)
 ;--OPEN DEVICE
 S OPTION=1
 D ZIS^PXQZIS G:POP EXIT
 ;--RESET $X,$Y TO ZERO
 N DX,DY S (DX,DY)=0 X ^%ZOSF("XY")
DEP ;--TITLE OF PRINT OUT
 W $$RE^PXQUTL("**  D E P E N D E N T   E N T R Y   C O U N T  **")
 ;--ENTRIES POINTING TO VISIT
 W $$EXP^PXQUTL("^AUPNVSIT(",IEN)
 W $$RE^PXQUTL("     DEPENDENT ENTRY COUNT --- FOR     VISIT "_IEN)
 W $$DEC^PXQFV(IEN,1,"")
 ;--ENTRIES POINTING TO ENCOUNTER
 N I S I=0 F  S I=$O(^SCE("AVSIT",IEN,I)) Q:I=""  D
 .W $$RE^PXQUTL("     DEPENDENT ENTRY COUNT --- FOR ENCOUNTER "_I)
 .W $$DEC^PXQFE(I,1,"")
 ;--READ TO DEVICE
 D READ^PXQUTL
 ;--CLOSE DEVICE
 D ^%ZISC
 I $D(ZTSK) G EXIT
 E  G DEPEN
 Q
 ;
 ;
EXPAND ;--2ND OPTION
 N DFN,IEN,VISIT,ANS,I,PXBCNT,PXBHIGH,POP
 ;--ASK FOR PATIENT
 S DFN=$$ASKPAT^PXQUTL Q:DFN<0
 ;--GET A LIST OF VISITS
 S (IEN,VISIT)=$$VISITLST^PXQGVST(DFN,"","","","X") Q:IEN<0
 I $G(IEN)'<1 S ^DISV(DUZ,"PXQREP3")="`"_$G(IEN)
 ;--OPEN DEVICE
 S OPTION=2
 D ZIS^PXQZIS G:POP EXIT
 ;--RESET $X,$Y TO ZERO
 N DX,DY S (DX,DY)=0 X ^%ZOSF("XY")
EXP ;--TITLE OF PRINT OUT
 W $$RE^PXQUTL("**  E X P A N D E D  D E P E N D E N T   E N T R Y   C O U N T  **")
 ;--ENTRIES POINTING TO VISIT
 W $$RE^PXQUTL("     DEPENDENT ENTRY COUNT---FOR VISIT "_IEN_"-----")
 W $$DEC^PXQFV(IEN,1,1)
 ;--ENTRIES POINTING TO ENCOUNTER
 N I S I=0 F  S I=$O(^SCE("AVSIT",IEN,I)) Q:I=""  D
 .W $$RE^PXQUTL("     DEPENDENT ENTRY COUNT ---FOR ENCOUNTER "_I_"-----")
 .W $$DEC^PXQFE(I,1,1)
 ;--LOOK UP SCHEDULING VISITS FILE
 D SDV^PXQUTL
 ;--READ TO DEVICE
 D READ^PXQUTL
 ;--CLOSE DEVICE
 D ^%ZISC
 ;--RETURN TO MENU
 I $D(ZTSK) G EXIT
 E  G EXPAND
 Q
 ;
 ;
INTER ;--3RD OPTION
 N DFN,IEN,VISIT,ANS,I,PXQINT,PXBCNT,PXBHIGH,POP
 ;--SET FLAG VARIABLE
 S PXQINT=1
 ;--ASK FOR PATIENT
 S DFN=$$ASKPAT^PXQUTL Q:DFN<0
 ;--GET A LIST OF VISITS
 S (IEN,VISIT)=$$VISITLST^PXQGVST(DFN,"","","","X") Q:IEN<0
 I $G(IEN)'<1 S ^DISV(DUZ,"PXQREP3")="`"_$G(IEN)
 ;--OPEN DEVICE
 S OPTION=3
 D ZIS^PXQZIS G:POP EXIT
 ;--RESET $X,$Y TO ZERO
 N DX,DY S (DX,DY)=0 X ^%ZOSF("XY")
INT ;--TITLE OF PRINT OUT
 W $$RE^PXQUTL("**  E X P A N D E D   D E P E N D E N T   E N T R Y   C O U N T  **")
 ;--ENTRIES POINTING TO VISIT
 W $$RE^PXQUTL("     DEPENDENT ENTRY COUNT---FOR VISIT "_IEN_"-----")
 W $$DEC^PXQFV(IEN,1,1)
 ;--ENTRIES POINTING TO ENCOUNTER
 N I S I=0 F  S I=$O(^SCE("AVSIT",IEN,I)) Q:I=""  D
 .W $$RE^PXQUTL("     DEPENDENT ENTRY COUNT ---FOR ENCOUNTER "_I_"-----")
 .W $$DEC^PXQFE(I,1,1)
 ;--LOOK UP SCHEDULING VISITS FILE
 D SDV^PXQUTL
 ;--READ TO DEVICE
 D READ^PXQUTL
 ;--CLOSE DEVICE
 D ^%ZISC
 ;--RETURN TO MENU
 I $D(ZTSK) G EXIT
 E  G INTER
 Q
 ;
 ;
SOURCE ;--4TH OPTION
 N DFN,IEN,VISIT,ANS,I,PXQAUDIT,PXQSOR,PXBCNT,PXBHIGH,POP
 ;--SET FLAG VARIABLES
 S PXQAUDIT=1,PXQSOR=1
 ;--ASK FOR PATIENT
 S DFN=$$ASKPAT^PXQUTL Q:DFN<0
 ;--GET A LIST OF VISITS
 S (IEN,VISIT)=$$VISITLST^PXQGVST(DFN,"","","","X") Q:IEN<0
 I $G(IEN)'<1 S ^DISV(DUZ,"PXQREP3")="`"_$G(IEN)
 ;--OPEN DEVICE
 S OPTION=4
 D ZIS^PXQZIS G:POP EXIT
 ;--RESET $X,$Y TO ZERO
 N DX,DY S (DX,DY)=0 X ^%ZOSF("XY")
SOR ;--TITLE OF PRINT OUT
 W $$RE^PXQUTL("**  S O U R C E S / A U D I T  T R A I L  **")
 ;--GET SOURCE OF THE VISIT ENTRY
 W $$SOR^PXQUTL(VISIT)
 ;--ENTRIES POINTING TO VISIT
 W $$RE^PXQUTL("     DEPENDENT ENTRY COUNT---FOR VISIT "_IEN)
 W $$DEC^PXQFV(IEN,1,1)
 ;--ENTRIES POINTING TO ENCOUNTER
 ;N I S I=0 F  S I=$O(^SCE("AVSIT",IEN,I)) Q:I=""  D
 ;.W $$RE^PXQUTL("     DEPENDENT ENTRY COUNT ---FOR ENCOUNTER "_I)
 ;.W $$DEC^PXQFE(I,1,1)
 ;--READ TO DEVICE
 D READ^PXQUTL
 ;--CLOSE DEVICE
 D ^%ZISC
 I $D(ZTSK) G EXIT
 ;--RETURN TO MENU
 E  K USER,OPTION,PROTOCOL,SOURCE,PACKAGE,DATEC,DATEE G SOURCE
 Q
 ;
 ;
VISIT ;--5TH OPTION
 ;D ^PXQRENO
 ;I IOST["C-" R !,"Press any key to return to the menu",ANS:DTIME
 Q
CLOSE ;--CLOSE DEVICE
 D ^%ZISC
 ;--RETURN TO MENU
 Q
 ;
MAX ;--MAXIMUM LENGTH OF GLOBAL REFERENCE
 W !,"    I M F O R M A T I O N    O N L Y"
 W !,"This routine can only be run buy someone who is"
 W !,"AUTHORIZED to be in progammer mode. If you run"
 W !,"the routine, 'D ^PXQGRLT' ,it will error out when"
 W !,"the mazimum length is reached."
 ;--RETURN TO MENU
 R !,"Press any key to return to the menu",ANS:DTIME
 Q
 ;
SETUP ;--7TH OPTION
 N POP,DIC,DA
 ;--TITLE OF PRINT OUT
 W $$RE^PXQUTL("**  P A R A M E T E R S   S E T   U P  **")
 ;--OPEN DEVICE
 S OPTION=7
 D ZIS^PXQZIS G:POP EXIT
 ;--RESET $X,$Y TO ZERO
 N DX,DY S (DX,DY)=0 X ^%ZOSF("XY")
SET7 ;---START
 D CHK^PXQFS
 W $$EXP^PXQUTL("^DIC(",150.9)
 S DIC="^DIC(150.9,",DA=1 D EN^DIQ
 W $$EXP^PXQUTL("^PX(",815)
 S DIC="^PX(815,",DA=1 D EN^DIQ
 D READ^PXQUTL
 ;--CLOSE DEVICE
 D ^%ZISC
 I $D(ZTSK) G EXIT
 E  Q
 ;---SUB ROUTINES AND FUNCTIONS
EXIT ;
 K USER,OPTION,PROTOCOL,SOURCE,PACKAGE,DATEC,DATEE
 K OPTION
 Q