source: WorldVistAEHR/trunk/r/PCE_PATIENT_CARE_ENCOUNTER-AUTN-EFDP-PX-VSIT--PXRM/PXQMAIN3.m@ 1581

Last change on this file since 1581 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 3.1 KB
RevLine 
[613]1PXQMAIN3 ;ISL/JVS - MAIN MENU ROUTINE #4 ;8/29/96 10:33
2 ;;1.0;PCE PATIENT CARE ENCOUNTER;**4**;Aug 12, 1996
3 ;
4 ;
5ASKENC ;--6TH OPTION
6 N DFN,IEN,VISIT,ANS,I
7 ;--ASK FOR ENCOUNTER IEN
8 S IEN=$$ASKENC^PXQUTL Q:IEN<0
9 ;--CONVERT TO A VISIT
10 S (VISIT,IEN)=$P(^SCE(IEN,0),"^",5)
11 I IEN']"" D
12 .W $$RE^PXQUTL(" NO VISIT IEN TO FOLLOW ")
13 .D READ^PXQUTL
14 Q:IEN']""
15 ;
16MENENC ;--MENU FOR WHAT TO DISPLAY FOR VISIT
17 S DIR("A")="Select a Display"
18 S DIR(0)="SOM^D:Dependent Entry Counts;E:Expanded Views;S:Sources and Audit Trail;A:All of the Above"
19 D ^DIR I Y=""!(Y["^") G CLOSENC
20 I Y="D" D DECENC G MENENC
21 I Y="E" D EXPENC G MENENC
22 I Y="S" D AUDENC G MENENC
23 I Y="A" D ALLENC G MENENC
24 G CLOSENC
25 ;
26DECENC ;--ENTRIES POINTING TO ENCOUNTER
27 ;--OPEN DEVICE
28 S OPTION="6D"
29 D ZIS^PXQZIS G:POP EXIT
30 ;--RESET $X,$Y TO ZERO
31 N DX,DY S (DX,DY)=0 X ^%ZOSF("XY")
32DEC6D ;--TITLE OF PRINT OUT
33 W $$RE^PXQUTL("** D E P E N D E N T E N T R Y C O U N T **")
34 N I S I=0 F S I=$O(^SCE("AVSIT",IEN,I)) Q:I="" D
35 .W $$RE^PXQUTL(" DEPENDENT ENTRY COUNT ---FOR ENCOUNTER "_I_"-----")
36 .W $$DEC^PXQFE(I,1,"")
37 ;W $$EXP^PXQUTL("^AUPNVSIT(",IEN)
38 W $$RE^PXQUTL(" DEPENDENT ENTRY COUNT---FOR VISIT "_IEN_"-----")
39 W $$DEC^PXQFV(IEN,1,"")
40 D READ^PXQUTL
41 D ^%ZISC
42 I $D(ZTSK) G CLOSE
43 E Q
44 ;
45 ;
46EXPENC ;--EXPANDED VIEW
47 ;--OPEN DEVICE
48 S OPTION="6E"
49 D ZIS^PXQZIS G:POP EXIT
50 ;--RESET $X,$Y TO ZERO
51 N DX,DY S (DX,DY)=0 X ^%ZOSF("XY")
52EXP6E ;--TITLE OF PRINT OUT
53 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 **")
54 N I S I=0 F S I=$O(^SCE("AVSIT",IEN,I)) Q:I="" D
55 .W $$RE^PXQUTL(" DEPENDENT ENTRY COUNT ---FOR ENCOUNTER "_I_"-----")
56 .W $$DEC^PXQFE(I,1,1)
57 D SDV^PXQUTL
58 W $$RE^PXQUTL(" DEPENDENT ENTRY COUNT---FOR VISIT "_IEN_"-----")
59 W $$DEC^PXQFV(IEN,1,1)
60 ;--ENTRIES POINTING TO ENCOUNTER
61 D READ^PXQUTL
62 D ^%ZISC
63 I $D(ZTSK) G CLOSE
64 E Q
65 ;
66AUDENC ;--AUDIT TRAIL AND SOURCE
67 N PXQAUDIT,PXQSOR
68 S (PXQAUDIT,PXQSOR)=1
69 ;--OPEN DEVICE
70 S OPTION="6A"
71 D ZIS^PXQZIS G:POP EXIT
72 ;--RESET $X,$Y TO ZERO
73 N DX,DY S (DX,DY)=0 X ^%ZOSF("XY")
74AUD6A ;--TITLE OF PRINT OUT
75 W $$RE^PXQUTL("** S O U R C E S / A U D I T T R A I L **")
76 ;--GET SOURCE OF THE VISIT ENTRY
77 W $$SOR^PXQUTL(VISIT)
78 W $$RE^PXQUTL(" DEPENDENT ENTRY COUNT---FOR VISIT "_IEN_"-----")
79 W $$DEC^PXQFV(IEN,1,1)
80 D READ^PXQUTL
81 D ^%ZISC
82 I $D(ZTSK) G CLOSE
83 E Q
84ALLENC ;--ALL OF THE ABOVE
85 N PXQAUDIT,PXQSOR
86 S (PXQAUDIT,PXQSOR)=1
87 ;--OPEN DEVICE
88 S OPTION="6A"
89 D ZIS^PXQZIS G:POP EXIT
90 ;--RESET $X,$Y TO ZERO
91 N DX,DY S (DX,DY)=0 X ^%ZOSF("XY")
92ALL6A ;--TITLE OF PRINT OUT
93 W $$RE^PXQUTL("**A L L S O U R C E S / A U D I T T R A I L **")
94 ;--ENTRIES POINTING TO ENCOUNTER
95 N I S I=0 F S I=$O(^SCE("AVSIT",IEN,I)) Q:I="" D
96 .W $$RE^PXQUTL(" DEPENDENT ENTRY COUNT ---FOR ENCOUNTER "_I_"-----")
97 .W $$DEC^PXQFE(I,1,1)
98 D SDV^PXQUTL
99 ;--GET SOURCE OF THE VISIT ENTRY
100 W $$SOR^PXQUTL(VISIT)
101 W $$RE^PXQUTL(" DEPENDENT ENTRY COUNT---FOR VISIT "_IEN_"-----")
102 W $$DEC^PXQFV(IEN,1,1)
103 D READ^PXQUTL
104 D ^%ZISC
105 I $D(ZTSK) G CLOSE
106 E Q
107 ;
108 ;
109CLOSENC ;--CLOSE DEVICE
110 D ^%ZISC
111 ;--RETURN TO MENU
112 K OPTION
113 Q
114CLOSE ;--CLOSE DEVICE
115 D ^%ZISC
116 ;--RETURN TO MENU
117 K OPTION
118 Q
119 ;
120EXIT ;--EXIT
121 K OPTION
122 Q
Note: See TracBrowser for help on using the repository browser.