IBECEAMH ;EDE/SAB - Cancel/Edit/Add... Mental Health Utilities ; 21-APR-23
Source file <IBECEAMH.m>
| 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 | 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 | 
  | 
| 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 |