I have created a count field (XCNT) to serially count those MRNs with more than one record (e.g. MRN #104132).
TABLE FILE CRAZY
HEADING CENTER
" Patients Given Troponin Injection Prior to Admission "
" Date Created: &DATEMtrDYY "
" "
PRINT
EDP
COMPUTE XCNT/I9 = IF MRN NE LAST MRN THEN 1
ELSE IF MRN EQ LAST MRN AND EDP EQ LAST EDP THEN XCNT + 1
ELSE IF MRN EQ LAST MRN AND EDP NE LAST EDP THEN 1
ELSE XCNT;
NAME
BY MRN
END
-*
As the output captioned below indicates, I am not getting
a count I am looking for:
MRN EDP XCNT NAME
104132 7327202 1 MONTGOMERY,JOHN E
7335621 1 MONTGOMERY,JOHN E
135419 7285749 1 WILSON,JESSE
141933 7310570 1 VINES,LINDA POWELL
155092 7264537 1 EDWARDS,BARBARA JEAN
160609 7274638 1 FORBES,ALICE
7301230 1 FORBES,ALICE
7346586 1 FORBES,ALICE
161711 7309362 1 KNOX,JUANITA IRENE
162932 7293505 1 COOKE,DONALD RAY
163193 7275927 1 LITTLE,JAMES H
7296333 1 LITTLE,JAMES H
165209 7282343 1 BOYD,MARY
165578 7254975 1 LYONS,MARY ETTA
174878 7257600 1 SCOTT,PHILLIP JORDAN
175521 7325633 1 ROSENKOETTER,ROBERT GENE
I am trying to get this output:
MRN EDP XCNT NAME
104132 7327202 1 MONTGOMERY,JOHN E
7335621 2 MONTGOMERY,JOHN E
135419 7285749 1 WILSON,JESSE
141933 7310570 1 VINES,LINDA POWELL
155092 7264537 1 EDWARDS,BARBARA JEAN
160609 7274638 1 FORBES,ALICE
7301230 2 FORBES,ALICE
7346586 3 FORBES,ALICE
161711 7309362 1 KNOX,JUANITA IRENE
162932 7293505 1 COOKE,DONALD RAY
163193 7275927 1 LITTLE,JAMES H
7296333 2 LITTLE,JAMES H
165209 7282343 1 BOYD,MARY
165578 7254975 1 LYONS,MARY ETTA
174878 7257600 1 SCOTT,PHILLIP JORDAN
175521 7325633 1 ROSENKOETTER,ROBERT GENE
???
Thanks!
Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36