source: FOIAVistA/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNLRC.m@ 1397

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

initial load of FOIAVistA 6/30/08 version

File size: 1.7 KB
Line 
1SPNLRC ;ISC-SF/GB-SCD CURRENT INPATIENT REPORT ;6/23/95 11:54
2 ;;2.0;Spinal Cord Dysfunction;;01/02/1997
3ASK(QLIST,ABORT) ; Report-specific questions
4 Q
5GATHER(DFN,FDATE,TDATE,HIUSERS,QLIST) ;
6 D GATHER^SPNLGICI(DFN,FDATE) ; gather current inpatients
7 Q
8PRINT(FACNAME,XFDATE,XTDATE,HIUSERS,QLIST,ABORT) ;
9 ; PAGELEN Number of lines per page
10 ; TITLE Array of header lines (titles)
11 N TITLE,PAGELEN
12 S PAGELEN=IOSL-3
13 S TITLE(1)=$$CENTER^SPNLRU("SCD - Current Inpatients")
14 S TITLE(2)=$$CENTER^SPNLRU(FACNAME)
15 I $D(SPNLTRM1) S TITLE(2.5)=$$CENTER^SPNLRU(SPNLTRM1)
16 D P1(.TITLE,PAGELEN,.ABORT) Q:ABORT
17 Q
18P1(TITLE,PAGELEN,ABORT) ;
19 N WARD,PAT,ZAD,ADMINFO,CURRLOS,FYTDLOS,ROOMBED,DIAG
20 S TITLE(3)=$$CENTER^SPNLRU("Total Inpatients: "_+$G(^TMP("SPN",$J,"CI")))
21 S TITLE(4)=""
22 ; " 1 2 3 4 5 6 7 8"
23 S TITLE(5)=" Last Admission Curr FYTD"
24 S TITLE(6)="Name Four Ward Date LOS LOS"
25 D HEADER^SPNLRU(.TITLE,.ABORT) Q:ABORT
26 S WARD=""
27 F S WARD=$O(^TMP("SPN",$J,"CI",WARD)) Q:WARD="" D Q:ABORT
28 . S PAT=""
29 . F S PAT=$O(^TMP("SPN",$J,"CI",WARD,PAT)) Q:PAT="" D Q:ABORT
30 . . I $Y>PAGELEN D HEADER^SPNLRU(.TITLE,.ABORT) Q:ABORT
31 . . S ADMINFO=^TMP("SPN",$J,"CI",WARD,PAT)
32 . . S ZAD=$P(ADMINFO,U,1)
33 . . S CURRLOS=$P(ADMINFO,U,2)
34 . . S FYTDLOS=$P(ADMINFO,U,3)
35 . . S ROOMBED=$P(ADMINFO,U,4)
36 . . S DIAG=$P(ADMINFO,U,5)
37 . . W !,$P(PAT,U,1),?31,$P(PAT,U,2),?38,$E(WARD,1,20)
38 . . W ?59,$E(ZAD,4,5)_"/"_$E(ZAD,6,7)_"/"_$E(ZAD,2,3)
39 . . W ?68,$J($FN(CURRLOS,","),5),?75,$J($FN(FYTDLOS,","),5)
40 . . W !,?5,"Adm dx: ",$E(DIAG,1,24),?38,"Room-Bed: ",ROOMBED
41 . . Q
42 . Q
43 Q
Note: See TracBrowser for help on using the repository browser.