source: FOIAVistA/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNLEGA.m@ 1582

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

initial load of FOIAVistA 6/30/08 version

File size: 2.3 KB
Line 
1SPNLEGA ;WDE/SD EDIT OLD DATA ;11/7/02 05:15
2 ;;2.0;Spinal Cord Dysfunction;**19**;01/02/1997
3 ;
4EN ;Starting point
5 I $D(IOF) W @IOF
6 W !!,"This edit option is limited to OLDER outcomes only, i.e., outcomes on file"
7 W !,"before the adoption of the 'episode of care' clinical model."
8 W !,"Editing an older outcome record will not convert it to the new model."
9 W !,"This option is not intended for regular use, but does provide a way to"
10 W !,"access older, heritage outcomes to correct data inaccuracies.",!
11PAT ;Select an Outcome from 154.1
12 ;
13 S SPNFEXIT=0
14 K DIC
15 S DIC("S")="I $P($G(^SPNL(154.1,+Y,8)),U,3)="""""
16 ;S DIC("W")="I $P(^SPNL(154.1,+Y,0),U,4)"
17 W ! S DIC="^SPNL(154.1,",DIC(0)="AEMQ" D ^DIC
18 I +Y'>0 S SPNFEXIT=1 D ZAP^SPNCTINA Q
19 S DA=+Y
20EDIT ;Set up the dr string based on the record type FIM, FAM, Diener, etc
21 S SPNRTYP=$P($G(^SPNL(154.1,DA,0)),U,2)
22 I $G(SPNRTYP)="" D ZAP^SPNCTINA Q
23 I SPNRTYP=1 S DR=".024;.03;.16;.17;.13;.14;.15;.05;.06;.07;.08;.09;.1;.11;.12;2.01;2.02;2.03;2.04;2.05;2.08;2.09;2.13;2.06;2.07" ;Self Rpt
24 I SPNRTYP=2 S DR=".024;.05;.06;.07;.08;.09;.1;.11;.12;.13;.14;.15;.161;.16;.17;.181;.18;.191;.19;.2;.21;.22" ;FIM
25 I SPNRTYP=3 S DR=".024;7.01;7.02;7.03;7.04;7.05;7.06;7.07;7.08;7.09;7.1;7.11;7.12;7.13;7.14" ;ASIA
26 I SPNRTYP=4 S DR="4.1;4.2;4.3;4.4;4.5;4.6" ;CHART
27 I SPNRTYP=5 S DR=".024;5.09;5.02;5.03;5.04;5.06;5.05;5.07;5.11;5.12;5.1;5.08;5.01" ;FAM
28 I SPNRTYP=6 S DR=".024;6.01" ;DIENER
29 I SPNRTYP=7 S DR=".024;6.02" ;DUSOI
30 I SPNRTYP=8 S DR=".024;3.1;3.2;3.3;3.4;3.5;3.6;3.7;3.8;3.9" ;MS
31 I $D(IOF) W @IOF
32 S SPNDFN=$P($G(^SPNL(154.1,DA,0)),U,1)
33 I $G(SPNDFN)="" K SPNRTYP,SPNDFN,SPNSSN,DA,DIC,DIE,DR,Y,SPNFEXIT Q
34 S SPNSSN=$P($G(^DPT(SPNDFN,0)),U,9) S SPNSSN=$E(SPNSSN,1,3)_"-"_$E(SPNSSN,4,5)_"-"_$E(SPNSSN,6,9)
35 W !!,"Patient: ",$P(^DPT(SPNDFN,0),U,1)," SSN: ",SPNSSN
36 W !,"Record Type: ",$$GET1^DIQ(154.1,DA_",",.02)
37 W " Date Recorded : ",$$FMTE^XLFDT($P($G(^SPNL(154.1,DA,0)),U,4),"5DZP")
38 W !,"--------------------------------------------------------------------------",!
39 ;
40 S DIE=154.1
41 I $G(SPNRTYP)'="" D ^DIE
42 K DIE,DIC,DA,DR,Y,SPNFEXIT,SPNRTYP
43 Q
44INQ ;Inquire to an outcome
45 W ! S DIC="^SPNL(154.1,",DIC(0)="AEMQ" D ^DIC
46 I +Y'>0 S SPNFEXIT=1 D ZAP^SPNCTINA Q
47 S DA=+Y
48 S DIQ(0)="C"
49 I $D(IOF) W @IOF
50 D EN^DIQ
51 K DIC,DIQ,DA,Y,SPNFEXIT
52 Q
Note: See TracBrowser for help on using the repository browser.