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

RCRCEL.m

Go to the documentation of this file.
  1. RCRCEL ;WASH@ALTOONA/LDB/CMS - RCRC TRANSMISISON LOG ; 27-MAR-1998
  1. V ;;4.5;Accounts Receivable;**63**;Mar 20, 1995
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified
  1. EN ; -- main entry point for RCRC TRANSMISSION LOG
  1. W !!,?3,"Building Transmission Log list ......."
  1. D EN^VALM("RCRC TRANSMISSION LOG")
  1. Q
  1. ;
  1. HDR ; -- header code
  1. S VALMHDR(1)=" Regional Counsel"
  1. S VALMHDR(2)=" Transmission Message Handler"
  1. I +$G(VALMCNT)=0 S VALMSG="NO MESSAGES FOUND"
  1. Q
  1. ;
  1. INIT ; -- init variables and list array
  1. N RCBN0,RCBN2,RCCNT,RCDATE,RCCOM,RCNT,RCX,RCY,X,Y
  1. K ^TMP("RCRCE",$J),^TMP("RCRCEX",$J)
  1. ;
  1. REQ ;Reverse order of entries entry for Resequenceing
  1. S RCY=0 F S RCY=$O(^RCT(349.3,RCY)) Q:'RCY D
  1. .S ^TMP("RCRCE",$J,"D",9999999.999999-+$G(^RCT(349.3,RCY,2)),99999999999-RCY)=RCY
  1. I '$O(^TMP("RCRCE",$J,"D",0)) S VALMCNT=0 G INITQ
  1. ;
  1. ;Set "B" to new order
  1. S (RCDATE,RCCNT)=0 F S RCDATE=$O(^TMP("RCRCE",$J,"D",RCDATE)) Q:'RCDATE D
  1. .S RCX=0 F S RCX=$O(^TMP("RCRCE",$J,"D",RCDATE,RCX)) Q:'RCX D
  1. ..S RCCNT=RCCNT+1
  1. ..S ^TMP("RCRCE",$J,"B",RCCNT)=^TMP("RCRCE",$J,"D",RCDATE,RCX)
  1. K ^TMP("RCRCE",$J,"D")
  1. ;
  1. ;Set data in TMP
  1. S (RCCNT,VALMCNT)=0 F S RCCNT=$O(^TMP("RCRCE",$J,"B",RCCNT)) Q:'RCCNT D
  1. .S RCY=^TMP("RCRCE",$J,"B",RCCNT),VALMCNT=VALMCNT+1
  1. .S RCBN0=$G(^RCT(349.3,+RCY,0)),RCBN2=$G(^RCT(349.3,+RCY,2))
  1. .S (RCNT,RCX)=0 K RCCOM F S RCX=$O(^RCT(349.3,+RCY,3,RCX)) Q:'RCX D
  1. ..I $G(^RCT(349.3,+RCY,3,RCX,0))]"" S RCNT=RCNT+1,RCCOM(RCNT)=$E(^(0),1,80)
  1. .S X="",X=$$SETFLD^VALM1(RCCNT,X,"NUMBER")
  1. .S RCX=$S($P(RCBN0,U,2)]"":$E($P(RCBN0,U,2),1,42),1:"No Subject"),X=$$SETFLD^VALM1(RCX,X,"SUBJECT")
  1. .S X=$$SETFLD^VALM1(+RCBN0,X,"MM#")
  1. .S RCX=$$FMTE^XLFDT(+RCBN2,"5ZD"),X=$$SETFLD^VALM1(RCX,X,"DATE")
  1. .S RCX=$$FMTE^XLFDT(+$G(^RCT(349.3,+RCY,4)),"5ZD"),X=$$SETFLD^VALM1(RCX,X,"PDATE")
  1. .S ^TMP("RCRCE",$J,VALMCNT,0)=X
  1. .S ^TMP("RCRCE",$J,"IDX",VALMCNT,RCCNT)=""
  1. .S ^TMP("RCRCEX",$J,RCCNT)=VALMCNT_U_RCY
  1. .S VALMCNT=VALMCNT+1
  1. .S ^TMP("RCRCE",$J,VALMCNT,0)=" Sender: "_$P($G(RCBN0),U,3)_" Recipient: "_$P($G(RCBN0),U,4)
  1. .S ^TMP("RCRCE",$J,"IDX",VALMCNT,RCCNT)=""
  1. .S RCX=0 F S RCX=$O(RCCOM(RCX)) Q:'RCX D
  1. ..S VALMCNT=VALMCNT+1
  1. ..S ^TMP("RCRCE",$J,VALMCNT,0)=$S(RCX=1:" Comment: ",1:" ")_RCCOM(RCX)
  1. ..S ^TMP("RCRCE",$J,"IDX",VALMCNT,RCCNT)=""
  1. .D FLDCTRL^VALM10(VALMCNT)
  1. INITQ Q
  1. ;
  1. HELP ; -- help code
  1. S X="?" D DISP^XQORM1 W !!
  1. Q
  1. ;
  1. EXIT ; -- exit code
  1. K ^TMP("RCRCE",$J),^TMP("RCRCEX",$J)
  1. K RCOUT,VALMBCK,VALMSG,VALMCNT
  1. D CLEAN^VALM10,CLEAR^VALM1
  1. Q
  1. ;
  1. EXPND ; -- expand code
  1. Q
  1. ;RCRCEL