source: FOIAVistA/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNLRM2.m@ 1452

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

initial load of FOIAVistA 6/30/08 version

File size: 2.7 KB
Line 
1SPNLRM2 ;ISC-SF/GB-SCD RADIOLOGY UTILIZATION REPORT (PRINT PART 2 OF 2) ;5 JUN 94 [ 08/15/94 8:38 AM ]
2 ;;2.0;Spinal Cord Dysfunction;;01/02/1997
3 ; PAGELEN Number of lines per page
4 ; TITLE Array of header lines (titles)
5P4(TITLE,PAGELEN,HIUSERS,ABORT) ;
6 ; I High user counter
7 ; COST Cost of the procedures
8 ; NDPROCS Number of different procedures
9 ; NPROCS Number of procedures
10 ; PID Patient ID (Coded SSN)
11 ; PNAME Patient Name
12 ; PSSN Patient SSN
13 N NPROCS,NDPROCS,COST,PID,PNAME,PSSN,I
14 S TITLE(4)=""
15 S TITLE(5)=$$CENTER^SPNLRU("Highest Utilization Patients Based on Number of Procedures")
16 ; TITLE(5)=" 1 2 3 4 5 6 7 8"
17 S TITLE(6)=""
18 S TITLE(7)=" Total Different Total"
19 S TITLE(8)="Patient Name SSN Procs Procs Value"
20 D HEADER^SPNLRU(.TITLE,.ABORT) Q:ABORT
21 S NPROCS=""
22 F I=1:1:HIUSERS S NPROCS=$O(^TMP("SPN",$J,"RA","HI","H1",NPROCS)) Q:NPROCS="" D Q:ABORT
23 . S NDPROCS=""
24 . F S NDPROCS=$O(^TMP("SPN",$J,"RA","HI","H1",NPROCS,NDPROCS)) Q:NDPROCS="" D Q:ABORT
25 . . S COST=""
26 . . F S COST=$O(^TMP("SPN",$J,"RA","HI","H1",NPROCS,NDPROCS,COST)) Q:COST="" D Q:ABORT
27 . . . S PID=""
28 . . . F S PID=$O(^TMP("SPN",$J,"RA","HI","H1",NPROCS,NDPROCS,COST,PID)) Q:PID="" D Q:ABORT
29 . . . . I $Y>PAGELEN D HEADER^SPNLRU(.TITLE,.ABORT) Q:ABORT
30 . . . . D GETNAME^SPNLRU(PID,.PNAME,.PSSN)
31 . . . . W !,PNAME,?32,PSSN,?44,$J($FN(-NPROCS,","),10),?55,$J($FN(-NDPROCS,","),8),?68,$J($FN(-COST,",",2),12)
32 Q
33P5(TITLE,PAGELEN,HIUSERS,ABORT) ;
34 ; I High user counter
35 ; COST Cost of the procedures
36 ; NDPROCS Number of different procedures
37 ; NPROCS Number of procedures
38 ; PID Patient ID (Coded SSN)
39 ; PNAME Patient Name
40 ; PSSN Patient SSN
41 N NPROCS,NDPROCS,COST,PID,PNAME,PSSN,I
42 S TITLE(5)=$$CENTER^SPNLRU("Highest Utilization Patients Based on Value")
43 D HEADER^SPNLRU(.TITLE,.ABORT) Q:ABORT
44 S COST=""
45 F I=1:1:HIUSERS S COST=$O(^TMP("SPN",$J,"RA","HI","H2",COST)) Q:COST="" D Q:ABORT
46 . S NPROCS=""
47 . F S NPROCS=$O(^TMP("SPN",$J,"RA","HI","H2",COST,NPROCS)) Q:NPROCS="" D Q:ABORT
48 . . S NDPROCS=""
49 . . F S NDPROCS=$O(^TMP("SPN",$J,"RA","HI","H2",COST,NPROCS,NDPROCS)) Q:NDPROCS="" D Q:ABORT
50 . . . S PID=""
51 . . . F S PID=$O(^TMP("SPN",$J,"RA","HI","H2",COST,NPROCS,NDPROCS,PID)) Q:PID="" D Q:ABORT
52 . . . . I $Y>PAGELEN D HEADER^SPNLRU(.TITLE,.ABORT) Q:ABORT
53 . . . . D GETNAME^SPNLRU(PID,.PNAME,.PSSN)
54 . . . . W !,PNAME,?32,PSSN,?44,$J($FN(-NPROCS,","),10),?58,$J($FN(-NDPROCS,","),8),?68,$J($FN(-COST,",",2),12)
55 K TITLE(4),TITLE(5),TITLE(6),TITLE(7),TITLE(8)
56 Q
Note: See TracBrowser for help on using the repository browser.