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

PRCHCORE.m

Go to the documentation of this file.
PRCHCORE ;WISC/DJM-CORRECT ESIG #5 ;9/23/94  2:40 PM
V ;;5.1;IFCAP;;Oct 20, 2000
 ;Per VHA Directive 10-93-142, this routine should not be modified.
 ;
 ;THIS CORRECTION ROUTINE WILL RECODE THE ESIG AT FIELD 16.5
 ;IN FILE 442.  THIS WILL ALLOW A VERSION 4 PO TO HAVE MORE
 ;THEN ONE VERSION 5 AMENDMENT.
 ;
FIX N PO,PODATE,AMEND,AMEND3,COUNT,CHECKSUM,MESG1
 S PODATE=2931000 F  S PODATE=$O(^PRC(442,"AB",PODATE)) Q:PODATE'>0  Q:PODATE>2940800  S PO=0 F  S PO=$O(^PRC(442,"AB",PODATE,PO)) Q:PO'>0  D
 .S AMEND=$G(^PRC(442,PO,6,0)) Q:AMEND=""
 .S (AMEND,COUNT)=0 F  S AMEND=$O(^PRC(442,PO,6,AMEND)) Q:AMEND'>0  D  Q:COUNT
 ..S AMEND3=$G(^PRC(442,PO,6,AMEND,3,1,0)) Q:AMEND3=""  D  Q
 ...S (CHECKSUM,MESG1)="" D RECODE^PRCHES5(PO,CHECKSUM,.MESG1) S COUNT=1
 ...I MESG1'=1 W !,"The ESIG for PO number "_$P($G(^PRC(442,PO,0)),U)_" did not RECODE correctly."
 ...Q
 ..Q
 .Q
 Q