AGTXCONF ;IHS/ASDS/EFG - CONFIGURE AGTX FOR BEFORE or AFTER P14 ;
;;7.1;PATIENT REGISTRATION;;AUG 25,2005
;
INTRO ;
;;In an attempt to foresee unknown configurations, this option
;;allows you to toggle the before and after Patch 14 export
;;formats. This is done simply by restoring 7 routines that
;;were saved before the KIDS install of Patch 14.
;;
;;Before the install of Patch 14, 7 routines were saved into the
;;"AGTXX*" namespace. After the install of Patch 14, the same 7
;;patched routines were saved into the "AGTXZ*" namespace.
;;
;;Don't worry, you won't be asked for namespaces. You'll just be
;;asked for the 'BEFORE P14' or 'AFTER P14' configuration.
;;###
D HELP^XBHELP("INTRO","AGTXCONF")
NEW AGCONFIG
S AGCONFIG=$$CONFIG
W !!,"It appears that your current configuration is '",AGCONFIG," P14'."
I AGCONFIG="UNKNOWN" W !,"I don't know what to do.",!,"Some of the 7 are 'BEFORE' and some are 'AFTER'.",!,"You better call for help....." Q
W !,"Do you want to change your export formats to '",$S(AGCONFIG="AFTER":"BEFORE",1:"AFTER")," P14'?"
Q:'$$DIR^XBDIR("YO","Proceed","N","","Do you want to change your export formats to '"_$S(AGCONFIG="AFTER":"BEFORE",1:"AFTER")_" P14'? (Y/N)")
D @$S(AGCONFIG="AFTER":"BEFLOD",1:"AFTLOD")
Q
BEFLOD ;Restore the before p14 routines.
NEW AG,XCN,XCNP,DIE,DIF
F AG=1:1:7 D KT S X=$P($T(BEF+AG),";",4),(XCN,XCNP)=0,(DIE,DIF)="^TMP(""AGTXCONF"",$J," W !,"Loading '",X,"'..." X ^%ZOSF("LOAD") S X=$P($T(BEF+AG),";",3) X ^%ZOSF("SAVE") W "Saved as '",X,"'."
D KT
Q
AFTLOD ;Restore the after p14 routines.
NEW AG,XCN,XCNP,DIE,DIF
F AG=1:1:7 D KT S X=$P($T(AFT+AG),";",4),(XCN,XCNP)=0,(DIE,DIF)="^TMP(""AGTXCONF"",$J," W !,"Loading '",X,"'..." X ^%ZOSF("LOAD") S X=$P($T(AFT+AG),";",3) X ^%ZOSF("SAVE") W "Saved as '",X,"'."
D KT
Q
KT KILL ^TMP("AGTXCONF",$J)
Q
CONFIG() ;
NEW AGP,Y
S Y=""
F AG=1:1:7 S X=$P($T(BEF+AG),";",3) F AGP=14:1 Q:'$$INSTALLD^AG6P16("AG*6.0*"_AGP) S Y=Y_($P($T(+2^@X),";",5)[AGP)
Q $S('Y:"BEFORE",1:"AFTER")
BEF ;These are the "before p14" routines.
;;AGTX1;AGTXX1
;;AGTX2;AGTXX2
;;AGTX3;AGTXX3
;;AGTX4;AGTXX4
;;AGTX5;AGTXX5
;;AGTXST;AGTXX6
;;AGTXTAPE;AGTXX7
AFT ; These are the "after p14" routines.
;;AGTX1;AGTXZ1
;;AGTX2;AGTXZ2
;;AGTX3;AGTXZ3
;;AGTX4;AGTXZ4
;;AGTX5;AGTXZ5
;;AGTXST;AGTXZ6
;;AGTXTAPE;AGTXZ7
;
BEFSAV ;EP - From P14 install. Save the before p14 routines.
NEW AG,AGM,XCN,XCNP,DIE,DIF
F AG=1:1:7 D
. D KT
. S X=$P($T(BEF+AG),";",3),(XCN,XCNP)=0,(DIE,DIF)="^TMP(""AGTXCONF"",$J,"
. S AGM="Loading '"_X_"'..."
. X ^%ZOSF("LOAD")
. S X=$P($T(BEF+AG),";",4)
. X ^%ZOSF("TEST")
. I D MES^XPDUTL(AGM_"NOT SAVED AS '"_X_"'. '"_X_"' ALREADY EXISTS.") Q
. X ^%ZOSF("SAVE")
. D MES^XPDUTL(AGM_"Saved as '"_X_"'.")
.Q
D KT
Q
AFTSAV ;EP - From P14 install. Save the after p14 routines.
NEW AG,AGM,XCN,XCNP,DIE,DIF
F AG=1:1:7 D
. D KT
. S X=$P($T(AFT+AG),";",3),(XCN,XCNP)=0,(DIE,DIF)="^TMP(""AGTXCONF"",$J,"
. S AGM="Loading '"_X_"'..."
. X ^%ZOSF("LOAD")
. S X=$P($T(AFT+AG),";",4)
. X ^%ZOSF("TEST")
. I D MES^XPDUTL(AGM_"NOT SAVED AS '"_X_"'. '"_X_"' ALREADY EXISTS.") Q
. X ^%ZOSF("SAVE")
. D MES^XPDUTL(AGM_"Saved as '"_X_"'.")
.Q
D KT
Q
DELAFT ;EP - Delete routine(s) to make room for "just installed" routines.
NEW AG,X
F AG=1:1:7 S X=$P($T(AFT+AG),";",4) X ^%ZOSF("DEL") I '$D(ZTQUEUED) D BMES^XPDUTL(X_$E("...........",1,11-$L(X))_"<poof'd>")
Q
AGTXCONF ;IHS/ASDS/EFG - CONFIGURE AGTX FOR BEFORE or AFTER P14 ;
+1 ;;7.1;PATIENT REGISTRATION;;AUG 25,2005
+2 ;
INTRO ;
+1 ;;In an attempt to foresee unknown configurations, this option
+2 ;;allows you to toggle the before and after Patch 14 export
+3 ;;formats. This is done simply by restoring 7 routines that
+4 ;;were saved before the KIDS install of Patch 14.
+5 ;;
+6 ;;Before the install of Patch 14, 7 routines were saved into the
+7 ;;"AGTXX*" namespace. After the install of Patch 14, the same 7
+8 ;;patched routines were saved into the "AGTXZ*" namespace.
+9 ;;
+10 ;;Don't worry, you won't be asked for namespaces. You'll just be
+11 ;;asked for the 'BEFORE P14' or 'AFTER P14' configuration.
+12 ;;###
+13 DO HELP^XBHELP("INTRO","AGTXCONF")
+14 NEW AGCONFIG
+15 SET AGCONFIG=$$CONFIG
+16 WRITE !!,"It appears that your current configuration is '",AGCONFIG," P14'."
+17 IF AGCONFIG="UNKNOWN"
WRITE !,"I don't know what to do.",!,"Some of the 7 are 'BEFORE' and some are 'AFTER'.",!,"You better call for help....."
QUIT
+18 WRITE !,"Do you want to change your export formats to '",$SELECT(AGCONFIG="AFTER":"BEFORE",1:"AFTER")," P14'?"
+19 IF '$$DIR^XBDIR("YO","Proceed","N","","Do you want to change your export formats to '"_$SELECT(AGCONFIG="AFTER"
QUIT
+20 DO @$SELECT(AGCONFIG="AFTER":"BEFLOD",1:"AFTLOD")
+21 QUIT
BEFLOD ;Restore the before p14 routines.
+1 NEW AG,XCN,XCNP,DIE,DIF
+2 FOR AG=1:1:7
DO KT
SET X=$PIECE($TEXT(BEF+AG),";",4)
SET (XCN,XCNP)=0
SET (DIE,DIF)="^TMP(""AGTXCONF"",$J,"
WRITE !,"Loading '",X,"'..."
XECUTE ^%ZOSF("LOAD")
SET X=$PIECE($TEXT(BEF+AG),";",3)
XECUTE ^%ZOSF("SAVE")
WRITE "Saved as '",X,"'."
+3 DO KT
+4 QUIT
AFTLOD ;Restore the after p14 routines.
+1 NEW AG,XCN,XCNP,DIE,DIF
+2 FOR AG=1:1:7
DO KT
SET X=$PIECE($TEXT(AFT+AG),";",4)
SET (XCN,XCNP)=0
SET (DIE,DIF)="^TMP(""AGTXCONF"",$J,"
WRITE !,"Loading '",X,"'..."
XECUTE ^%ZOSF("LOAD")
SET X=$PIECE($TEXT(AFT+AG),";",3)
XECUTE ^%ZOSF("SAVE")
WRITE "Saved as '",X,"'."
+3 DO KT
+4 QUIT
KT KILL ^TMP("AGTXCONF",$JOB)
+1 QUIT
CONFIG() ;
+1 NEW AGP,Y
+2 SET Y=""
+3 FOR AG=1:1:7
SET X=$PIECE($TEXT(BEF+AG),";",3)
FOR AGP=14:1
IF '$$INSTALLD^AG6P16("AG*6.0*"_AGP)
QUIT
SET Y=Y_($PIECE($TEXT(+2^@X),";",5)[AGP)
+4 QUIT $SELECT('Y:"BEFORE",1:"AFTER")
BEF ;These are the "before p14" routines.
+1 ;;AGTX1;AGTXX1
+2 ;;AGTX2;AGTXX2
+3 ;;AGTX3;AGTXX3
+4 ;;AGTX4;AGTXX4
+5 ;;AGTX5;AGTXX5
+6 ;;AGTXST;AGTXX6
+7 ;;AGTXTAPE;AGTXX7
AFT ; These are the "after p14" routines.
+1 ;;AGTX1;AGTXZ1
+2 ;;AGTX2;AGTXZ2
+3 ;;AGTX3;AGTXZ3
+4 ;;AGTX4;AGTXZ4
+5 ;;AGTX5;AGTXZ5
+6 ;;AGTXST;AGTXZ6
+7 ;;AGTXTAPE;AGTXZ7
+8 ;
BEFSAV ;EP - From P14 install. Save the before p14 routines.
+1 NEW AG,AGM,XCN,XCNP,DIE,DIF
+2 FOR AG=1:1:7
Begin DoDot:1
+3 DO KT
+4 SET X=$PIECE($TEXT(BEF+AG),";",3)
SET (XCN,XCNP)=0
SET (DIE,DIF)="^TMP(""AGTXCONF"",$J,"
+5 SET AGM="Loading '"_X_"'..."
+6 XECUTE ^%ZOSF("LOAD")
+7 SET X=$PIECE($TEXT(BEF+AG),";",4)
+8 XECUTE ^%ZOSF("TEST")
+9 IF $TEST
DO MES^XPDUTL(AGM_"NOT SAVED AS '"_X_"'. '"_X_"' ALREADY EXISTS.")
QUIT
+10 XECUTE ^%ZOSF("SAVE")
+11 DO MES^XPDUTL(AGM_"Saved as '"_X_"'.")
+12 QUIT
End DoDot:1
+13 DO KT
+14 QUIT
AFTSAV ;EP - From P14 install. Save the after p14 routines.
+1 NEW AG,AGM,XCN,XCNP,DIE,DIF
+2 FOR AG=1:1:7
Begin DoDot:1
+3 DO KT
+4 SET X=$PIECE($TEXT(AFT+AG),";",3)
SET (XCN,XCNP)=0
SET (DIE,DIF)="^TMP(""AGTXCONF"",$J,"
+5 SET AGM="Loading '"_X_"'..."
+6 XECUTE ^%ZOSF("LOAD")
+7 SET X=$PIECE($TEXT(AFT+AG),";",4)
+8 XECUTE ^%ZOSF("TEST")
+9 IF $TEST
DO MES^XPDUTL(AGM_"NOT SAVED AS '"_X_"'. '"_X_"' ALREADY EXISTS.")
QUIT
+10 XECUTE ^%ZOSF("SAVE")
+11 DO MES^XPDUTL(AGM_"Saved as '"_X_"'.")
+12 QUIT
End DoDot:1
+13 DO KT
+14 QUIT
DELAFT ;EP - Delete routine(s) to make room for "just installed" routines.
+1 NEW AG,X
+2 FOR AG=1:1:7
SET X=$PIECE($TEXT(AFT+AG),";",4)
XECUTE ^%ZOSF("DEL")
IF '$DATA(ZTQUEUED)
DO BMES^XPDUTL(X_$EXTRACT("...........",1,11-$LENGTH(X))_"<poof'd>")
+3 QUIT