Search the OSCAR Documentation
< All Topics

BC Billing Teleplan Troubleshooting

Share this

Documentation Copyright © Adrian Starzynski 2024

“Teleplan is a telecommunications system which allows practitioners to securely submit claims and notes, retrieve remittance information, and check patient eligibility over an encrypted internet connection with MSP…” teleplan-ch1.pdf (gov.bc.ca)

Teleplan Claim Submission Files

Before generating a teleplan file, you need to run a simulation which should catch many errors – go to “Simulate Submission File2”.

Teleplan submission files are text only files with no file extension. Once the Teleplan file is generated by going to Administration>Billing>Generate Teleplan File2>clicking “Create Report”, the generated file with the # of claims will show up.

Once you click “Create Report”, OSCAR looks for all unsubmitted MSP bills and puts them into the Teleplan submission file with the required format. Each row in the file is an individual claim, but the first row of the file is always the header which contains the software information. OSCAR’s Teleplan file header will look like this:

VS1T84440178347V6242OSCAR_MCMASTER V1.1 20030930OSCAR MCMASTER (905) 575-1300
  • VS1 is an identifier that this is a claim submission file with vendor record
  • T8444 is the data center ID given to you by Teleplan
  • 0178347 is the sequence number
  • V6242 is an identifier
  • Onwards is the billing/EMR software name

Note that the sequence number will always be 7 digits long, and starts on position/column 8 on EVERY ROW OF THE CLAIM FILE.

OSCAR stores the teleplan submission files in this directory on the server: OscarDocument/oscar/billing/download

Every time you interact with Teleplan, the Teleplan responses come back in text files into the OscarDocument/oscar/document directory and are tracked in the corresponding database table.

Here are the tables in OSCAR corresponding to the types of MSP/Teleplan files that OSCAR generates to track their file name. See teleplan-v4-7.pdf (gov.bc.ca) for details on what the codes stand for.

  • Remittance Claim Data: teleplanS00
  • Remittance Payee Payment Summary Record: teleplanS21
  • Remittance Practitioner Record: teleplanS22
  • Remittance Adjustment Detail: teleplanS23
  • Remittance Broadcast Message: teleplanS25

The Teleplan submission log table is log_teleplantx which has a ‘claim’ column that contains a blob of each row from all MSP files generated by OSCAR.

When OSCAR generates a Teleplan claim file, the data is also stored in the log_teleplantx which contains each row of the file including a row for the header. There is a column for sequence_no to track the current sequencenuber, and billingmaster_no which links to the billing invoice number in OSCAR.

TETA-022 SEQ NUMBER ERROR. EXPECTED: 0123456 LAST COMMITTED:0123455

This is a common Teleplan error that shows after you try to Send a claim file if you are using multiple billing/EMR systems on the same Teleplan account to submit claims or if you manually set a wrong sequence number under Manage Teleplan.

It indicates what sequence number what OSCAR sent to Teleplan (0178263 after LAST COMMITTED in the example above) and what number it should have been instead (0178264 after EXPECTED in the example above).

Here is information on sequence numbers from the Teleplan manual:

1.11.5 Sequence Number Not Valid
Message text in your session log:

TETA-022 SEQ NUMBER ERROR. EXPECTED: ___ LAST COMMITTED: ___

Although your Teleplan User ID and Data Centre Number were valid, one of the records in your
transmission did not have a sequence number that was sequentially higher by one than the
previous record on this or your last accepted transmission.

A) Each transmission must begin with the sequence number of the last record of the last successful
transmission incremented by one.

B) Each record in a transmission must have a sequence number sequentially one higher than the
previous record.

All Data Centres start with one (0000001) on their first transmission to MSP. It then increases by
one until you reach the limit of 9,999,999 at which point you must start at one (0000001) again.

In the case of a transmission refused because of an INVALID SEQUENCE NUMBER: the last
sequence number stored on our records will be transmitted to you, to allow you to setup your file
correctly and retransmit.

Contact the Teleplan Support Centre for guidance.

