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

IBCAPR1.m

Go to the documentation of this file.
  1. IBCAPR1 ;ALB/GEF - CAPR PRINT FUNCTIONS ;OCT 1 2010
  1. ;;2.0;INTEGRATED BILLING;**432**;21-MAR-94;Build 192
  1. ;;Per VHA Directive 2004-038, this routine should not be modified.
  1. ;
  1. Q
  1. ;
  1. STFLP(IBIFN) ;Secondary/Tertiary Force Local Print
  1. ; Forces automatically generated secondary/tertiary claims to electronic payers to print
  1. ; locally based upon flag in the Insurance Company file
  1. ; Required input = IBIFN (claim internal entry#)
  1. ; Returns 1 if printed successfully
  1. ; Otherwise, returns 0^Reason not printed
  1. ;
  1. N IBF,IB,IBFT,IBJ,IBDV,Z,IBINS
  1. S Z=$$COBN^IBCEF(IBIFN)
  1. S IBINS=$$POLICY^IBCEF(IBIFN,1,Z)
  1. Q:$P($G(^DIC(36,IBINS,6)),U,9)'=1 "0^Insurance Company not set to print locally"
  1. S IB=$$FT^IBCU3(IBIFN) ; form type ien (2 or 3)
  1. Q:"2^3"'[IB "0^Form type not 2 or 3"
  1. S IBFT=$$FTN^IBCU3(IB) ; form type name
  1. S IBF=$P($G(^IBE(353,+IB,2)),U,8)
  1. S:IBF="" IBF=IB ;Forces the use of the output formatter to print bills
  1. ; get default CMS or UB printer (based on claim form type)
  1. S IBDV=$S(IB=2:$$CMS1500(),1:$$UB4PRT())
  1. Q:IBDV="" "0^Auto-printer not defined in IB Site Parameters"
  1. Q:'$$FORM(IBF,IB,IBDV) "0^Claim Print not tasked"
  1. K ^TMP("IBQONE",$J)
  1. I IBF=2 D RXP
  1. ; Print EOB
  1. Q $$PRINT8Q^IBCAPR(IBIFN)
  1. ;
  1. RXP ;queue an Rx Addendum for a bill, IBIFN must be defined
  1. N IBFORM1
  1. Q:'$D(^DGCR(399,+$G(IBIFN),0)) I '$D(^IBA(362.4,"AIFN"_+IBIFN)),'$D(^IBA(362.5,"AIFN"_+IBIFN)) Q
  1. N IBFT S IBFT=$$FNT^IBCU3("BILL ADDENDUM") Q:'IBFT S (IBFORM1,ZTDESC)="BILL ADDENDUM FOR "_$P(^DGCR(399,+IBIFN,0),U,1)
  1. S ZTSAVE("IB*")="",ZTDTH=$H
  1. S ZTIO=$P($G(^IBE(353,IBFT,0)),"^",2),ZTRTN=$G(^IBE(353,IBFT,1)) I (ZTIO="")!(ZTRTN="") K ZTDESC,ZTSAVE,ZTDTH,ZTIO,ZTRTN Q
  1. D ^%ZTLOAD
  1. Q
  1. ;
  1. FORM(IBFORM,IB,IBQUE) ;For ien IBFORM, extract data using output generater
  1. ; Queued job entrypoint - IBFORM needs to be defined
  1. ; IBQUE = the output queue for transmitted forms or the printer queue
  1. ; for printed output
  1. ; Returns ZTSK if job is queued sucessfully
  1. ;
  1. N ZTIO,ZTRTN,ZTDESC,ZTSAVE,ZTREQ,ZTDTH,IBFT,IBFTP,IBJ,ZTSK
  1. S %ZIS="QN"
  1. S IBFT=IB,IBFTP="IBCFP"_IB,IBJ=$J
  1. K ^XTMP(IBFTP,$J),^TMP("IBQONE",$J)
  1. S ^XTMP(IBFTP,$J,1,1,1,IBIFN)="",^TMP("IBQONE",$J)=""
  1. S ZTRTN="FORMOUT^IBCEFG7",ZTIO=IBQUE,ZTDESC="OUTPUT FORMATTER - FORM: "_$P($G(^IBE(353,IBFORM,0)),U),ZTSAVE("IB*")="",ZTDTH=$$NOW^XLFDT()
  1. S:'$G(DUZ) DUZ=.5
  1. D ^%ZTLOAD
  1. Q:'$D(ZTSK) "0^Claim Print not tasked"
  1. Q "1^"_ZTSK
  1. ;
  1. UB4PRT() ; Get UB4 Printer Name
  1. Q $$GET1^DIQ(350.9,"1, ",8.15)
  1. ;
  1. CMS1500() ; Get CMS1500 Printer Name
  1. Q $$GET1^DIQ(350.9,"1, ",8.14)
  1. ;