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

IBARXMP.m

Go to the documentation of this file.
  1. IBARXMP ;LL/ELZ - PHARMCAY COPAY CAP PUSH TRANSACTION ;26-APR-2001
  1. ;;2.0;INTEGRATED BILLING;**150,158,637,676**;21-MAR-94;Build 34
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. ;
  1. PUSH ; this entry point will allow the user to select one or all transactions
  1. ; and transmit them to other treating facilities. This is used to try
  1. ; to resolve untransmitted transactions. First IRM should verify the
  1. ; HL7 link is working properly.
  1. ;
  1. N DIR,X,Y,DIRUT,DTOUT,DUOUT,DIROUT,IBER
  1. ;
  1. W !!,"This option will attempt to transmit un-transmitted copay cap transactions.",!,"You can select to send all un-transmitted transactions or selected"
  1. W !,"individual transactions. If you choose All, it could tie up your terminal",!,"session for some time.",!
  1. S DIR(0)="S^A:All;I:Individual",DIR("A")="Do you want to transmit All or Individual transactions" D ^DIR Q:$D(DIRUT)
  1. ;
  1. D @Y
  1. Q
  1. I ; transmits selected individual transactions
  1. N DIC,X,Y,IBZ,IBX,%,%Y,IBTFL,DFN,IBY,IBS,IBONE
  1. ;
  1. S DIC="^IBAM(354.71,",DIC(0)="AEMNQZ",IBS=+$P($$SITE^IBARXMU,"^",3),DIC("S")="I $E(^(0),1,3)=IBS" D ^DIC Q:Y<1
  1. S IBX=+Y,IBZ=Y(0),DFN=$P(IBZ,"^",2),IBTFL=$$TFL^IBARXMU(DFN,.IBTFL,2),IBY=1
  1. ;
  1. I IBTFL,($P(IBZ,"^",5)="C"!($P(IBZ,"^",5)="X")) W !!,"This transaction appears to already be transmitted.",!,"Do you want to transmit again" S %=2 D YN^DICN G:%'=1 I S IBONE=1
  1. ;
  1. I 'IBTFL W !!,"The patient for this transaction has no treating facilities to transmit to." D STATUS^IBARXMA(.IBY,IBX,0) G I
  1. ;
  1. D FOUND^IBARXMA(.IBY,IBX)
  1. ;
  1. U IO
  1. I '$D(IBER) W !,"Transmission Successful !!",!
  1. I $D(IBER) S X=0 F S X=$O(IBER(X)) Q:'X W !,"Error: ",X,"=",IBER(X)
  1. W ! K IBER
  1. ;
  1. G I
  1. A ; transmits all un-transmitted transactions
  1. N IBX,IBS
  1. ;
  1. I '$D(^IBAM(354.71,"AC","P")),'$D(^("Y")) W !!,"No Un-transmitted records to send.",!! Q
  1. ;
  1. F IBS="P","Y" S IBX=0 F S IBX=$O(^IBAM(354.71,"AC",IBS,IBX)) Q:IBX<1 D
  1. . N IBER,IBY,IBZ,DFN
  1. . S IBY=1,IBZ=$G(^IBAM(354.71,IBX,0)) Q:IBZ=""
  1. . S DFN=$P(IBZ,"^",2)
  1. . W !,"Now transmitting ",$P(IBZ,"^")
  1. . D FOUND^IBARXMA(.IBY,IBX)
  1. . U IO
  1. . I '$D(IBER) W !,"Transmission Successful !!",! Q
  1. . I $D(IBER) S X=0 F S X=$O(IBER(X)) Q:'X W !,"Error: ",IBER(X)
  1. . W ! K IBER
  1. Q