PXQMAIN1 ;ISL/JVS - MAIN MENU ROUTINE #2 ;8/29/96 10:33
;;1.0;PCE PATIENT CARE ENCOUNTER;**4**;Aug 12, 1996
;
;
;
ASK ;--5TH OPTION
N DFN,IEN,VISIT,ANS,I,BROKEN
;--ASK FOR IEN OR UID
;S (VISIT,IEN)=$$ASKNUM^PXQUTL Q:IEN<0
S (VISIT,IEN)=$$ASKNUM^PXQUTL I IEN<0 D Q:IEN<0
.R !,"Look at a BROKER POINTER to a visit? (Y/N): N// ",ANS:DTIME
.I ANS["N"!(ANS="") Q
.R !,"Enter Visit IEN: ",ANS:DTIME
.I +ANS<1 Q
.S (VISIT,IEN)=ANS
.I '$D(^AUPNVSIT(ANS)) S BROKEN=1
I $G(IEN)'<1 S ^DISV(DUZ,"PXQREP3")="`"_$G(IEN)
;
MEN ;--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 CLOSE
I Y="D" D DEC G MEN
I Y="E" D EXP G MEN
I Y="S" D AUD G MEN
I Y="A" D ALL G MEN
G CLOSE
;
;
DEC ;--ENTRIES POINTING TO VISIT
;--OPEN DEVICE
S OPTION="5D"
D ZIS^PXQZIS G:POP CLOSE
;--RESET $X,$Y TO ZERO
N DX,DY S (DX,DY)=0 X ^%ZOSF("XY")
DEC5D ;--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 **")
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,"")
;--PRINT TO SCREEN
D READ^PXQUTL
D ^%ZISC
I $D(ZTSK) G CLOSE
E Q
;
;
EXP ;--EXPANDED VIEW
;--OPEN DEVICE
S OPTION="5E"
D ZIS^PXQZIS G:POP CLOSE
;--RESET $X,$Y TO ZERO
N DX,DY S (DX,DY)=0 X ^%ZOSF("XY")
EXP5E ;--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 **")
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)
D SDV^PXQUTL
;--PRINT TO SCREEN
D READ^PXQUTL
D ^%ZISC
I $D(ZTSK) G CLOSE
E Q
;
AUD ;--AUDIT TRAIL AND SOURCE
N PXQAUDIT,PXQSOR
S (PXQAUDIT,PXQSOR)=1
;--OPEN DEVICE
S OPTION="5A"
D ZIS^PXQZIS G:POP EXIT
;--RESET $X,$Y TO ZERO
N DX,DY S (DX,DY)=0 X ^%ZOSF("XY")
AUD5A ;--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(" ")
W $$RE^PXQUTL(" DEPENDENT ENTRY COUNT---FOR VISIT "_IEN_"-----")
W $$DEC^PXQFV(IEN,1,1)
;--PRINT TO SCREEN
D READ^PXQUTL
D ^%ZISC
I $D(ZTSK) G CLOSE
E Q
ALL ;--ALL OF THE ABOVE
N PXQAUDIT,PXQSOR
;--OPEN DEVICE
S OPTION="5A"
D ZIS^PXQZIS G:POP EXIT
;--RESET $X,$Y TO ZERO
N DX,DY S (DX,DY)=0 X ^%ZOSF("XY")
ALL5A ;--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 **")
S (PXQAUDIT,PXQSOR)=1
;--GET SOURCE OF THE VISIT ENTRY
W $$SOR^PXQUTL(VISIT)
W $$RE^PXQUTL(" ")
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)
D SDV^PXQUTL
;--PRINT TO DEVICE
D READ^PXQUTL
D ^%ZISC
I $D(ZTSK) G CLOSE
E Q
CLOSE ;--CLOSE DEVICE
D ^%ZISC
;--RETURN TO MENU
Q
;
EXIT ;--EXIT
K OPTION
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPXQMAIN1 3534 printed Dec 13, 2024@02:30:07 Page 2
PXQMAIN1 ;ISL/JVS - MAIN MENU ROUTINE #2 ;8/29/96 10:33
+1 ;;1.0;PCE PATIENT CARE ENCOUNTER;**4**;Aug 12, 1996
+2 ;
+3 ;
+4 ;
ASK ;--5TH OPTION
+1 NEW DFN,IEN,VISIT,ANS,I,BROKEN
+2 ;--ASK FOR IEN OR UID
+3 ;S (VISIT,IEN)=$$ASKNUM^PXQUTL Q:IEN<0
+4 SET (VISIT,IEN)=$$ASKNUM^PXQUTL
IF IEN<0
Begin DoDot:1
+5 READ !,"Look at a BROKER POINTER to a visit? (Y/N): N// ",ANS:DTIME
+6 IF ANS["N"!(ANS="")
QUIT
+7 READ !,"Enter Visit IEN: ",ANS:DTIME
+8 IF +ANS<1
QUIT
+9 SET (VISIT,IEN)=ANS
+10 IF '$DATA(^AUPNVSIT(ANS))
SET BROKEN=1
End DoDot:1
if IEN<0
QUIT
+11 IF $GET(IEN)'<1
SET ^DISV(DUZ,"PXQREP3")="`"_$GET(IEN)
+12 ;
MEN ;--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 CLOSE
+4 IF Y="D"
DO DEC
GOTO MEN
+5 IF Y="E"
DO EXP
GOTO MEN
+6 IF Y="S"
DO AUD
GOTO MEN
+7 IF Y="A"
DO ALL
GOTO MEN
+8 GOTO CLOSE
+9 ;
+10 ;
DEC ;--ENTRIES POINTING TO VISIT
+1 ;--OPEN DEVICE
+2 SET OPTION="5D"
+3 DO ZIS^PXQZIS
if POP
GOTO CLOSE
+4 ;--RESET $X,$Y TO ZERO
+5 NEW DX,DY
SET (DX,DY)=0
XECUTE ^%ZOSF("XY")
DEC5D ;--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 WRITE $$EXP^PXQUTL("^AUPNVSIT(",IEN)
+3 WRITE $$RE^PXQUTL(" DEPENDENT ENTRY COUNT---FOR VISIT "_IEN_"-----")
+4 WRITE $$DEC^PXQFV(IEN,1,"")
+5 ;--ENTRIES POINTING TO ENCOUNTER
+6 NEW I
SET I=0
FOR
SET I=$ORDER(^SCE("AVSIT",IEN,I))
if I=""
QUIT
Begin DoDot:1
+7 WRITE $$RE^PXQUTL(" DEPENDENT ENTRY COUNT ---FOR ENCOUNTER "_I_"-----")
+8 WRITE $$DEC^PXQFE(I,1,"")
End DoDot:1
+9 ;--PRINT TO SCREEN
+10 DO READ^PXQUTL
+11 DO ^%ZISC
+12 IF $DATA(ZTSK)
GOTO CLOSE
+13 IF '$TEST
QUIT
+14 ;
+15 ;
EXP ;--EXPANDED VIEW
+1 ;--OPEN DEVICE
+2 SET OPTION="5E"
+3 DO ZIS^PXQZIS
if POP
GOTO CLOSE
+4 ;--RESET $X,$Y TO ZERO
+5 NEW DX,DY
SET (DX,DY)=0
XECUTE ^%ZOSF("XY")
EXP5E ;--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 WRITE $$RE^PXQUTL(" DEPENDENT ENTRY COUNT---FOR VISIT "_IEN_"-----")
+3 WRITE $$DEC^PXQFV(IEN,1,1)
+4 ;--ENTRIES POINTING TO ENCOUNTER
+5 NEW I
SET I=0
FOR
SET I=$ORDER(^SCE("AVSIT",IEN,I))
if I=""
QUIT
Begin DoDot:1
+6 WRITE $$RE^PXQUTL(" DEPENDENT ENTRY COUNT ---FOR ENCOUNTER "_I_"-----")
+7 WRITE $$DEC^PXQFE(I,1,1)
End DoDot:1
+8 DO SDV^PXQUTL
+9 ;--PRINT TO SCREEN
+10 DO READ^PXQUTL
+11 DO ^%ZISC
+12 IF $DATA(ZTSK)
GOTO CLOSE
+13 IF '$TEST
QUIT
+14 ;
AUD ;--AUDIT TRAIL AND SOURCE
+1 NEW PXQAUDIT,PXQSOR
+2 SET (PXQAUDIT,PXQSOR)=1
+3 ;--OPEN DEVICE
+4 SET OPTION="5A"
+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")
AUD5A ;--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(" ")
+5 WRITE $$RE^PXQUTL(" DEPENDENT ENTRY COUNT---FOR VISIT "_IEN_"-----")
+6 WRITE $$DEC^PXQFV(IEN,1,1)
+7 ;--PRINT TO SCREEN
+8 DO READ^PXQUTL
+9 DO ^%ZISC
+10 IF $DATA(ZTSK)
GOTO CLOSE
+11 IF '$TEST
QUIT
ALL ;--ALL OF THE ABOVE
+1 NEW PXQAUDIT,PXQSOR
+2 ;--OPEN DEVICE
+3 SET OPTION="5A"
+4 DO ZIS^PXQZIS
if POP
GOTO EXIT
+5 ;--RESET $X,$Y TO ZERO
+6 NEW DX,DY
SET (DX,DY)=0
XECUTE ^%ZOSF("XY")
ALL5A ;--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 SET (PXQAUDIT,PXQSOR)=1
+3 ;--GET SOURCE OF THE VISIT ENTRY
+4 WRITE $$SOR^PXQUTL(VISIT)
+5 WRITE $$RE^PXQUTL(" ")
+6 WRITE $$RE^PXQUTL(" DEPENDENT ENTRY COUNT---FOR VISIT "_IEN_"-----")
+7 WRITE $$DEC^PXQFV(IEN,1,1)
+8 ;--ENTRIES POINTING TO ENCOUNTER
+9 NEW I
SET I=0
FOR
SET I=$ORDER(^SCE("AVSIT",IEN,I))
if I=""
QUIT
Begin DoDot:1
+10 WRITE $$RE^PXQUTL(" DEPENDENT ENTRY COUNT ---FOR ENCOUNTER "_I_"-----")
+11 WRITE $$DEC^PXQFE(I,1,1)
End DoDot:1
+12 DO SDV^PXQUTL
+13 ;--PRINT TO DEVICE
+14 DO READ^PXQUTL
+15 DO ^%ZISC
+16 IF $DATA(ZTSK)
GOTO CLOSE
+17 IF '$TEST
QUIT
CLOSE ;--CLOSE DEVICE
+1 DO ^%ZISC
+2 ;--RETURN TO MENU
+3 QUIT
+4 ;
EXIT ;--EXIT
+1 KILL OPTION
+2 QUIT