source: FOIAVistA/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNMSR2.m@ 1458

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

initial load of FOIAVistA 6/30/08 version

File size: 1.4 KB
Line 
1SPNMSR2 ;SAN/WDE/MS Canned report CONT print segment
2 ;;2.0;Spinal Cord Dysfunction;**12**;01/02/1997
3EN ;
4 S SPNPAGE=1,SPNLEXIT=0
5 S Y=DT X ^DD("DD") S SPNDATE=Y K Y
6 D HEAD
7 ;
8 ;
9 S SPNAME="" F S SPNAME=$O(^UTILITY($J,SPNAME)) Q:SPNAME="" S SPNDFN=0 F S SPNDFN=$O(^UTILITY($J,SPNAME,SPNDFN)) Q:(SPNDFN="")!('+SPNDFN)!(SPNLEXIT=1) D
10 .S SPNDATA=$G(^UTILITY($J,SPNAME,SPNDFN))
11 .W !,$P(SPNDATA,U,1),?25,$P(SPNDATA,U,2),?40,$P(SPNDATA,U,3),?66,$E($P(SPNDATA,U,4),1,14)
12 .W !,"(",$P(SPNDATA,U,5),?14,$P(SPNDATA,U,6),")",?33,$P(SPNDATA,U,7),?58,"(",$P(SPNDATA,U,8)," ",$P(SPNDATA,U,9),")"
13 .W !,"--------------------------------------------------------------------------------"
14 .I $Y>(IOSL-6) D HEAD
15 I $E(IOST,1)="C" I SPNLEXIT=0 N DIR S DIR(0)="E" D ^DIR K Y
16 D CLOSE^SPNPRTMT
17 Q
18 ;
19 ;
20HEAD ;Header
21 I $E(IOST,1)="C" D Q:SPNLEXIT
22 .I SPNPAGE'=1 D Q:SPNLEXIT
23 ..N DIR S DIR(0)="E" D ^DIR I 'Y S SPNLEXIT=1
24 ..I $D(DTOUT) S SPNLEXIT=1
25 ..K Y
26 ..Q
27 .Q
28 I $E(IOST,1)="C" W @IOF
29 I $E(IOST,1)="P" W #
30 W !,?25,"MS Patient Listing Report",?55,SPNDATE,?70,"Page: ",SPNPAGE
31 W !,"Patient",?25,"SSN",?40,"MS Subtype",?66,"Provider"
32 W !,"(Last / Next Eval)",?33,"Date of Onset",?58,"(EDSS Date & Score)"
33 W !,"-------------------------------------------------------------------------------"
34 I $D(^UTILITY($J))=0 W !?10,"No Patients to report.",!!
35 S SPNPAGE=SPNPAGE+1
36 Q
37EXIT ;
38 K Y,DIR,SPNPAGE,SPNDATE,SPNDATA,SPNLEXIT,SPNAME
39 K SPNNAME,SPNDFN,SPNDATA
40 Q
Note: See TracBrowser for help on using the repository browser.