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

IBARXEB.m

Go to the documentation of this file.
  1. IBARXEB ;ALB/AAS - RX COPAY EXEMPTION BULLETIN PROCESSOR ; 15-JAN-93
  1. ;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;
  1. % N IBP,IBALERT
  1. Q:IBEVTP="" ; no prior exemption
  1. Q:IBEVTP=IBEVTA
  1. S IBCODA=$$ACODE^IBARXEU0(IBEVTA),IBCODP=$$ACODE^IBARXEU0(IBEVTP)
  1. Q:$L(IBCODA)=2 ; -went to automatic exemption
  1. ;
  1. K IBT
  1. I IBCODA=2010 D ; -went to hardship
  1. .S IBALERT=1
  1. .S IBT(9)="Patient has been given a Hardship Exemption."
  1. .Q
  1. I IBCODP=2010 D ; -went from hardship
  1. .S IBALERT=2
  1. .S IBT(9)="Patient's Hardship exemption has been removed."
  1. .Q
  1. I IBCODA=210,$L(IBCODP)=3,$P(IBEVTP,"^",4)=1 D ; -went to no income data from exempt income
  1. .S IBALERT=3
  1. .S IBT(9)="Patient's exemption based on Income has expired."
  1. .Q
  1. ;
  1. Q:'$D(IBT) ; no alert needed
  1. ;
  1. S IBP=$$PT^IBEFUNC(DFN)
  1. I $$ALERT^IBAUTL7 D SEND^IBAERR3 G BQ
  1. D BULL
  1. BQ K IBEXERR Q
  1. ;
  1. ALERT ; -- use kernel alerts
  1. ;
  1. ALERTQ Q
  1. ;
  1. BULL ; -- send bulletin
  1. ;
  1. S XMSUB="Medication Copayment Exemption Status Change"
  1. S IBT(1)="The following Patient's Medication Copayment Exemption Status has changed:"
  1. S IBT(2)=" Patient: "_$E($P(IBP,"^")_" ",1,25)_" PT. ID: "_$P(IBP,"^",2)
  1. S IBT(3)=""
  1. S IBT(4)=" Old Status: "_$E($$TEXT^IBARXEU0($P(IBEVTP,"^",4))_" ",1,10)_" - "_$P($G(^IBE(354.2,+$P(IBEVTP,"^",5),0)),"^")_" Dated "_$$DAT1^IBOUTL(+IBEVTP)
  1. S IBT(5)=" New Status: "_$E($$TEXT^IBARXEU0($P(IBEVTA,"^",4))_" ",1,10)_" - "_$P($G(^IBE(354.2,+$P(IBEVTA,"^",5),0)),"^")_" Dated "_$$DAT1^IBOUTL(+IBEVTA)
  1. S IBT(6)="" I $D(IBARCAN) S IBT(6)="Past charges were canceled in AR."
  1. S IBT(7)=""
  1. S IBT(8)=""
  1. S IBT(10)=" by: "_$P($G(^VA(200,+$P(IBEVTA,"^",7),0)),"^")_"/"_$S($P(IBEVTA,"^",6)=1:"(System)",1:"(Manual)")
  1. S Y=$P(IBEVTA,"^",8) D D^DIQ S IBT(11)=" on: "_$P(Y,"@")_" @ "_$P(Y,"@",2)
  1. S IBT(12)="Option: " I $D(XQY0) S IBT(12)=IBT(12)_$P($G(XQY0),"^",2)
  1. I $D(ZTQUEUED),$P($G(XQY0),"^",2)="" S IBT(12)=IBT(12)_"Queued Job - "_$G(ZTDESC)
  1. D SEND
  1. BULLQ Q
  1. ;
  1. SEND S XMDUZ="INTEGRATED BILLING PACKAGE",XMTEXT="IBT("
  1. K XMY S XMN=0
  1. ;S XMY(DUZ)="" ;don't send to user, is annoying to pharmacy.
  1. S IBGRP=$P($G(^XMB(3.8,+$P($G(^IBE(350.9,1,0)),"^",13),0)),"^")
  1. I IBGRP]"" S XMY("G."_IBGRP_"@"_^XMB("NETNAME"))=""
  1. ;S IBGRP=$P(^IBE(350.9,1,0),"^",9)
  1. ;F IBI=0:0 S IBI=$O(^XMB(3.8,+IBGRP,1,"B",IBI)) Q:'IBI S XMY(IBI)=""
  1. D ^XMD
  1. K X,Y,IBI,IBT,IBGRP,XMDUZ,XMTEXT,XMY,XMSUB
  1. Q