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

PXQMAIN3.m

Go to the documentation of this file.
PXQMAIN3 ;ISL/JVS - MAIN MENU ROUTINE #4 ;8/29/96  10:33
 ;;1.0;PCE PATIENT CARE ENCOUNTER;**4**;Aug 12, 1996
 ;
 ;
ASKENC ;--6TH OPTION
 N DFN,IEN,VISIT,ANS,I
 ;--ASK FOR ENCOUNTER IEN
 S IEN=$$ASKENC^PXQUTL Q:IEN<0
 ;--CONVERT TO A VISIT
 S (VISIT,IEN)=$P(^SCE(IEN,0),"^",5)
 I IEN']"" D
 .W $$RE^PXQUTL(" NO VISIT IEN TO FOLLOW ")
 .D READ^PXQUTL
 Q:IEN']""
 ;
MENENC ;--MENU FOR WHAT TO DISPLAY FOR VISIT
 S DIR("A")="Select a Display"
 S DIR(0)="SOM^D:Dependent Entry Counts;E:Expanded Views;S:Sources and Audit Trail;A:All of the Above"
 D ^DIR I Y=""!(Y["^") G CLOSENC
 I Y="D" D DECENC G MENENC
 I Y="E" D EXPENC G MENENC
 I Y="S" D AUDENC G MENENC
 I Y="A" D ALLENC G MENENC
 G CLOSENC
 ;
DECENC ;--ENTRIES POINTING TO ENCOUNTER
 ;--OPEN DEVICE
 S OPTION="6D"
 D ZIS^PXQZIS G:POP EXIT
 ;--RESET $X,$Y TO ZERO
 N DX,DY S (DX,DY)=0 X ^%ZOSF("XY")
DEC6D ;--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  **")
 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,"")
 ;W $$EXP^PXQUTL("^AUPNVSIT(",IEN)
 W $$RE^PXQUTL("     DEPENDENT ENTRY COUNT---FOR VISIT "_IEN_"-----")
 W $$DEC^PXQFV(IEN,1,"")
 D READ^PXQUTL
 D ^%ZISC
 I $D(ZTSK) G CLOSE
 E  Q
 ;
 ;
EXPENC ;--EXPANDED VIEW
 ;--OPEN DEVICE
 S OPTION="6E"
 D ZIS^PXQZIS G:POP EXIT
 ;--RESET $X,$Y TO ZERO
 N DX,DY S (DX,DY)=0 X ^%ZOSF("XY")
EXP6E ;--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  **")
 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)
 D SDV^PXQUTL
 W $$RE^PXQUTL("     DEPENDENT ENTRY COUNT---FOR VISIT "_IEN_"-----")
 W $$DEC^PXQFV(IEN,1,1)
 ;--ENTRIES POINTING TO ENCOUNTER
 D READ^PXQUTL
 D ^%ZISC
 I $D(ZTSK) G CLOSE
 E  Q
 ;
AUDENC ;--AUDIT TRAIL AND SOURCE
 N PXQAUDIT,PXQSOR
 S (PXQAUDIT,PXQSOR)=1
 ;--OPEN DEVICE
 S OPTION="6A"
 D ZIS^PXQZIS G:POP EXIT
 ;--RESET $X,$Y TO ZERO
 N DX,DY S (DX,DY)=0 X ^%ZOSF("XY")
AUD6A ;--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)
 W $$RE^PXQUTL("     DEPENDENT ENTRY COUNT---FOR VISIT "_IEN_"-----")
 W $$DEC^PXQFV(IEN,1,1)
 D READ^PXQUTL
 D ^%ZISC
 I $D(ZTSK) G CLOSE
 E  Q
ALLENC ;--ALL OF THE ABOVE
 N PXQAUDIT,PXQSOR
 S (PXQAUDIT,PXQSOR)=1
 ;--OPEN DEVICE
 S OPTION="6A"
 D ZIS^PXQZIS G:POP EXIT
 ;--RESET $X,$Y TO ZERO
 N DX,DY S (DX,DY)=0 X ^%ZOSF("XY")
ALL6A ;--TITLE OF PRINT OUT
 W $$RE^PXQUTL("**A L L   S O U R C E S / A U D I T  T R A I L  **")
 ;--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)
 D SDV^PXQUTL
 ;--GET SOURCE OF THE VISIT ENTRY
 W $$SOR^PXQUTL(VISIT)
 W $$RE^PXQUTL("     DEPENDENT ENTRY COUNT---FOR VISIT "_IEN_"-----")
 W $$DEC^PXQFV(IEN,1,1)
 D READ^PXQUTL
 D ^%ZISC
 I $D(ZTSK) G CLOSE
 E  Q
 ;
 ;
CLOSENC ;--CLOSE DEVICE
 D ^%ZISC
 ;--RETURN TO MENU
 K OPTION
 Q
CLOSE ;--CLOSE DEVICE
 D ^%ZISC
 ;--RETURN TO MENU
 K OPTION
 Q
 ;
EXIT ;--EXIT
 K OPTION
 Q