source: WorldVistAEHR/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNLCNV1.m@ 794

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

initial load of WorldVistAEHR

File size: 3.5 KB
Line 
1SPNLCNV1 ;HISC/DAD-CONVERSION ;6/1/95 15:28
2 ;;2.0;Spinal Cord Dysfunction;;01/02/1997
3 ;
4 ; *** Etiology conversion table
5 F OFFSET=1:1 S SPNLINE=$P($T(ETIOLOGY+OFFSET),";",3) Q:SPNLINE="" D
6 . S SPNOLD(0)=$P(SPNLINE,U),SPNNEW(0)=$P(SPNLINE,U,2)
7 . S SPNTYPE=$P(SPNLINE,U,3)
8 . D FINDNEW I SPNNEWD0 D FINDOLD
9 . Q
10 ; *** Registration status conversion table
11 F OFFSET=1:1 S SPNLINE=$P($T(REGSTAT+OFFSET),";",3) Q:SPNLINE="" D
12 . S SPNOLD=$P(SPNLINE,U),SPNNEW=$P(SPNLINE,U,2)
13 . S ^TMP($J,"SPN REGSTAT",SPNOLD)=SPNNEW
14 . S ^TMP($J,"SPN REGSTAT",SPNNEW)=SPNNEW
15 . Q
16 ; *** Source of NLOI conversion table
17 F OFFSET=1:1 S SPNLINE=$P($T(NLOI+OFFSET),";",3) Q:SPNLINE="" D
18 . S SPNOLD=$P(SPNLINE,U),SPNNEW=$P(SPNLINE,U,2)
19 . S ^TMP($J,"SPN NLOI",SPNOLD)=SPNNEW
20 . S ^TMP($J,"SPN NLOI",SPNNEW)=SPNNEW
21 . Q
22 Q
23 ;
24FINDNEW ; *** Find the new etiology entry in file #154.03
25 S (SPNNEW,SPNNEWD0)=0
26 F S SPNNEW=$O(^SPNL(154.03,"B",SPNNEW(0),SPNNEW)) Q:SPNNEW'>0!SPNNEWD0 D
27 . I $P($G(^SPNL(154.03,SPNNEW,0)),U,1,2)'=(SPNNEW(0)_U_SPNTYPE) Q
28 . S SPNNEWD0=SPNNEW
29 . Q
30 I SPNNEWD0'>0 D
31 . S X="Cannot convert '"_SPNNEW(0)_"' ("_SPNTYPE_"), not found in SCD"
32 . S X=X_" ETIOLOGY file (#154.03), affects all SCD Registry records"
33 . D ERR^SPNLCNV0(X)
34 . Q
35 Q
36 ;
37FINDOLD ; *** Find the old etiology entry in file #154.02
38 S SPNOLD=0,SPNEXIT=1
39 F S SPNOLD=$O(^SPNL(154.02,"B",SPNOLD(0),SPNOLD)) Q:SPNOLD'>0 D
40 . I $P($G(^SPNL(154.02,SPNOLD,0)),U)'=SPNOLD(0) Q
41 . S ^TMP($J,"SPN ETIOLOGY",SPNOLD)=SPNNEWD0,SPNEXIT=0
42 . Q
43 I SPNEXIT=1 D
44 . S X="Cannot convert '"_SPNOLD(0)_"', not found in *SCD ETIOLOGY CATEGORY"
45 . S X=X_" file (#154.02), affects all SCD Registry records"
46 . D ERR^SPNLCNV0(X)
47 . Q
48 Q
49 ;
50ETIOLOGY ;; Old_Value ^ New_Value ^ Type_of_Cause
51 ;;AIR SPORTS^SPORTS ACTIVITY^TC
52 ;;ALL OTHER PENETRATING WOUNDS^ACT OF VIOLENCE^TC
53 ;;ALL TERRAIN VEHICLE & CYCLE^VEHICULAR^TC
54 ;;AUTO ACCIDENT^VEHICULAR^TC
55 ;;BASEBALL/SOFTBALL^SPORTS ACTIVITY^TC
56 ;;BASKETBALL/VOLLEYBALL^SPORTS ACTIVITY^TC
57 ;;BICYCLE^VEHICULAR^TC
58 ;;BOAT^VEHICULAR^TC
59 ;;DIVING^SPORTS ACTIVITY^TC
60 ;;EXPLOSION^ACT OF VIOLENCE^TC
61 ;;FALL^FALL^TC
62 ;;FIELD SPORTS^SPORTS ACTIVITY^TC
63 ;;FIXED-WING AIRCRAFT^VEHICULAR^TC
64 ;;FOOTBALL^SPORTS ACTIVITY^TC
65 ;;GUNSHOT WOUND^ACT OF VIOLENCE^TC
66 ;;GYMNASTICS^SPORTS ACTIVITY^TC
67 ;;HANG GLIDING^SPORTS ACTIVITY^TC
68 ;;HIT BY FALLING/FLYING OBJECT^ACT OF VIOLENCE^TC
69 ;;HORSEBACK RIDING^SPORTS ACTIVITY^TC
70 ;;INTERSPINAL ABSCESS^INFECTION OR ABSCESS^NTC
71 ;;MEDICAL/SURGICAL COMPLICATION^OTHER - TRAUMATIC^TC
72 ;;MOTOR NEURON DISEASE^MOTOR NEURON DISEASE^NTC
73 ;;MOTORCYCLE ACCIDENT^VEHICULAR^TC
74 ;;MULTIPLE SCLEROSIS^MULTIPLE SCLEROSIS^NTC
75 ;;NEOPLSM AFCTNG SPNL& RLTD STRC^TUMOR^NTC
76 ;;OTHER^OTHER^U
77 ;;OTHER DESEASE OF THE SPNL CORD^OTHER - DISEASE^NTC
78 ;;OTHER SPORT - UNCLASSIFIED^SPORTS ACTIVITY^TC
79 ;;OTHER UNCLASSIFIED^OTHER^U
80 ;;OTHER VEHICULAR - UNCLASSIFIED^VEHICULAR^TC
81 ;;PEDESTRIAN^OTHER - TRAUMATIC^TC
82 ;;PERSON-TO-PERSON CONTACT^ACT OF VIOLENCE^TC
83 ;;POLIOMYELITIS^POLIOMYELITIS^NTC
84 ;;RODEO^SPORTS ACTIVITY^TC
85 ;;ROTATING WING AIRCRAFT^VEHICULAR^TC
86 ;;SKATEBOARD^SPORTS ACTIVITY^TC
87 ;;SNOW SKIING^SPORTS ACTIVITY^TC
88 ;;SNOWMOBILE^SPORTS ACTIVITY^TC
89 ;;SPINOCEREBELLAR DISEASES^OTHER - DISEASE^NTC
90 ;;SPONDYLOSIS^OTHER - DISEASE^NTC
91 ;;SURFING^SPORTS ACTIVITY^TC
92 ;;TRACK & FIELD^SPORTS ACTIVITY^TC
93 ;;TRAMPOLINE^SPORTS ACTIVITY^TC
94 ;;UNKNOWN -DISEASE^UNKNOWN^NTC
95 ;;UNKNOWN -TRAUMATIC^UNKNOWN^TC
96 ;;WATER SKIING^SPORTS ACTIVITY^TC
97 ;;WINTER SPORTS^SPORTS ACTIVITY^TC
98 ;;WRESTLING^SPORTS ACTIVITY^TC
99 ;;
100REGSTAT ;; Old_Value ^ New_Value
101 ;;A^1
102 ;;I^2
103 ;;
104NLOI ;; Old_Value ^ New_Value
105 ;;PS^1
106 ;;CO^2
107 ;;CA^3
108 ;;
Note: See TracBrowser for help on using the repository browser.