SQL_HIPAA PACKAGE

SQL TABLE FORMATS

Document Version: Beta0.04 By: Joe Thielen


SUMMARY:
This document details the format of the SQL tables to be used by SQL_HIPAA. All communication with an external program is done via these SQL tables.

NOTE: These tables were designed around the State of Ohio's MACSIS medicaid system. Your state's use of the 837 form may vary. In particular, their use of identifiers may be different. For MACSIS specific identifiers, examples are given in brackets.

NOTE: The terms 'resident' and 'subscriber' are synonymous. I work for a residential care facility, and am used to calling them residents. I may also accidentially refer to them as 'kids' or 'children', because that is the population we serve. All are synonymous with subscriber :).


TABLE: hipaa_to
Contains all arguments to be passed TO SQL_HIPAA FROM the external program.

FieldTypeDescription
modechar(1)T for TEST or P for Production
back_urlchar(120)The URL SQL_HIPAA should go to when all processes are complete.
cancel_urlchar(120)The URL SQL_HIPAA should go to if there is an error during processing. This might be a clea-up routine of sorts.
batchchar(30)The batch number for this file. This will be used in 837 fields GS06, GE06, ST02, SE02, and BHT03. Each batch (i.e. file) should have a unique number. It can be alphanumeric.
file_namechar(128)The file name of the 837 file that SQL_HIPAA will create
use_autoftpintThis indicates if the file should be FTP'd to a site automatically in the case of a successful file creation... 0 for no, 1 for yes.


TABLE: hipaa_from - UNDER CONSTRUCTION
Contains program execution status information and/or any errors returned from SQL_HIPAA.

FieldTypeDescription
back_statusintReturns 0 for successful. Anything greater than zero implies an error occured.
back_statustextchar(120)Specific error results
total_servicesintTotal number of service line items billed
total_claimsintTotal number of claims billed
total_amountdecimal (12,2)Total charges billed


TABLE: hipaa_orginfo
Contains information regarding the agency, contacts, and potential FTP information.

FieldTypeDescription
agency_namechar(25)The name of agency
agency_address_1char(55)Line 1 of the agency's street address
agency_address_2char(55)Line 2 of the agency's street address
agency_citychar(30)The city the agency is located in
agency_statechar(2)The state the agency is located in
agency_zipchar(15)The zip code the agency is located in
agency_contactchar(60)A general contact person (not necessarily EDI related) in the agency who will be contacted if a non-technical problem is found in the file.
agency_contact_numchar(80)The phone number of the person in agency_contact
agency_billidchar(80)The Billing Provider Identifier (for 837 field NM109) [MACSIS: Agency Tax ID]
agency_sidchar(15)The Billing Provider Secondary Identifier (for 837 field REF02) [MACSIS: Agency UPI]
receiver_namechar(25)The Receiver Name (for 837 field 2000A:NM103) [MACSIS: Board Name corresponding to number in next field, receiver_id]
receiver_idchar(15)The Receiver ID (for 837 fields ISA08/GS03/2000A:NM109) [MACSIS: Board Number and Type]
edi_contactchar(60)An EDI contact person who will be contacted if a technical problem is found in the file.
edi_contact_numchar(80)The phone number of the person in edi_contact
ftp_sitechar(80)IF AUTOFTP TO BE USED: The IP or hostname of the host to deliver the file to upon successful creation of the 837 file.
ftp_accountchar(80)IF AUTOFTP TO BE USED: The account name.
ftp_passwordchar(80)IF AUTOFTP TO BE USED: The password for ftp_account
ftp_directorychar(120)IF AUTOFTP TO BE USED: The directory on fy_site to place the file


TABLE: hipaa_resinfo
Contains demographic info about residents who have services listed in hipaa_services.
NOTE: For the address fields, please check with your board. For MACSIS purposes, use the address in which the resident was enrolled into MACSIS.

FieldTypeDescription
pri_idchar(7)The Subscriber Primary ID (837 field NM109) [MACSIS: UCI] - Must match pri_id in hipaa_services
control_numchar(38)The Patient Control Number (837 field CLM01) [MACSIS: NOT CURRENTLY USED, USES SERVICE LINE ITEM CODE INSTEAD] - This can be a complicated field. The Implementation Guide states that this may be either a patient account number or a unique claim number. However, the Implementation Guide STRONGLY suggests that this needs to be a unique number for this claim. For MACSIS, it's recommended the line item code is used instead. For other locales, what to put here may be needed to be asked to the board!
first_namechar(15)First Name
middle_namechar(15)Middle Name
last_namechar(15)Last Name
dobdateDate of Birth
sexchar(1)The Sex/Gender
ssnchar(11)The Social Security Number
address_1char(55)Line 1 of the resident's street address
address_2char(55)Line 2 of the resident's street address
citychar(30)The city of the resident's address
statechar(2)The state of the resident's address
zipchar(15)The zip code of the resident's address
diagcode1char(6)An ICD-9 diagnostic code
diagcode2char(6)An ICD-9 diagnostic code
diagcode3char(6)An ICD-9 diagnostic code
diagcode4char(6)An ICD-9 diagnostic code
diagcode5char(6)An ICD-9 diagnostic code
diagcode6char(6)An ICD-9 diagnostic code
diagcode7char(6)An ICD-9 diagnostic code


TABLE: hipaa_services
This is the main table for all line-item services to be billed. Only valid, billably, services can be in this table, and all data items must be filled in and valid to HIPAA specs!

FieldTypeDescription
charge_amountdecimal(8,2)The amount to be billed for this line item.
unitsdecimal(8,2)The number of units (must be valid HIPAA units!)
note_datedateThe Date of Service
pri_idchar(7)Must match pri_id in hipaa_resinfo
poschar(2)Place of Service
modifier1char(2)Procedure Modifier 1
modifier2char(2)Procedure Modifier 2
diagcode1char(6)An ICD-9 Diagnostic Code
diagcode2char(6)An ICD-9 Diagnostic Code
diagcode3char(6)An ICD-9 Diagnostic Code
line_control_numchar(30)Line Item Control Number - This is an in-house generated number used to identify this line item.
proc_codechar(5)Procedure Code
tempbillchar(1)RESERVED - DO NOT USE
temp1char(30)Not used - for external program usage
temp2char(30)Not used - for external program usage
temp3char(30)Not used - for external program usage
temp4char(30)Not used - for external program usage
temp5char(30)Not used - for external program usage
NOTE: You can have more fields than listed here if you need them for other purposes, as long as they do not conflict with these established fields. The temp fields are provided for your usage, and SQL_HIPAA will not use them at all. Nor will it use any other fields in this (or the other) tables.