Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: AUT98P12

AUT98P12.m

Go to the documentation of this file.
  1. AUT98P12 ;IHS/SET/GTH - AUT 98.1 PATCH 12 ; [ 02/12/2003 8:56 AM ]
  1. ;;98.1;IHS DICTIONARIES (POINTERS);**12**;MAR 04, 1998;Build 6
  1. ;
  1. ; IHS/SET/GTH AUT*98.1*12 01/02/2003
  1. ;
  1. I '$G(IOM) D HOME^%ZIS
  1. ;
  1. I '$G(DUZ) W !,"DUZ UNDEFINED OR 0." D SORRY(2) Q
  1. ;
  1. I '$L($G(DUZ(0))) W !,"DUZ(0) UNDEFINED OR NULL." D SORRY(2) Q
  1. ;
  1. I '(DUZ(0)["@") W:'$D(ZTQUEUED) !,"DUZ(0) DOES NOT CONTAIN AN '@'." D SORRY(2) Q
  1. ;
  1. S X=$P(^VA(200,DUZ,0),U)
  1. W !!,$$CJ^XLFSTR("Hello, "_$P(X,",",2)_" "_$P(X,","),IOM)
  1. W !!,$$CJ^XLFSTR("Checking Environment for "_$P($T(+2),";",4)_" V "_$P($T(+2),";",3)_" Patch "_$P($T(+2),";",5)_".",IOM)
  1. ;
  1. NEW IORVON,IORVOFF
  1. S X="IORVON;IORVOFF"
  1. D ENDR^%ZISS
  1. ;
  1. S X=$$VERSION^XPDUTL("AUT")
  1. W !!,$$CJ^XLFSTR("Need AUT v 98.1.....AUT v "_X_" Present",IOM)
  1. I X<98.1,+X'=1.1 D SORRY(2)
  1. ;
  1. NEW DA,DIC
  1. S X="AUT",DIC="^DIC(9.4,",DIC(0)="",D="C"
  1. D IX^DIC
  1. I Y<0,$D(^DIC(9.4,"C","AUT")) D
  1. . W !!,*7,*7,$$CJ^XLFSTR("You Have More Than One Entry In The",IOM),!,$$CJ^XLFSTR("PACKAGE File with an ""AUT"" prefix.",IOM)
  1. . W !,$$CJ^XLFSTR(IORVON_"One entry needs to be deleted."_IORVOFF,IOM)
  1. . D SORRY(2)
  1. .Q
  1. ;
  1. I $G(XPDQUIT) W !,$$CJ^XLFSTR(IORVON_"FIX IT! Before Proceeding."_IORVOFF,IOM),!!,*7,*7,*7 Q
  1. ;
  1. W !!,$$CJ^XLFSTR("ENVIRONMENT OK.",IOM)
  1. ;
  1. D HELP^XBHELP("INTROE","AUT98P12")
  1. I '$$DIR^XBDIR("E","","","","","",1) D SORRY(2) Q
  1. ;
  1. I $G(XPDENV)=1 S (XPDDIQ("XPZ1"),XPDDIQ("XPZ2"))=0 D HELP^XBHELP("INTROI","AUT98P12")
  1. ;
  1. Q
  1. ;
  1. SORRY(X) ;
  1. KILL DIFQ
  1. S XPDQUIT=X
  1. W *7,!,$$CJ^XLFSTR("Sorry....FIX IT!",IOM)
  1. Q
  1. ;
  1. VCHK(AUTPRE,AUTVER,AUTQUIT) ; Check versions needed.
  1. ;
  1. NEW AUTV
  1. S AUTV=$$VERSION^XPDUTL(AUTPRE)
  1. W !,$$CJ^XLFSTR("Need at least "_AUTPRE_" v "_AUTVER_"....."_AUTPRE_" v "_AUTV_" Present",IOM)
  1. I AUTV<AUTVER D SORRY(AUTQUIT) Q 0
  1. Q 1
  1. ;
  1. PRE ;EP - From KIDS.
  1. ;
  1. ; --- Save, and set dd audit to "y" for effected files.
  1. I $$NEWCP^XPDUTL("PRE1-AUDS^AUT98P12","AUDS^AUT98P12")
  1. ;
  1. Q
  1. ;
  1. POST ;EP - From KIDS.
  1. ;
  1. D UNIQUEL
  1. ;
  1. ; --- Restore dd audit to pre-install values.
  1. I $$NEWCP^XPDUTL("POS1-AUDR^AUT98P12","AUDR^AUT98P12")
  1. ;
  1. ; --- Send install mail message.
  1. I $$NEWCP^XPDUTL("POS2-MAIL^AUT98P12","MAIL^AUT98P12")
  1. ;
  1. Q
  1. ;
  1. MAIL ;
  1. D BMES^XPDUTL("BEGIN Delivering MailMan message to select users...")
  1. NEW DIFROM,XMSUB,XMDUZ,XMTEXT,XMY
  1. KILL ^TMP("AUT98P12",$J)
  1. D RSLT(" --- AUT v 98.1, Patch 12, has been installed into this uci ---")
  1. F %=1:1 D RSLT($P($T(GREET+%),";",3)) Q:$P($T(GREET+%+1),";",3)="###"
  1. S %=0
  1. F S %=$O(^XTMP("XPDI",XPDA,"BLD",XPDBLD,1,%)) Q:'% D RSLT(^(%,0))
  1. S XMSUB=$P($P($T(+1),";",2)," ",3,99),XMDUZ=$S($G(DUZ):DUZ,1:.5),XMTEXT="^TMP(""AUT98P12"",$J,",XMY(1)="",XMY(DUZ)=""
  1. F %="XUMGR","XUPROG","XUPROGMODE" D SINGLE(%)
  1. D ^XMD
  1. KILL ^TMP("AUT98P12",$J)
  1. D MES^XPDUTL("END Delivering MailMan message to select users...")
  1. Q
  1. ;
  1. RSLT(%) S ^(0)=$G(^TMP("AUT98P12",$J,0))+1,^(^(0))=%
  1. Q
  1. ;
  1. SINGLE(K) ; Get holders of a single key K.
  1. NEW Y
  1. S Y=0
  1. Q:'$D(^XUSEC(K))
  1. F S Y=$O(^XUSEC(K,Y)) Q:'Y S XMY(Y)=""
  1. Q
  1. ;
  1. INTROE ; Intro text during KIDS Environment check.
  1. ;;In this distribution:
  1. ;;There are several adds/edits to AUT standard data dictionaries, as
  1. ;;well as to the entries within the files. The notes file for this
  1. ;;patch can be printed using KIDS option "3 Print Transport Global",
  1. ;;and the adds/edits for both the DDs and the entries can be listed
  1. ;;using KIDS option "4 Compare Transport Global to Current System".
  1. ;;Neither option will effect your system prior to install.
  1. ;;###
  1. ;
  1. INTROI ; Intro text during KIDS Install.
  1. ;;A standard message will be produced by this update.
  1. ;;
  1. ;;If you run interactively, results will be displayed on your screen,
  1. ;;as well as in the mail message and the entry in the INSTALL file.
  1. ;;If you queue to TaskMan, please read the mail message for results of
  1. ;;this update, and remember not to Q to the HOME device.
  1. ;;###
  1. ;
  1. GREET ;;To add to mail message.
  1. ;;
  1. ;;Greetings.
  1. ;;
  1. ;;You are receiving this message because of the particular RPMS
  1. ;;security keys that you hold. This is for your information, only.
  1. ;;You need do nothing in response to this message.
  1. ;;
  1. ;;Questions about this patch, which is a product of the RPMS DBA
  1. ;;(George T. Huggins, 520-670-4871), can be directed to the DIR/RPMS
  1. ;;Support Center, at 505-248-4371, or via e-mail to
  1. ;;"hqwhd@mail.ihs.gov". Please refer to patch "AUT*98.1*12".
  1. ;;
  1. ;;Requests for modifications or additions to RPMS standard data
  1. ;;dictionaries must be directed to the RPMS DBA.
  1. ;;
  1. ;;###;NOTE: This line indicates the end of text in this message.
  1. ;
  1. ; -----------------------------------------------------
  1. ; The global location for dictionary audit is:
  1. ; ^DD(FILE,0,"DDA")
  1. ; If the valuey is "Y", dd audit is on. Any other value, or the
  1. ; absence of the node, means dd audit is off.
  1. ; -----------------------------------------------------
  1. AUDS ; Save current settings, and SET dd auditing 'on'.
  1. D MES^XPDUTL("Saving current DD AUDIT settings for files in this patch")
  1. D MES^XPDUTL("and turning DD AUDIT to 'Y'.")
  1. S ^XTMP("AUT98P12",0)=$$FMADD^XLFDT(DT,10)_"^"_DT_"^"_$P($P($T(+1),";",2)," ",3,99)
  1. NEW AUT
  1. S AUT=0
  1. F S AUT=$O(^XTMP("XPDI",XPDA,"FIA",AUT)) Q:'AUT D
  1. . I '$D(^XTMP("AUT98P12",AUT,"DDA")) S ^XTMP("AUT98P12",AUT,"DDA")=$G(^DD(AUT,0,"DDA"))
  1. . D MES^XPDUTL(" File "_$$RJ^XLFSTR(AUT,12)_" - "_$$LJ^XLFSTR(^XTMP("XPDI",XPDA,"FIA",AUT),30)_"- DD audit was '"_$G(^XTMP("AUT98P12",AUT,"DDA"))_"'"),MES^XPDUTL($$RJ^XLFSTR("Set to 'Y'",69))
  1. . S ^DD(AUT,0,"DDA")="Y"
  1. .Q
  1. D MES^XPDUTL("DD AUDIT settings saved in ^XTMP(.")
  1. Q
  1. ; -----------------------------------------------------
  1. AUDR ; Restore the file data audit values to their original values.
  1. D MES^XPDUTL("Restoring DD AUDIT settings for files in this patch")
  1. NEW AUT
  1. S AUT=0
  1. F S AUT=$O(^XTMP("AUT98P12",AUT)) Q:'AUT D
  1. . S ^DD(AUT,0,"DDA")=^XTMP("AUT98P12",AUT,"DDA")
  1. . D MES^XPDUTL(" File "_$$RJ^XLFSTR(AUT,12)_" - "_$$LJ^XLFSTR($$GET1^DID(AUT,"","","NAME"),30)_"- DD AUDIT Set to '"_^DD(AUT,0,"DDA")_"'")
  1. .Q
  1. KILL ^XTMP("AUT98P12")
  1. D MES^XPDUTL("DD AUDIT settings restored.")
  1. Q
  1. ; -----------------------------------------------------
  1. ;
  1. UNIQUEL ;----- LOOP THRU LOCATION FILE AND POPULATE UNIQUE RPMS DB ID FIELD
  1. ;
  1. N DIU,IEN,X,Y
  1. ;
  1. D BMES^XPDUTL("Populating UNIQUE RPMS DB ID field in LOCATION file")
  1. ;
  1. S IEN=0
  1. F S IEN=$O(^AUTTLOC(IEN)) Q:'IEN D UNIQUE1(IEN)
  1. ;
  1. ;----- DELETE SCRATCH LOCATION FILE
  1. ;
  1. S DIU="^AUTT999(8008699.06,"
  1. S DIU(0)="D"
  1. D EN^DIU2
  1. Q
  1. UNIQUE1(IEN) ;
  1. ;----- PROCESS ONE ENTRY
  1. ;
  1. N ASUFAC,D0,DATA,IEN2,NAME,UNIQUE,X,Y
  1. ;
  1. S NAME=$P($G(^DIC(4,IEN,0)),U)
  1. S D0=IEN
  1. X $P($G(^DD(9999999.06,.0799,0)),U,5,999)
  1. Q:X']""
  1. Q:$L(X)'=6
  1. S ASUFAC=X
  1. S IEN2=0
  1. S IEN2=$O(^AUTT999(8008699.06,"D",ASUFAC,IEN2))
  1. Q:'IEN2
  1. S DATA=$G(^AUTT999(8008699.06,IEN2,0))
  1. Q:DATA']""
  1. ;Q:NAME'=$P(DATA,U,2)
  1. Q:ASUFAC'=$P(DATA,U,3)
  1. S UNIQUE=$P(DATA,U,4)
  1. Q:'UNIQUE
  1. Q:$D(^AUTTLOC("F",UNIQUE))
  1. D UNIQUEA(IEN,UNIQUE)
  1. Q
  1. UNIQUEA(IEN,UNIQUE) ;
  1. ;----- EDIT ONE ENTRY
  1. ;
  1. N DA,DIE,DR,X,Y
  1. ;
  1. S DIE="^AUTTLOC("
  1. S DA=IEN
  1. S DR=".32///^S X=UNIQUE"
  1. D ^DIE
  1. Q