source: FOIAVistA/trunk/r/SPINAL_CORD_DYSFUNCTION-SPN/SPNPMDX.m@ 1203

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

initial load of FOIAVistA 6/30/08 version

File size: 2.1 KB
Line 
1SPNPMDX ;SD/AB-GET SCI ICD9 CODES FOR 344.0x, 344.1, 806.xx, 907.2, 952.xx ;4/17/98
2 ;;2.0;Spinal Cord Dysfunction;**6**;01/02/1997
3MAIN ;-- Called by ^SPNPM1, ^SPNPM2B, & ^SPNPM4 (Program Measures routines)
4 K:$D(^TMP($J,"SPNPMDX","SPNICD")) ^("SPNICD")
5 D GETICD
6EXIT ;
7 Q
8GETICD ;-- For hardcoded range (start and end #s) collect all ICD codes and store into ^TMP($J,"SPNPMDX","SCNICD") global
9 ;-- Create temporary storage for all ICD codes in the range:
10 ;-- 344.00 thru 344.09
11 S SPN("ST#")=343.99
12 S SPN("END#")=344.09
13 F SPN("I")=SPN("ST#"):.01:SPN("END#") D
14 .I $D(^ICD9("BA",SPN("I"))) D
15 ..;-- Get IEN in ICD9 global (file 80)
16 ..S SPN("ICD_IEN")=0
17 ..F S SPN("ICD_IEN")=$O(^ICD9("BA",SPN("I"),SPN("ICD_IEN"))) Q:'+SPN("ICD_IEN") D
18 ...;-- Now set temp global
19 ...S ^TMP($J,"SPNPMDX","SPNICD",SPN("ICD_IEN"))=^ICD9(SPN("ICD_IEN"),0)
20 ...Q
21 ..Q
22 .Q
23 ;-- Create temporary storage for ICD codes:
24 ;-- 344.1 and 907.2
25 F SPN("I")=344.1,907.2 D
26 .I $D(^ICD9("BA",SPN("I"))) D
27 ..;-- Get IEN in ICD9 global (file 80)
28 ..S SPN("ICD_IEN")=$O(^ICD9("BA",SPN("I"),0))
29 ..;-- Now set temp global
30 ..S ^TMP($J,"SPNPMDX","SPNICD",SPN("ICD_IEN"))=^ICD9(SPN("ICD_IEN"),0)
31 ..Q
32 .Q
33 ;-- Create temporary storage for all ICD codes in the range:
34 ;-- 806.00 thru 806.99
35 S SPN("ST#")=805.99
36 S SPN("END#")=806.99
37 F SPN("I")=SPN("ST#"):.01:SPN("END#") D
38 .I $D(^ICD9("BA",SPN("I"))) D
39 ..;-- Get IEN in ICD9 global (file 80)
40 ..S SPN("ICD_IEN")=0
41 ..F S SPN("ICD_IEN")=$O(^ICD9("BA",SPN("I"),SPN("ICD_IEN"))) Q:'+SPN("ICD_IEN") D
42 ...;-- Now set temp global
43 ...S ^TMP($J,"SPNPMDX","SPNICD",SPN("ICD_IEN"))=^ICD9(SPN("ICD_IEN"),0)
44 ...Q
45 ..Q
46 .Q
47 ;-- Create temporary storage for all ICD codes in the range:
48 ;-- 952.00 thru 952.99
49 S SPN("ST#")=951.99
50 S SPN("END#")=952.99
51 F SPN("I")=SPN("ST#"):.01:SPN("END#") D
52 .I $D(^ICD9("BA",SPN("I"))) D
53 ..;-- Get IEN in ICD9 global (file 80)
54 ..S SPN("ICD_IEN")=0
55 ..F S SPN("ICD_IEN")=$O(^ICD9("BA",SPN("I"),SPN("ICD_IEN"))) Q:'+SPN("ICD_IEN") D
56 ...;-- Now set temp global
57 ...S ^TMP($J,"SPNPMDX","SPNICD",SPN("ICD_IEN"))=^ICD9(SPN("ICD_IEN"),0)
58 ...Q
59 ..Q
60 .Q
61 Q
Note: See TracBrowser for help on using the repository browser.