source: WorldVistAEHR/trunk/r/CLINICAL_REMINDERS-PXRM/PXRMG2R1.m@ 1742

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

initial load of WorldVistAEHR

File size: 4.7 KB
Line 
1PXRMG2R1 ;SLC/JVS -GEC #2 REPORT #1 ;7/14/05 08:12
2 ;;2.0;CLINICAL REMINDERS;**2,4**;Feb 04, 2005;Build 21
3 Q
4EN ;Entry Point for Local Report
5 N NAME,ARY,SSN,CRITER,DATE,DATEF,NAME2,PAGE
6 N CRP1,CRP2,CRP3,CRP4,CRP5,CNT,PROG
7 S (CRP1,CRP2,CRP3,CRP4,CRP5)=""
8 D EN^PXRMG2E2
9 W @IOF
10 W "============================================================================="
11 W !,"Referred to Homemaker/Home Health Aide(HHHA) or Adult Day Health Care(ADHC)"
12 W !,"or VA In-Home Respite(VAIHR) or Care Coordination programs(CC)"
13 W !,"From: "_$$FMTE^XLFDT(BDT,"5ZM")_" To: "_$$FMTE^XLFDT(EDT,"5ZM")
14 W !,"Fiscal Quarter: "_FQUARTER_" (Calendar Quarter "_QUARTER_")"
15 W !,?39," Criteria ",?65,"Measured"
16 W !,"Name",?25,"SSN",?32,"Prog.",?39,"0",?42,"#1",?45,"#2",?48,"#3",?51,"#4",?54,"Date",?65,"Criteria"
17 W !,"============================================================================="
18 W ! D PB Q:Y=0
19 S CNT=0
20 S ARY="^TMP(""PXRMGEC"",$J,""GEC2"",""RPT"")"
21 S NAME="" F S NAME=$O(@ARY@(NAME)) Q:NAME="" D
22 .S CNT=1
23 .S SSN="" F S SSN=$O(@ARY@(NAME,SSN)) Q:SSN="" D
24 ..S DATE="" F S DATE=$O(@ARY@(NAME,SSN,DATE)) Q:DATE="" D
25 ...S DATEF=$$FMTE^XLFDT(DATE,"5ZM")
26 ...S CRITER="" F S CRITER=$O(@ARY@(NAME,SSN,DATE,CRITER)) Q:CRITER="" D
27 ....I CRITER=0 S CRP1="X"
28 ....I CRITER[1 S CRP2="X"
29 ....I CRITER[2 S CRP3="X"
30 ....I CRITER[3 S CRP4="X"
31 ....I CRITER[4 S CRP5="X"
32 ....S PROG=$O(@ARY@(NAME,SSN,DATE,CRITER,""))
33 ....I $D(XYZ) S NAME2="CPRS PATIENT "_$E(SSN,4,5)
34 ....W !,$S($D(XYZ):NAME2,1:NAME),?25,SSN,?32,PROG,?39,CRP1,?42,CRP2,?45,CRP3,?48,CRP4,?51,CRP5,?54,$P(DATEF,"@",1),?65,$S(CRP1="X":"Not Met",1:"")
35 ....S (CRP1,CRP2,CRP3,CRP4,CRP5)=""
36 ....D PB Q:Y=0
37 I CNT=0 W !," < NO PATIENT DATA FOUND >",!
38 W ! D PB Q:Y=0
39 W !,"Criteria" D PB Q:Y=0
40 W !,"0: Not eligible under any criteria." D PB Q:Y=0
41 W !,"1: Problems with 3 or more ADL's." D PB Q:Y=0
42 W !,"2: 1 or more patient behavior or cognitive problem." D PB Q:Y=0
43 W !,"3: Expected life limit of less than 6 months." D PB Q:Y=0
44 W !,"4: Combination of the following:" D PB Q:Y=0
45 W !," 2 or more ADL dependencies" D PB Q:Y=0
46 W !," <AND> 2 or more of the following:" D PB Q:Y=0
47 W !," Problems with 3 or more IADL's" D PB Q:Y=0
48 W !," <OR> age of patients is 75 or more." D PB Q:Y=0
49 W !," <OR> living alone in the community." D PB Q:Y=0
50 W !," <OR> utilizes the clinics 12 or more time in the" D PB Q:Y=0
51 W !," preceding 12 months." D PB Q:Y=0
52 D EXIT
53 Q
54 ;========================================================
55ENP ;Entry Point for Local Report
56 N NAME,ARY,SSN,CRITER,DATE,DATEF,PAGE
57 N CRP1,CRP2,CRP3,CRP4,CRP5,CNT,PROG
58 S (CRP1,CRP2,CRP3,CRP4,CRP5)=""
59 D EN^PXRMG2E2
60 W @IOF
61 W "============================================================================="
62 W !,"Referred to Homemaker/Home Health Aide(HHHA) or Adult Day Health Care(ADHC)"
63 W !,"or VA In-Home Respite(VAIHR) or Care Coordination programs(CC)"
64 W !,"From: "_$$FMTE^XLFDT(BDT,"5ZM")_" To: "_$$FMTE^XLFDT(EDT,"5ZM")
65 W !,"Fiscal Quarter: "_FQUARTER_" (Calendar Quarter "_QUARTER_")"
66 W !,?39," Criteria ",?65,"Measured"
67 W !,"Name",?25,"SSN",?32,"Prog.",?39,"0",?42,"#1",?45,"#2",?48,"#3",?51,"#4",?54,"Date",?65,"Criteria"
68 W !,"==========================================================================="
69 S ARY="^TMP(""PXRMGEC"",$J,""GEC2"",""RPT"")"
70 S CNT=0
71 S NAME="" F S NAME=$O(@ARY@(NAME)) Q:NAME="" D
72 .S CNT=1
73 .S SSN="" F S SSN=$O(@ARY@(NAME,SSN)) Q:SSN="" D
74 ..S DATE="" F S DATE=$O(@ARY@(NAME,SSN,DATE)) Q:DATE="" D
75 ...S DATEF=$$FMTE^XLFDT(DATE,"5ZM")
76 ...S CRITER="" F S CRITER=$O(@ARY@(NAME,SSN,DATE,CRITER)) Q:CRITER="" D
77 ....I CRITER=0 S CRP1="X"
78 ....I CRITER[1 S CRP2="X"
79 ....I CRITER[2 S CRP3="X"
80 ....I CRITER[3 S CRP4="X"
81 ....I CRITER[4 S CRP5="X"
82 ....S PROG=$O(@ARY@(NAME,SSN,DATE,CRITER,""))
83 ....W !,$S($D(XYZ):NAME2,1:NAME),?25,SSN,?32,PROG,?39,CRP1,?42,CRP2,?45,CRP3,?48,CRP4,?51,CRP5,?54,$P(DATEF,"@",1),?65,$S(CRP1="X":"Not Met",1:"") D PAGE^PXRMGECZ
84 ....S (CRP1,CRP2,CRP3,CRP4,CRP5)=""
85 I CNT=0 W !," < NO PATIENT DATA FOUND >",! D PAGE^PXRMGECZ
86 W !
87 W !,"Criteria"
88 W !,"0: Not eligible under any criteria."
89 W !,"1: Problems with 3 or more ADL's."
90 W !,"2: 1 or more patient behavior or cognitive problem."
91 W !,"3: Expected life limit of less than 6 months."
92 W !,"4: Combination of the following:"
93 W !," 2 or more ADL dependencies"
94 W !," <AND> 2 or more of the following:"
95 W !," Problems with 3 or more IADL's"
96 W !," <OR> age of patients is 75 or more."
97 W !," <OR> living alone in the community."
98 W !," <OR> utilizes the clinics 12 or more time in the"
99 W !," preceding 12 months."
100 D EXIT
101 Q
102PB ;Page Break
103 S Y=""
104 I $Y=(IOSL-2) D
105 .K DIR
106 .S DIR(0)="E"
107 .D ^DIR
108 .I Y=1 W @IOF S $Y=0
109 K DIR
110 Q
111EXIT ;Exit and Clean up Variables
112 K XYZ,FQUARTER
113 K ^TMP("PXRMGEC",$J)
114 Q
Note: See TracBrowser for help on using the repository browser.