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

DGBT1POS.m

Go to the documentation of this file.
  1. DGBT1POS ;ALB/LEB - Post-install of DGBT v1.0 ;[ 11/21/01 13:20 pm]
  1. ;;1.0;Beneficiary Travel;;Jun 25, 2001
  1. ;
  1. ; Update PACKAGE (#2) File fields not updated by the KIDS install.
  1. ; Used for documentation purposes.
  1. ;
  1. D BMES^XPDUTL(" ")
  1. D MES^XPDUTL(" Updating PACKAGE File...")
  1. ;
  1. PKG ; Retrieve 'DGBT' Package name
  1. ; Get Package IEN
  1. D FIND^DIC(9.4,"","@;1","P","DGBT","","C","","","DGBTARRY")
  1. S (DGBTI,DGBTIEN)=0
  1. F S DGBTI=$O(DGBTARRY("DILIST",DGBTI)) Q:'DGBTI D
  1. . Q:$P($G(DGBTARRY("DILIST",DGBTI,0)),"^",2)'="DGBT"
  1. . S DGBTIEN=$P($G(DGBTARRY("DILIST",DGBTI,0)),"^",1)
  1. I 'DGBTIEN D G EXIT
  1. . D BMES^XPDUTL(" ")
  1. . D MES^XPDUTL(" No PACKAGE entry defined - Cannot update!")
  1. ;
  1. UPD ; - Update fields not updated by the KIDS install.
  1. ; fields:
  1. ; Short Description (#2); required field
  1. ; Description (#3) ; word processing field
  1. ; File (#6) ; multiple
  1. ; Fields ; multiple
  1. ;
  1. ; - Replace Short Description (#2) field.
  1. K FDATA S FDATA(9.4,DGBTIEN_",",2)="Beneficiary Travel"
  1. D FILE^DIE("E","FDATA","ERR")
  1. D BMES^XPDUTL(" ")
  1. D MES^XPDUTL(" SHORT DESCRIPTION field complete.")
  1. K FDATA,ERR
  1. ;
  1. ; - Replace Description (#3) field. Leave blank.
  1. D WP^DIE(9.4,DGBTIEN_",",3,"K","")
  1. D BMES^XPDUTL(" ")
  1. D MES^XPDUTL(" DESCRIPTION field complete.")
  1. ;
  1. FILE ; - Replace File (#9.44) field.
  1. ; first remove (delete) existing fields.
  1. N DIC K DGBTARRY
  1. D LIST^DIC(9.44,","_DGBTIEN_",","@;.01","P","","","","","","","DGBTARRY")
  1. S (DGBTII,DGBTFIL)=0
  1. F S DGBTII=$O(DGBTARRY("DILIST",DGBTII)) Q:'DGBTII D
  1. . S DGBTFIEN=$P(DGBTARRY("DILIST",DGBTII,0),"^",1)
  1. . S DIE="^DIC(9.4,",DA(1)=DGBTIEN,DIE=DIE_DA(1)_",4,"
  1. . S DA=+DGBTFIEN,DR=".01///@" D ^DIE
  1. ; after old entries deleted, add current File entries
  1. F X="43","43.1","392","392.1","392.2","392.3","392.4" D
  1. . S DIC="^DIC(9.4,",DA(1)=DGBTIEN
  1. . S DIC=DIC_DA(1)_",4,",DIC(0)="L",DIC("P")=$P(^DD(9.4,6,0),"^",2)
  1. . D ^DIC
  1. D BMES^XPDUTL(" ")
  1. D MES^XPDUTL(" FILE field complete.")
  1. ; - Add fields.
  1. FLDS ; Add FIELD entries to File entries #43, #43.1
  1. ; Add ASSIGN A VERSION NUMBER? entries to File entries #392-392.4
  1. S DIC="^DIC(9.4,",DA(1)=DGBTIEN,DIC(0)="X"
  1. S DIC=DIC_DA(1)_",4,",DIC("P")=$P(^DD(9.4,6,0),"^",2)
  1. F X="43","43.1","392","392.1","392.2","392.3","392.4" D
  1. . D ^DIC
  1. . S DIE=DIC,DA=+Y
  1. . I X=43 F FLD=720,721,722 S DR="2///"_FLD D ^DIE
  1. . I X=43.1 F FLD=30.01,30.02,30.03,30.04,30.05 S DR="2///"_FLD D ^DIE
  1. . I X[392 S DR="222.2///Y" D ^DIE
  1. D BMES^XPDUTL(" ")
  1. D MES^XPDUTL(" FIELD field complete.")
  1. ;
  1. XPREF ; Add 'DGBTZ' entry to the EXCLUDED NAME SPACE (#919) field.
  1. S DIC="^DIC(9.4,",DA(1)=DGBTIEN
  1. S DIC=DIC_DA(1)_",""EX"",",DIC(0)="L",DIC("P")=$P(^DD(9.4,919,0),"^",2)
  1. S X="DGBTZ" D ^DIC
  1. ;
  1. EXIT K DIC,DIE,DGBTII,DGBTFIL,DGBTFIEN,DGBTIEN,X,DA,DGBTARRY
  1. Q