source: FOIAVistA/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNGCHRI.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.8 KB
Line 
1SPNGCHRI ;WDE/SD OUTCOME GRID FOR CHART 9/19/2002
2 ;;2.0;Spinal Cord Dysfunction;**19**;01/02/1997
3CALC ;
4 S SPNGOAL=""
5 S SPNXX=0 F S SPNXX=$O(^TMP($J,SPNXX)) Q:SPNXX="" S SPNYY=0 F S SPNYY=$O(^TMP($J,SPNXX,SPNYY)) Q:SPNYY="" S SPNZZ=0 F S SPNZZ=$O(^TMP($J,SPNXX,SPNYY,SPNZZ)) Q:SPNZZ="" D Q:+SPNGOAL
6 .I $P(^SPNL(154.1,SPNZZ,0),U,2)=4 I 27[$P(^SPNL(154.1,SPNZZ,2),U,17) S SPNGOAL=SPNZZ
7 I SPNGOAL="" D ZAP^SPNOGRDA Q
8 S XA=$S(SPNRSCO=4:"Finish",SPNRSCO=5:"F/U (END)",SPNRSCO=9:"Finish",SPNRSCO=10:"F/U (END)",1:"ERROR")
9 ;Physical
10 S SPNR1C1=$P($G(^SPNL(154.1,DA,"CHART")),U,1)
11 I SPNR1C1="" S SPNR1C1=0
12 S SPNR2C1=$P($G(^SPNL(154.1,SPNGOAL,"CHART")),U,1)
13 I SPNR2C1="" S SPNR2C1=0
14 S SPNR3C1=SPNR1C1-SPNR2C1
15 ;Mobility
16 S SPNR1C2=$P($G(^SPNL(154.1,DA,"CHART")),U,2)
17 I SPNR1C2="" S SPNR1C2=0
18 S SPNR2C2=$P($G(^SPNL(154.1,SPNGOAL,"CHART")),U,2)
19 I SPNR2C2="" S SPNR2C2=0
20 S SPNR3C2=SPNR1C2-SPNR2C2
21 ;Occupation
22 S SPNR1C3=$P($G(^SPNL(154.1,DA,"CHART")),U,3)
23 I SPNR1C3="" S SPNR1C3=0
24 S SPNR2C3=$P($G(^SPNL(154.1,SPNGOAL,"CHART")),U,3)
25 I SPNR2C3="" S SPNR2C3=0
26 S SPNR3C3=SPNR1C3-SPNR2C3
27 ;Social Int
28 S SPNR1C4=$P($G(^SPNL(154.1,DA,"CHART")),U,4)
29 I SPNR1C4="" S SPNR1C4=0
30 S SPNR2C4=$P($G(^SPNL(154.1,SPNGOAL,"CHART")),U,4)
31 I SPNR2C4="" S SPNR2C4=0
32 S SPNR3C4=SPNR1C4-SPNR2C4
33 ;Economic
34 S SPNR1C5=$P($G(^SPNL(154.1,DA,"CHART")),U,5)
35 I SPNR1C5="" S SPNR1C5=0
36 S SPNR2C5=$P($G(^SPNL(154.1,SPNGOAL,"CHART")),U,5)
37 I SPNR2C5="" S SPNR2C5=0
38 S SPNR3C5=SPNR1C5-SPNR2C5
39 ;Cognitive
40 S SPNR1C6=$P($G(^SPNL(154.1,DA,"CHART")),U,6)
41 I SPNR1C6="" S SPNR1C6=0
42 S SPNR2C6=$P($G(^SPNL(154.1,SPNGOAL,"CHART")),U,6)
43 I SPNR2C6="" S SPNR2C6=0
44 S SPNR3C6=SPNR1C6-SPNR2C6
45 ;TOTAL
46 S SPNR1C7=$$GET1^DIQ(154.1,DA_",",999.06)
47 S SPNR2C7=$$GET1^DIQ(154.1,SPNGOAL_",",999.06)
48 S SPNR3C7=SPNR1C7-SPNR2C7
49 Q
Note: See TracBrowser for help on using the repository browser.