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

RCFMPUR.m

Go to the documentation of this file.
  1. RCFMPUR ;WASH-ISC@ALTOONA,PA/RGY-Purge AR Documents to FMS ;9/28/94 2:09 PM
  1. V ;;4.5;Accounts Receivable;**270**;Mar 20, 1995;Build 25
  1. ;;Per VHA Directive 2004-038, this routine should not be modified.
  1. EN ;
  1. NEW %DT,PURDT,DATE
  1. S X="T-34" D ^%DT S PURDT=Y
  1. S DATE=0 F S DATE=$O(^RC(347,"AD",DATE)) Q:DATE>PURDT!'DATE S DOC=0 F S DOC=$O(^RC(347,"AD",DATE,DOC)) Q:'DOC D
  1. .S STAT=$P($G(^RC(347,DOC,0)),"^",3)
  1. .I ",0,1,3,"[(","_STAT_",") Q
  1. .D DEL(DOC)
  1. .Q
  1. Q
  1. DEL(DOC) ;Delete an FMS document
  1. NEW DIK,DA,STA,N0
  1. I $G(DOC)'?1N.N Q
  1. S N0=$G(^RC(347,DOC,0))
  1. I N0="" Q
  1. ; PRCA*4.5*270 this code was prefacing the Doc ID with a "BD-" even though that already existed in the DOC ID
  1. ;S STA=$P($G(^RC(347.1,+$P(N0,"^",2),0)),"^",2)_"-"_$P(N0,"^",9)_$E(" ",1,11-$L($P(N0,"^",9)))_$S($P(N0,"^",10)]"":"-"_$P(N0,"^",10),1:"")
  1. I $E($P(N0,"^",9),1,2)'?2A S STA=$P($G(^RC(347.1,+$P(N0,"^",2),0)),"^",2)_"-"_$P(N0,"^",9)_$E(" ",1,11-$L($P(N0,"^",9)))_$S($P(N0,"^",10)]"":"-"_$P(N0,"^",10),1:"")
  1. I $E($P(N0,"^",9),1,2)?2A S STA=$P(N0,"^",9)_$E(" ",1,11-$L($P(N0,"^",9)))_$S($P(N0,"^",10)]"":"-"_$P(N0,"^",10),1:"")
  1. D KILLCS^GECSSDCT(STA)
  1. S DA=DOC,DIK="^RC(347," D ^DIK
  1. Q