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

PRCAI217.m

Go to the documentation of this file.
  1. PRCAI217 ;ALB/CXW - PRCA*4.5*217 POST-INIT ROUTINE
  1. ;;4.5;Accounts Receivable;**217**;Mar 20, 1995
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. Q
  1. EN ;convert the data stored in the global DISV(DUZ,"RCDPRPLM") file to the
  1. ;AR USER CUSTOMIZE file (#342.3).
  1. ;^RC(342.3,da,0)=screen/options
  1. ;^RC(342.3,da,1,da(1),0)=duz^selection^device
  1. ;
  1. N RCDUZ,RCSNOPT,RCREC,RCSEL,RCDEV,U,DA,X,DIC,DIE,DR
  1. W !
  1. W "PRCA*4.5*217 Post Install......",!
  1. W "Converting the data stored in the ^DISV(DUZ,""RCDPRPLM"") global to",!
  1. W "the AR USER CUSTOMIZE file (#342.3)."
  1. S RCDUZ=0,U="^"
  1. F S RCDUZ=$O(^DISV(RCDUZ)) Q:'RCDUZ I $D(^DISV(RCDUZ,"RCDPRPLM")) D
  1. .S RCSNOPT=""
  1. .L +^DISV(RCDUZ,"RCDPRPLM"):5
  1. .F S RCSNOPT=$O(^DISV(RCDUZ,"RCDPRPLM",RCSNOPT)) Q:RCSNOPT="" D
  1. ..S RCREC=$G(^DISV(RCDUZ,"RCDPRPLM",RCSNOPT))
  1. ..I '$D(^RC(342.3,"B",RCSNOPT)) D
  1. ...K DD,DO,DIC("DR") S DIC="^RC(342.3,",DIC(0)="",X=RCSNOPT
  1. ...D FILE^DICN
  1. ..S RCSEL=$S(RCSNOPT="215REPORT":"",1:$P(RCREC,U))
  1. ..S RCDEV=$S(RCSNOPT="RECEIPT":$P(RCREC,U,2),RCSNOPT="215REPORT":$P(RCREC,U),1:"")
  1. ..S DA(1)=$O(^RC(342.3,"B",RCSNOPT,0))
  1. ..;if new then add entry
  1. ..I '$D(^RC(342.3,DA(1),1,"B",RCDUZ)) D Q
  1. ...S DIC(0)="",DIC("P")=$P(^DD(342.3,1,0),U,2)
  1. ...S DIC="^RC(342.3,"_DA(1)_",1,"
  1. ...S X=RCDUZ
  1. ...S DIC("DR")="1////"_RCSEL_";2////"_RCDEV
  1. ...K DD,DO D FILE^DICN
  1. ...;
  1. ..;if existing then edit entry
  1. ..S DA=$O(^RC(342.3,DA(1),1,"B",RCDUZ,0)),DR=".01////"_RCDUZ_";1////"_RCSEL_";2////"_RCDEV
  1. ..S DIE="^RC(342.3,"_DA(1)_",1," D ^DIE
  1. .W "."
  1. .L -^DISV(RCDUZ,"RCDPRPLM")
  1. W "Done!"
  1. Q