source: FOIAVistA/trunk/r/LAB_SERVICE-LR-LS/LREPIRP5.m@ 1553

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

initial load of FOIAVistA 6/30/08 version

File size: 6.2 KB
Line 
1LREPIRP5 ;DALOI/CKA-EMERGING PATHOGENS HL7 REPORT CONVERSION ;5/13/03
2 ;;5.2;LAB SERVICE;**281,320**;Sep 27, 1994
3 Q
4SUMMARY ;BUILD SUMMARY REPORT
5 ; BUILD SUMMARY INFO
6 F LRPATH=1:1:23 S LRTOT(LRPATH)=0
7 S LRPATH=0
8 F S LRPATH=$O(^XTMP("LREPIREP"_LRDATE,"TOTAL",LRPATH)) Q:LRPATH="" D
9 .S LRTOT(LRPATH)=^XTMP("LREPIREP"_LRDATE,"TOTAL",LRPATH)
10 S MSG="NTE~1-Vancomycin-resistant Enterococcus"
11 S MSG=MSG_$E(LRSP,1,17)_$J($P(LRTOT(1),U),5)_" "_$J($P(LRTOT(1),U,2),5)
12 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
13 S MSG="NTE~2-Hepatitis C antibody Positive"
14 S MSG=MSG_$E(LRSP,1,21)_$J($P(LRTOT(2),U),5)_" "_$J($P(LRTOT(2),U,2),5)
15 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
16 S MSG="NTE~3-Penicillin-Resistant Streptococcus pneumoniae"
17 S MSG=MSG_$E(LRSP,1,5)_$J($P(LRTOT(3),U),5)_" "_$J($P(LRTOT(3),U,2),5)
18 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
19 S MSG="NTE~4-Clostridium difficile"
20 S MSG=MSG_$E(LRSP,1,29)_$J($P(LRTOT(4),U),5)_" "_$J($P(LRTOT(4),U,2),5)
21 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
22 S MSG="NTE~5-Tuberculosis"
23 S MSG=MSG_LRSP_$E(LRSP,1,8)_$J($P(LRTOT(5),U),5)_" "_$J($P(LRTOT(5),U,2),5)
24 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
25 S MSG="NTE~6-Streptococcus, Group A"
26 S MSG=MSG_$E(LRSP,1,28)_$J($P(LRTOT(6),U),5)_" "_$J($P(LRTOT(6),U,2),5)
27 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
28 S MSG="NTE~7-Legionella/Legionaire's Disease"
29 S MSG=MSG_$E(LRSP,1,19)_$J($P(LRTOT(7),U),5)_" "_$J($P(LRTOT(7),U,2),5)
30 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
31 S MSG="NTE~8-Candida bloodstream infections"
32 S MSG=MSG_$E(LRSP,1,20)_$J($P(LRTOT(8),U),5)_" "_$J($P(LRTOT(8),U,2),5)
33 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
34 S MSG="NTE~9-Crytosporidium"
35 S MSG=MSG_LRSP_$E(LRSP,1,6)_$J($P(LRTOT(9),U),5)_" "_$J($P(LRTOT(9),U,2),5)
36 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
37 S MSG="NTE~10-Escherichia coli O157"
38 S MSG=MSG_$E(LRSP,1,28)_$J($P(LRTOT(10),U),5)_" "_$J($P(LRTOT(10),U,2),5)
39 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
40 S MSG="NTE~11-Malaria"
41 S MSG=MSG_LRSP_$E(LRSP,1,12)_$J($P(LRTOT(11),U),5)_" "_$J($P(LRTOT(11),U,2),5)
42 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
43 S MSG="NTE~12-Dengue"
44 S MSG=MSG_LRSP_$E(LRSP,1,13)_$J($P(LRTOT(12),U),5)_" "_$J($P(LRTOT(12),U,2),5)
45 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
46 S MSG="NTE~13-Creutzfeldt-Jakob Disease"
47 S MSG=MSG_$E(LRSP,1,24)_$J($P(LRTOT(13),U),5)_" "_$J($P(LRTOT(13),U,2),5)
48 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
49 S MSG="NTE~14-Leishmaniasis"
50 S MSG=MSG_LRSP_$E(LRSP,1,6)_$J($P(LRTOT(14),U),5)_" "_$J($P(LRTOT(14),U,2),5)
51 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
52 S MSG="NTE~15-Hepatitis C antibody negative"
53 S MSG=MSG_$E(LRSP,1,20)_$J($P(LRTOT(15),U),5)_" "_$J($P(LRTOT(15),U,2),5)
54 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
55 S MSG="NTE~16-Hepatitis A antibody positive"
56 S MSG=MSG_$E(LRSP,1,20)_$J($P(LRTOT(16),U),5)_" "_$J($P(LRTOT(16),U,2),5)
57 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
58 S MSG="NTE~17-Hepatitis B positive"
59 S MSG=MSG_$E(LRSP,1,29)_$J($P(LRTOT(17),U),5)_" "_$J($P(LRTOT(17),U,2),5)
60 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
61 S MSG="NTE~18-All Staphylococcus Aureus"
62 S MSG=MSG_$E(LRSP,1,24)_$J($P(LRTOT(18),U),5)_" "_$J($P(LRTOT(18),U,2),5)
63 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
64 S MSG="NTE~19-Methicillin-Resistant Staphylococcus Aureus (Mrsa)"
65 S MSG=MSG_$J($P(LRTOT(19),U),4)_" "_$J($P(LRTOT(19),U,2),5)
66 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
67 S MSG="NTE~20-Vancomycin-Resistant Staphylococcus Aureus (Vrsa)"
68 S MSG=MSG_$J($P(LRTOT(20),U),5)_" "_$J($P(LRTOT(20),U,2),5)
69 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
70 S MSG="NTE~21-Vancomycin-Resistant Coagulase Negative"
71 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
72 S MSG=" Staphylococci/Staph EPI (Vrse)"
73 S MSG=MSG_$E(LRSP,1,19)_$J($P(LRTOT(21),U),5)_" "_$J($P(LRTOT(21),U,2),5)
74 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
75 S MSG="NTE~22-All Streptococcus Pneumoniae"
76 S MSG=MSG_$E(LRSP,1,21)_$J($P(LRTOT(22),U),5)_" "_$J($P(LRTOT(22),U,2),5)
77 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
78 S MSG="NTE~23-All Enterococci"
79 S MSG=MSG_LRSP_$E(LRSP,1,4)_$J($P(LRTOT(23),U),5)_" "_$J($P(LRTOT(23),U,2),5)
80 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
81 Q
82PRTTOT ;Print totals on summary report
83 S MSG="",^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
84 S MSG="Processing Month: "_LRHDGL2_" for site # "_$P(SITE,U,3)_" "_$P(SITE,U,2)
85 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
86 S MSG="Site totals"
87 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
88 S MSG="",^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
89 S LRNUM=0
90 F S LRNUM=$O(^XTMP("LREPIREP"_LRDATE,"TOTAL1",LRNUM)) Q:LRNUM="" D
91 .S MSG=$P($P(^XTMP("LREPIREP"_LRDATE,"TOTAL1",LRNUM),HLFS,3),LRCS,3)
92 .I 60-$L(MSG)>30 S MSG=MSG_LRSP
93 .I 60-$L(MSG)>30 S MSG=MSG_LRSP
94 .S MSG=MSG_$E(LRSP,1,60-$L(MSG))
95 .S MSG=MSG_$J($P($P(^XTMP("LREPIREP"_LRDATE,"TOTAL1",LRNUM),HLFS,3),LRCS,4),5)
96 .S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
97 Q
98PRTHEP ;PRINT HEP C RISK ASSESSMENT TOTALS
99 F LRNUM=1:1:7 S LRTOT(LRNUM)=+$G(^XTMP("LREPIREP"_LRDATE,"HEPTOT",LRNUM))
100 S MSG="Resolved term-1-Declined Assessment for Hepatitis C"
101 S MSG=MSG_$E(LRSP,1,9)_$J($P(LRTOT(1),U),5)
102 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
103 S MSG="Resolved term-2-No Risk Factors for Hepatitis C"
104 S MSG=MSG_$E(LRSP,1,13)_$J($P(LRTOT(2),U),5)
105 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
106 S MSG="Resolved term-3-Previously Assessed for Hepatitis C"
107 S MSG=MSG_$E(LRSP,1,9)_$J($P(LRTOT(3),U),5)
108 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
109 S MSG="Resolved term-4-Risk Factors for Hepatitis C"
110 S MSG=MSG_$E(LRSP,1,16)_$J($P(LRTOT(4),U),5)
111 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
112 S MSG="Resolved term-5-Positive Test for Hepatitis C antibody"
113 S MSG=MSG_$E(LRSP,1,6)_$J($P(LRTOT(5),U),5)
114 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
115 S MSG="Resolved term-6-Negative Test for Hepatitis C antibody"
116 S MSG=MSG_$E(LRSP,1,6)_$J($P(LRTOT(6),U),5)
117 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
118 S MSG="Resolved term-7-Hepatitis C diagnosis (ICD-9 based)"
119 S MSG=MSG_$E(LRSP,1,9)_$J($P(LRTOT(7),U),5)
120 S ^TMP($J,"MSG",MSGCNT)=MSG,MSGCNT=MSGCNT+1
121 S ^TMP($J,"MSG",MSGCNT)=LRSP_LRSP_"-----"
122 S MSGCNT=MSGCNT+1
123 S LRTOT=LRTOT(1)+LRTOT(2)+LRTOT(3)+LRTOT(4)+LRTOT(5)+LRTOT(6)+LRTOT(7)
124 S ^TMP($J,"MSG",MSGCNT)="Total Hepatitis C Risk Assessment Resolution"_$E(LRSP,1,16)_$J(LRTOT,5)
125 S MSGCNT=MSGCNT+1
126 ;
127 Q
Note: See TracBrowser for help on using the repository browser.