source: WorldVistAEHR/trunk/r/DRG_GROUPER-ICD--ICPT/ICD1824B.m@ 1211

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

initial load of WorldVistAEHR

File size: 4.8 KB
Line 
1ICD1824B ;ALB/ESD/JAT - FY 2007 UPDATE; 6/22/01 2:43pm ; 6/29/05 3:30pm
2 ;;18.0;DRG Grouper;**24**;Oct 13,2000;Build 5
3 ; - UPD01: Update weights & ALOS for FY 2007 for all DRGs
4 ; - UPD02: update 80.272 multiple with new table routines for FY 2007 for most DRGs
5 ; - INACTDRG: inactivate certain DRGs
6 ; - DRGTITLE: update title of certain DRGs
7 Q
8 ;
9UPDTDRG ;
10 N DRG,FYR,ICDLOW,ICDHIGH,ICDLOS,ICDWWU,ICDCNT,WT,I,J
11 N ICDREF,ICDDRG,ICDFDA,IEN
12 ;D UPD01 - (waiting on CMS - must update each entry in ICD1824X,Y,Z
13 D UPD02
14 Q
15 ;
16 ;
17UPD01 ;- Load FY 2007 weights & ALOS into DRG file (#80.2)
18 S FYR=3070000
19 D BMES^XPDUTL(">>> Adding FY 2007 Weights & ALOS to all DRGs...")
20 ; check if already done in case patch being re-installed
21 Q:$D(^ICD(579,"FY",3070000,0))
22 F I=1:1 S WT=$P($T(WEIGHTS+I^ICD1824X),";;",2,99) Q:I>200 D SETVAR,FY,MORE
23 F I=1:1 S WT=$P($T(WEIGHTS+I^ICD1824Y),";;",2,99) Q:I>200 D SETVAR,FY,MORE
24 F I=1:1 S WT=$P($T(WEIGHTS+I^ICD1824Z),";;",2,99) Q:$E(WT,1,4)="EXIT" D SETVAR,FY,MORE
25 S ^ICD("AFY",3070000)=""
26 D MES^XPDUTL(">>> ...completed.")
27 D MES^XPDUTL("")
28 Q
29 ;
30 ;
31FY ;- Set FY multiple with FYR stats
32 ; check if already done in case patch being re-installed
33 I $D(^ICD(DRG,"FY",FYR,0)) Q
34 S $P(^ICD(DRG,"FY",FYR,0),"^",1,4)=FYR_"^"_ICDWWU_"^"_ICDLOW_"^"_ICDHIGH,$P(^(0),"^",9)=ICDLOS
35 I '$D(^ICD(DRG,"FY",0)) S ^ICD(DRG,"FY",0)="^80.22D^"_FYR_"^1" Q
36 S ICDCNT="" F J=0:1 S ICDCNT=$O(^ICD(DRG,"FY",ICDCNT)) Q:ICDCNT=""
37 S $P(^ICD(DRG,"FY",0),"^",3,4)=FYR_"^"_J
38 Q
39 ;
40 ;
41SETVAR ;- Set variables
42 S DRG=$P(WT,U),ICDLOW=1,ICDHIGH=99,ICDWWU=$P(WT,U,2),ICDLOS=$P(WT,U,3)
43DRG S ICDLOW=$P(^ICD(DRG,"FY",3060000,0),U,3),ICDHIGH=$P(^ICD(DRG,"FY",3060000,0),U,4)
44 Q
45 ;
46 ;
47MORE ;- Set zero node with FY 2007 stats
48 S $P(^ICD(DRG,0),"^",2,4)=ICDWWU_"^"_ICDLOW_"^"_ICDHIGH,$P(^(0),"^",8)=ICDLOS
49 Q
50 ;
51UPD02 ; create new entries for FY 2007 versioning
52 S DRG=0
53 F S DRG=$O(^ICD(DRG)) Q:'DRG D
54 .; check if already done in case patch being re-installed
55 .Q:$D(^ICD(DRG,2,"B",3061001))
56 .;one-time code because not done in FY2006
57 .I DRG<57&($D(^ICD(DRG,2,"B",3041001))) D
58 ..S ICDREF="ICDTLB1B"
59 ..S ICDFDA(80.2,"?1,",.01)="`"_DRG
60 ..S ICDFDA(80.271,"+2,?1,",.01)=3051001
61 ..S ICDFDA(80.271,"+2,?1,",1)=ICDREF
62 ..D UPDATE^DIE("","ICDFDA") K ICDFDA
63 .;end of one-time code
64 .; it's also already done if DRG new this year
65 .Q:DRG>559&($D(^ICD(DRG,2)))
66 .S (ICDDRG,ICDREF)=""
67 .S ICDDRG=$P($G(^ICD(DRG,0)),U,1)
68 .;"A"= FY 2005 "B"=FY 2006 "C"=FY 2007, etc.
69 .S IEN=0,IEN=$O(^ICD(DRG,2,"B",3051001,IEN))
70 .I IEN S ICDREF=$P(^ICD(DRG,2,IEN,0),U,3),ICDREF=$E(ICDREF,1,7)_"C"
71 .;Create FY 2007 reference table entries used for FY 2007
72 .I ICDDRG'="",ICDREF'="" D
73 ..S ICDFDA(80.2,"?1,",.01)="`"_DRG
74 ..S ICDFDA(80.271,"+2,?1,",.01)=3061001
75 ..S ICDFDA(80.271,"+2,?1,",1)=ICDREF
76 ..D UPDATE^DIE("","ICDFDA")
77 Q
78 ;
79INACTDRG ;
80 N LINE,X,ICDDRG,DESC,DA,DIE,DR,MDC,SURG,ICDFDA
81 D BMES^XPDUTL(">>> Inactivating 8 DRGs...")
82 F LINE=1:1 S X=$T(INAC+LINE) S ICDDRG=$P(X,";;",2) Q:ICDDRG="EXIT" D
83 .S DESC="NO LONGER VALID"
84 .S DA(1)=$P(ICDDRG,U)
85 .S DA=1
86 .S DIE="^ICD("_DA(1)_",1,"
87 .S DR=".01///^S X=DESC"
88 .D ^DIE
89 .; check if already done in case patch being re-installed
90 .Q:$D(^ICD($P(ICDDRG,U),66,"B",3061001))
91 .; add entry to 80.266
92 .S MDC=$P(ICDDRG,U,2)
93 .S SURG=$P(ICDDRG,U,3)
94 .S ICDDRG=$P(ICDDRG,U)
95 .S ICDFDA(80.2,"?1,",.01)=ICDDRG
96 .S ICDFDA(80.266,"+2,?1,",.01)=3061001
97 .S ICDFDA(80.266,"+2,?1,",.03)=0
98 .S ICDFDA(80.266,"+2,?1,",.05)=MDC
99 .S ICDFDA(80.266,"+2,?1,",.06)=SURG
100 .D UPDATE^DIE("","ICDFDA") K ICDFDA
101 .; add entry to 80.268 and 80.2681
102 .S ICDFDA(80.2,"?1,",.01)=ICDDRG
103 .S ICDFDA(80.268,"+2,?1,",.01)=3061001
104 .D UPDATE^DIE("","ICDFDA") K ICDFDA
105 .S ICDFDA(80.2,"?1,",.01)=ICDDRG
106 .S ICDFDA(80.268,"?2,?1,",.01)=3061001
107 .S ICDFDA(80.2681,"+3,?2,?1,",.01)=DESC
108 .D UPDATE^DIE("","ICDFDA") K ICDFDA
109 Q
110 ;
111INAC ;
112 ;;20^1^
113 ;;24^1^
114 ;;25^1^
115 ;;475^4^1
116 ;;148^6^1
117 ;;154^6^1
118 ;;415^18^1
119 ;;416^18^1
120 ;;EXIT
121DRGTITLE ; modify titles of DRGs
122 N LINE,X,ICDDRG,DESC,DA,DIE,DR,ICDFDA
123 F LINE=1:1 S X=$T(TITLE+LINE) S ICDDRG=$P(X,";;",2) Q:ICDDRG="EXIT" D
124 .S DESC=$P(ICDDRG,U,2)
125 .S DA(1)=$P(ICDDRG,U)
126 .S DA=1
127 .S DIE="^ICD("_DA(1)_",1,"
128 .S DR=".01///^S X=DESC"
129 .D ^DIE
130 .; check if already done in case patch being re-installed
131 .Q:$D(^ICD($P(ICDDRG,U),68,"B",3061001))
132 .; add entry to 80.268 and 80.2681
133 .S ICDDRG=$P(ICDDRG,U)
134 .S ICDFDA(80.2,"?1,",.01)=ICDDRG
135 .S ICDFDA(80.268,"+2,?1,",.01)=3061001
136 .D UPDATE^DIE("","ICDFDA") K ICDFDA
137 .S ICDFDA(80.2,"?1,",.01)=ICDDRG
138 .S ICDFDA(80.268,"?2,?1,",.01)=3061001
139 .S ICDFDA(80.2681,"+3,?2,?1,",.01)=DESC
140 .D UPDATE^DIE("","ICDFDA") K ICDFDA
141 Q
142TITLE ;
143 ;;303^KIDNEY AND URETER PROCEDURES FOR NEOPLASM
144 ;;304^KIDNEY AND URETER PROCEDURES FOR NON-NEOPLASM WITH CC
145 ;;305^KIDNEY AND URETER PROCEDURES FOR NON-NEOPLASM WITHOUT CC
146 ;;543^CRANIOTOMY W/MAJOR DEVICE IMPLANT OR ACUTE COMPLEX CNS PDX
147 ;;EXIT
Note: See TracBrowser for help on using the repository browser.