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