IBCFP ;ALB/ARH - PRINT AUTHORIZED BILLS IN ORDER ;6-DEC-94
;;2.0;INTEGRATED BILLING;**41,54,137,155,348**;21-MAR-94;Build 5
;;Per VHA Directive 10-93-142, this routine should not be modified.
;
;
S IBPAR1=$G(^IBE(350.9,1,1))
S IBFT=$G(^IBE(353,3,0)) I $P(IBFT,U,2)="" W !!,"Default printer in billing not defined for the "_$P(IBFT,U,1)_", none will print!",!
I +$P(IBPAR1,U,22) S IBFT=$G(^IBE(353,2,0)) I $P(IBFT,U,2)="" W !!,"Default printer in billing not defined for the "_$P(IBFT,U,1)_", none will print!",!
I '$D(^DGCR(399,"AST")) W !!,"There are no Authorized but not Printed bills to print!" G END
;
S IBS="",IBZ="Z:ZIP;I:INSURANCE COMPANY NAME;P:PATIENT NAME;"
ORDER S DIR("?")="This option prints all non-transmittable bills with a Status of Authorized in the order requested. The printed bills may be sorted by: Zip Code, Insurance Company Name, and Patient name."
1 S DIR("A")="First Sort Bills By",DIR(0)="SOB^"_IBZ D ^DIR I $D(DIRUT) G END
S IBS=IBS_$S(Y="Z":1,Y="I":2,Y="P":3,1:0) S IBX=$P($P(IBZ,Y_":",2),";",1)
;
S DIR("?",1)="Enter the field that the bills should be sorted on within "_IBX_". Press return if the order already entered is sufficient.",DIR("?",2)=""
2 S DIR("A")="Then Sort Bills By",DIR(0)="SOB^"_IBZ D ^DIR I Y'="",$D(DIRUT) G END
S IBS=IBS_$S(Y="Z":1,Y="I":2,Y="P":3,1:0) G:Y="" BEG S IBY=$P($P(IBZ,Y_":",2),";",1)
;
S DIR("?",1)="Enter the field that the bills should be sorted on within "_IBX_" and "_IBY_". Press return if the order already entered is sufficient."
3 S DIR("A")="Then Sort Bills By",DIR(0)="SOB^"_IBZ D ^DIR K DIR I Y'="",$D(DIRUT) G END
S IBS=IBS_$S(Y="Z":1,Y="I":2,Y="P":3,1:0)
;
BEG S DIR("A")="Begin printing bills",DIR("?",1)=" Enter YES to begin printing all authorized non-transmittable bills."
S DIR("?",2)=" Enter NO to quit this option."
S DIR("?")=" Enter ?? to list the authorized bills that will be printed."
W ! S DIR(0)="YBO",DIR("??")="^D DISPX^IBCF" D ^DIR K DIR I 'Y W "... bills not printed!" G END
;
S ZTRTN="QTASK^IBCFP1",ZTDESC="BATCH PRINT AUTHORIZED THIRD PARTY BILLS",ZTIO="",ZTSAVE("IBS")="" D ^%ZTLOAD
I $D(ZTSK) W !," ... queued"
;
END K DIR,IBX,IBY,IBZ,IBS,IBPAR1,IBFT,Y,X,DIRUT ; end of interactive part
Q
;
;
DATE(X) Q $E(X,4,5)_"/"_$E(X,6,7)_"/"_$E(X,2,3)
;
STOP() ;determine if user has requested the queued report to stop
I $D(ZTQUEUED),$$S^%ZTLOAD S ZTSTOP=1 K ZTREQ I +$G(IBPGN) W !,"***TASK STOPPED BY USER***"
Q +$G(ZTSTOP)
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBCFP 2493 printed Oct 16, 2024@18:13:46 Page 2
IBCFP ;ALB/ARH - PRINT AUTHORIZED BILLS IN ORDER ;6-DEC-94
+1 ;;2.0;INTEGRATED BILLING;**41,54,137,155,348**;21-MAR-94;Build 5
+2 ;;Per VHA Directive 10-93-142, this routine should not be modified.
+3 ;
+4 ;
+5 SET IBPAR1=$GET(^IBE(350.9,1,1))
+6 SET IBFT=$GET(^IBE(353,3,0))
IF $PIECE(IBFT,U,2)=""
WRITE !!,"Default printer in billing not defined for the "_$PIECE(IBFT,U,1)_", none will print!",!
+7 IF +$PIECE(IBPAR1,U,22)
SET IBFT=$GET(^IBE(353,2,0))
IF $PIECE(IBFT,U,2)=""
WRITE !!,"Default printer in billing not defined for the "_$PIECE(IBFT,U,1)_", none will print!",!
+8 IF '$DATA(^DGCR(399,"AST"))
WRITE !!,"There are no Authorized but not Printed bills to print!"
GOTO END
+9 ;
+10 SET IBS=""
SET IBZ="Z:ZIP;I:INSURANCE COMPANY NAME;P:PATIENT NAME;"
ORDER SET DIR("?")="This option prints all non-transmittable bills with a Status of Authorized in the order requested. The printed bills may be sorted by: Zip Code, Insurance Company Name, and Patient name."
1 SET DIR("A")="First Sort Bills By"
SET DIR(0)="SOB^"_IBZ
DO ^DIR
IF $DATA(DIRUT)
GOTO END
+1 SET IBS=IBS_$SELECT(Y="Z":1,Y="I":2,Y="P":3,1:0)
SET IBX=$PIECE($PIECE(IBZ,Y_":",2),";",1)
+2 ;
+3 SET DIR("?",1)="Enter the field that the bills should be sorted on within "_IBX_". Press return if the order already entered is sufficient."
SET DIR("?",2)=""
2 SET DIR("A")="Then Sort Bills By"
SET DIR(0)="SOB^"_IBZ
DO ^DIR
IF Y'=""
IF $DATA(DIRUT)
GOTO END
+1 SET IBS=IBS_$SELECT(Y="Z":1,Y="I":2,Y="P":3,1:0)
if Y=""
GOTO BEG
SET IBY=$PIECE($PIECE(IBZ,Y_":",2),";",1)
+2 ;
+3 SET DIR("?",1)="Enter the field that the bills should be sorted on within "_IBX_" and "_IBY_". Press return if the order already entered is sufficient."
3 SET DIR("A")="Then Sort Bills By"
SET DIR(0)="SOB^"_IBZ
DO ^DIR
KILL DIR
IF Y'=""
IF $DATA(DIRUT)
GOTO END
+1 SET IBS=IBS_$SELECT(Y="Z":1,Y="I":2,Y="P":3,1:0)
+2 ;
BEG SET DIR("A")="Begin printing bills"
SET DIR("?",1)=" Enter YES to begin printing all authorized non-transmittable bills."
+1 SET DIR("?",2)=" Enter NO to quit this option."
+2 SET DIR("?")=" Enter ?? to list the authorized bills that will be printed."
+3 WRITE !
SET DIR(0)="YBO"
SET DIR("??")="^D DISPX^IBCF"
DO ^DIR
KILL DIR
IF 'Y
WRITE "... bills not printed!"
GOTO END
+4 ;
+5 SET ZTRTN="QTASK^IBCFP1"
SET ZTDESC="BATCH PRINT AUTHORIZED THIRD PARTY BILLS"
SET ZTIO=""
SET ZTSAVE("IBS")=""
DO ^%ZTLOAD
+6 IF $DATA(ZTSK)
WRITE !," ... queued"
+7 ;
END ; end of interactive part
KILL DIR,IBX,IBY,IBZ,IBS,IBPAR1,IBFT,Y,X,DIRUT
+1 QUIT
+2 ;
+3 ;
DATE(X) QUIT $EXTRACT(X,4,5)_"/"_$EXTRACT(X,6,7)_"/"_$EXTRACT(X,2,3)
+1 ;
STOP() ;determine if user has requested the queued report to stop
+1 IF $DATA(ZTQUEUED)
IF $$S^%ZTLOAD
SET ZTSTOP=1
KILL ZTREQ
IF +$GET(IBPGN)
WRITE !,"***TASK STOPPED BY USER***"
+2 QUIT +$GET(ZTSTOP)