system
(system)
May 16, 2014, 2:07pm
1
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.
system
(system)
May 16, 2014, 2:19pm
2
yehster wrote on Friday, May 16, 2014 :
Unknown column means database.
system
(system)
May 16, 2014, 2:46pm
3
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…
system
(system)
May 16, 2014, 2:50pm
4
yehster wrote on Friday, May 16, 2014 :
In a “clean install” account_code is supposed to be there.
--
-- Table structure for table `openemr_module_vars`
--
DROP TABLE IF EXISTS `openemr_module_vars`;
CREATE TABLE `openemr_module_vars` (
`pn_id` int(11) unsigned NOT NULL auto_increment,
`pn_modname` varchar(64) default NULL,
`pn_name` varchar(64) default NULL,
`pn_value` longtext,
PRIMARY KEY (`pn_id`),
KEY `pn_modname` (`pn_modname`),
KEY `pn_name` (`pn_name`)
) ENGINE=InnoDB AUTO_INCREMENT=235 ;
--
-- Inserting data for table `openemr_module_vars`
--
INSERT INTO `openemr_module_vars` VALUES (234, 'PostCalendar', 'pcNotifyEmail', '');
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.
system
(system)
May 16, 2014, 6:20pm
5
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?
system
(system)
May 16, 2014, 7:17pm
6
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.
system
(system)
May 16, 2014, 8:35pm
7
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.
system
(system)
May 16, 2014, 9:11pm
8
fsgl wrote on Friday, May 16, 2014 :
代表我自己和葉医生,
请不要站在仪式.
system
(system)
May 16, 2014, 9:18pm
9
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.
system
(system)
May 16, 2014, 9:40pm
10
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.