Note:
Teleplan has been designed so that MSP staff is unable to change the sequence number. This is
to protect the integrity of records transmitted and accepted by MSP. It also ensures that the ability
to locate a claim in progress is intact and verifiable.

The sequence number is a requirement of Teleplan for data integrity.

To avoid this error it is important to understand that before generating the claim file/report in OSCAR, you should go to Administration>Billing>Manage Teleplan and click “Get Teleplan Sequence #”. NOTE: This option will only show if you are logged in as the billing super user, which is the ‘oscardoc’ account by default (provider ID 999998, which can be changed in oscar.properties).

This will fetch the current sequence # to use from Teleplan and OSCAR will know to use that number for all new claim files generated.

You have the ability to manually set the sequence # which you can do if your OSCAR does not have the automatic Get Teleplan Sequence # feature. This would be used if you used the same Teleplan account on another EMR which shows the latest sequence #, and you need to tell your OSCAR to start from this new sequence # for all new records created. If you’re only using one OSCAR, each Teleplan response indicates the next expected sequence # so OSCAR updates it automatically. You only need to worry about setting/retrieving the sequence # if you have multiple OSCAR systems with the same Teleplan login.

Fixing TETA-022 SEQ NUMBER ERROR for an already generated claim file

You will need back-end server access to correct this error.

The error message will indicate the expected sequence number for the claim file. All sequence numbers are 7 digits long.

The claim file that OSCAR generated will need to be corrected manually.

Navigate to the OscarDocument/oscar/billing/download directory on the OSCAR server and find the Teleplan file that failed to send. The file you’re looking for is the from the MSP Filename column in the page Administration>Billing>Generate Teleplan File2.

YOU ABSOLUTELY HAVE TO BACK UP THIS FILE BEFORE MAKING ANY CHANGES. IF YOU MESS IT UP THERE IS NO WAY TO GO BACK.

The file should be opened with Notepad/a text editor. Press Ctrl+A to SELECT ALL text and then Ctrl+C to copy all the file’s contents to the clipboard.

At this point you need to update the sequence number in each row of the file, including the header. Recall what was mentioned above on the positioning of the sequence number. Manually adjusting this would take several hours. So I have developed a tool to do this for you automatically:

Increment Sequence Numbers Tool

This tool will ask you for the new sequence number to start from, and it will replace all sequence numbers in the pasted MSP file in all rows (first row/header = the sequence number entered, then increment each next row by 1).

Then you can put the output into the MSP file on the OSCAR server and save it. Next you can go to Administration>Billing>Generate Teleplan File2 and press “Send” next to this file, and it should be submitted without errors if the sequence numbers were corrected successfully.

Misc. SQL scripts

To update the sequence number for all records in log_teleplantx table where 178264 is the new sequence number to start from. This script will update the sequence_no column, and also the claim column which contains the 7 digit sequence no. starting from position 8, encoded in blob data type. Each row will have the sequence number set for the claim (blob type) as well as the sequence_no column. Note that this does not modify already existing MSP files.

-- Step 1: Create a temporary table to hold the new sequence numbers
CREATE TEMPORARY TABLE temp_seq (
    log_no INT,
    new_sequence_no INT
);

-- Step 2: Populate the temporary table with the desired sequence numbers
SET @new_sequence_no = 178264;
INSERT INTO temp_seq (log_no, new_sequence_no)
SELECT log_no, @new_sequence_no := @new_sequence_no + 1
FROM log_teleplantx
ORDER BY log_no;

-- Step 3: Update the original table using the values from the temporary table
UPDATE log_teleplantx lt
JOIN temp_seq ts ON lt.log_no = ts.log_no
SET 
    lt.sequence_no = ts.new_sequence_no,
    lt.claim = CONCAT(LEFT(lt.claim, 8), LPAD(ts.new_sequence_no, 7, '0'), SUBSTRING(lt.claim, 16));

-- Step 4: Drop the temporary table
DROP TEMPORARY TABLE temp_seq;

Table of Contents