Fee Sheet error

blankev wrote on Friday, May 16, 2014:

Linux version 4.2.5 on server, PHP 5.2.17.

Whenever the Fee Sheet is opened I get the following error:

ERROR: query failed: SELECT pay_amount as PatientPay,session_id as id,date(post_time) as date FROM ar_activity where pid =? and encounter =? and payer_type=0 and account_code=‘PCP’

Error: Unknown column ‘account_code’ in ‘where clause’

I did some patching in the past with some new development code. Now I can’t find the correct spot where to make changes so this error will disappear. Table or PHP files, both etc.

Any help is welcome.

yehster wrote on Friday, May 16, 2014:

Unknown column means database.

blankev wrote on Friday, May 16, 2014:

Any ge to look for the solution? Demo and search for: account_code

in log there is a field with the following text:

INSERT INTO ar_activity (pid,encounter,code_type,code,modifier,payer_type,post_time,post_user,session_id,pay_amount,account_code) VALUES (?,?,?,?,?,0,now(),?,?,?,‘PCP’) (‘1’,‘5’,‘CPT4’,‘99202’,’’,‘1’,‘1’,‘25.00’)

But no account_code in any table? What is next? Software…

yehster wrote on Friday, May 16, 2014:

In a “clean install” account_code is supposed to be there.

I couldn’t tell you which patch exactly the column was introduced, but one of the upgrade scripts is supposed to create the column for you.

fsgl wrote on Friday, May 16, 2014:

Found account_code as the 17th column in the 4.1.2 (3)Demo and in the Dev. Demo’s. See attachment. It’s the 16th column in the 4.1.1 Demo.

Does the addition of that column correct the problem?

blankev wrote on Friday, May 16, 2014:

Tnx!!! This solved the problem. I should have asked some days ago.

It did correct the problem and also created the option to Save etc… (my next question.

Tnx a lot.

blankev wrote on Friday, May 16, 2014:

I did change the whole table. Exported from demo 4.2 Imported in my local. There were several fields missing.

fsgl wrote on Friday, May 16, 2014:

代表我自己和葉医生,
请不要站在仪式.

blankev wrote on Friday, May 16, 2014:

OK, no stars no medals. But please explain how you found the field? I did a search in the Database, but did not get the field as a result only contents.

fsgl wrote on Friday, May 16, 2014:

Your second post said to look in ar_activity.

Next step was to scan the columns under the Browse tab, but it’s quicker from the Structure tab.

Under the Search tab, account_code is the penultimate entry. Perhaps you did not scroll down far enough.

In any event, all’s well that ends well.