source: FOIAVistA/trunk/r/CLINICAL_REMINDERS-PXRM/PXRMXTD.m@ 1635

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

initial load of FOIAVistA 6/30/08 version

File size: 3.2 KB
Line 
1PXRMXTD ; SLC/PJH - Reminder Reports Template Display ;11/16/2007
2 ;;2.0;CLINICAL REMINDERS;**4,6**;Feb 04, 2005;Build 123
3 ;
4 ; Called from PXRMXT/PXRMXTF
5 ;
6 ;
7 ;Display Template information
8START ;----------------------------
9 N PAGE,BMARG,DONE,SD,ED,DES,RDES,CDES,PSTART,PXRMOPT,IC,CNT
10 S PAGE=1,BMARG=0,DONE=0,SD="",ED="",PSTART=10,CNT=0
11 ;
12 D LITS^PXRMXPR1
13 ;
14 I PXRMREP="D" S PXRMOPT="Detailed Report"
15 I PXRMREP="S" S PXRMOPT="Summary Report"
16 W !!?(PSTART),"Report Title:",?32,$P(PXRMTMP,U,3)
17 W !?PSTART,"Report Type:",?32,$G(PXRMOPT)
18 W !?PSTART,"Patient Sample:",?32,PXRMFLD
19 I "LT"[PXRMSEL D
20 .W !,?PSTART,"Facility:" D FAC
21 I PXRMSEL'="L" W !,?PSTART,PXRMFLD,":" D ARRS
22 I PXRMSEL="L" D
23 .W !?PSTART,PXRMFLD,":",?32,DES
24 .I $E(PXRMLCSC,2)'="A" W ! D ARRS
25 I DONE Q
26 W !?PSTART,"Print Locations without Patients:",?32,$S($G(PXRMPML)=0:"NO",1:"YES")
27 S IC="" F S IC=$O(PXRMRCAT(IC)) Q:IC="" D Q:DONE
28 .W !,?PSTART W:IC=1 "Category:"
29 .W ?32,$P(PXRMRCAT(IC),U,3),?35,$P(PXRMRCAT(IC),U,2) D CHECK(1)
30 I DONE Q
31 S IC="" F S IC=$O(PXRMREM(IC)) Q:IC="" D Q:DONE
32 .W !,?PSTART W:IC=1 "Reminder:"
33 .W ?32,$P(PXRMREM(IC),U,3),?35,$P(PXRMREM(IC),U,2) D CHECK(1)
34 I DONE Q
35 I PXRMSEL="P" W !,?PSTART,"All/Primary:",?32,CDES
36 W !?(PSTART),"Template Name:",?32,$P(PXRMTMP,U,2)
37 W !?PSTART,"Date last run:",?32,$S(RUN]"":RUN,1:"n/a")
38 I $D(PXRMSCAT),PXRMSCAT]"",PXRMFD="P" D OSCAT(PXRMSCAT,PSTART)
39EXIT Q
40 ;
41 ;Display selected teams/providers
42 ;--------------------------------
43ARRS N IC
44 S IC=""
45 I PXRMSEL="P" F S IC=$O(PXRMPRV(IC)) Q:IC="" D Q:DONE
46 .W:IC>1 ! W ?32,$P(PXRMPRV(IC),U,2) D CHECK(1)
47 I PXRMSEL="T" F S IC=$O(PXRMPCM(IC)) Q:IC="" D Q:DONE
48 .W:IC>1 ! W ?32,$P(PXRMPCM(IC),U,2) D CHECK(1)
49 I PXRMSEL="O" F S IC=$O(PXRMOTM(IC)) Q:IC="" D Q:DONE
50 .W:IC>1 ! W ?32,$P(PXRMOTM(IC),U,2) D CHECK(1)
51 I PXRMSEL="I" F S IC=$O(PXRMPAT(IC)) Q:IC="" D Q:DONE
52 .W:IC>1 ! W ?32,$P(PXRMPAT(IC),U,2) D CHECK(1)
53 I PXRMSEL="R" F S IC=$O(PXRMLIST(IC)) Q:IC="" D Q:DONE
54 .W:IC>1 ! W ?32,$P(PXRMLIST(IC),U,2) D CHECK(1)
55 I PXRMSEL="L" D
56 .I $E(PXRMLCSC)="H" F S IC=$O(PXRMLCHL(IC)) Q:IC="" D
57 ..W:IC>1 ! W ?32,$P(PXRMLCHL(IC),U) D CHECK(1)
58 .I $E(PXRMLCSC)="C" F S IC=$O(PXRMCS(IC)) Q:IC="" D
59 ..W:IC>1 ! W ?32,$P(PXRMCS(IC),U)," ",$P(PXRMCS(IC),U,3)
60 ..D CHECK(1)
61 .I $E(PXRMLCSC)="G" F S IC=$O(PXRMCGRP(IC)) Q:IC="" D
62 ..W:IC>1 ! W ?32,$P(PXRMCGRP(IC),U)," ",$P(PXRMCGRP(IC),U,2)
63 ..D CHECK(1)
64 Q
65 ;
66 ;Display selected Facilities
67 ;---------------------------
68FAC N IC
69 S IC=""
70 F S IC=$O(PXRMFAC(IC)) Q:IC="" D Q:DONE
71 .W:IC>1 ! W ?32,$P(PXRMFAC(IC),U,2) D CHECK(1)
72 Q
73 ;
74 ;
75 ;Output the service categeories
76 ;------------------------------
77OSCAT(SCL,PSTART) ;
78 N IC,CSTART,EM,SC,SCTEXT
79 S CSTART=PSTART+3
80 W !,?PSTART,"Service categories:",?32,SCL
81 F IC=1:1:$L(SCL,",") D
82 .S SC=$P(SCL,",",IC)
83 .S SCTEXT=$$EXTERNAL^DILFD(9000010,.07,"",SC,.EM)
84 .W !,?CSTART,SC," - ",SCTEXT
85 .D CHECK(1)
86 Q
87 ;
88 ;Check for page throw
89 ;--------------------
90CHECK(LEAVE) ;
91 S CNT=CNT+1
92 I CNT>(IOSL-BMARG-LEAVE) D PAGE S CNT=0
93 Q
94 ;
95 ;form feed to new page
96 ;---------------------
97PAGE I ($E(IOST,1,2)="C-")&(IO=IO(0))&(PAGE>0) D
98 .S DIR(0)="E"
99 .W !
100 .D ^DIR K DIR
101 I $D(DUOUT)!($D(DTOUT))!($D(DIROUT)) S DONE=1 Q
102 W !
103 Q
Note: See TracBrowser for help on using the repository browser.