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

DVB4049P.m

Go to the documentation of this file.
  1. DVB4049P ;ALB/ERC - CHANGE IP ADDR FOR HINQ TO VBA CORPORATE ; 9/1/05 1:46pm
  1. ;;4.0;HINQ;**49**;03/25/92
  1. ;
  1. ;this routine will change the IP address for the HINQ inquiries
  1. ;to the address for the AAC interface engine, which will communicate
  1. ;with the new VBA corporate database in addition to the C&P and BIRLS
  1. ;databases. There will be only one address for all sites. This is
  1. ;being done for the HINQ replacement, interim solution.
  1. ;this routine will also add three entries into the Anatomical - Loss
  1. ;Code file (#395.2) in the POST subroutine
  1. ;
  1. D ADDR
  1. D POST
  1. Q
  1. ;
  1. ADDR ;
  1. N DVBADD,DVBFDA,DVBMSG,DVBNEW,DVBOLDAD,DVBSTA,X,X1,X2
  1. K ^XTMP("DVBBACK")
  1. S DVBSTA=$O(^DVB(395,0))
  1. I '$D(DVBSTA)!($G(DVBSTA)']"") S DVBMSG="HINQ Parameter file (#395) not set properly." G MSG
  1. I '$D(^DVB(395,DVBSTA,0)) S DVBMSG="HINQ Parameter file (#395) not set properly." G MSG
  1. ;new AAC server address DVB*4*49
  1. S X1=DT,X2=30 D C^%DTC
  1. S ^XTMP("DVBBACK",0)=X_"^"_$$NOW^XLFDT_"^DVB*4*49 - HINQ REPLACEMENT PATCH"
  1. S DVBOLDAD=$$GET1^DIQ(395,1,22)
  1. I $G(DVBOLDAD)']"" S DVBOLDAD="Not populated."
  1. S ^XTMP("DVBBACK","OLDIP")=DVBOLDAD
  1. S DVBADD="127.0.0.1"
  1. S DVBFDA(395,"1,",22)=DVBADD
  1. D FILE^DIE("E","DVBFDA")
  1. S DVBNEW=$G(^DVB(395,DVBSTA,"HQIP"))
  1. I $G(DVBNEW)'=DVBADD S DVBMSG="Address change not successful - update manually." G MSG
  1. S DVBMSG="IP address successfully updated to "_DVBADD_"." D MSG
  1. S DVBMSG="Previous IP address was "_DVBOLDAD_"." D MSG
  1. Q
  1. MSG ;add message to the KIDS build
  1. D BMES^XPDUTL(.DVBMSG)
  1. Q
  1. ;
  1. ;need to add three entries into file 395.2 (Anat-Loss Code file)
  1. ;this is patterned after DVB448PT
  1. POST ;entry point for post-install, setting up checkpoints
  1. N %
  1. S %=$$NEWCP^XPDUTL("DVBLINE","EN^DVB4049P",1)
  1. Q
  1. ;
  1. EN ;begin processing
  1. ;
  1. N DVBLINE
  1. ;
  1. D BMES^XPDUTL(" >> *** Updating ANATOMICAL-LOSS CODE file (#395.2)")
  1. D MES^XPDUTL(" ")
  1. ;
  1. ;get value from checkpoints, previous run
  1. S DVBLINE=+$$PARCP^XPDUTL("DVBLINE")
  1. ;
  1. DVBNEW ;add new codes or modify name if code is in use
  1. ;
  1. F DVBI=DVBLINE:1 S DVBJ=$P($T(NEWCODE+DVBI),";;",2) Q:DVBJ["$EXIT" D
  1. .S DVBCODE=+DVBJ,DVBLINE=DVBI
  1. .S DVBDESC=$E($P(DVBJ,"^",2),1,30)
  1. .;
  1. .;add new code
  1. .I '$D(^DVB(395.2,"B",DVBCODE)) D G UPDATECH
  1. ..K DD,DO
  1. ..S DIC="^DVB(395.2,",DIC(0)="L",DIC("DR")="1////"_DVBDESC
  1. ..S X=$P(DVBJ,U),DLAYGO=31
  1. ..D FILE^DICN
  1. ..D MES^XPDUTL("adding new code - "_X)
  1. ..K DLAYGO,DIC,X
  1. ..Q
  1. .;
  1. .;modify name
  1. .S DVBIEN=+$O(^DVB(395.2,"B",DVBCODE,0))
  1. .S DVBREC=$G(^DVB(395.2,DVBIEN,0)),DVBOLDSC=$P(DVBREC,U,2) I DVBREC']"" D G UPDATECH
  1. ..D MES^XPDUTL(" >>>> error "_DVBCODE_" in B x-reference and not in file 395.2")
  1. ..Q
  1. .S DVBOLDC=$P(DVBREC,"^") I DVBOLDC=DVBCODE,(DVBOLDSC=DVBDESC) G UPDATECH
  1. .I DVBOLDC'=DVBCODE D
  1. ..S DA=DVBIEN,DIE="^DVB(395.2,",DR=".01////"_DVBCODE_";1////"_DVBDESC
  1. ..D ^DIE
  1. ..K DR,DA,DIE
  1. .I DVBOLDSC'=DVBDESC D
  1. ..S DA=DVBIEN,DIE="^DVB(395.2,",DR="1////"_DVBDESC
  1. ..D ^DIE
  1. ..K DA,DIE,DR
  1. ..D MES^XPDUTL(DVBCODE_": changing description...")
  1. ..D MES^XPDUTL(" from: "_DVBOLDSC)
  1. ..D MES^XPDUTL(" to: "_DVBDESC)
  1. .;
  1. UPDATECH .;update checkpoint
  1. .S %=$$UPCP^XPDUTL("DVBLINE",DVBLINE)
  1. .Q
  1. K DVBCODE,DVBI,DVBIEN,DVBJ,DVBNAME,DVBOLDC,DVBOLDN,DVBREC,DVBDESC,DVBOLDSC
  1. Q
  1. ;
  1. NEWCODE ;codes to be added or changed
  1. ;;16^Deafness, Total
  1. ;;17^Aphonia
  1. ;;29^Deafnessand Aphonia
  1. ;;$EXIT
  1. Q