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

DVB442PT.m

Go to the documentation of this file.
  1. DVB442PT ;ALB/ZJF POST-INSTALL FOR PATCH DVB*4*42
  1. ;;4.0;HINQ;**42**;03/25/92
  1. ;
  1. ;This routine will be run as a post-installation for patch DVB*4*42.
  1. ;This routine will add three new disability codes to the DISABILITY
  1. ;CONDITION file (#31).
  1. ;
  1. POST ;entry point for post-install, setting up checkpoints
  1. N %
  1. S %=$$NEWCP^XPDUTL("DVBLINE","EN^DVB442PT",1)
  1. Q
  1. ;
  1. EN ;begin processing
  1. ;
  1. N DVBLINE
  1. ;
  1. D BMES^XPDUTL(" >> *** Updating DISABILITY CONDITION file (#31)")
  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,DVBNAME=$E($P(DVBJ,"^",2),1,45),DVBLINE=DVBI
  1. .S DVBDESC=$E($P(DVBJ,"^",3),1,200)
  1. .;
  1. .;add new code
  1. .I '$D(^DIC(31,"C",DVBCODE)) D G UPDATECH
  1. ..K DD,DO
  1. ..S DIC="^DIC(31,",DIC(0)="L",DIC("DR")="2////"_DVBCODE_";10////"_DVBDESC
  1. ..S X=DVBNAME,DLAYGO=31
  1. ..D FILE^DICN
  1. ..D MES^XPDUTL(DVBCODE_": adding "_DVBCODE_" "_X)
  1. ..K DLAYGO,DIC,X
  1. ..Q
  1. .;
  1. .;modify name
  1. .S DVBIEN=+$O(^DIC(31,"C",DVBCODE,0))
  1. .S DVBREC=$G(^DIC(31,DVBIEN,0)),DVBOLDSC=$G(^DIC(31,DVBIEN,1)) I DVBREC']"" D G UPDATECH
  1. ..D MES^XPDUTL(" >>>> error "_DVBCODE_" in C x-reference and not in file 31")
  1. ..Q
  1. .S DVBOLDN=$P(DVBREC,"^") I DVBOLDN=DVBNAME&(DVBOLDSC=DVBDESC) G UPDATECH
  1. .S DA=DVBIEN,DIE="^DIC(31,",DR=".01////"_DVBNAME_";10////"_DVBDESC
  1. .D ^DIE
  1. .K DR,DA,DIE
  1. .I DVBOLDN'=DVBNAME D
  1. ..D MES^XPDUTL(DVBCODE_": changing name from "_DVBOLDN)
  1. ..D MES^XPDUTL(" to "_DVBNAME)
  1. .I DVBOLDSC'=DVBDESC D
  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,DVBOLDN,DVBREC,DVBDESC,DVBOLDSC
  1. Q
  1. ;
  1. NEWCODE ;codes to be added or changed
  1. ;;5230^LIMITATION ON MOTION, RING OR LITTLE FINGER^LIMITATION ON MOTION, RING OR LITTLE FINGER
  1. ;;7829^CHLORACNE^CHLORACNE
  1. ;;7820^INFECTIONS OF THE SKIN^INFECTIONS OF THE SKIN
  1. ;;$EXIT
  1. Q