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
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPXQMAIN3 3338 printed Dec 13, 2024@02:30:09 Page 2
PXQMAIN3 ;ISL/JVS - MAIN MENU ROUTINE #4 ;8/29/96 10:33
+1 ;;1.0;PCE PATIENT CARE ENCOUNTER;**4**;Aug 12, 1996
+2 ;
+3 ;
ASKENC ;--6TH OPTION
+1 NEW DFN,IEN,VISIT,ANS,I
+2 ;--ASK FOR ENCOUNTER IEN
+3 SET IEN=$$ASKENC^PXQUTL
if IEN<0
QUIT
+4 ;--CONVERT TO A VISIT
+5 SET (VISIT,IEN)=$PIECE(^SCE(IEN,0),"^",5)
+6 IF IEN']""
Begin DoDot:1
+7 WRITE $$RE^PXQUTL(" NO VISIT IEN TO FOLLOW ")
+8 DO READ^PXQUTL
End DoDot:1
+9 if IEN']""
QUIT
+10 ;
MENENC ;--MENU FOR WHAT TO DISPLAY FOR VISIT
+1 SET DIR("A")="Select a Display"
+2 SET DIR(0)="SOM^D:Dependent Entry Counts;E:Expanded Views;S:Sources and Audit Trail;A:All of the Above"
+3 DO ^DIR
IF Y=""!(Y["^")
GOTO CLOSENC
+4 IF Y="D"
DO DECENC
GOTO MENENC
+5 IF Y="E"
DO EXPENC
GOTO MENENC
+6 IF Y="S"
DO AUDENC
GOTO MENENC
+7 IF Y="A"
DO ALLENC
GOTO MENENC
+8 GOTO CLOSENC
+9 ;
DECENC ;--ENTRIES POINTING TO ENCOUNTER
+1 ;--OPEN DEVICE
+2 SET OPTION="6D"
+3 DO ZIS^PXQZIS
if POP
GOTO EXIT
+4 ;--RESET $X,$Y TO ZERO
+5 NEW DX,DY
SET (DX,DY)=0
XECUTE ^%ZOSF("XY")
DEC6D ;--TITLE OF PRINT OUT
+1 WRITE $$RE^PXQUTL("** D E P E N D E N T E N T R Y C O U N T **")
+2 NEW I
SET I=0
FOR
SET I=$ORDER(^SCE("AVSIT",IEN,I))
if I=""
QUIT
Begin DoDot:1
+3 WRITE $$RE^PXQUTL(" DEPENDENT ENTRY COUNT ---FOR ENCOUNTER "_I_"-----")
+4 WRITE $$DEC^PXQFE(I,1,"")
End DoDot:1
+5 ;W $$EXP^PXQUTL("^AUPNVSIT(",IEN)
+6 WRITE $$RE^PXQUTL(" DEPENDENT ENTRY COUNT---FOR VISIT "_IEN_"-----")
+7 WRITE $$DEC^PXQFV(IEN,1,"")
+8 DO READ^PXQUTL
+9 DO ^%ZISC
+10 IF $DATA(ZTSK)
GOTO CLOSE
+11 IF '$TEST
QUIT
+12 ;
+13 ;
EXPENC ;--EXPANDED VIEW
+1 ;--OPEN DEVICE
+2 SET OPTION="6E"
+3 DO ZIS^PXQZIS
if POP
GOTO EXIT
+4 ;--RESET $X,$Y TO ZERO
+5 NEW DX,DY
SET (DX,DY)=0
XECUTE ^%ZOSF("XY")
EXP6E ;--TITLE OF PRINT OUT
+1 WRITE $$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 **")
+2 NEW I
SET I=0
FOR
SET I=$ORDER(^SCE("AVSIT",IEN,I))
if I=""
QUIT
Begin DoDot:1
+3 WRITE $$RE^PXQUTL(" DEPENDENT ENTRY COUNT ---FOR ENCOUNTER "_I_"-----")
+4 WRITE $$DEC^PXQFE(I,1,1)
End DoDot:1
+5 DO SDV^PXQUTL
+6 WRITE $$RE^PXQUTL(" DEPENDENT ENTRY COUNT---FOR VISIT "_IEN_"-----")
+7 WRITE $$DEC^PXQFV(IEN,1,1)
+8 ;--ENTRIES POINTING TO ENCOUNTER
+9 DO READ^PXQUTL
+10 DO ^%ZISC
+11 IF $DATA(ZTSK)
GOTO CLOSE
+12 IF '$TEST
QUIT
+13 ;
AUDENC ;--AUDIT TRAIL AND SOURCE
+1 NEW PXQAUDIT,PXQSOR
+2 SET (PXQAUDIT,PXQSOR)=1
+3 ;--OPEN DEVICE
+4 SET OPTION="6A"
+5 DO ZIS^PXQZIS
if POP
GOTO EXIT
+6 ;--RESET $X,$Y TO ZERO
+7 NEW DX,DY
SET (DX,DY)=0
XECUTE ^%ZOSF("XY")
AUD6A ;--TITLE OF PRINT OUT
+1 WRITE $$RE^PXQUTL("** S O U R C E S / A U D I T T R A I L **")
+2 ;--GET SOURCE OF THE VISIT ENTRY
+3 WRITE $$SOR^PXQUTL(VISIT)
+4 WRITE $$RE^PXQUTL(" DEPENDENT ENTRY COUNT---FOR VISIT "_IEN_"-----")
+5 WRITE $$DEC^PXQFV(IEN,1,1)
+6 DO READ^PXQUTL
+7 DO ^%ZISC
+8 IF $DATA(ZTSK)
GOTO CLOSE
+9 IF '$TEST
QUIT
ALLENC ;--ALL OF THE ABOVE
+1 NEW PXQAUDIT,PXQSOR
+2 SET (PXQAUDIT,PXQSOR)=1
+3 ;--OPEN DEVICE
+4 SET OPTION="6A"
+5 DO ZIS^PXQZIS
if POP
GOTO EXIT
+6 ;--RESET $X,$Y TO ZERO
+7 NEW DX,DY
SET (DX,DY)=0
XECUTE ^%ZOSF("XY")
ALL6A ;--TITLE OF PRINT OUT
+1 WRITE $$RE^PXQUTL("**A L L S O U R C E S / A U D I T T R A I L **")
+2 ;--ENTRIES POINTING TO ENCOUNTER
+3 NEW I
SET I=0
FOR
SET I=$ORDER(^SCE("AVSIT",IEN,I))
if I=""
QUIT
Begin DoDot:1
+4 WRITE $$RE^PXQUTL(" DEPENDENT ENTRY COUNT ---FOR ENCOUNTER "_I_"-----")
+5 WRITE $$DEC^PXQFE(I,1,1)
End DoDot:1
+6 DO SDV^PXQUTL
+7 ;--GET SOURCE OF THE VISIT ENTRY
+8 WRITE $$SOR^PXQUTL(VISIT)
+9 WRITE $$RE^PXQUTL(" DEPENDENT ENTRY COUNT---FOR VISIT "_IEN_"-----")
+10 WRITE $$DEC^PXQFV(IEN,1,1)
+11 DO READ^PXQUTL
+12 DO ^%ZISC
+13 IF $DATA(ZTSK)
GOTO CLOSE
+14 IF '$TEST
QUIT
+15 ;
+16 ;
CLOSENC ;--CLOSE DEVICE
+1 DO ^%ZISC
+2 ;--RETURN TO MENU
+3 KILL OPTION
+4 QUIT
CLOSE ;--CLOSE DEVICE
+1 DO ^%ZISC
+2 ;--RETURN TO MENU
+3 KILL OPTION
+4 QUIT
+5 ;
EXIT ;--EXIT
+1 KILL OPTION
+2 QUIT