1 | SPNLRB ;ISC-SF/GB-SCD PATIENT BREAKDOWN REPORT ;6/23/95 11:53
|
---|
2 | ;;2.0;Spinal Cord Dysfunction;**6,20**;01/02/1997
|
---|
3 | ASK(QLIST,ABORT) ; Report-specific question
|
---|
4 | N DIR,Y,DIRUT
|
---|
5 | S DIR(0)="YAO" ; Answer yes or no
|
---|
6 | S DIR("A")="Include deceased patients? "
|
---|
7 | S DIR("B")="NO"
|
---|
8 | S DIR("?")="Should the report statistics include deceased patients?"
|
---|
9 | D ^DIR I $D(DIRUT) S ABORT=1 Q
|
---|
10 | S QLIST("INCLUDE DEAD")=Y
|
---|
11 | W !
|
---|
12 | S DIR(0)="YAO" ; Answer yes or no
|
---|
13 | S DIR("A")="Include only those patients seen during a specified period? "
|
---|
14 | S DIR("B")="NO"
|
---|
15 | S DIR("?")="Should the report statistics be limited to a certain time period?"
|
---|
16 | D ^DIR I $D(DIRUT) S ABORT=1 Q
|
---|
17 | S QLIST("WINDOW")=Y
|
---|
18 | Q
|
---|
19 | GATHER(DFN,FDATE,TDATE,HIUSERS,QLIST) ;
|
---|
20 | D GATHER^SPNLGRPS(DFN,FDATE,TDATE,.QLIST) ; gather patient statistics
|
---|
21 | Q
|
---|
22 | PRINT(FACNAME,XFDATE,XTDATE,HIUSERS,QLIST,ABORT) ;
|
---|
23 | ; PAGELEN Number of lines per page
|
---|
24 | ; TITLE Array of header lines (titles)
|
---|
25 | N TITLE,PAGELEN,PATDESC,SEXLIST,SEX,NUMSEX
|
---|
26 | S PAGELEN=IOSL-3
|
---|
27 | I QLIST("INCLUDE DEAD") S PATDESC="Patients"
|
---|
28 | E S PATDESC="Patients Currently Alive"
|
---|
29 | S TITLE(1)=$$CENTER^SPNLRU("SCD-Registry Patient Breakdown")
|
---|
30 | S TITLE(2)=$$CENTER^SPNLRU(FACNAME)
|
---|
31 | I $D(SPNLTRM1) S TITLE(2.5)=$$CENTER^SPNLRU(SPNLTRM1)
|
---|
32 | I QLIST("WINDOW") S TITLE(3)=$$CENTER^SPNLRU(PATDESC_" Seen During the Period "_XFDATE_" to "_XTDATE)
|
---|
33 | E S TITLE(3)=$$CENTER^SPNLRU(PATDESC)
|
---|
34 | S TITLE(4)=""
|
---|
35 | S TITLE(5)=$$PAD^SPNLRU(" ",41)
|
---|
36 | S SEX=""
|
---|
37 | F NUMSEX=0:1 S SEX=$O(^TMP("SPN",$J,"PS","SEX",SEX)) Q:SEX="" D
|
---|
38 | . S SEXLIST(SEX)=""
|
---|
39 | . S TITLE(5)=TITLE(5)_$J($S(SEX="F":"Female",SEX="M":"Male",1:"Unknown"),10)
|
---|
40 | S:NUMSEX>1 TITLE(5)=TITLE(5)_$J("Total",10)
|
---|
41 | D P1^SPNLRB1(.TITLE,PAGELEN,.SEXLIST,.QLIST,.ABORT) Q:ABORT
|
---|
42 | D P2^SPNLRB1(.TITLE,PAGELEN,.SEXLIST,.QLIST,.ABORT) Q:ABORT
|
---|
43 | D P3^SPNLRB1(.TITLE,PAGELEN,.SEXLIST,.QLIST,.ABORT) Q:ABORT
|
---|
44 | D P4^SPNLRB1(.TITLE,PAGELEN,.SEXLIST,.QLIST,.ABORT) Q:ABORT
|
---|
45 | D P5^SPNLRB1(.TITLE,PAGELEN,.SEXLIST,.QLIST,.ABORT) Q:ABORT
|
---|
46 | D P6^SPNLRB1(.TITLE,PAGELEN,.SEXLIST,.QLIST,.ABORT) Q:ABORT
|
---|
47 | D P7^SPNLRB1(.TITLE,PAGELEN,.SEXLIST,.QLIST,.ABORT) Q:ABORT
|
---|
48 | Q
|
---|