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

IBBDOC.m

Go to the documentation of this file.
  1. IBBDOC ;OAK/ELZ - APIS FOR OTHER PACKAGES FOR PFSS - DOCUMENT ;5-AUG-2004
  1. ;;2.0;INTEGRATED BILLING;**267,260,286,361,384,404,737**;21-MAR-94;Build 19
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. ;
  1. ; Documents the calls to the routine IBBAPI.
  1. ;
  1. INSUR ;(DFN,IBDT,IBSTAT,IBR,IBFLDS)
  1. ; Function to return patient insurance information
  1. ; --Input:
  1. ; DFN = patient
  1. ; IBDT = date insured (optional - default is today's date)
  1. ; IBSTAT = Insurance Status filter (combinable based on groups below)
  1. ; Group 1
  1. ; A = Inactive included (Default is active only)
  1. ; Group 2
  1. ; R = Not reimbursable included (Default is reimbursable only)
  1. ; B = Indemnity included (Default is not included)
  1. ; Group 3
  1. ; P = Prescription coverage required (Default is all coverages)
  1. ; O = Outpatient coverage required (Default is all coverages)
  1. ; I = Inpatient coverage only (Default is all coverages)
  1. ; E = e-Pharmacy billable coverage required, i.e. should have
  1. ; Pharmacy coverage and be able to process e-claims (Default
  1. ; is all coverages)
  1. ;
  1. ; IBR = Array to return insurance information - passed by reference
  1. ; Example of IBR Array when IBFLDS="1,6,14,17":
  1. ; Third parameter is an incremental counter
  1. ;
  1. ; IBR("IBBAPI","INSUR",1)=IEN for the policy in #2.312
  1. ; IBR("IBBAPI","INSUR",1,1)= Ins. Comp. IEN^Ins. Comp. Name (#2.312,.01) internal^external
  1. ; IBR("IBBAPI","INSUR",1,6)=Ins. Comp. Phone (#36,.131)
  1. ; IBR("IBBAPI","INSUR",1,14)=Subscriber ID (#2.312,7.02)
  1. ; IBR("IBBAPI","INSUR",1,17)=Inpatient Coverage? 0^NO/1^YES
  1. ; IBR("IBBAPI","INSUR",2)= IEN for the policy in #2.312
  1. ; IBR("IBBAPI","INSUR",2,1)=Ins. Comp. IEN^Ins. Comp. Name (#2.312,.01) internal^external
  1. ; IBR("IBBAPI","INSUR",2,6)=Ins. Comp. Phone (#36,.131)
  1. ; IBR("IBBAPI","INSUR",2,14)=Subscriber ID (#2.312,7.02)
  1. ; IBR("IBBAPI","INSUR",2,17)=Inpatient Coverage? 0^NO/1^YES
  1. ; etc.
  1. ;
  1. ; IBFLDS = List of fields to return (1-31) in a comma separated list or "*" for all
  1. ; IB*737/TAZ added list of possible fields for IBFLDS
  1. ; 1 - Ins. Comp. Name (#2.312,.01) internal^external
  1. ; 2 - Ins. Comp. Street Addr Line 1 (#36,.111)
  1. ; 3 - Ins. Comp. City (#36,.114)
  1. ; 4 - Ins. Comp. State (#36,.115) internal^external
  1. ; 5 - Ins. Comp. Zip (#36,.116)
  1. ; 6 - Ins. Comp. Phone (#36,.131)
  1. ; 7 - COB (#2.312,.2) internal^external
  1. ; 8 - Policy Name (#2.312,.18) internal^external
  1. ; 9 - Policy Reimbursable (#36,1) 0^NO/1^YES
  1. ; 10 - Policy Effective Date (#2.312,8) internal
  1. ; 11 - Policy Expiration Date (#2.312,3) internal
  1. ; 12 - Subscriber Relationship (#2.312,16) abbrev.^external
  1. ; 13 - Subscriber Name (#2.312,7.01)
  1. ; 14 - Subscriber ID (#2.312,7.02)
  1. ; 15 - Pharmacy Coverage? 0^NO/1^YES
  1. ; 16 - Outpatient Coverage? 0^NO/1^YES
  1. ; 17 - Inpatient Coverage? 0^NO/1^YES
  1. ; 18 - Group Number (#2.312,.18) -> (#355.3,2.02)
  1. ; 19 - Patient Relationship to Subscriber (#2.312,16) internal^external
  1. ; 20 - VA Advantage (always returns 0) ^ Tricare plan (1/0)
  1. ; 21 - Plan Type (#2.312,.18) -> (#355.3,.09) internal^external
  1. ; 22 - Subscriber Sex (#2,.02) or (#2.312,3.12) depends if it is a dependent policy abbrev.^external
  1. ; 23 - Ins. Comp. Street Addr Line 2 (#36,.112)
  1. ; 24 - Ins. Comp. Street Addr Line 3 (#36,.113)
  1. ; 25 - Date Last Verified (#2.312,1.03) internal (may include time)
  1. ; 26 - Insured's Street 1 (#2.312,3.06)
  1. ; 27 - Insured's Street 2 (#2.312,3.07)
  1. ; 28 - Insured's City (#2.312,3.08)
  1. ; 29 - Insured's State (#2.312,3.09) internal^external
  1. ; 30 - Insured's Zip (#2.312,3.1)
  1. ; 31 - Insured's Phone (#2.312,3.11)
  1. ;
  1. ; --Output:
  1. ; -1 = error occurred (error message passed back in
  1. ; IBR("IBBAPI","INSUR","ERROR",x) where x is error number
  1. ; between 101 & 111
  1. ; 0 = No insurance found based on parameters
  1. ; 1 = Insurance found
  1. ;
  1. ;
  1. CIDC ; (DFN)
  1. ; Input: DFN for the patient in question.
  1. ; Output: 1 = Ask CIDC questions for the specified patient
  1. ; 0 = Don't ask CIDC questions for the specified patient
  1. ;
  1. ; The API will evaluate both a CIDC switch and the patient's insurance
  1. ; to determine if the CIDC questions should be asked.
  1. ;
  1. ; The switch will have three internal values:
  1. ; 0 = Don't ask any patients
  1. ; 1 = Ask for patients only with active billable insurance
  1. ; 2 = Ask for all patients
  1. ;
  1. ;
  1. SWSTAT ; ()
  1. ; Returns the current status of the PFSS On/Off Switch
  1. ;
  1. ; Output: <switch_status>^<status_date/time>
  1. ;
  1. ; <switch_status> will be one of the following:
  1. ; 0 = OFF
  1. ; 1 = ON
  1. ;
  1. GETACCT ; (IBBDFN,IBBARFN,IBBEVENT,IBBAPLR,IBBPV1,IBBPV2,IBBPR1,IBBDG1,IBBZCL,IBBDIV,IBBRAIEN,IBBSURG)
  1. ; Pass data to IBB for account/visit (ADT) messaging.
  1. ;
  1. ; Input:
  1. ; IBBDFN = Patient; IEN to file #2 [required]
  1. ; IBBARFN = Account Reference;
  1. ; IEN to file #375 or null [required]
  1. ; IBBEVENT = HL7 Event Code; e.g., "A04" [required]
  1. ; IBBAPLR = Calling Application;
  1. ; <routine> or <tag>_;_<routine>
  1. ; IBBPV1 = array for PV1 segment data [required]
  1. ; IBBPV1(2) - Patient Class (O=Outpatient;I=Inpatient)
  1. ; IBBPV1(3) - IEN to file #44, or "FEE BASIS"
  1. ; IBBPV1(4) - Appointment Type; IEN to file #409.1
  1. ; IBBPV1(7) - Attending Physician; IEN to file #200
  1. ; IBBVP1(9) - Consulting Physician; IEN to file #200
  1. ; IBBPV1(10) - Purpose of Visit;
  1. ; (Scheduling: 1=C&P;2=10-10;3=SV;4=UV)
  1. ; IBBPV1(17) - Admitting Physician or Surgeon;
  1. ; IEN to file #200
  1. ; IBBPV1(18) - Primary Stop Code; IEN to file #40.7
  1. ; IBBPV1(25) - Check-In Date/Time (Scheduling)
  1. ; IBBPV1(41) - Credit Stop Code; IEN to file #40.7
  1. ; IBBPV1(44) - Admit Date/Time
  1. ; IBBPV1(45) - Check-Out Date/Time (Scheduling)
  1. ; IBBPV1(50) - Prescription #; IEN to file #52 (Pharmacy)
  1. ; IBBPV1(52) - Other Provider; IEN to file #200
  1. ; IBBPV2 = array for PV2 segment data
  1. ; IBBPV2(7) - Eligibility of Visit; IEN to file #8.1
  1. ; IBBPV2(8) - Expected Admit/Visit Date/Time
  1. ; IBBPV2(24) - Appointment Status;
  1. ; (Scheduling:
  1. ; R=Scheduled/Kept;I=Inpatient;
  1. ; NS=No-Show;NSR=No-Show, Rescheduled;
  1. ; CP=Cancelled by Patient;
  1. ; CPR=Cancelled by Patient, Rescheduled;
  1. ; CC=Cancelled by Clinic;
  1. ; CCR=Cancelled by Clinic, Rescheduled;
  1. ; NT=No Action Taken)
  1. ; IBBPV2(46) - Date Appointment Made (Scheduling)
  1. ; IBBPR1 = array for PR1 segment data
  1. ; IBBPR1(3) - Procedure; IEN to file #81
  1. ; IBBPR1(4) - Procedure; free text
  1. ; IBBPR1(5) - Procedure Date/Time
  1. ; IBBPR1(6) - Functional Type;
  1. ; (Prosthetics:
  1. ; O=Home Oxygen;P=Purchasing;
  1. ; I=Stock Issue)
  1. ; (Radiology:
  1. ; ANI=Angio/Neuro/Interventional;
  1. ; CARD=Cardiology Studies;CT=CT Scan;
  1. ; RAD=General Radiology;
  1. ; MRI=Magnetic Resonance Imaging;
  1. ; MAM=Mammography;NM=Nuclear Medicine;
  1. ; US=Ultrasound;VAS=Vascular Lab)
  1. ; IBBPR1(11) - Surgeon; IEN to file #200
  1. ; IBBPR1(16) - <modifier><modifier><modifier>...
  1. ; where each <modifier> is an IEN to file #81.3
  1. ; IBBDG1 = array for DG1 segment data
  1. ; IBBDG1(n,3) - Diagnosis; IEN to file #80
  1. ; IBBDG1(1,4) - Diagnosis; free text; only one allowed
  1. ; IBBDG1(n,6) - Diagnosis Type; (A=Admitting;
  1. ; W=Working;
  1. ; D=Discharge;
  1. ; F=Final)
  1. ; IBBZCL = array for ZCL segment data
  1. ; IBBZCL(n,2) - Classification Type;
  1. ; (1=AO;2=IR;3=SC;4=EC;5=MST;6=HNC;
  1. ; 7=CV;8=SHAD)
  1. ; IBBZCL(n,3) - Classification Value; (1=YES;0=NO)
  1. ; IBBDIV = IEN to file #40.8
  1. ; IBBRAIEN = IEN to file #75.1
  1. ; IBBSURG = array for special Surgery data
  1. ; IBBSURG(1) - Surgical Case #; IEN to file #130
  1. ; IBBSURG(2) - Surgical Specialty; IEN to file #45.3
  1. ;
  1. ; Returns the pointer to the PFSS ACCOUNT file (#375) where
  1. ; all application input data is stored.
  1. ;
  1. ; Output: IEN to file #375, or 0, if unsuccessful
  1. ;
  1. GETCHGID ; ()
  1. ; Returns a Unique Charge ID.
  1. ;
  1. ; Output: 1 + current value of field #2 of file #372.
  1. ;
  1. CHARGE ; (IBBDFN,IBBARFN,IBBCTYPE,IBBUCID,IBBFT1,IBBPR1,IBBDG1,IBBZCL,IBBRXE,IBBORIEN,IBBPROS)
  1. ; Pass data to IBB for charge (DFT) messaging.
  1. ;
  1. ; Input:
  1. ; IBBDFN = Patient; IEN to file #2 [required]
  1. ; IBBARFN = Account Reference; IEN to file #375 [required]
  1. ; IBBCTYPE = Charge Type; (CG=debit;CD=credit) [required]
  1. ; IBBUCID = Unique Charge ID [required]
  1. ; IBBFT1 = array for FT1 segment data [required]
  1. ; IBBFT1(4) - Transaction Date/Time
  1. ; IBBFT1(7) - Pharmacy Service Code
  1. ; IBBFT1(10) - Transaction Quantity
  1. ; IBBFT1(13) - Department Code
  1. ; IBBFT1(16) - Patient Location; IEN to file #44
  1. ; IBBFT1(18) - Patient Status; (Pharmacy: 1=Rx Copay Exempt;
  1. ; 0=Not Exempt)
  1. ; IBBFT1(20) - Rendering Provider; IEN to file #200
  1. ; IBBFT1(21) - Ordering Provider; IEN to file #200
  1. ; IBBFT1(22) - Unit Cost
  1. ; IBBFT1(29) - <NDC><generic_name>
  1. ; IBBFT1(31) - Transaction Type;
  1. ; (Pharmacy: 1=PSO NSC Rx Copay;
  1. ; 2=PSO SC Rx Copay;
  1. ; 3=PSO NSC Rx Copay Cancel
  1. ; 4=PSO NSC Rx Copay Update
  1. ; 5=PSO SC Rx Copay Cancel
  1. ; 6=PSO SC Rx Copay Update)
  1. ; IBBPR1 = array for PR1 segment data;
  1. ; (required except Pharmacy)
  1. ; IBBPR1(3) - Procedure; IEN to file #81
  1. ; IBBPR1(4) - Procedure; free text
  1. ; IBBPR1(5) - Procedure Date/Time
  1. ; IBBPR1(6) - Functional Type;
  1. ; (Prosthetics: O=Home Oxygen;
  1. ; P=Purchasing;
  1. ; I=Stock Issue)
  1. ; IBBPR1(11,1) - Surgeon; IEN to file #200
  1. ; IBBPR1(11,2) - Attending Surgeon; IEN to file #200
  1. ; IBBPR1(16) - <modifier><modifier><modifier>...;
  1. ; each <modifier> is an IEN to file #81.3
  1. ; IBBDG1 = array for DG1 segment data
  1. ; IBBDG1(n,3) - Diagnosis; IEN to file #80
  1. ; IBBDG1(n,6) - Diagnosis Type; (A=Admitting;W=Working;
  1. ; D=Discharge;F=Final)
  1. ; IBBZCL = array for ZCL segment data
  1. ; IBBZCL(n,2) - Classification Type;
  1. ; (1=AO;2=IR;3=SC;4=EC;5=MST;
  1. ; 6=HNC;7=CV;8=SHAD)
  1. ; IBBZCL(n,3) - Classification Value; (1=YES;0=NO)
  1. ; IBBRXE = data for RXE segment data (Pharmacy only)
  1. ; IBBRXE(1) - <quantity>_;_<days_supply>
  1. ; IBBRXE(17) - Refills Dispensed
  1. ; IBBRXE(18) - Release Date/Time
  1. ; IBBRXE(31) - DEA, Special Handling codes
  1. ; IBBPROS = array for special Prosthetics data
  1. ; IBBPROS(1) - Vendor; IEN to file #440
  1. ; IBBPROS(2) - OBL#
  1. ;
  1. ; Returns success indicator.
  1. ;
  1. ; Output: 1, if successful; 0 otherwise
  1. ;
  1. SETACCT ; (IBBDFN,HLMTIENS)
  1. ; Store visit/account # from external billing system in PFSS
  1. ; ACCOUNT record; the file #375 record is found based on data
  1. ; contained in the HL7 message referenced by HLMTIENS.
  1. ; Most of the ADT messages involved originate in VistA and
  1. ; are returned by the external billing system with visit#
  1. ; attached.
  1. ; Some ADT-A01 messages originate in the external billing
  1. ; system; these cause a new record to be created in file #375.
  1. ;
  1. ; Input:
  1. ; IBBDFN = Patient; IEN to file #2 [required]
  1. ; HLMTIENS = HL7 Message (standard VistA HL7 variable);
  1. ; IEN to file #773 [required]
  1. ;
  1. ; Returns PFSS Account Reference.
  1. ;
  1. ; Output: IEN to file #375
  1. ;
  1. EXTNUM ; (IBBDFN,IBBARFN)
  1. ; Obtain the visit/account # of the external billing system
  1. ; that has been associated with the PFSS ACCOUNT file (#375)
  1. ; record.
  1. ;
  1. ; Input:
  1. ; IBBDFN = Patient; IEN to file #2 [required]
  1. ; IBBARFN = Account Reference; IEN to file #375 [required]
  1. ;
  1. ; Returns the value of field #.02 from the file #375 record.
  1. ;
  1. ; Output: external visit/account #, or 0, if unsuccessful
  1. ;