source: FOIAVistA/tag/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DG1010P.m@ 812

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

initial load of FOIAVistA 6/30/08 version

File size: 5.7 KB
Line 
1DG1010P ;ALB/JDS;REW - 1010 PRINT--INQUIRY PATIENT ; 1/3/05 6:18pm
2 ;;5.3;Registration;**86,108,113,161,642,624**;Aug 13, 1993
3 ;
4FIND W !! S DIC="^DPT(",DIC(0)="AEQZM" D ^DIC G Q:+Y'>0 S (DA,DFN)=+Y
5 S DFN1=0
6 I $O(^DPT(DFN,"DIS",0))>0 S DFN1=$O(^DPT(DFN,"DIS",0))
7W1 D NOREG^DG1010PA(DFN)
8QU ;
9 S DGHDFN=DFN
10 I DGOPT]"" D
11 . N EAPP,EAIP
12 . S (EAPP,EAIP)=0 F S EAPP=$O(^EAS(712,"AC",DFN,EAPP)) Q:'EAPP!EAIP D
13 . . I $$GET1^DIQ(712,EAPP,7.1)="" D
14 . . . N EAIX,EADT F EAIX="REV","PRT","SIG" Q:EAIP D
15 . . . . S EADT=0 F S EADT=$O(^EAS(712,EAIX,EADT)) Q:'EADT!EAIP I $D(^EAS(712,EAIX,EADT,EAPP)) S EAIP=1
16 . I EAIP D Q
17 . . N DIR
18 . . W !!,"No data have been found for the selected patient, or"
19 . . W !,"the patient may have an on-line 10-10EZ application"
20 . . W !,"in progress. The 10-10EZ form shall not be printed."
21 . . S DIR(0)="E" D ^DIR
22 . . S DGOPT=""
23 I DGOPT]"" D S DGPGM="DQ^DG1010P",DGVAR="DGOPT^PRF^DFN^DFN1^DUZ^DGPMDA^PSOINST^PSONOPG^PSOPAR^PSTYPE^GMTSTYP^EASMTIEN" D ZIS^DGUTQ G:POP EMB U IO D DQ G EMB
24 .W:DGOPT'=5 !!?5,*7,"This output requires 132 column output to a PRINTER.",!?5,*7,"Output to SCREEN will be unreadable."
25 G EMB
26EN ;
27 Q
28DQ ;
29 D NOW^%DTC,YX^%DTC S DGNOW=Y
30 S X=132 X ^%ZOSF("RM") F I="DFN","DFN1","DGPMDA","PRF","GMTSTYP" S DGHOLD(I)=$S($D(@I):@I,1:"")
31 I DGOPT[0&'($G(DGSTOP)) DO
32 . S (EASDFN,DA)=DFN,ZUSR=DUZ
33 . D EN^EASEZPDG ;1010EZ
34 . K EASDFN,ZUSR,EASMTIEN
35 I DGOPT[1&'($G(DGSTOP)) DO
36 . S (EASDFN,DA)=DFN,EASFLAG="EZR",ZUSR=DUZ
37 . D EN^EASEZPDG ;1010EZR
38 . K EASFLAG,EASDFN,ZUSR,EASMTIEN
39 I DGOPT[3&'($G(DGSTOP)) D RESTORE,RET^DGBLRV ;3rd party review
40 I DGOPT[8&'($G(DGSTOP)) D RESTORE,ENXQ^GMTSDVR
41 I DGOPT[5&'($G(DGSTOP)) S POP=0 D RESTORE,DFN^PSOSD1 K POP S X=132 X ^%ZOSF("RM") ;DRUG PROFILE NOTE: EXECUTES ^%ZIS("C")
42 D ^%ZISC
43 D CLOSE^DGUTQ,Q K DGHOLD,DGOPT,DGPMDA Q
44Q K %,%DT,DA,DB,DFN,DFN1,DGHSFLG,DGOPT,DGL2,DGLDASH,DGLDOUBL,DGLSUP,DGLSUP1,DGLUND,DGPGM,DGPMDA,DGMTDT,DGMTI,DGMTYPT,DGNOW,DGVAR,DGX,DIC,DIRUT,DTOUT,DUOUT,I,J,L,POP,PRF,X,Y,DGSTOP
45 K LMI,PSCNT,PSDIS,PSDT,PSII,PSOPRINT ;FROM DRUG PROFILE
46 K GMTSTYP,EASMTIEN
47 Q
48RESTORE F I="DFN","DFN1","PRF","DGPMDA","GMTSTYP" S @I=DGHOLD(I)
49 Q
50EMB ;emboss card?
51 S DFN=DGHDFN
52 ;W !! D EMBOS^DGQEMA
53 D EF
54 K DGHDFN G FIND
55 ;
56EF ;encounter form?
57 N EFX,WITHDATA,IBDFRION
58 I $$PROMPRN^DG1010PA("EF") I DG1'<0 S EFX=1 D
59 .S WITHDATA=1
60 .D MAIN^IBDFREG(WITHDATA)
61 Q
62 ;
63SEL1010(PROMPT) ;* Prompt user to select the 1010EZ to print
64 ;
65 ; INPUT:
66 ; PROMPT : Indicate which prompts to present
67 ; : NULL - Prompt both (EZ prompted 1st)
68 ; : EZ - Prompt 1010EZ only
69 ; : EZR/EZ - Prompt both (EZR prompted 1st)
70 ; : EZR - Prompt 1010EZR only
71 ;
72 ; OUTPUT
73 ; RPTSEL : NULL - No report selected
74 ; : "EZ" - 1010EZ report was selected
75 ; : "EZR" - 1010EZR report was selected
76 ;
77 N PRT1010,PRT1010R,RPTSEL
78 I '$D(PROMPT) S PROMPT=""
79 S PRT1010=0
80 S PRT1010R=0
81 S RPTSEL=""
82 ;
83 ;* Prompt 1010EZ and then 1010EZR
84 I PROMPT="" DO
85 . S PRT1010=$$EZPRMPT
86 . I PRT1010 S RPTSEL="EZ"
87 . S:PRT1010=0 PRT1010R=$$EZRPRMPT
88 . I PRT1010R S RPTSEL="EZR"
89 . I (PRT1010=-2)!(PRT1010R=-2) S RPTSEL=-1
90 ;
91 ;* Prompt 1010EZR and then 1010EZ
92 I PROMPT="EZR/EZ" DO
93 . S PRT1010R=$$EZRPRMPT
94 . I PRT1010R S RPTSEL="EZR"
95 . S:PRT1010R=0 PRT1010=$$EZPRMPT
96 . I PRT1010 S RPTSEL="EZ"
97 . I (PRT1010=-2)!(PRT1010R=-2) S RPTSEL=-1
98 ;
99 ;* Prompt 1010EZ only
100 I PROMPT="EZ" DO
101 . S PRT1010=$$EZPRMPT
102 . I PRT1010 S RPTSEL="EZ"
103 . I (PRT1010=-2) S RPTSEL=-1
104 ;
105 ;* Prompt 1010EZR only
106 I PROMPT="EZR" DO
107 . S PRT1010R=$$EZRPRMPT
108 . I PRT1010R S RPTSEL="EZR"
109 . I (PRT1010R=-2) S RPTSEL=-1
110 ;
111 Q RPTSEL
112 ;
113EZPRMPT() ;* Prompt for 1010EZ print
114 ; OUTPUT -
115 ; RPTSEL : -1 REPORT NOT SELECTED
116 ; RPTSEL : -2 USER EXITED WITHOUT RESPONSE
117 ; RPTSEL : 0 USER ANSWERED "NO"
118 ; RPTSEL : 1 USER ANSWERED "YES"
119 ;
120 N RPTSEL,PRT1010
121 S RPTSEL=-1
122 K DIR,Y,X,DIRUT,DTOUT,DIROUT,DUOUT
123 S DIR(0)="Y^A0^"
124 S DIR("A")="PRINT 10-10EZ"
125 S DIR("?",1)="Enter 'Yes' to print a 10-10EZ Application for Health Benefits form."
126 S DIR("?")="Otherwise enter 'No'."
127 S DIR("B")="YES"
128 D ^DIR
129 I $D(DIRUT)!$D(DTOUT)!$D(DIROUT)!$D(DUOUT) S RPTSEL=-2
130 S:RPTSEL'=-2 RPTSEL=Y
131 ;;S PRT1010=Y
132 ;;I PRT1010 S RPTSEL="EZ"
133 K DIR,Y,X,DIRUT,DTOUT,DIROUT,DUOUT
134 Q RPTSEL
135 ;
136EZRPRMPT() ;* Prompt for 1010EZR print
137 ; OUTPUT -
138 ; RPTSEL : -1 REPORT NOT SELECTED
139 ; RPTSEL : -2 USER EXITED WITHOUT RESPONSE
140 ; RPTSEL : 0 USER ANSWERED "NO"
141 ; RPTSEL : 1 USER ANSWERED "YES"
142 ;
143 N RPTSEL,PRT1010R
144 S RPTSEL=-1
145 K DIR,Y,X,DIRUT,DTOUT,DIROUT,DUOUT
146 S DIR(0)="Y^A0^"
147 S DIR("A")="PRINT 10-10EZR"
148 S DIR("?",1)="Enter 'YES' to print a 10-10EZR Health Benefits Renewal form."
149 S DIR("?")="Otherwise enter 'No'."
150 S DIR("B")="YES"
151 D ^DIR
152 I $D(DIRUT)!$D(DTOUT)!$D(DIROUT)!$D(DUOUT) S RPTSEL=-2
153 S:RPTSEL'=-2 RPTSEL=Y
154 ;;S PRT1010R=Y
155 ;;I PRT1010R S RPTSEL="EZR"
156 K DIR,Y,X,DIRUT,DTOUT,DIROUT,DUOUT
157 Q RPTSEL
158 ;
159MTPRMPT(DFN,DGMTI) ;* Prompt for Means test included on 1010EZ
160 ;input:
161 ; DFN - Patient file (#2) ien (required)
162 ; DGMTI - Means Test file (#408.31) ien (required)
163 ;output:
164 ; MTSEL - Means Test IEN selected
165 N MTSEL
166 S MTSEL=+DGMTI
167 I $D(^DGMT(408.31,MTSEL,0)) Q MTSEL
168 Q $$ENEZ^EASEZPDG(DFN,0)
169 ;
170PRT1010(PRT1010,DFN,MTIEN) ;* Print 1010EZ reports
171 ;INPUT:
172 ; PRT1010 -
173 ; "EZ": Print 1010EZ report
174 ; "EZR": Print 1010EZR report
175 ; DFN - IEN from Patient entry in Patient file
176 ; MTIEN - IEN from 408.31 Means Test file
177 ;
178 ;OUTPUT:
179 ; DGTASK : Value of ZTSK passed back from ^%ZTLOAD in EASEZPDG
180 ; : 0 indicates print task was not completed
181 ;
182 N DGTASK
183 S DGTASK=0
184 ;* Following calls allowed via IA #4600
185 I PRT1010="EZ" S DGTASK=$$ENEZ^EASEZPDG(DFN,MTIEN)
186 I PRT1010="EZR" S DGTASK=$$ENEZR^EASEZPDG(DFN,MTIEN)
187 Q DGTASK
Note: See TracBrowser for help on using the repository browser.