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

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

initial load of WorldVistAEHR

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