APCLXXAB ; IHS/OHPRD/TMJ -CREATED BY ^XBERTN ON APR 18, 1996 ;
;;3.0;IHS PCC REPORTS;;FEB 05, 1997
;; E W "Saving of routine ^",ATXPGM," failed.",!
;; K ^TMP("ATXPGM",$J,ATXPGM)
;; Q
;; ;
;;SETTMP ; SET ^TMP GLOBAL
;; S ATXL=ATXL+1
;; S ^TMP("ATXPGM",$J,ATXPGM,ATXL,0)=X
;; S ATXLNTH=ATXLNTH+(4+$L(X))
;; Q
;; ;
;;RECURSE ; CALLED FROM PGMTMP TO BUILD OTHER ROUTINES IF TOO LARGE
;; NEW ATXL,ATXLNTH,ATXPGM,ATXTMPQ
;; S ATXPGMC=ATXPGMC+1
;; S ATXPGM=ATXPGMR_$C(64+ATXPGMC)
;; D PGMBEG
;; D PGMTMP
;; D PGMSAVE
;; S ATXPGMS(ATXPGM)=""
;; Q
;; ;
;;DRIVER ; BUILD MAIN DRIVER ROUTINE
;; S ATXPGM=ATXDRVR
;; K ^TMP("ATXPGM",$J,ATXPGM)
;; S (ATXL,ATXLNTH)=0
;; S X=ATXPGM_" ;"_ATXASP_"-CREATED BY ^ATXSTX ON "_Y_";" D SETTMP
;; S X=" ;;"_ATXVER D SETTMP
;; S X=" ;" D SETTMP
;; S X=" ; See referenced routines to see taxonomies being loaded." D SETTMP
;; S X=" ;" D SETTMP
;; S X="START ;" D SETTMP
;; F ATXI=1:1:26 S X=ATXPGM_$C(64+ATXI) X ^%ZOSF("TEST") Q:'$T D
;; . X "ZL @X S Z=$T(@X+2),Z=$P(Z,"";;"",2)"
;; . S Y="",$P(Y," ",(10-$L(X)))=" ",Y=" ;"_Y_Z
;; . S X=" D ^"_X_Y D SETTMP
;; . Q
;; S X=" Q" D SETTMP
;; D PGMSAVE
;; Q
;; ;
;;POSTINIT ; UPDATE POST INIT ENTRY IN PACKAGE FILE
;; S ATXX=$$VALI^XBDIQ1(9.4,ATXPK,914)
;; I ATXX'="",ATXX'=ATXDRVR D Q:ATXQ
;; . S ATXQ=1
;; . W !!,"Package file already has post-init routine=^",ATXX
;; . S DIR(0)="Y",DIR("A")="Do you want me to replace it",DIR("B")="N" K DA D ^DIR K DIR
;; . Q:'Y
;; . S ATXQ=0
;; . Q
;; S DIE="^DIC(9.4,",DA=ATXPK,DR="914////"_ATXDRVR
;; D ^DIE
;; W !,"Package post-init routine has been set to ^",ATXDRVR,!
;; Q
;; ;
;;EOJ ;
;; K ^TMP("ATX",$J),^TMP("ATXPGM",$J)
;; D EN^XBVK("ATX")
;; Q
;; ;
;; ;-------------------
;;INSTALL ; This is to test the code for the post init routine
;; K ^TMP("ATX",$J)
;; ;F ATXI=1:1 S X=$P($T(TMP+ATXI),";;",2,99) Q:X="" S ATXI=ATXI+1,Y=$P($T(TMP+ATXI),";;",2,99) S @X=Y
;; F ATXI=4:1 S X=$P($G(^TMP("ATXPGM",$J,ATXI,0)),";;",2) Q:X="" S ATXI=ATXI+1,Y=$P(^TMP("ATXPGM",$J,ATXI,0),";;",2) S @X=Y
;; I $O(^TMP("ATX",$J,3.6,0)) D BULL^ATXSTX2
;; I $O(^TMP("ATX",$J,9002226,0)) D TAX^ATXSTX2
;; D KILL^ATXSTX2
;; Q
;; ;--------------------
;; ;
;;CODE ;; If you modify this code change all F ATXI=n1:n2:n3 as appropriate
;;1 ;; ;
;;2 ;;START ;
;;3 ;; K:'$G(ATXPGMC) ^TMP("ATX",$J)
;;4 ;; S ATXPGMC=$G(ATXPGMC)+1
;;5 ;; F ATXI=1:1 S X=$P($T(TMP+ATXI),";;",2,99) Q:X="" S X="^TMP(""ATX"",$J,"_X,ATXI=ATXI+1,Y=$P($T(TMP+ATXI),";;",2,99) S @X=Y
;;6 ;; D OTHER
;;7 ;; I $O(^TMP("ATX",$J,3.6,0)) D BULL^ATXSTX2
;;8 ;; I $O(^TMP("ATX",$J,9002226,0)) D TAX^ATXSTX2
;;9 ;; D KILL^ATXSTX2
;;10 ;; Q
APCLXXAB ; IHS/OHPRD/TMJ -CREATED BY ^XBERTN ON APR 18, 1996 ;
+1 ;;3.0;IHS PCC REPORTS;;FEB 05, 1997
+2 ;; E W "Saving of routine ^",ATXPGM," failed.",!
+3 ;; K ^TMP("ATXPGM",$J,ATXPGM)
+4 ;; Q
+5 ;; ;
+6 ;;SETTMP ; SET ^TMP GLOBAL
+7 ;; S ATXL=ATXL+1
+8 ;; S ^TMP("ATXPGM",$J,ATXPGM,ATXL,0)=X
+9 ;; S ATXLNTH=ATXLNTH+(4+$L(X))
+10 ;; Q
+11 ;; ;
+12 ;;RECURSE ; CALLED FROM PGMTMP TO BUILD OTHER ROUTINES IF TOO LARGE
+13 ;; NEW ATXL,ATXLNTH,ATXPGM,ATXTMPQ
+14 ;; S ATXPGMC=ATXPGMC+1
+15 ;; S ATXPGM=ATXPGMR_$C(64+ATXPGMC)
+16 ;; D PGMBEG
+17 ;; D PGMTMP
+18 ;; D PGMSAVE
+19 ;; S ATXPGMS(ATXPGM)=""
+20 ;; Q
+21 ;; ;
+22 ;;DRIVER ; BUILD MAIN DRIVER ROUTINE
+23 ;; S ATXPGM=ATXDRVR
+24 ;; K ^TMP("ATXPGM",$J,ATXPGM)
+25 ;; S (ATXL,ATXLNTH)=0
+26 ;; S X=ATXPGM_" ;"_ATXASP_"-CREATED BY ^ATXSTX ON "_Y_";" D SETTMP
+27 ;; S X=" ;;"_ATXVER D SETTMP
+28 ;; S X=" ;" D SETTMP
+29 ;; S X=" ; See referenced routines to see taxonomies being loaded." D SETTMP
+30 ;; S X=" ;" D SETTMP
+31 ;; S X="START ;" D SETTMP
+32 ;; F ATXI=1:1:26 S X=ATXPGM_$C(64+ATXI) X ^%ZOSF("TEST") Q:'$T D
+33 ;; . X "ZL @X S Z=$T(@X+2),Z=$P(Z,"";;"",2)"
+34 ;; . S Y="",$P(Y," ",(10-$L(X)))=" ",Y=" ;"_Y_Z
+35 ;; . S X=" D ^"_X_Y D SETTMP
+36 ;; . Q
+37 ;; S X=" Q" D SETTMP
+38 ;; D PGMSAVE
+39 ;; Q
+40 ;; ;
+41 ;;POSTINIT ; UPDATE POST INIT ENTRY IN PACKAGE FILE
+42 ;; S ATXX=$$VALI^XBDIQ1(9.4,ATXPK,914)
+43 ;; I ATXX'="",ATXX'=ATXDRVR D Q:ATXQ
+44 ;; . S ATXQ=1
+45 ;; . W !!,"Package file already has post-init routine=^",ATXX
+46 ;; . S DIR(0)="Y",DIR("A")="Do you want me to replace it",DIR("B")="N" K DA D ^DIR K DIR
+47 ;; . Q:'Y
+48 ;; . S ATXQ=0
+49 ;; . Q
+50 ;; S DIE="^DIC(9.4,",DA=ATXPK,DR="914////"_ATXDRVR
+51 ;; D ^DIE
+52 ;; W !,"Package post-init routine has been set to ^",ATXDRVR,!
+53 ;; Q
+54 ;; ;
+55 ;;EOJ ;
+56 ;; K ^TMP("ATX",$J),^TMP("ATXPGM",$J)
+57 ;; D EN^XBVK("ATX")
+58 ;; Q
+59 ;; ;
+60 ;; ;-------------------
+61 ;;INSTALL ; This is to test the code for the post init routine
+62 ;; K ^TMP("ATX",$J)
+63 ;; ;F ATXI=1:1 S X=$P($T(TMP+ATXI),";;",2,99) Q:X="" S ATXI=ATXI+1,Y=$P($T(TMP+ATXI),";;",2,99) S @X=Y
+64 ;; F ATXI=4:1 S X=$P($G(^TMP("ATXPGM",$J,ATXI,0)),";;",2) Q:X="" S ATXI=ATXI+1,Y=$P(^TMP("ATXPGM",$J,ATXI,0),";;",2) S @X=Y
+65 ;; I $O(^TMP("ATX",$J,3.6,0)) D BULL^ATXSTX2
+66 ;; I $O(^TMP("ATX",$J,9002226,0)) D TAX^ATXSTX2
+67 ;; D KILL^ATXSTX2
+68 ;; Q
+69 ;; ;--------------------
+70 ;; ;
+71 ;;CODE ;; If you modify this code change all F ATXI=n1:n2:n3 as appropriate
+72 ;;1 ;; ;
+73 ;;2 ;;START ;
+74 ;;3 ;; K:'$G(ATXPGMC) ^TMP("ATX",$J)
+75 ;;4 ;; S ATXPGMC=$G(ATXPGMC)+1
+76 ;;5 ;; F ATXI=1:1 S X=$P($T(TMP+ATXI),";;",2,99) Q:X="" S X="^TMP(""ATX"",$J,"_X,ATXI=ATXI+1,Y=$P($T(TMP+ATXI),";;",2,99) S @X=Y
+77 ;;6 ;; D OTHER
+78 ;;7 ;; I $O(^TMP("ATX",$J,3.6,0)) D BULL^ATXSTX2
+79 ;;8 ;; I $O(^TMP("ATX",$J,9002226,0)) D TAX^ATXSTX2
+80 ;;9 ;; D KILL^ATXSTX2
+81 ;;10 ;; Q