IBARXMC ;LL/ELZ-PHARMACY COPAY CAP FUNCTIONS ; 03 Mar 2021
Source file <IBARXMC.m>
action | A | extended action | Ea | event driver | Ed | subscriber | Su | protocol | O | limited protocol | LP | run routine | RR | broker | B | edit | E | server | Se | P | screenman | SM | inquire | I |
Name | Comments | DBIA/ICR reference |
---|---|---|
NEW(IBQ,IBC,IBD,IBB,IBN) | ; used to compute new bills amount above cap
; DFN is assumed ; IBQ = quantity ; IBC = charge per item ; IBD = effective date ; Return: ; IBB = Amount to bill ; IBN = Amount NOT to bill |
|
BILLED(DFN,IBD,IBFD,IBTD) | ; returns about billed, format: month^year
; IBD = transaction date, IBFD = from date, IBTD = to date |
|
CAP(IBD,IBP,IBM,IBY,IBF,IBT) | ; returns the cap amount and dates
; IBD = date of transaction ; IBP = priority level of patient ; return (by reference): ; IBM = monthly cap amount ; IBY = yearly cap amount ; IBF = from date for yearly cap determination ; IBT = to date for yearly cap determination |
|
CAPC | ;
|
|
FLAG(DFN,IBD) | ; flag account if at or above cap
; IBD = date of transaction (mo/year fm format) ; flag in account is set to: 2 = cap exceeded, some copays not billed ; 1 = cap reached ; 0 = below cap |
|
PARENT(X) | ; returns the parent entry in 354.71 for a transaction
|
|
NET(X) | ; returns net amount billed for a parent and its children
; X = ien from 354.71 (parent or child) output: billed ^ un-billed |
|
CANCEL(DFN,IBDT) | ; receives notification of a cancellation and determines
; if more need to be billed. IBDT should be in fm format date to check |
|
C1 | ; get starting values
|
|
C2 | ||
C3 | ||
C4 | ||
C5 | ||
NEXTMO(DATE) | ; returns first date of next month
|
|
NEXTMOQ | ||
QCAN(DFN,IBCAP,IBSAVXMC) | ; queue off job to look for back billing in the background
|
|
DQCAN | ; entry point for queued back billing job
|
Name | Field # of Occurrence |
---|---|
^%ZTLOAD | QCAN+5 |
^DIE | FLAG+12 |
^IBAERR | DQCAN+14 |
BULL^IBAERR | QCAN+7 |
EN^IBARXCBK | C5+8 |
EN^IBARXCQR | C2+5 |
$$ADD^IBARXMN | C2+9 |
$$PRIORITY^IBARXMU | NEW+11, FLAG+9, C1+2 |
$$SITE^IBARXMU | C1+1 |
$$TFL^IBARXMU | C2 |
UQUERY^IBARXMU | C2+7 |
$$FYCY^IBCU8 | CAPC+4 |
$$FMADD^XLFDT | QCAN+4 |
$$FMTH^XLFDT | QCAN+4 |
$$NOW^XLFDT | QCAN+4 |
Name | Line Occurrences |
---|---|
Function Call: WRITE |
|
Routine Call |
|
Name | Line Occurrences (* Changed, ! Killed) |
---|---|
^DPT - [#2] | DQCAN+7, DQCAN+8 |
^IBAM(354.7 - [#354.7] | BILLED+4, BILLED+5, BILLED+6, FLAG+7, FLAG+8, FLAG+12, DQCAN+4, DQCAN+20 |
^IBAM(354.71 - [#354.71] | PARENT+1, NET+3, C3+3, C3+4 |
^IBAM(354.75 - [#354.75] | CAP+9, CAP+10, CAPC+1 |
^TMP("IBD" | C3!, C3+10*, C3+12, C4+3, C4+4, C5+11! |
Name | Field # of Occurrence |
---|---|
^( | CAP+9, CAP+10 |
>> | Not killed explicitly |
* | Changed |
! | Killed |
~ | Newed |
Name | Field # of Occurrence |
---|---|
B | NET+3~*, NET+4 |
DA | FLAG+6~, FLAG+12* |
DA(1 | FLAG+12* |
DATE | NEXTMO~, NEXTMO+1*, NEXTMO+2 |
DFN | NEW+11, NEW+15, BILLED~, BILLED+4, BILLED+5, BILLED+6, FLAG~, FLAG+7, FLAG+8, FLAG+9 , FLAG+10, FLAG+12, CANCEL~, C1+2, C1+5, C2, C2+5, C2+7, C2+9, C3+3 , QCAN~, DQCAN+4, DQCAN+7, DQCAN+8, DQCAN+17, DQCAN+20 |
DIE | FLAG+6~, FLAG+12* |
DR | FLAG+6~, FLAG+12* |
IBA | NEW+9~, NEW+15*, NEW+17, C1+5*, C4, C5+1*, C5+2 |
IBB | NEW~, NEW+16*, NEW+17*, NEW+18*, NEW+19, FLAG+6~, FLAG+10*, FLAG+11, C4*, C5+2 , C5+4* |
IBBIL | CANCEL+3~, C5+2*, C5+3, C5+4, C5+6, C5+8 |
IBC | NEW~, NEW+16, NEW+19, FLAG+6~, FLAG+9, FLAG+11 |
IBCAP | QCAN~ |
IBCAP( | DQCAN+17 |
IBD | NEW~, NEW+14, NEW+15, BILLED~, BILLED+4, CAP~, CAP+9, CAP+10, CAPC+2, CAPC+4 , FLAG~, FLAG+7, FLAG+9, FLAG+10, CANCEL+3~, C2+7, C2+8!, C2+9*, C2+10!, DQCAN+1~ , DQCAN+17* |
IBD( | C2+9 |
IBD(0 | C2+8 |
IBDT | CAP+8~, CAP+10*, CAPC+4*, CAPC+5, CAPC+6, CANCEL~, C1+3, C1+5 |
IBDTQ | CANCEL+3~, C2+6*, C2+7, C3+2*, C3+3 |
IBE | NEW+9~, NEW+15*, NEW+18, C1+5*, C4 |
IBF | CAP~, CAPC+2*, CAPC+5*, FLAG+6~, FLAG+11*, FLAG+12 |
IBFD | NEW+9~, NEW+14, NEW+15, BILLED~, BILLED+6, FLAG+6~, FLAG+9, FLAG+10, CANCEL+3~, C1+3 , C1+4, C1+5, C2+5, C2+6, C3+2 |
IBFY | BILLED+2~ |
IBL | DQCAN+1~, DQCAN+4*, DQCAN+5 |
IBM | BILLED+2~, BILLED+5*, BILLED+7, CAP~, CAPC+2*, CAPC+3* |
IBN | NEW~, NEW+19* |
IBP | NEW+9~, NEW+11*, NEW+13*, NEW+14, CAP~, CAP+9, CAP+10, C1+2*, C1+3 |
IBPAT | DQCAN+1~, DQCAN+7*, DQCAN+13 |
IBQ | NEW~, NEW+16, NEW+19 |
IBREF | DQCAN+1~, DQCAN+9*, DQCAN+11*, DQCAN+12*, DQCAN+13 |
IBS | CANCEL+3~, C1+1*, C5+10 |
IBS1 | CANCEL+3~, C4+3*, C4+4, C5+3* |
IBS2 | CANCEL+3~, C4+3*, C4+4 |
IBSAVXMC | QCAN~ |
IBSAVXMC( | DQCAN+10, DQCAN+11, DQCAN+12 |
IBSSN | DQCAN+1~, DQCAN+8*, DQCAN+13 |
IBT | CAP~, CAPC+2*, CAPC+6*, CANCEL+3~, C2*, C2+1 |
IBTAG | QCAN+1~, QCAN+7*, DQCAN+1~, DQCAN+6* |
IBTD | NEW+9~, NEW+14, NEW+15, BILLED~, BILLED+6, FLAG+6~, FLAG+9, FLAG+10, CANCEL+3~, C1+3 , C1+4, C1+5, C2+6, C3+2 |
IBTFL | CANCEL+3~, C2 |
IBTFL( | C2+1, C2+2, C2+4, C2+7 |
IBX | BILLED+2~, BILLED+3*, BILLED+4*, BILLED+5, BILLED+6*, CAP+8~, CAP+9*, CAP+10*, CAPC+1*, CAPC+2 , CAPC+3, CAPC+4, CAPC+5, CAPC+6, FLAG+6~, FLAG+7*, FLAG+8, FLAG+12, CANCEL+3~, C2+1* , C2+2, C2+4, C2+7, C3+3*, C3+4, C3+7, C3+10, C4+3*, C4+4, C5+1 , C5+8 |
IBY | NEW+9~, NEW+14, NEW+18, BILLED+2~, BILLED+6*, BILLED+7, CAP~, CAPC+2*, CAPC+3*, FLAG+6~ , FLAG+9, FLAG+11, C1+3, C1+4, C4 |
IBZ | NEW+9~, NEW+14, NEW+17, BILLED+2~, BILLED+6*, FLAG+6~, FLAG+8*, FLAG+11, FLAG+12, C1+3 , C1+4, C3+4~*, C3+7, C3+10, C4, C4+4*, C5+8, C5+10 |
IO | C2+2, C2+11 |
N | NET+3~*, NET+4 |
P | NET+3~* |
X | FLAG+6~, PARENT~, PARENT+1, NET~, NET+3, C2+9*, NEXTMO+1~*, NEXTMO+2*, NEXTMOQ, DQCAN+4* , DQCAN+9*, DQCAN+10*, DQCAN+11, DQCAN+12 |
Y | FLAG+6~, NET+3~*, QCAN+1~, QCAN+7*, DQCAN+1~, DQCAN+13* |
Z | NET+3~* |
ZTDESC | QCAN+1~, QCAN+3* |
ZTDTH | QCAN+1~, QCAN+4* |
ZTIO | QCAN+1~, QCAN+5* |
>> ZTQUEUED | C2+1, C2+2, C2+11, C3+12 |
ZTRTN | QCAN+1~, QCAN+3* |
ZTSAVE | QCAN+1~ |
ZTSAVE("DFN" | QCAN+5* |
ZTSAVE("IBCAP(" | QCAN+5* |
ZTSAVE("IBSAVXMC(" | QCAN+5* |
ZTSK | QCAN+1~, QCAN+7 |