source: FOIAVistA/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNGFIMM.m@ 1522

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

initial load of FOIAVistA 6/30/08 version

File size: 1.5 KB
Line 
1SPNGFIMM ;WDE/SD OUTCOME GRID FOR FIM'S 9/19/2002
2 ;;2.0;Spinal Cord Dysfunction;**19**;01/02/1997
3CALC ; Create the values
4 ;called from spngfimh gets the scores to plug into the grids
5 ; da = the current fim with a score of 4,5,9 or 10
6 ; now get the START fim
7 S SPNGFIS=""
8 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:+SPNGFIS
9 .I $P(^SPNL(154.1,SPNZZ,0),U,2)=2 I 16[$P(^SPNL(154.1,SPNZZ,2),U,17) S SPNGFIS=SPNZZ
10 ;SPNGFIS IS THE FIM START RECORD
11 Q:$D(SPNGFIS)=0
12 Q:SPNGFIS=""
13 ;total gain
14 S SPNR1C1A=$$GET1^DIQ(154.1,DA_",",999.05)
15 S SPNR1C1B=$$GET1^DIQ(154.1,SPNGFIS_",",999.05)
16 S SPNR1C1=SPNR1C1A-SPNR1C1B
17 ;Total efficiency
18 S SPNR1C2A=$$GET1^DIQ(154.1,DA_",",999.08)
19 I $G(SPNR1C2A)>0 S SPNR1C2=SPNR1C1/SPNR1C2A S SPNR1C2=$E(SPNR1C2,1,4)
20 I $G(SPNR1C2A)=0 S SPNR1C2="N/A"
21 ;Motor Gain
22 S SPNR1C3A=$$GET1^DIQ(154.1,DA_",",999.03)
23 S SPNR1C3B=$$GET1^DIQ(154.1,SPNGFIS_",",999.03)
24 S SPNR1C3=SPNR1C3A-SPNR1C3B
25 ;Motor efficiency
26 S SPNR1C4A=$$GET1^DIQ(154.1,DA_",",999.08)
27 I $G(SPNR1C4A)>0 S SPNR1C4=SPNR1C3/SPNR1C4A S SPNR1C4=$E(SPNR1C4,1,4)
28 I $G(SPNR1C4A)=0 S SPNR1C4="N/A"
29 ;Cognitive Gain
30 S SPNR1C5A=$$GET1^DIQ(154.1,DA_",",999.04)
31 S SPNR1C5B=$$GET1^DIQ(154.1,SPNGFIS_",",999.04)
32 S SPNR1C5=SPNR1C5A-SPNR1C5B
33 ;Cognitive Efficiency
34 S SPNR1C6A=$$GET1^DIQ(154.1,DA_",",999.08)
35 I $G(SPNR1C6A)>0 S SPNR1C6=SPNR1C5/SPNR1C6A S SPNR1C6=$E(SPNR1C6,1,4)
36 I $G(SPNR1C6A)=0 S SPNR1C6="N/A"
Note: See TracBrowser for help on using the repository browser.