IBECEAMH ;EDE/SAB - Cancel/Edit/Add... Mental Health Utilities ; 21-APR-23
Source file <IBECEAMH.m>
Package | Total | Call Graph |
---|---|---|
VA FileMan | 4 | $$FIND1^DIC (FILE,UPDATE)^DIE $$GET1^DIQ ^DIR |
Integrated Billing | 2 | ($$ISCDELIG,$$PRCLSCHK,$$STCDCHK)^IBECEAMH GETPCECP^IBOMHC |
Kernel | 2 | $$GET^XUA4A72 $$STA^XUAF4 |
Scheduling | 1 | GETPRV^SDOE |
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 |
---|---|---|
ISCDELIG(IBDOS) | ;Is the Date of Service allow the bill to be Cleland-Dole Eligible
; INPUT - IBDOS - Date of Service of the Bill in question or the bill attempting to be created ; Returns - 0 - Not eligible ; 1 - Eligible for Cleland-Dole Review |
|
ISCDCANC(IBIEN) | ; Check to see if bill is cancellable
|
|
STCDCHK(IBSTCD) | ;Check to see if the stop code is eligible for C-D cancellation.
|
|
GETSTCD(STCDARY) | ; Retrieve the list of Stop codes that are Cleland Dole Eligible
|
|
STOPCODE | ; List of stop codes eligible for Cleland Dole tracking and cancellations
|
|
PRCLSCHK(IBPRSCLS) | ;Check to see if the Person Class associated with an Outpatient Copay is eligible for Cleland-Dole Tracking and cancellations.
|
|
GETPRCL(PRSCLARY) | ;
|
|
PRSCLS | ; List of Person Classes
|
|
MHCPTCHK(IBCPT) | ;Checks to see if the CPT code is Cleland-Dole eligible for tracking and cancellation
|
|
GETCPT(CPTARY) | ; Utility to gather the list of CPT Codes eligible for Cleland Dole Tracking and Cancellation
|
|
CPTCODE | ; List of CPT Codes that are eligble for Cleland Dole Tracking and copay cancellation
|
|
NUMVSTCK(DFN,IBDOS) | ; Check the DB to for the number of visits in a calendar year for a Veteran
|
|
ADDVST(DFN,IBDT,IBN,IBSTATUS,IBREAS,IBSITE) | ; Update the Visit Tracking DB
|
|
ADD(IBN,IBDFN,IBSITE,IBVISDT,IBSTAT,IBBILL,IBCOMM,IBUPDATE,IBUNIQ,RETURN) | ; Add an entry to the file
; INPUT: ; IBDFN - Pointer to the patient number ; IBSITE - external site number ; IBVISDT - Visit date ; IBSTAT - Status ; IBBILL - Bill number or possibly free text description such as 'ONHOLD' ; IBCOMM - Cancel reason ; IBUPDATE - 1 if this is the originating site and data should be pushed out to other treating facilities, otherwise 0 ; IBUNIQ - Unique ID consiting of external site number underscor ien of file 351.83 on originating site ex. 442_1234567 ; OUTPUT: ; RETURN - This is any information returned by FileMan if update was unsuccessful ; ; Function call returns 0 or 1 if successful. ; data must be all internal or all external - no mashup of the two allowed ; I vote internal and since I am coding... ; the incoming parameters were all internal except site #. ; NOTE to self: internal data is filed without validation so be sure it's cool |
|
CHKST44(IBOE) | ; check stop codes in file 44 for Cleland Dole eligibility
|
|
CDCHK(IBSTOPDA,IBFR) | ;
; INPUT: IBSTOPDA - Stop Code ; IBFR - Date of Service ; Returns - 0 - Not eligible ; 1 - Eligible |
|
DTCHK(DFN,IBEVDT) | ; Checks to see if the copay being cancelled as C-D is in the correct sequence (i.e. 1 of the oldest 3 for the calendar year)
; INPUT: DFN - Patient ; IBEVDT - Date of Service ; Returns - 0 - No sequence issue ; 1 - Possible sequence issue |
|
MESS1 | ; Visit cancelled due to Cleland Dole.
|
|
MESS2 | ; User received their 3 free visits
|
|
MESS2A | ;User received 3 free visits, but the DoS is prior to one of those free visits.
|
|
MESS2B | ; User received their 3 free visits
|
|
MESS3(IBFLG) | ;
|
|
OECHK(IBOE,IBEVDT) | ;
; INPUT: IBOE - Outpatient Encounter IEN (from Bill Resulting From field (#350, .04, 2nd ";" piece) ; IBEVDT - Date of Service ; Returns - 0 - Encounter Not eligible under Cleland-Dole ; 1 - Encounter eligible under Cleland-Dole |
|
UPMHDB(DFN,IBDOS) | ; Update the MH Visit Tracking DB if the Cancellation Reason is usable on MH copays
|
|
UPDVST(IBN,IBCAN,IBVSTIEN) | ; update the Visit Tracking file
|
|
FNDVST(IBBLNO,IBVSTDT,IBN) | ; Locate the Visit IEN
|
|
UPDATE(IBNP,IBIEN,IBSTAT,IBBILL,IBCOMM,IBUPDATE,RETURN) | ; update an entry to the file
; INPUT: ; IBNP - Flag for processing type ; 1 = Nightly Process ; 0 or NULL = Manual Update (IB CANCEL/EDIT/ADD, MH Visit Maintenance,etc.) ; IBIEN - internal entry number into 351.82 that is being edited ; IBSTAT - Status ; IBBILL - Bill number or possibly free text description such as 'ONHOLD' ; IBCOMM - Cancel reason ; IBUPDATE - 1 if this is the originating site and data should be pushed out to other treating facilities, otherwise 0 ; OUTPUT: ; RETURN - This is any information returned by FileMan if update was unsuccessful ; ; Function call returns 0 or 1 if successful. ; ; limiting edits to a few fields ; data must be all internal or all external - no mashup of the two allowed ; I still vote internal and since I am still coding... ; the incoming parameters were all internal ; NOTE to self: internal data is filed without validation so be sure it's cool |
|
ASKMH() | ; Mental Health visit (Cleland - Dole) confirmation prompt
|
|
ASKCONT() | ; "do you wish to continue" confirmation prompt
|
Name | Field # of Occurrence |
---|---|
$$FIND1^DIC | ADD+29 |
FILE^DIE | UPDATE+48 |
UPDATE^DIE | ADD+39 |
$$GET1^DIQ | ISCDELIG+6, ISCDELIG+7, ISCDCANC+11, ADDVST+18, ADDVST+25, ADDVST+30, CHKST44+8, CHKST44+11, UPDATE+25, UPDATE+26 , UPDATE+27 |
^DIR | ASKMH+8, ASKCONT+8 |
$$ISCDELIG^IBECEAMH | CDCHK+7 |
$$PRCLSCHK^IBECEAMH | OECHK+23 |
$$STCDCHK^IBECEAMH | CDCHK+9 |
GETPCECP^IBOMHC | OECHK+25 |
GETPRV^SDOE | OECHK+10 |
$$GET^XUA4A72 | OECHK+21 |
$$STA^XUAF4 | ADDVST+18, ADDVST+23 |
Name | Line Occurrences |
---|---|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Function Call: WRITE |
|
Routine Call |
|
Routine Call |
|
Routine Call |
|
Routine Call |
|
FileNo | Call Tags |
---|---|
^IB - [#350] | GET1^DIQ |
^IBE(350.9 - [#350.9] | GET1^DIQ |
^IBMH(351.83 - [#351.83] | GET1^DIQ |
^IBE(352.5 - [#352.5] | GET1^DIQ |
^DIC(4 - [#4] | FIND1^DIC |
^DIC(40.7 - [#40.7] | GET1^DIQ |
^SCE - [#409.68] | GET1^DIQ |
^SC - [#44] | GET1^DIQ |
Name | Line Occurrences (* Changed, ! Killed) |
---|---|
^DD("DD" | ADD+23, UPDATE+34 |
^IB - [#350] | ISCDCANC+9 |
^IBMH(351.83 - [#351.83] | NUMVSTCK+14, NUMVSTCK+16, DTCHK+15, DTCHK+16, UPDVST+11, FNDVST+4, FNDVST+5 |
Name | Line Occurrences |
---|---|
$$CHKST44 | ISCDCANC+13 |
$$MHCPTCHK | OECHK+28 |
$$NUMVSTCK | ADD+21, UPMHDB+5, UPDATE+30 |
$$STCDCHK | ISCDCANC+12, CHKST44+11 |
$$UPDATE | UPDVST+24 |
ADD | ADDVST+35 |
GETCPT | MHCPTCHK+9 |
GETPRCL | PRCLSCHK+7 |
GETSTCD | STCDCHK+9 |
UPDVST | UPMHDB+8, UPMHDB+11 |
>> | Not killed explicitly |
* | Changed |
! | Killed |
~ | Newed |
Name | Field # of Occurrence |
---|---|
CDDTCHK | CDCHK+6~, CDCHK+7*, CDCHK+8, CDCHK+10 |
CHK | DTCHK+6~, DTCHK+9* |
CPTARY | MHCPTCHK+5~, MHCPTCHK+8*, MHCPTCHK+9, GETCPT~ |
CPTARY( | MHCPTCHK+12, GETCPT+9* |
CT | DTCHK+6~, DTCHK+9*, DTCHK+15, DTCHK+20* |
DATA | NUMVSTCK+7~, NUMVSTCK+16*, NUMVSTCK+18, NUMVSTCK+22, DTCHK+6~, DTCHK+16*, DTCHK+17 |
DFN | NUMVSTCK~, NUMVSTCK+14, ADDVST~, ADDVST+35, DTCHK~, DTCHK+15, UPMHDB~, UPMHDB+5 |
DIR | ASKMH+4~, ASKCONT+4~ |
DIR("A" | ASKMH+6*, ASKCONT+6* |
DIR(0 | ASKMH+7*, ASKCONT+7* |
DIROUT | ASKMH+4~, ASKMH+9, ASKCONT+4~, ASKCONT+9 |
DIRUT | ASKMH+4~, ASKMH+9, ASKCONT+4~, ASKCONT+9 |
DTIME | MESS2+4, MESS2A+6, MESS3+11 |
DTOUT | ASKMH+4~, ASKMH+9, ASKCONT+4~, ASKCONT+9 |
DUOUT | ASKMH+4~, ASKMH+9, ASKCONT+4~, ASKCONT+9 |
ENDDT | DTCHK+6~, DTCHK+8*, DTCHK+18 |
ERR | OECHK+6~, OECHK+9*, OECHK+11 |
FDA | ADDVST+15~, ADD+26~, UPDATE+40~ |
FDA( | ADD+28*, ADD+29*, ADD+30*, ADD+31*, ADD+32*, ADD+33*, ADD+34*, ADD+35*, ADD+36*, UPDATE+42* , UPDATE+43*, UPDATE+44*, UPDATE+45* |
FDAIEN | ADDVST+15~ |
FLD | CHKST44+6~, CHKST44+10*, CHKST44+11 |
IBBILL | ADDVST+15~, ADDVST+25*, ADDVST+29, ADDVST+32*, ADDVST+35, ADD~, ADD+32, UPDATE~, UPDATE+43 |
IBBLNO | FNDVST~, FNDVST+4 |
IBBLSTAT | ADDVST+15~, ADDVST+30*, ADDVST+32 |
IBCAN | UPDVST~, UPDVST+9, UPDVST+19, UPDVST+20, UPDVST+21, UPDVST+22 |
IBCDEFF | ISCDELIG+5~, ISCDELIG+6*, ISCDELIG+8 |
IBCDEND | ISCDELIG+5~, ISCDELIG+7*, ISCDELIG+8 |
IBCOMM | ADD~, ADD+33, UPDATE~, UPDATE+44 |
IBCPT | MHCPTCHK~, MHCPTCHK+12 |
IBCPTARY | OECHK+6~, OECHK+17*, OECHK+25, OECHK+29! |
IBCPTARY( | OECHK+28 |
IBCPTCHK | OECHK+6~, OECHK+26*, OECHK+28* |
IBCTS | ADD+19~, UPDATE+24~, UPDATE+30*, UPDATE+31 |
IBDATA | ISCDCANC+6~, ISCDCANC+9*, ISCDCANC+10, ISCDCANC+13, GETSTCD+4~, GETSTCD+7*, GETSTCD+8, GETSTCD+10, GETPRCL+4~, GETPRCL+5* , GETPRCL+6, GETPRCL+7, GETCPT+4~, GETCPT+6*, GETCPT+7, GETCPT+9 |
IBDFN | ADD~, ADD+21, ADD+28, UPDATE+24~, UPDATE+25*, UPDATE+30 |
IBDOS | ISCDELIG~, ISCDELIG+8, NUMVSTCK~, NUMVSTCK+11, UPMHDB~, UPMHDB+5, UPDATE+24~, UPDATE+26*, UPDATE+30 |
IBDT | ADDVST~, ADDVST+35 |
IBENC | ISCDCANC+6~ |
IBERROR | ADDVST+15~, ADDVST+35, UPDVST+8~, UPDVST+10*, UPDVST+24 |
IBEVDT | DTCHK~, DTCHK+8, DTCHK+18, DTCHK+21, OECHK~, OECHK+21 |
>> IBFAC | ADDVST+23 |
IBFLG | MESS3~, MESS3+6*, MESS3+8 |
IBFOUND | FNDVST+2~, FNDVST+3*, FNDVST+4, FNDVST+6* |
IBFR | CDCHK~, CDCHK+7 |
IBIEN | ISCDCANC~, ISCDCANC+9, UPDATE~, UPDATE+25, UPDATE+26, UPDATE+27, UPDATE+41 |
IBLOC | CHKST44+6~, CHKST44+8*, CHKST44+9, CHKST44+11 |
IBLP | OECHK+6~, OECHK+15*, OECHK+16*, OECHK+19 |
IBLP1 | OECHK+6~, OECHK+26*, OECHK+28* |
IBMAXFR | ADD+19~, UPDATE+24~ |
IBN | ADDVST~, ADDVST+18, ADDVST+25, ADDVST+30, ADDVST+35, ADD~, ADD+35, UPDVST~, UPDVST+11, FNDVST~ , FNDVST+6 |
IBNOFRVS | UPMHDB+2~, UPMHDB+5*, UPMHDB+8 |
IBNP | UPDATE~, UPDATE+32 |
IBOE | CHKST44~, CHKST44+8, OECHK~, OECHK+10, OECHK+25 |
IBPRCLS | OECHK+6~, OECHK+21*, OECHK+23 |
IBPRSCLS | PRCLSCHK~, PRCLSCHK+9 |
IBPRVIEN | OECHK+6~, OECHK+19*, OECHK+21 |
IBREAS | ADDVST~, ADDVST+26*, ADDVST+35, UPDVST+8~, UPDVST+19*, UPDVST+20*, UPDVST+21*, UPDVST+22*, UPDVST+24 |
IBRES | ISCDCANC+6~, ISCDCANC+12*, ISCDCANC+13*, ISCDCANC+14 |
IBRTN | UPDVST+8~, UPDVST+24* |
IBSCDIEN | ISCDCANC+6~, ISCDCANC+10*, ISCDCANC+11 |
IBSDV | OECHK+6~, OECHK+9*, OECHK+12 |
IBSDV( | OECHK+16, OECHK+19 |
IBSITE | ADDVST~, ADDVST+15~, ADDVST+18*, ADDVST+23*, ADDVST+35, ADD~, ADD+29 |
IBSTAT | ADD~, ADD+21, ADD+31, UPDVST+8~, UPDVST+19*, UPDVST+20*, UPDVST+21*, UPDVST+22*, UPDVST+24, UPDATE~ , UPDATE+31, UPDATE+38*, UPDATE+42 |
IBSTATUS | ADDVST~, ADDVST+35 |
IBSTCD | ISCDCANC+6~, ISCDCANC+11*, ISCDCANC+12, STCDCHK~, STCDCHK+12 |
IBSTCHCK | CDCHK+6~, CDCHK+9*, CDCHK+10 |
IBSTIEN | CHKST44+6~, CHKST44+11* |
IBSTOP | CHKST44+6~, CHKST44+11* |
IBSTOPDA | CDCHK~, CDCHK+9 |
IBUNIQ | ADD~, ADD+34 |
IBUPDATE | ADD~, ADD+36, UPDATE~, UPDATE+45 |
IBVISDT | ADD~, ADD+21, ADD+23, ADD+30, UPDATE+24~, UPDATE+27*, UPDATE+34 |
IBVSTD | FNDVST+2~, FNDVST+5*, FNDVST+6 |
IBVSTDT | FNDVST~, FNDVST+6 |
IBVSTIEN | UPDVST~, UPDVST+11*, UPDVST+12, UPDVST+24, FNDVST+2~, FNDVST+3*, FNDVST+4*, FNDVST+5, FNDVST+7 |
IBX | MESS2+1~, MESS2+4*, MESS2A+1~, MESS2A+6*, MESS3+5~, MESS3+11* |
IBY | UPDATE+24~, UPDATE+30*, UPDATE+31, UPDATE+36* |
IENS | ADD+26~, ADD+27*, ADD+28, ADD+29, ADD+30, ADD+31, ADD+32, ADD+33, ADD+34, ADD+35 , ADD+36, UPDATE+40~, UPDATE+41*, UPDATE+42, UPDATE+43, UPDATE+44, UPDATE+45 |
LOOP | GETSTCD+4~, GETSTCD+7*, GETPRCL+4~, GETPRCL+5*, GETCPT+4~, GETCPT+6* |
LP | NUMVSTCK+7~, NUMVSTCK+13*, NUMVSTCK+14*, NUMVSTCK+16, DTCHK+6~, DTCHK+9*, DTCHK+15*, DTCHK+16 |
NUMVST | NUMVSTCK+7~, NUMVSTCK+9*, NUMVSTCK+14, NUMVSTCK+22*, NUMVSTCK+24 |
PRSCLARY | PRCLSCHK+5~, PRCLSCHK+7, GETPRCL~ |
PRSCLARY( | PRCLSCHK+9, GETPRCL+7* |
RES | CHKST44+6~, CHKST44+7*, CHKST44+10, CHKST44+11*, CHKST44+14, OECHK+6~, OECHK+15*, OECHK+16, OECHK+28*, OECHK+30 |
RETURN | ADD~, ADD+24*, ADD+42, UPDATE~, UPDATE+35*, UPDATE+51 |
SQFLG | DTCHK+6~, DTCHK+9*, DTCHK+15, DTCHK+21*, DTCHK+22 |
STARTDT | DTCHK+6~, DTCHK+8*, DTCHK+18 |
STAT | DTCHK+6~, DTCHK+17*, DTCHK+19 |
STCDARY | STCDCHK+5~, STCDCHK+8*, STCDCHK+9, GETSTCD~ |
STCDARY( | STCDCHK+12, GETSTCD+10* |
U | ISCDCANC+10, ISCDCANC+13, NUMVSTCK+18, NUMVSTCK+22, DTCHK+17, OECHK+19, OECHK+21, FNDVST+6 |
VD | NUMVSTCK+7~, NUMVSTCK+18*, NUMVSTCK+20, DTCHK+6~, DTCHK+17*, DTCHK+21 |
X | ASKMH+4~, ASKCONT+4~ |
Y | ADD+22~, ADD+23*, ADD+24, UPDATE+33~, UPDATE+34*, UPDATE+35, ASKMH+4~, ASKMH+10, ASKCONT+4~, ASKCONT+10 |
YR | NUMVSTCK+7~, NUMVSTCK+11*, NUMVSTCK+20 |
Z | ISCDCANC+6~, ISCDCANC+13* |
Name | Field # of Occurrence |
---|---|
$T(CPTCODE+LOOP | GETCPT+6 |
$T(PRSCLS+LOOP | GETPRCL+5 |
$T(STOPCODE+LOOP | GETSTCD+7 |