SD53441 ;ALB/MRY - Post init for patch 441;6/20/2005
;;5.3;Scheduling;**441,1015**;Aug 13, 1993;Build 21
;
PRE ;Main entry point for pre-install
;Do AmbCare pre-install (copied from SD53142)
;Remove ERROR CODE DESCRIPTION (field #11) as an identifier of the
; TRANSMITTED OUTPATIENT ENCOUNTER ERROR CODE file (#409.76)
; (this causes problems when installing error codes)
I ($D(^DD(409.76,0,"ID",11))) D
.N TMP,X
.S X(1)=" "
.S X(2)="Removing ERROR CODE DESCRIPTION (field #11) as an identifier"
.S X(3)="of the TRANSMITTED OUTPATIENT ENCOUNTER ERROR CODE file"
.S X(4)="(#409.76) as it causes problems when installing error codes."
.S X(5)=" "
.D MES^XPDUTL(.X) K X
.K ^DD(409.76,0,"ID",11)
.Q:($D(^DD(409.76,0,"ID")))
.S TMP=$P(^SD(409.76,0),U,2)
.S TMP=$TR(TMP,"I","")
.S $P(^SD(409.76,0),U,2)=TMP
.Q
Q
;
POST ;Main entry point for post-install
;Change 'Environmental Contaminants' to 'Southwest Asia Conditions'
N ENTRY,FDATA,SDX,SDSAVX
S ENTRY=+$O(^SD(409.41,"B","ENVIRONMENTAL CONTAMINANTS",0)) I ENTRY D
.S FDATA(409.41,ENTRY_",",.01)="SW ASIA CONDITIONS"
.S FDATA(409.41,ENTRY_",",.02)="Was treatment related to service in SW Asia"
.S FDATA(409.41,ENTRY_",",.06)="SW Asia Conditions"
.S SDSAVX=$P(^DD(409.41,.01,0),"^",2)
.S SDX=$P(SDSAVX,"I",1)_$P(SDSAVX,"I",2,99) ;REMOVE THE 'I'
.S $P(^DD(409.41,.01,0),U,2)=SDX
.D FILE^DIE("E","FDATA","ERR")
.S $P(^DD(409.41,.01,0),"^",2)=SDSAVX
.D BMES^XPDUTL("*****")
.D MES^XPDUTL("Edit to the OUTPATIENT CLASSIFICATION TYPE file (#409.41)")
.D MES^XPDUTL("...Replacing 'ENVIRONMENTAL CONTAMINANTS' with...")
.D MES^XPDUTL("...'SW ASIA CONDITIONS'.")
.D MES^XPDUTL("*****")
N TEXT
;Ensure entry 8 doesn't exist in Outpatient Classification Type file
I $D(^SD(409.41,8)) D
.;Delete entry 8
.N DIK,DA
.K TEXT
.S TEXT(1)=" "
.S TEXT(2)="'Project 112/SHAD' must be entry number 8 in the Outpatient"
.S TEXT(3)="Classification Type file (#409.41). The existing entry 8"
.S TEXT(4)="will be deleted to ensure that it matches the nationally"
.S TEXT(5)="distributed definition for 'Project 112/SHAD'."
.D MES^XPDUTL(.TEXT)
.S DIK="^SD(409.41,"
.S DA=8
.D ^DIK
;Create entry in Outpatient Classification Type file (#409.41)
N SDFDA,SDIEN,SDMSG
K TEXT
S TEXT(1)=" "
S TEXT(2)="Creating 'PROJ 112/SHAD' entry in Outpatient Classification"
S TEXT(3)="Type file (#409.41) as entry number 8 ..."
D MES^XPDUTL(.TEXT)
S SDFDA(409.41,"+1,",.01)="PROJ 112/SHAD"
S SDFDA(409.41,"+1,",.02)="Was treatment related to PROJ 112/SHAD"
S SDFDA(409.41,"+1,",.03)="YES/NO"
S SDFDA(409.41,"+1,",.05)="YES"
S SDFDA(409.41,"+1,",.06)="PROJ 112/SHAD"
S SDFDA(409.41,"+1,",.07)="SHAD"
S SDFDA(409.41,"+1,",1)="I $$SHAD^SDCO22(DFN)"
S SDFDA(409.41,"+1,",2)="@"
S SDFDA(409.41,"+1,",50)="@"
S SDFDA(409.4175,"+2,+1,",.01)="SEPTEMBER 1, 2004"
S SDFDA(409.4175,"+2,+1,",.02)="YES"
S SDIEN(1)=8
D UPDATE^DIE("E","SDFDA","SDIEN","SDMSG")
I $D(SDMSG) D
.D MES^XPDUTL("** Unable to create entry **")
.K TEXT
.D MSG^DIALOG("ASE",.TEXT,60,3,"SDMSG")
.D MES^XPDUTL(.TEXT)
I '$D(SDMSG) D
.K TEXT
.S TEXT(1)=" "
.S TEXT(2)="'PROJ 112/SHAD' successfully added to Outpatient Classification"
.S TEXT(3)="Type file (#409.41)"
.D MES^XPDUTL(.TEXT)
;Do AmbCare post-init
D POST^SD53441A
Q
SD53441 ;ALB/MRY - Post init for patch 441;6/20/2005
+1 ;;5.3;Scheduling;**441,1015**;Aug 13, 1993;Build 21
+2 ;
PRE ;Main entry point for pre-install
+1 ;Do AmbCare pre-install (copied from SD53142)
+2 ;Remove ERROR CODE DESCRIPTION (field #11) as an identifier of the
+3 ; TRANSMITTED OUTPATIENT ENCOUNTER ERROR CODE file (#409.76)
+4 ; (this causes problems when installing error codes)
+5 IF ($DATA(^DD(409.76,0,"ID",11)))
Begin DoDot:1
+6 NEW TMP,X
+7 SET X(1)=" "
+8 SET X(2)="Removing ERROR CODE DESCRIPTION (field #11) as an identifier"
+9 SET X(3)="of the TRANSMITTED OUTPATIENT ENCOUNTER ERROR CODE file"
+10 SET X(4)="(#409.76) as it causes problems when installing error codes."
+11 SET X(5)=" "
+12 DO MES^XPDUTL(.X)
KILL X
+13 KILL ^DD(409.76,0,"ID",11)
+14 IF ($DATA(^DD(409.76,0,"ID")))
QUIT
+15 SET TMP=$PIECE(^SD(409.76,0),U,2)
+16 SET TMP=$TRANSLATE(TMP,"I","")
+17 SET $PIECE(^SD(409.76,0),U,2)=TMP
+18 QUIT
End DoDot:1
+19 QUIT
+20 ;
POST ;Main entry point for post-install
+1 ;Change 'Environmental Contaminants' to 'Southwest Asia Conditions'
+2 NEW ENTRY,FDATA,SDX,SDSAVX
+3 SET ENTRY=+$ORDER(^SD(409.41,"B","ENVIRONMENTAL CONTAMINANTS",0))
IF ENTRY
Begin DoDot:1
+4 SET FDATA(409.41,ENTRY_",",.01)="SW ASIA CONDITIONS"
+5 SET FDATA(409.41,ENTRY_",",.02)="Was treatment related to service in SW Asia"
+6 SET FDATA(409.41,ENTRY_",",.06)="SW Asia Conditions"
+7 SET SDSAVX=$PIECE(^DD(409.41,.01,0),"^",2)
+8 ;REMOVE THE 'I'
SET SDX=$PIECE(SDSAVX,"I",1)_$PIECE(SDSAVX,"I",2,99)
+9 SET $PIECE(^DD(409.41,.01,0),U,2)=SDX
+10 DO FILE^DIE("E","FDATA","ERR")
+11 SET $PIECE(^DD(409.41,.01,0),"^",2)=SDSAVX
+12 DO BMES^XPDUTL("*****")
+13 DO MES^XPDUTL("Edit to the OUTPATIENT CLASSIFICATION TYPE file (#409.41)")
+14 DO MES^XPDUTL("...Replacing 'ENVIRONMENTAL CONTAMINANTS' with...")
+15 DO MES^XPDUTL("...'SW ASIA CONDITIONS'.")
+16 DO MES^XPDUTL("*****")
End DoDot:1
+17 NEW TEXT
+18 ;Ensure entry 8 doesn't exist in Outpatient Classification Type file
+19 IF $DATA(^SD(409.41,8))
Begin DoDot:1
+20 ;Delete entry 8
+21 NEW DIK,DA
+22 KILL TEXT
+23 SET TEXT(1)=" "
+24 SET TEXT(2)="'Project 112/SHAD' must be entry number 8 in the Outpatient"
+25 SET TEXT(3)="Classification Type file (#409.41). The existing entry 8"
+26 SET TEXT(4)="will be deleted to ensure that it matches the nationally"
+27 SET TEXT(5)="distributed definition for 'Project 112/SHAD'."
+28 DO MES^XPDUTL(.TEXT)
+29 SET DIK="^SD(409.41,"
+30 SET DA=8
+31 DO ^DIK
End DoDot:1
+32 ;Create entry in Outpatient Classification Type file (#409.41)
+33 NEW SDFDA,SDIEN,SDMSG
+34 KILL TEXT
+35 SET TEXT(1)=" "
+36 SET TEXT(2)="Creating 'PROJ 112/SHAD' entry in Outpatient Classification"
+37 SET TEXT(3)="Type file (#409.41) as entry number 8 ..."
+38 DO MES^XPDUTL(.TEXT)
+39 SET SDFDA(409.41,"+1,",.01)="PROJ 112/SHAD"
+40 SET SDFDA(409.41,"+1,",.02)="Was treatment related to PROJ 112/SHAD"
+41 SET SDFDA(409.41,"+1,",.03)="YES/NO"
+42 SET SDFDA(409.41,"+1,",.05)="YES"
+43 SET SDFDA(409.41,"+1,",.06)="PROJ 112/SHAD"
+44 SET SDFDA(409.41,"+1,",.07)="SHAD"
+45 SET SDFDA(409.41,"+1,",1)="I $$SHAD^SDCO22(DFN)"
+46 SET SDFDA(409.41,"+1,",2)="@"
+47 SET SDFDA(409.41,"+1,",50)="@"
+48 SET SDFDA(409.4175,"+2,+1,",.01)="SEPTEMBER 1, 2004"
+49 SET SDFDA(409.4175,"+2,+1,",.02)="YES"
+50 SET SDIEN(1)=8
+51 DO UPDATE^DIE("E","SDFDA","SDIEN","SDMSG")
+52 IF $DATA(SDMSG)
Begin DoDot:1
+53 DO MES^XPDUTL("** Unable to create entry **")
+54 KILL TEXT
+55 DO MSG^DIALOG("ASE",.TEXT,60,3,"SDMSG")
+56 DO MES^XPDUTL(.TEXT)
End DoDot:1
+57 IF '$DATA(SDMSG)
Begin DoDot:1
+58 KILL TEXT
+59 SET TEXT(1)=" "
+60 SET TEXT(2)="'PROJ 112/SHAD' successfully added to Outpatient Classification"
+61 SET TEXT(3)="Type file (#409.41)"
+62 DO MES^XPDUTL(.TEXT)
End DoDot:1
+63 ;Do AmbCare post-init
+64 DO POST^SD53441A
+65 QUIT