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

BARRQ2.m

Go to the documentation of this file.
BARRQ2 ; IHS/SD/TPF - Re-queue A/R Transactions for UFMS export ;
 ;;1.8;IHS ACCOUNTS RECEIVABLE;**22**;OCT 26,2005;Build 38
MSG ;EP
 W !!,"This option should only be run by OIT!"
 W !,"The user will be given a variety of ways to requeue A/R Transactions"
 W !,"to go to UFMS.  This should be done with EXTREME caution, as erroneous"
 W !,"or duplication of transaction will cause errors at UFMS."
 W !,"PLEASE contact OIT if you have any questions."
 Q
INDPAT(BARTRIEN) ;EP - IS BEN OR NO INS TYP
 S BARTR0=$G(^BARTR(DUZ(2),BARTRIEN,0))
 S BARBL=$P(BARTR0,U,4)
 I BARBL="" D  Q 1
 .W !,"NO BILL FOUND FOR THIS TX!"
 S BAR(0)=$G(^BARBL(DUZ(2),BARBL,0))
 S BARAC=$P(BAR(0),U,3)  ;A/R Account IEN
 S BARITYP=$$GET1^DIQ(90050.02,BARAC,1.08)  ;Ins Typ
 Q BARITYP=""!(BARITYP="INDIAN PATIENT")
 Q
 ;
RESEND(UDUZ,SESSID,BARTRIEN) ;EP - ADD TO NEW CASHIER SESS
 ;COPY EXISTING DAT INTO TMP
 I SESSID'="",UDUZ'="" D
 .S ^TMP($J,BARRNAM,BARRQDT,20,"BARSESS",BARTRIEN,SESSID,110102,1)=UDUZ
 .S ^TMP($J,BARRNAM,BARRQDT,20,"BARSESS",BARTRIEN,SESSID,110102,2)=$G(^BARSESS(DUZ(2),UDUZ,11,SESSID,2,BARTRIEN,0))
 .S ^TMP($J,BARRNAM,BARRQDT,20,"BARSESS",BARTRIEN,SESSID,210101)=$G(^BARSESS(DUZ(2),UDUZ,21,SESSID,2,1,0))
 .S ^TMP($J,BARRNAM,BARRQDT,20,"BARSESS",BARTRIEN,SESSID,6)=$G(^BARTR(DUZ(2),BARTRIEN,6))
 Q
 ;
CLRSESS ;CLEAR THE SESS TRANSMISSION DATA
 D SAVE^BARRQ1  ;SAVE ORIGINAL DATA BEFORE RE-Q
 I $D(^BARSESS(DUZ(2),UDUZ,11,SESSID,2,BARTRIEN)) D
 .Q:'UDUZ
 .Q:'SESSID
 .K DIR,DIE,DIC,DA,DR
 .S DA(2)=UDUZ
 .S DA(1)=SESSID
 .S DA=BARTRIEN
 .S DIE="^BARSESS(DUZ(2),"_DA(2)_",11,"_DA(1)_",2,"
 .S DR=".04///@;.05////@;.06///@"
 .D ^DIE
 .K DIR,DIE,DIC,DA,DR
 Q
 ;
CLEARTX ;EP - CLEAR THE A/R TRANS TRANSMISSION DATA
 I $G(BARSAVE)'=1 D SAVE^BARRQ1
 I $D(^BARTR(DUZ(2),BARTRIEN,6)) D
 .S DA=BARTRIEN
 .S DIE="^BARTR(DUZ(2),"
 .S DR="601///@;602////@;603///@;604///@"
 .D ^DIE
 .K DIR,DIE,DIC,DA,DR
 Q
SESSLOG ;EP - ADD TX DATA TO NEW/OPEN CASHIER SESS
 ;CHECK FOR ALL REQ'D DATA THEN CALL TRANTRIG!
 S X=$$TRANTRIG^BARUFUT(NEWDUZ,NEWSESS,BARTRIEN)
 S FLAG=1
 S BARBLIEN=$P($G(^BARTR(DUZ(2),BARTRIEN,0)),U,4)  ;A/R BILL IEN
 S:BARBLIEN BARBILL=$P($G(^BARBL(DUZ(2),BARBLIEN,0)),U)  ;A/R BILL
 S BARCNTS=BARCNTS+1  ;CNT TX ADDED TO SESS
 S BARMSG2=""
 S BARMSG1=BARTRIEN_" RE-QUEUED IN CASHIER SESSION: "_NEWSESS_" FOR USER: "_$G(NEWUSRNM)
 I $G(SESSXMT)'["TRANSMIT" S BARMSG2="*** NOTE:  ORIG SESS STATUS NOT TRANSMITTED ***"
 W !,DASHLINE
 W !,$G(BARCNTS),?6,$G(BARMSG1),!,?6,$G(BARMSG2)
 W !,?5,"A/R TRANS:",?25,$G(BARTRIEN),?45,"ORIGINAL SESSION:",?65,$G(SESSID)
 W !,?5,"A/R BILL:",?25,$G(BARBILL),?45,"ORIG EXPORT USER:"
 W:$G(UDUZ)'="" ?65,$P($G(^VA(200,UDUZ,0)),U)
 W !,?5,"3P BILL:",?25,$G(TPBILL)
 I $G(BAR3PB)=1 W !,?6,"# OF A/R TX'S PROCESSED FOR ",$G(TPBILL),":",?37,BARCNT3X
 S BARSAVE=""
 Q