1 | PXQPVST2 ;ISL/JVS - PROMPT FOR VISITS (ENCOUNTERS) ;8/29/96 10:33
|
---|
2 | ;;1.0;PCE PATIENT CARE ENCOUNTER;**4**;Aug 12, 1996
|
---|
3 | ;
|
---|
4 | Q
|
---|
5 | VST ;--PROMPTS FOR VISITS
|
---|
6 | N X,Y,ADD,DATA,DOUG,DEL,DIRUT
|
---|
7 | D LOC^PXBCC(15,0),WIN17^PXBCC(PXBCNT)
|
---|
8 | W !,IOCUD,IOELALL,IOCUD,IOELALL,IOCUU,IOCUU
|
---|
9 | ;
|
---|
10 | I $G(PROMPT)="A" G PRADD
|
---|
11 | I $G(PROMPT)="D" G PRDEL
|
---|
12 | I $G(PROMPT)["AD"!($G(PROMPT)["DA") G BOTH
|
---|
13 | ;
|
---|
14 | PRMPT ;
|
---|
15 | S DIR("A",1)="'RETURN' to continue or '-' for previous screen"
|
---|
16 | I $G(PXBCNT)'>0 S DIR("A",1)=""
|
---|
17 | ;
|
---|
18 | ;
|
---|
19 | S DIR("?")="Enter item number or '-' to backup a screen or RETURN for next screen or '^' to exit."
|
---|
20 | I $G(PXBCNT)'>0 S DIR("?")="Enter 'RETURN' or '^' to exit this screen."
|
---|
21 | ;
|
---|
22 | ;
|
---|
23 | S DIR("A")="Select Encounter by entering the ITEM No. : "
|
---|
24 | I $G(PXBCNT)'>0 S DIR("A")="'RETURN' or '^' to exit: "
|
---|
25 | S DIR(0)="FAO^1:3"
|
---|
26 | D ^DIR K DIR
|
---|
27 | G VERIFY
|
---|
28 | ;
|
---|
29 | PRADD ;
|
---|
30 | S DIR("A",1)="'RETURN' to continue or '-' for previous screen"
|
---|
31 | I $G(PXBCNT)'>0 S DIR("A",1)=""
|
---|
32 | ;
|
---|
33 | ;
|
---|
34 | S DIR("?")="Enter item number or A to add a new encounter or '-' to backup a screen or RETURN for next screen or '^' to exit."
|
---|
35 | I $G(PXBCNT)'>0 S DIR("?")="Enter A to add a new encounter, 'RETURN' or '^' to exit this screen."
|
---|
36 | ;
|
---|
37 | ;
|
---|
38 | S DIR("A")="Select ITEM No. or 'A' to ADD an Encounter: "
|
---|
39 | I $G(PXBCNT)'>0 S DIR("A")="Select 'A' to ADD or 'RETURN' to exit: "
|
---|
40 | S DIR(0)="FAO^1:3"
|
---|
41 | D ^DIR K DIR
|
---|
42 | G VERIFY
|
---|
43 | ;
|
---|
44 | PRDEL ;
|
---|
45 | S DIR("A",1)="'RETURN' to continue or '-' for previous screen"
|
---|
46 | I $G(PXBCNT)'>0 S DIR("A",1)=""
|
---|
47 | ;
|
---|
48 | ;
|
---|
49 | S DIR("?")="Enter item number or '@' folowed by the 'ITEM No.'(eg @9) to delete an encounter or '-' to backup a screen or 'RETURN' for next screen or '^' to exit."
|
---|
50 | I $G(PXBCNT)'>0 S DIR("?")="Enter 'RETURN' or '^' to exit this screen."
|
---|
51 | ;
|
---|
52 | ;
|
---|
53 | S DIR("A")="Select ITEM No. or '@ITEM No.' to DELETE an Encounter: "
|
---|
54 | I $G(PXBCNT)'>0 S DIR("A")="Enter 'RETURN' or '^' to exit this screen: "
|
---|
55 | S DIR(0)="FAO^1:3"
|
---|
56 | D ^DIR K DIR
|
---|
57 | G VERIFY
|
---|
58 | ;
|
---|
59 | BOTH ;
|
---|
60 | S DIR("A",1)="'RETURN' to continue or '-' for previous screen"
|
---|
61 | I $G(PXBCNT)'>0 S DIR("A",1)=""
|
---|
62 | ;
|
---|
63 | ;
|
---|
64 | S DIR("?")="Enter item number or A to add, or '@' followed by the 'ITEM No.'(eg @7) to DELETE a new encounter or '-' to backup a screen or 'RETURN' for next screen or '^' to exit."
|
---|
65 | I $G(PXBCNT)'>0 S DIR("?")="Enter item number or, A to add an encounter, 'RETURN' or '^' to exit this screen."
|
---|
66 | ;
|
---|
67 | ;
|
---|
68 | S DIR("A")="Select ITEM No. or 'A' to ADD or '@ITEM No.' to DELETE: "
|
---|
69 | I $G(PXBCNT)'>0 S DIR("A")="Select 'A' to ADD or 'RETURN' to exit: "
|
---|
70 | S DIR(0)="FAO^1:3"
|
---|
71 | D ^DIR K DIR
|
---|
72 | G VERIFY
|
---|
73 | ;
|
---|
74 | ;
|
---|
75 | VERIFY ;--VERIFY INPUT
|
---|
76 | ;
|
---|
77 | ;
|
---|
78 | S EDATA=$G(Y) D CASE^PXBUTL S (X,Y)=EDATA K EDATA
|
---|
79 | I $G(PROMPT)="A" G VERADD
|
---|
80 | I $G(PROMPT)="D" G VERDEL
|
---|
81 | I $G(PROMPT)["AD"!($G(PROMPT)["DA") G VERBOTH
|
---|
82 | ;
|
---|
83 | VER ;
|
---|
84 | ;
|
---|
85 | I $G(PXBCNT)>0 S DOUG="-^" I DOUG'[Y&(Y'?1.3N) W IOELEOL,! D HELP1^PXBUTL1("VST2") G VST
|
---|
86 | I $G(PXBCNT)'>0 S DOUG="^" I DOUG'[Y W ! D HELP1^PXBUTL1("VST2") G VST
|
---|
87 | ;
|
---|
88 | ;
|
---|
89 | I Y?1.3N,Y>$G(PXBHIGH) W ! D HELP1^PXBUTL1("VST1") G VST
|
---|
90 | I Y=0!(Y="00")!(Y="000") W ! D HELP1^PXBUTL1("VST3") G VST
|
---|
91 | I Y#1!(Y<0) W ! D HELP1^PXBUTL1("VST4") G VST
|
---|
92 | I Y?1.3N,Y'>$G(^TMP("PXBDVST",$J,"START")) G CONFIRM
|
---|
93 | I Y?1.3N,Y'<($G(^TMP("PXBDVST",$J,"START"))+10) G CONFIRM
|
---|
94 | I Y="",($G(^TMP("PXBDVST",$J,"START"))+10)'<$G(PXBCNT) S VAL=-1 Q
|
---|
95 | I Y="" D DVST43^PXQDVST3("+") G VST
|
---|
96 | I Y="-" D DVST43^PXQDVST3("-") G VST
|
---|
97 | I $D(DIRUT) S VAL=-1
|
---|
98 | I Y?1.3N,Y'>PXBCNT S VAL=$O(^TMP("PXBSKY",$J,Y,0))
|
---|
99 | G EXIT
|
---|
100 | VERADD ;
|
---|
101 | ;
|
---|
102 | I $G(PXBCNT)>0 S DOUG="-^A" I DOUG'[Y&(Y'?1.3N) W ! D HELP1^PXBUTL1("VST2") G VST
|
---|
103 | I $G(PXBCNT)'>0 S DOUG="^A" I DOUG'[Y W ! D HELP1^PXBUTL1("VST2") G VST
|
---|
104 | ;
|
---|
105 | ;
|
---|
106 | I Y?1.3N,Y>$G(PXBHIGH) W ! D HELP1^PXBUTL1("VST1") G VST
|
---|
107 | I Y=0!(Y="00")!(Y="000") W ! D HELP1^PXBUTL1("VST3") G VST
|
---|
108 | I Y#1!(Y<0) W ! D HELP1^PXBUTL1("VST4") G VST
|
---|
109 | I Y?1.3N,Y'>$G(^TMP("PXBDVST",$J,"START")) G CONFIRM
|
---|
110 | I Y?1.3N,Y'<($G(^TMP("PXBDVST",$J,"START"))+10) G CONFIRM
|
---|
111 | I Y="",($G(^TMP("PXBDVST",$J,"START"))+10)'<$G(PXBCNT) S VAL=-1 Q
|
---|
112 | I Y="" D DVST43^PXQDVST3("+") G VST
|
---|
113 | I Y="-" D DVST43^PXQDVST3("-") G VST
|
---|
114 | I $D(DIRUT) S VAL=-1
|
---|
115 | I Y?.A S DATA=Y D CASE^PXBUTL S Y=DATA
|
---|
116 | S DOUG="ADD" I DOUG[Y S VAL="A"
|
---|
117 | I Y?1.3N,Y'>PXBCNT S VAL=$O(^TMP("PXBSKY",$J,Y,0))
|
---|
118 | G EXIT
|
---|
119 | VERDEL ;
|
---|
120 | ;
|
---|
121 | I $G(PXBCNT)>0 S DOUG="-^" I DOUG'[Y&(Y'?1.3N)&($E(Y,1)'["@") W ! D HELP1^PXBUTL1("VST2") G VST
|
---|
122 | I $G(PXBCNT)'>0 S DOUG="^" I DOUG'[Y W ! D HELP1^PXBUTL1("VST2") G VST
|
---|
123 | ;
|
---|
124 | ;
|
---|
125 | I $E(Y,1)["@" S Y=$E(Y,2,4),DEL=1
|
---|
126 | I Y?1.3N,Y>$G(PXBHIGH) W ! D HELP1^PXBUTL1("VST1") G VST
|
---|
127 | I Y=0!(Y="00")!(Y="000") W ! D HELP1^PXBUTL1("VST3") G VST
|
---|
128 | I Y#1!(Y<0) W ! D HELP1^PXBUTL1("VST4") G VST
|
---|
129 | I Y?1.3N,Y'>$G(^TMP("PXBDVST",$J,"START")) G CONFIRM
|
---|
130 | I Y?1.3N,Y'<($G(^TMP("PXBDVST",$J,"START"))+10) G CONFIRM
|
---|
131 | I Y="",($G(^TMP("PXBDVST",$J,"START"))+10)'<$G(PXBCNT) S VAL=-1 Q
|
---|
132 | I Y="" D DVST43^PXQDVST3("+") G VST
|
---|
133 | I Y="-" D DVST43^PXQDVST3("-") G VST
|
---|
134 | I $D(DIRUT) S VAL=-1
|
---|
135 | I Y?.A S DATA=Y D CASE^PXBUTL S Y=DATA
|
---|
136 | I $G(DEL) S VAL="D^"_$O(^TMP("PXBSKY",$J,Y,0))
|
---|
137 | I Y?1.3N,Y'>PXBCNT,'$G(DEL) S VAL=$O(^TMP("PXBSKY",$J,Y,0))
|
---|
138 | G EXIT
|
---|
139 | VERBOTH ;
|
---|
140 | ;
|
---|
141 | I $G(PXBCNT)>0 S DOUG="-^A" I DOUG'[Y&(Y'?1.3N)&($E(Y,1)'["@") W ! D HELP1^PXBUTL1("VST2") G VST
|
---|
142 | I $G(PXBCNT)'>0 S DOUG="^A" I DOUG'[Y W ! D HELP1^PXBUTL1("VST2") G VST
|
---|
143 | ;
|
---|
144 | ;
|
---|
145 | I $E(Y,1)["@" S Y=$E(Y,2,4),DEL=1
|
---|
146 | I Y?1.3N,Y>$G(PXBHIGH) W ! D HELP1^PXBUTL1("VST1") G VST
|
---|
147 | I Y=0!(Y="00")!(Y="000") W ! D HELP1^PXBUTL1("VST3") G VST
|
---|
148 | I Y#1!(Y<0) W ! D HELP1^PXBUTL1("VST4") G VST
|
---|
149 | I Y?1.3N,Y'>$G(^TMP("PXBDVST",$J,"START")) G CONFIRM
|
---|
150 | I Y?1.3N,Y'<($G(^TMP("PXBDVST",$J,"START"))+10) G CONFIRM
|
---|
151 | I Y="",($G(^TMP("PXBDVST",$J,"START"))+10)'<$G(PXBCNT) S VAL=-1 Q
|
---|
152 | I Y="" D DVST43^PXQDVST3("+") G VST
|
---|
153 | I Y="-" D DVST43^PXQDVST3("-") G VST
|
---|
154 | I $D(DIRUT) S VAL=-1
|
---|
155 | I Y?.A S DATA=Y D CASE^PXBUTL S Y=DATA
|
---|
156 | S DOUG="A" I DOUG[Y S VAL="A"
|
---|
157 | I $G(DEL) S VAL="D^"_$O(^TMP("PXBSKY",$J,Y,0))
|
---|
158 | I Y?1.3N,Y'>PXBCNT,'$G(DEL) S VAL=$O(^TMP("PXBSKY",$J,Y,0))
|
---|
159 | G EXIT
|
---|
160 | CONFIRM ;---CONFIRM A REQUEST NOT ON THE SCREEN
|
---|
161 | D DVST43^PXQDVST3(Y)
|
---|
162 | N PXBLINE,PXBCOLM,PXBENT,ENTRY,YY
|
---|
163 | S YY=Y
|
---|
164 | S PXBLINE=(Y#10)+3 I Y#10=0,Y\10>0 S PXBLINE=(PXBLINE)+(10)
|
---|
165 | S PXBCOLM=4
|
---|
166 | S PXBENT=$G(^TMP("PXBSAM",$J,Y))
|
---|
167 | S ENTRY=$P(PXBENT,"^",1)
|
---|
168 | D RREVST^PXBCC(PXBLINE,PXBCOLM,ENTRY)
|
---|
169 | ;
|
---|
170 | S DIR(0)="YA"
|
---|
171 | S DIR("B")="YES"
|
---|
172 | S DIR("A")="Is this the entry you selected? "
|
---|
173 | D ^DIR K DIR
|
---|
174 | I Y=1,'$G(DEL) S VAL=$O(^TMP("PXBSKY",$J,YY,0)) G EXIT
|
---|
175 | I Y=1,$G(DEL) S VAL="D^"_$O(^TMP("PXBSKY",$J,YY,0)) G EXIT
|
---|
176 | I Y=0 G VST
|
---|
177 | G EXIT
|
---|
178 | ;
|
---|
179 | EXIT ;
|
---|
180 | ;
|
---|
181 | ;
|
---|
182 | Q
|
---|