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

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

initial load of WorldVistAEHR

File size: 4.9 KB
RevLine 
[613]1PXQMAIN ;ISL/JVS - DEBUGGINH MAIN ROUTINE #1;8/29/96 10:32
2 ;;1.0;PCE PATIENT CARE ENCOUNTER;**4**;Aug 12, 1996
3 ;
4 ;
5 ;
6DEPEN ;--1ST OPTION
7 N DFN,IEN,VISIT,ANS,I,PXBCNT,PXBHIGH
8 ;--ASK FOR PATIENT
9 S DFN=$$ASKPAT^PXQUTL Q:DFN<0
10 ;--GET A LIST OF VISITS
11 S (IEN,VISIT)=$$VISITLST^PXQGVST(DFN,"","","","X") Q:IEN<0
12 I $G(IEN)'<1 S ^DISV(DUZ,"PXQREP3")="`"_$G(IEN)
13 ;--OPEN DEVICE
14 S OPTION=1
15 D ZIS^PXQZIS G:POP EXIT
16 ;--RESET $X,$Y TO ZERO
17 N DX,DY S (DX,DY)=0 X ^%ZOSF("XY")
18DEP ;--TITLE OF PRINT OUT
19 W $$RE^PXQUTL("** D E P E N D E N T E N T R Y C O U N T **")
20 ;--ENTRIES POINTING TO VISIT
21 W $$EXP^PXQUTL("^AUPNVSIT(",IEN)
22 W $$RE^PXQUTL(" DEPENDENT ENTRY COUNT --- FOR VISIT "_IEN)
23 W $$DEC^PXQFV(IEN,1,"")
24 ;--ENTRIES POINTING TO ENCOUNTER
25 N I S I=0 F S I=$O(^SCE("AVSIT",IEN,I)) Q:I="" D
26 .W $$RE^PXQUTL(" DEPENDENT ENTRY COUNT --- FOR ENCOUNTER "_I)
27 .W $$DEC^PXQFE(I,1,"")
28 ;--READ TO DEVICE
29 D READ^PXQUTL
30 ;--CLOSE DEVICE
31 D ^%ZISC
32 I $D(ZTSK) G EXIT
33 E G DEPEN
34 Q
35 ;
36 ;
37EXPAND ;--2ND OPTION
38 N DFN,IEN,VISIT,ANS,I,PXBCNT,PXBHIGH,POP
39 ;--ASK FOR PATIENT
40 S DFN=$$ASKPAT^PXQUTL Q:DFN<0
41 ;--GET A LIST OF VISITS
42 S (IEN,VISIT)=$$VISITLST^PXQGVST(DFN,"","","","X") Q:IEN<0
43 I $G(IEN)'<1 S ^DISV(DUZ,"PXQREP3")="`"_$G(IEN)
44 ;--OPEN DEVICE
45 S OPTION=2
46 D ZIS^PXQZIS G:POP EXIT
47 ;--RESET $X,$Y TO ZERO
48 N DX,DY S (DX,DY)=0 X ^%ZOSF("XY")
49EXP ;--TITLE OF PRINT OUT
50 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 **")
51 ;--ENTRIES POINTING TO VISIT
52 W $$RE^PXQUTL(" DEPENDENT ENTRY COUNT---FOR VISIT "_IEN_"-----")
53 W $$DEC^PXQFV(IEN,1,1)
54 ;--ENTRIES POINTING TO ENCOUNTER
55 N I S I=0 F S I=$O(^SCE("AVSIT",IEN,I)) Q:I="" D
56 .W $$RE^PXQUTL(" DEPENDENT ENTRY COUNT ---FOR ENCOUNTER "_I_"-----")
57 .W $$DEC^PXQFE(I,1,1)
58 ;--LOOK UP SCHEDULING VISITS FILE
59 D SDV^PXQUTL
60 ;--READ TO DEVICE
61 D READ^PXQUTL
62 ;--CLOSE DEVICE
63 D ^%ZISC
64 ;--RETURN TO MENU
65 I $D(ZTSK) G EXIT
66 E G EXPAND
67 Q
68 ;
69 ;
70INTER ;--3RD OPTION
71 N DFN,IEN,VISIT,ANS,I,PXQINT,PXBCNT,PXBHIGH,POP
72 ;--SET FLAG VARIABLE
73 S PXQINT=1
74 ;--ASK FOR PATIENT
75 S DFN=$$ASKPAT^PXQUTL Q:DFN<0
76 ;--GET A LIST OF VISITS
77 S (IEN,VISIT)=$$VISITLST^PXQGVST(DFN,"","","","X") Q:IEN<0
78 I $G(IEN)'<1 S ^DISV(DUZ,"PXQREP3")="`"_$G(IEN)
79 ;--OPEN DEVICE
80 S OPTION=3
81 D ZIS^PXQZIS G:POP EXIT
82 ;--RESET $X,$Y TO ZERO
83 N DX,DY S (DX,DY)=0 X ^%ZOSF("XY")
84INT ;--TITLE OF PRINT OUT
85 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 **")
86 ;--ENTRIES POINTING TO VISIT
87 W $$RE^PXQUTL(" DEPENDENT ENTRY COUNT---FOR VISIT "_IEN_"-----")
88 W $$DEC^PXQFV(IEN,1,1)
89 ;--ENTRIES POINTING TO ENCOUNTER
90 N I S I=0 F S I=$O(^SCE("AVSIT",IEN,I)) Q:I="" D
91 .W $$RE^PXQUTL(" DEPENDENT ENTRY COUNT ---FOR ENCOUNTER "_I_"-----")
92 .W $$DEC^PXQFE(I,1,1)
93 ;--LOOK UP SCHEDULING VISITS FILE
94 D SDV^PXQUTL
95 ;--READ TO DEVICE
96 D READ^PXQUTL
97 ;--CLOSE DEVICE
98 D ^%ZISC
99 ;--RETURN TO MENU
100 I $D(ZTSK) G EXIT
101 E G INTER
102 Q
103 ;
104 ;
105SOURCE ;--4TH OPTION
106 N DFN,IEN,VISIT,ANS,I,PXQAUDIT,PXQSOR,PXBCNT,PXBHIGH,POP
107 ;--SET FLAG VARIABLES
108 S PXQAUDIT=1,PXQSOR=1
109 ;--ASK FOR PATIENT
110 S DFN=$$ASKPAT^PXQUTL Q:DFN<0
111 ;--GET A LIST OF VISITS
112 S (IEN,VISIT)=$$VISITLST^PXQGVST(DFN,"","","","X") Q:IEN<0
113 I $G(IEN)'<1 S ^DISV(DUZ,"PXQREP3")="`"_$G(IEN)
114 ;--OPEN DEVICE
115 S OPTION=4
116 D ZIS^PXQZIS G:POP EXIT
117 ;--RESET $X,$Y TO ZERO
118 N DX,DY S (DX,DY)=0 X ^%ZOSF("XY")
119SOR ;--TITLE OF PRINT OUT
120 W $$RE^PXQUTL("** S O U R C E S / A U D I T T R A I L **")
121 ;--GET SOURCE OF THE VISIT ENTRY
122 W $$SOR^PXQUTL(VISIT)
123 ;--ENTRIES POINTING TO VISIT
124 W $$RE^PXQUTL(" DEPENDENT ENTRY COUNT---FOR VISIT "_IEN)
125 W $$DEC^PXQFV(IEN,1,1)
126 ;--ENTRIES POINTING TO ENCOUNTER
127 ;N I S I=0 F S I=$O(^SCE("AVSIT",IEN,I)) Q:I="" D
128 ;.W $$RE^PXQUTL(" DEPENDENT ENTRY COUNT ---FOR ENCOUNTER "_I)
129 ;.W $$DEC^PXQFE(I,1,1)
130 ;--READ TO DEVICE
131 D READ^PXQUTL
132 ;--CLOSE DEVICE
133 D ^%ZISC
134 I $D(ZTSK) G EXIT
135 ;--RETURN TO MENU
136 E K USER,OPTION,PROTOCOL,SOURCE,PACKAGE,DATEC,DATEE G SOURCE
137 Q
138 ;
139 ;
140VISIT ;--5TH OPTION
141 ;D ^PXQRENO
142 ;I IOST["C-" R !,"Press any key to return to the menu",ANS:DTIME
143 Q
144CLOSE ;--CLOSE DEVICE
145 D ^%ZISC
146 ;--RETURN TO MENU
147 Q
148 ;
149MAX ;--MAXIMUM LENGTH OF GLOBAL REFERENCE
150 W !," I M F O R M A T I O N O N L Y"
151 W !,"This routine can only be run buy someone who is"
152 W !,"AUTHORIZED to be in progammer mode. If you run"
153 W !,"the routine, 'D ^PXQGRLT' ,it will error out when"
154 W !,"the mazimum length is reached."
155 ;--RETURN TO MENU
156 R !,"Press any key to return to the menu",ANS:DTIME
157 Q
158 ;
159SETUP ;--7TH OPTION
160 N POP,DIC,DA
161 ;--TITLE OF PRINT OUT
162 W $$RE^PXQUTL("** P A R A M E T E R S S E T U P **")
163 ;--OPEN DEVICE
164 S OPTION=7
165 D ZIS^PXQZIS G:POP EXIT
166 ;--RESET $X,$Y TO ZERO
167 N DX,DY S (DX,DY)=0 X ^%ZOSF("XY")
168SET7 ;---START
169 D CHK^PXQFS
170 W $$EXP^PXQUTL("^DIC(",150.9)
171 S DIC="^DIC(150.9,",DA=1 D EN^DIQ
172 W $$EXP^PXQUTL("^PX(",815)
173 S DIC="^PX(815,",DA=1 D EN^DIQ
174 D READ^PXQUTL
175 ;--CLOSE DEVICE
176 D ^%ZISC
177 I $D(ZTSK) G EXIT
178 E Q
179 ;---SUB ROUTINES AND FUNCTIONS
180EXIT ;
181 K USER,OPTION,PROTOCOL,SOURCE,PACKAGE,DATEC,DATEE
182 K OPTION
183 Q
Note: See TracBrowser for help on using the repository browser.