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

RCFMCAF.m

Go to the documentation of this file.
  1. RCFMCAF ;WASH-ISC@ALTOONA,PA/RB-CONVERSION AR ACCTG FIELDS RPT ;8/9/95 11:12 AM
  1. V ;;4.5;Accounts Receivable;**14**;Mar 20, 1995
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. EN ;Creates report from CAF data in file 423.6
  1. W !!,"This option will take the Conversion AR Fields (CAF) data from",!
  1. W "the FMS file (#423.6) and put them in their proper AR file entries."
  1. W !,"Afterwards, a list will be transmitted to the G.FMS mail group"
  1. W !,"showing FMS bills entered into the AR file and FMS bills that are"
  1. W !,"not in the AR file, if any.",! N DIR,Y,ZTDESC,ZTIO,ZTRTN
  1. S DIR(0)="YO",DIR("A")="Are you sure you want to do this",DIR("B")="NO"
  1. D ^DIR Q:Y'=1 S ZTRTN="EN2^RCFMCAF",ZTDESC="Conversion AR Fields Rpt."
  1. S ZTIO="" D ^%ZTLOAD Q
  1. ;
  1. EN2 N A0,A1,A2,A3,BN,C1,C2,DA,DIE,DR,LN,ND,SP,X K ^TMP($J),^TMP("RJ",$J)
  1. S C1=3,C2=0,$P(LN,"=",79)="=",$P(SP," ",30)=" "
  1. S A0="CAF-" F S A0=$O(^PRCF(423.6,"B",A0)) Q:A0=""!(A0'["CAF-") S A1=$O(^PRCF(423.6,"B",A0,0)) I $D(^PRCF(423.6,A1,0)) D
  1. .S A2=0 F S A2=$O(^PRCF(423.6,A1,1,A2)) Q:+A2=0 I ^(A2,0)["CAF^" D
  1. ..S ND=^PRCF(423.6,A1,1,A2,0),X=$P(ND,U,4),BN=$E(X,1,3)_"-"_$E(X,4,10),A3=+$O(^PRCA(430,"B",BN,0))
  1. ..I $D(^PRCA(430,A3,0)) S C1=C1+1,^TMP($J,C1)="Bill #: "_BN_SP_"Amount: "_$J($P(ND,U,6),0,2)
  1. ..I S DA=A3,DIE="^PRCA(430,",DR="[RCFM CAF FILE ENTRIES]" D ^DIE
  1. ..I '$D(^PRCA(430,A3,0)) S C2=C2+1,^TMP("RJ",$J,C2)="Bill #: "_BN_SP_"Amount: "_$J($P(ND,U,6),0,2)
  1. I '$D(^TMP($J)),'$D(^TMP("RJ",$J)) S ^TMP($J,1)="There are no CAF entries in the FMS file (#423.6)." G XM
  1. I $D(^TMP($J)) S ^TMP($J,1)=LN,^TMP($J,2)="The following FMS bills have been entered into the AR file: ",^TMP($J,3)=LN
  1. I $D(^TMP("RJ",$J)) D
  1. .S C1=C1+1,^TMP($J,C1)=LN,C1=C1+1,^TMP($J,C1)="The following FMS bills are NOT in AR: ",C1=C1+1,^TMP($J,C1)=LN
  1. .S A0=0 F S A0=$O(^TMP("RJ",$J,A0)) Q:+A0=0 S C1=C1+1,^TMP($J,C1)=^TMP("RJ",$J,A0) K ^TMP("RJ",$J,A0)
  1. XM N XMSUB,XMTEXT,XMY S XMY("G.FMS")="",XMSUB="CONVERSION AR FIELDS LIST"
  1. S XMTEXT="^TMP($J," D ^XMD K ^TMP($J),^TMP("RJ",$J) Q