BCSVEC ;IHS/MSC/BWF - CSV Package Update Utility ;16-Apr-2010 09:58;JSH
;;1.0;BCSV;;Apr 23, 2010;Build 44
;=================================================================
;
;
PATUPD ;
N DLM,DDLM,QUIT,I,TEXT,DATA,PKGNM,VERSION,PATCH,PKGIEN,TAG,VSB,XREFREV
S (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0 ; Suppress the Disable options and Move routine prompts
S XPDABORT=0
I '$D(^XPD(9.6,"B","IHS CSV DD MOVE 1.0")) S XPDABORT=1
I XPDABORT D BMES^XPDUTL("IHS CSV DD MOVE 1.0 build must be installed to continue!") Q
I '$D(^XCSV("MMDONE")) S XPDABORT=1
I XPDABORT D BMES^XPDUTL("Manual mapping must be marked as 'complete' prior to installing this patch.") Q
I $D(^XPD(9.6,"B","IHS CSV VA UPDATES 1.0")) S XPDABORT=1
I XPDABORT D Q
.D BMES^XPDUTL("IHS CSV VA UPDATES has been installed before and may not be installed again!") Q
.;D:$D(^XCSV("POSTKID")) FIX^BCSVP1
S DDLM=";;",DLM="|",QUIT=0
F TAG="LEX","ICD","ICPT" D
.S QUIT=0
.F I=1:1 D Q:QUIT
..S TEXT=$T(@TAG+I) I TEXT="Q" S QUIT=1 Q
..S DATA=$P(TEXT,DDLM,2) I DATA="" S QUIT=1 Q
..S PKGNM=$P(DATA,DLM),VERSION=$P(DATA,DLM,2),PATCH=$P(DATA,DLM,3)
..I '$D(^DIC(9.4,"B",PKGNM)) Q
..S PKGIEN=$O(^DIC(9.4,"B",PKGNM,0)) Q:PKGIEN=""
..I TAG="ICD" D
...I $$GET1^DIQ(9.4,PKGIEN,13)=18.0 Q
...S FDA(9.4,PKGIEN_",",13)=18.0 D FILE^DIE(,"FDA")
..I '$D(^DIC(9.4,PKGIEN,22,"B",VERSION)) D
...K FDA
...S FDA(9.49,"+1,"_PKGIEN_",",.01)=VERSION
...D UPDATE^DIE(,"FDA")
...S FDA(9.49,"+1,"_PKGIEN_",",1)=$G(DT)
...S FDA(9.49,"+1,"_PKGIEN_",",2)=$G(DT)
...S FDA(9.49,"+1,"_PKGIEN_",",3)=$G(DUZ)
...D FILE^DIE(,"FDA")
..Q:PATCH=""
..S VSB=$O(^DIC(9.4,PKGIEN,22,"B",VERSION,0))
..Q:'VSB
..K FDA
..; Do not update if the patch is already in the patch history
..I $D(^DIC(9.4,PKGIEN,22,VSB,"PAH","B",PATCH)) Q
..S FDA(9.4901,"+1,"_VSB_","_PKGIEN_",",.01)=$G(PATCH)
..S FDA(9.4901,"+1,"_VSB_","_PKGIEN_",",.02)=DT
..S FDA(9.4901,"+1,"_VSB_","_PKGIEN_",",.03)=DUZ
..D UPDATE^DIE(,"FDA")
Q
;;;;FORMAT - Package name|Version|Patch|Sequence
LEX ;
;;LEXICON UTILITY|2.0|1
;;LEXICON UTILITY|2.0|2
;;LEXICON UTILITY|2.0|3
;;LEXICON UTILITY|2.0|4
;;LEXICON UTILITY|2.0|5
;;LEXICON UTILITY|2.0|7 SEQ #6
;;LEXICON UTILITY|2.0|6 SEQ #7
;;LEXICON UTILITY|2.0|8 SEQ #8
;;LEXICON UTILITY|2.0|9 SEQ #9
;;LEXICON UTILITY|2.0|10 SEQ #10
;;LEXICON UTILITY|2.0|11 SEQ #11
;;LEXICON UTILITY|2.0|12 SEQ #12
;;LEXICON UTILITY|2.0|13 SEQ #13
;;LEXICON UTILITY|2.0|14 SEQ #14
;;LEXICON UTILITY|2.0|15 SEQ #15
;;LEXICON UTILITY|2.0|16 SEQ #16
;;LEXICON UTILITY|2.0|17 SEQ #17
;;LEXICON UTILITY|2.0|18 SEQ #18
;;LEXICON UTILITY|2.0|19 SEQ #19
;;LEXICON UTILITY|2.0|21 SEQ #20
;;LEXICON UTILITY|2.0|22 SEQ #21
;;LEXICON UTILITY|2.0|23 SEQ #22
;;LEXICON UTILITY|2.0|24 SEQ #23
;;LEXICON UTILITY|2.0|25 SEQ #24
;;LEXICON UTILITY|2.0|26 SEQ #25
;;LEXICON UTILITY|2.0|27 SEQ #26
;;LEXICON UTILITY|2.0|28 SEQ #27
;;LEXICON UTILITY|2.0|29 SEQ #28
;;LEXICON UTILITY|2.0|30 SEQ #29
;;LEXICON UTILITY|2.0|31 SEQ #30
;;LEXICON UTILITY|2.0|33 SEQ #31
;;LEXICON UTILITY|2.0|34 SEQ #32
;;LEXICON UTILITY|2.0|35 SEQ #33
;;LEXICON UTILITY|2.0|32 SEQ #34
;;LEXICON UTILITY|2.0|36 SEQ #35
;;LEXICON UTILITY|2.0|37 SEQ #36
;;LEXICON UTILITY|2.0|39 SEQ #37
;;LEXICON UTILITY|2.0|38 SEQ #38
;;LEXICON UTILITY|2.0|40 SEQ #39
;;LEXICON UTILITY|2.0|42 SEQ #41
;;LEXICON UTILITY|2.0|36 SEQ #35
;;LEXICON UTILITY|2.0|43
;;LEXICON UTILITY|2.0|45 SEQ #43
;;LEXICON UTILITY|2.0|46
;;LEXICON UTILITY|2.0|47
;;LEXICON UTILITY|2.0|48
;;LEXICON UTILITY|2.0|49
;;LEXICON UTILITY|2.0|50 SEQ #48
;;LEXICON UTILITY|2.0|52
;;LEXICON UTILITY|2.0|53
;;LEXICON UTILITY|2.0|54
;;
Q
ICD ;
;;DRG GROUPER|9.0||
;;DRG GROUPER|10.0||
;;DRG GROUPER|11.0||
;;DRG GROUPER|12.0||
;;DRG GROUPER|13.0||
;;DRG GROUPER|14.0||
;;DRG GROUPER|15.0||
;;DRG GROUPER|16.0||
;;DRG GROUPER|17.0||
;;DRG GROUPER|18.0|1 SEQ #1
;;DRG GROUPER|18.0|2 SEQ #2
;;DRG GROUPER|18.0|3 SEQ #3
;;DRG GROUPER|18.0|4 SEQ #4
;;DRG GROUPER|18.0|5 SEQ #5
;;DRG GROUPER|18.0|6 SEQ #6
;;DRG GROUPER|18.0|7 SEQ #7
;;DRG GROUPER|18.0|8 SEQ #9
;;DRG GROUPER|18.0|10 SEQ #10
;;DRG GROUPER|18.0|11 SEQ #11
;;DRG GROUPER|18.0|12 SEQ #12
;;DRG GROUPER|18.0|13 SEQ #13
;;DRG GROUPER|18.0|14 SEQ #14
;;DRG GROUPER|18.0|16 SEQ #15
;;DRG GROUPER|18.0|15
;;DRG GROUPER|18.0|17 SEQ #17
;;DRG GROUPER|18.0|20 SEQ #19
;;DRG GROUPER|18.0|22 SEQ #21
;;DRG GROUPER|18.0|24 SEQ #24
;;DRG GROUPER|18.0|26 SEQ #25
;;DRG GROUPER|18.0|28
;;DRG GROUPER|18.0|27 SEQ #27
;;DRG GROUPER|18.0|30 SEQ #28
;;DRG GROUPER|18.0|29
;;DRG GROUPER|18.0|31
;;DRG GROUPER|18.0|32
;;
Q
ICPT ;
;;CPT/HCPCS CODES|6.0|1 SEQ #1
;;CPT/HCPCS CODES|6.0|2 SEQ #2
;;CPT/HCPCS CODES|6.0|3 SEQ #3
;;CPT/HCPCS CODES|6.0|4 SEQ #4
;;CPT/HCPCS CODES|6.0|5 SEQ #5
;;CPT/HCPCS CODES|6.0|6 SEQ #6
;;CPT/HCPCS CODES|6.0|7 SEQ #7
;;CPT/HCPCS CODES|6.0|8 SEQ #8
;;CPT/HCPCS CODES|6.0|9 SEQ #9
;;CPT/HCPCS CODES|6.0|10 SEQ #10
;;CPT/HCPCS CODES|6.0|11 SEQ #11
;;CPT/HCPCS CODES|6.0|12 SEQ #12
;;CPT/HCPCS CODES|6.0|13 SEQ #13
;;CPT/HCPCS CODES|6.0|14 SEQ #14
;;CPT/HCPCS CODES|6.0|15 SEQ #15
;;CPT/HCPCS CODES|6.0|16 SEQ #16
;;CPT/HCPCS CODES|6.0|17 SEQ #17
;;CPT/HCPCS CODES|6.0|18 SEQ #18
;;CPT/HCPCS CODES|6.0|19 SEQ #19
;;CPT/HCPCS CODES|6.0|20 SEQ #20
;;CPT/HCPCS CODES|6.0|22 SEQ #23
;;CPT/HCPCS CODES|6.0|23 SEQ #22
;;CPT/HCPCS CODES|6.0|30
;;CPT/HCPCS CODES|6.0|34
;;CPT/HCPCS CODES|6.0|37
;;
Q
AUPN ;
;;IHS DICTIONARIES (PATIENT)|99.1|20 SEQ #20
Q
BCSVEC ;IHS/MSC/BWF - CSV Package Update Utility ;16-Apr-2010 09:58;JSH
+1 ;;1.0;BCSV;;Apr 23, 2010;Build 44
+2 ;=================================================================
+3 ;
+4 ;
PATUPD ;
+1 NEW DLM,DDLM,QUIT,I,TEXT,DATA,PKGNM,VERSION,PATCH,PKGIEN,TAG,VSB,XREFREV
+2 ; Suppress the Disable options and Move routine prompts
SET (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0
+3 SET XPDABORT=0
+4 IF '$DATA(^XPD(9.6,"B","IHS CSV DD MOVE 1.0"))
SET XPDABORT=1
+5 IF XPDABORT
DO BMES^XPDUTL("IHS CSV DD MOVE 1.0 build must be installed to continue!")
QUIT
+6 IF '$DATA(^XCSV("MMDONE"))
SET XPDABORT=1
+7 IF XPDABORT
DO BMES^XPDUTL("Manual mapping must be marked as 'complete' prior to installing this patch.")
QUIT
+8 IF $DATA(^XPD(9.6,"B","IHS CSV VA UPDATES 1.0"))
SET XPDABORT=1
+9 IF XPDABORT
Begin DoDot:1
+10 DO BMES^XPDUTL("IHS CSV VA UPDATES has been installed before and may not be installed again!")
QUIT
+11 ;D:$D(^XCSV("POSTKID")) FIX^BCSVP1
End DoDot:1
QUIT
+12 SET DDLM=";;"
SET DLM="|"
SET QUIT=0
+13 FOR TAG="LEX","ICD","ICPT"
Begin DoDot:1
+14 SET QUIT=0
+15 FOR I=1:1
Begin DoDot:2
+16 SET TEXT=$TEXT(@TAG+I)
IF TEXT="Q"
SET QUIT=1
QUIT
+17 SET DATA=$PIECE(TEXT,DDLM,2)
IF DATA=""
SET QUIT=1
QUIT
+18 SET PKGNM=$PIECE(DATA,DLM)
SET VERSION=$PIECE(DATA,DLM,2)
SET PATCH=$PIECE(DATA,DLM,3)
+19 IF '$DATA(^DIC(9.4,"B",PKGNM))
QUIT
+20 SET PKGIEN=$ORDER(^DIC(9.4,"B",PKGNM,0))
IF PKGIEN=""
QUIT
+21 IF TAG="ICD"
Begin DoDot:3
+22 IF $$GET1^DIQ(9.4,PKGIEN,13)=18.0
QUIT
+23 SET FDA(9.4,PKGIEN_",",13)=18.0
DO FILE^DIE(,"FDA")
End DoDot:3
+24 IF '$DATA(^DIC(9.4,PKGIEN,22,"B",VERSION))
Begin DoDot:3
+25 KILL FDA
+26 SET FDA(9.49,"+1,"_PKGIEN_",",.01)=VERSION
+27 DO UPDATE^DIE(,"FDA")
+28 SET FDA(9.49,"+1,"_PKGIEN_",",1)=$GET(DT)
+29 SET FDA(9.49,"+1,"_PKGIEN_",",2)=$GET(DT)
+30 SET FDA(9.49,"+1,"_PKGIEN_",",3)=$GET(DUZ)
+31 DO FILE^DIE(,"FDA")
End DoDot:3
+32 IF PATCH=""
QUIT
+33 SET VSB=$ORDER(^DIC(9.4,PKGIEN,22,"B",VERSION,0))
+34 IF 'VSB
QUIT
+35 KILL FDA
+36 ; Do not update if the patch is already in the patch history
+37 IF $DATA(^DIC(9.4,PKGIEN,22,VSB,"PAH","B",PATCH))
QUIT
+38 SET FDA(9.4901,"+1,"_VSB_","_PKGIEN_",",.01)=$GET(PATCH)
+39 SET FDA(9.4901,"+1,"_VSB_","_PKGIEN_",",.02)=DT
+40 SET FDA(9.4901,"+1,"_VSB_","_PKGIEN_",",.03)=DUZ
+41 DO UPDATE^DIE(,"FDA")
End DoDot:2
IF QUIT
QUIT
End DoDot:1
+42 QUIT
+43 ;;;;FORMAT - Package name|Version|Patch|Sequence
LEX ;
+1 ;;LEXICON UTILITY|2.0|1
+2 ;;LEXICON UTILITY|2.0|2
+3 ;;LEXICON UTILITY|2.0|3
+4 ;;LEXICON UTILITY|2.0|4
+5 ;;LEXICON UTILITY|2.0|5
+6 ;;LEXICON UTILITY|2.0|7 SEQ #6
+7 ;;LEXICON UTILITY|2.0|6 SEQ #7
+8 ;;LEXICON UTILITY|2.0|8 SEQ #8
+9 ;;LEXICON UTILITY|2.0|9 SEQ #9
+10 ;;LEXICON UTILITY|2.0|10 SEQ #10
+11 ;;LEXICON UTILITY|2.0|11 SEQ #11
+12 ;;LEXICON UTILITY|2.0|12 SEQ #12
+13 ;;LEXICON UTILITY|2.0|13 SEQ #13
+14 ;;LEXICON UTILITY|2.0|14 SEQ #14
+15 ;;LEXICON UTILITY|2.0|15 SEQ #15
+16 ;;LEXICON UTILITY|2.0|16 SEQ #16
+17 ;;LEXICON UTILITY|2.0|17 SEQ #17
+18 ;;LEXICON UTILITY|2.0|18 SEQ #18
+19 ;;LEXICON UTILITY|2.0|19 SEQ #19
+20 ;;LEXICON UTILITY|2.0|21 SEQ #20
+21 ;;LEXICON UTILITY|2.0|22 SEQ #21
+22 ;;LEXICON UTILITY|2.0|23 SEQ #22
+23 ;;LEXICON UTILITY|2.0|24 SEQ #23
+24 ;;LEXICON UTILITY|2.0|25 SEQ #24
+25 ;;LEXICON UTILITY|2.0|26 SEQ #25
+26 ;;LEXICON UTILITY|2.0|27 SEQ #26
+27 ;;LEXICON UTILITY|2.0|28 SEQ #27
+28 ;;LEXICON UTILITY|2.0|29 SEQ #28
+29 ;;LEXICON UTILITY|2.0|30 SEQ #29
+30 ;;LEXICON UTILITY|2.0|31 SEQ #30
+31 ;;LEXICON UTILITY|2.0|33 SEQ #31
+32 ;;LEXICON UTILITY|2.0|34 SEQ #32
+33 ;;LEXICON UTILITY|2.0|35 SEQ #33
+34 ;;LEXICON UTILITY|2.0|32 SEQ #34
+35 ;;LEXICON UTILITY|2.0|36 SEQ #35
+36 ;;LEXICON UTILITY|2.0|37 SEQ #36
+37 ;;LEXICON UTILITY|2.0|39 SEQ #37
+38 ;;LEXICON UTILITY|2.0|38 SEQ #38
+39 ;;LEXICON UTILITY|2.0|40 SEQ #39
+40 ;;LEXICON UTILITY|2.0|42 SEQ #41
+41 ;;LEXICON UTILITY|2.0|36 SEQ #35
+42 ;;LEXICON UTILITY|2.0|43
+43 ;;LEXICON UTILITY|2.0|45 SEQ #43
+44 ;;LEXICON UTILITY|2.0|46
+45 ;;LEXICON UTILITY|2.0|47
+46 ;;LEXICON UTILITY|2.0|48
+47 ;;LEXICON UTILITY|2.0|49
+48 ;;LEXICON UTILITY|2.0|50 SEQ #48
+49 ;;LEXICON UTILITY|2.0|52
+50 ;;LEXICON UTILITY|2.0|53
+51 ;;LEXICON UTILITY|2.0|54
+52 ;;
+53 QUIT
ICD ;
+1 ;;DRG GROUPER|9.0||
+2 ;;DRG GROUPER|10.0||
+3 ;;DRG GROUPER|11.0||
+4 ;;DRG GROUPER|12.0||
+5 ;;DRG GROUPER|13.0||
+6 ;;DRG GROUPER|14.0||
+7 ;;DRG GROUPER|15.0||
+8 ;;DRG GROUPER|16.0||
+9 ;;DRG GROUPER|17.0||
+10 ;;DRG GROUPER|18.0|1 SEQ #1
+11 ;;DRG GROUPER|18.0|2 SEQ #2
+12 ;;DRG GROUPER|18.0|3 SEQ #3
+13 ;;DRG GROUPER|18.0|4 SEQ #4
+14 ;;DRG GROUPER|18.0|5 SEQ #5
+15 ;;DRG GROUPER|18.0|6 SEQ #6
+16 ;;DRG GROUPER|18.0|7 SEQ #7
+17 ;;DRG GROUPER|18.0|8 SEQ #9
+18 ;;DRG GROUPER|18.0|10 SEQ #10
+19 ;;DRG GROUPER|18.0|11 SEQ #11
+20 ;;DRG GROUPER|18.0|12 SEQ #12
+21 ;;DRG GROUPER|18.0|13 SEQ #13
+22 ;;DRG GROUPER|18.0|14 SEQ #14
+23 ;;DRG GROUPER|18.0|16 SEQ #15
+24 ;;DRG GROUPER|18.0|15
+25 ;;DRG GROUPER|18.0|17 SEQ #17
+26 ;;DRG GROUPER|18.0|20 SEQ #19
+27 ;;DRG GROUPER|18.0|22 SEQ #21
+28 ;;DRG GROUPER|18.0|24 SEQ #24
+29 ;;DRG GROUPER|18.0|26 SEQ #25
+30 ;;DRG GROUPER|18.0|28
+31 ;;DRG GROUPER|18.0|27 SEQ #27
+32 ;;DRG GROUPER|18.0|30 SEQ #28
+33 ;;DRG GROUPER|18.0|29
+34 ;;DRG GROUPER|18.0|31
+35 ;;DRG GROUPER|18.0|32
+36 ;;
+37 QUIT
ICPT ;
+1 ;;CPT/HCPCS CODES|6.0|1 SEQ #1
+2 ;;CPT/HCPCS CODES|6.0|2 SEQ #2
+3 ;;CPT/HCPCS CODES|6.0|3 SEQ #3
+4 ;;CPT/HCPCS CODES|6.0|4 SEQ #4
+5 ;;CPT/HCPCS CODES|6.0|5 SEQ #5
+6 ;;CPT/HCPCS CODES|6.0|6 SEQ #6
+7 ;;CPT/HCPCS CODES|6.0|7 SEQ #7
+8 ;;CPT/HCPCS CODES|6.0|8 SEQ #8
+9 ;;CPT/HCPCS CODES|6.0|9 SEQ #9
+10 ;;CPT/HCPCS CODES|6.0|10 SEQ #10
+11 ;;CPT/HCPCS CODES|6.0|11 SEQ #11
+12 ;;CPT/HCPCS CODES|6.0|12 SEQ #12
+13 ;;CPT/HCPCS CODES|6.0|13 SEQ #13
+14 ;;CPT/HCPCS CODES|6.0|14 SEQ #14
+15 ;;CPT/HCPCS CODES|6.0|15 SEQ #15
+16 ;;CPT/HCPCS CODES|6.0|16 SEQ #16
+17 ;;CPT/HCPCS CODES|6.0|17 SEQ #17
+18 ;;CPT/HCPCS CODES|6.0|18 SEQ #18
+19 ;;CPT/HCPCS CODES|6.0|19 SEQ #19
+20 ;;CPT/HCPCS CODES|6.0|20 SEQ #20
+21 ;;CPT/HCPCS CODES|6.0|22 SEQ #23
+22 ;;CPT/HCPCS CODES|6.0|23 SEQ #22
+23 ;;CPT/HCPCS CODES|6.0|30
+24 ;;CPT/HCPCS CODES|6.0|34
+25 ;;CPT/HCPCS CODES|6.0|37
+26 ;;
+27 QUIT
AUPN ;
+1 ;;IHS DICTIONARIES (PATIENT)|99.1|20 SEQ #20
+2 QUIT