I installed SQL-LEDGER and i configured the postgresql and I am able to login,etc. When I go to openEMR, then billing, then EOB. I am getting the following error:
Fatal error: Call to undefined function: pg_pconnect() in /usr/local/apache2/htdocs/openemr/library/sql-ledger.inc on line 9
I checked the sql-ledger.inc file and it is correct, the pg_connect() function does not exist. Did anyone else have this problem, if so how did you fix it?
ok… i uninstalled postgres and re-installed it. I also recompiled php with the --with-pgsql=shared option. then i recreated the postgres database for sql-ledger. made sure the extension was added in php.ini restarted apache and i still can’t get pg_connect() error message from happening… i’m lost … Can someone help me?
and see if its output includes a “pgsql” section. There may be more you have to do to install pgsql support, like compiling the module for it? I don’t remember offhand all the details of how that works.
However most Linux distributions will give you an option for installing this without having to recompile PHP.
if (!extension_loaded(‘pgsql’)) {
dl(‘pgsql.so’);
}
and voila!! it ran… don’t ask me why it wasn’t loading before…
Also i did a search on sql-ledger’s site and they said if you are using postgres 8.0 or higher with sql-ledger 2.6.3 or lower then you need to make certain changes to the Pg-tables.sql script… Here’s the link http://www.sql-ledger.org/cgi-bin/nav.pl?page=misc/faq.html&title=FAQ
I did that also. now i just have to figure out how to use sql-ledger.
oh one last thing… the errors :
Fault: Code: 5 Reason ‘Didn’t receive 200 OK from remote server. (HTTP/1.1 500 Internal Server Error)’
and I thought once I hook up sql-ledger they will go away. what do i need to do to stop that… I definitely need to use sql-ledger.
Well, i am getting further. I must have entered in wrong information in the config.php file under the accounting variables. Now I am getting this error instead.
Fault: Code: 6 Reason ‘No data received from server.’
How do i fix this?
Here are my params in the config.php just wondering if these are correct…
Port 5432 doesn’t look right. I believe this is the port the web server listens on, usually 80. If you are really using port 5432 then you may have a conflict because that’s the default for the PostgreSQL server.
Also make sure ws_server.pl exists at <documentroot>/sql-ledger/bin/ws_server.pl.
Ok. The apache is listening on port 80. The 5432 is what postgres is listening on. but what your saying is in the config.php I should have port 80 instead of the 5432? How does openemr know how to connect to postgres then? I’m confused. Maybe if you show me the config files like how your config.php is setup and the sql-ledger is setup.
Yes, port 80 instead of 5432. In this situation OpenEMR does not talk directly to Postgres. It talks to ws_server.pl via XML-RPC over HTTP, i.e. using the web server. So in config.php you are telling it the web server’s hostname, port, URL, etc. for doing that.
One other thing. You might need to modify line 7 of ws_server.pl to correctly point to your sql-ledger directory.
ok if i change the port from 5432 to 80 i get the fault code 5: Reason ‘Didn’t receive 200 OK from remote server. (HTTP/1.1 500 Internal Server Error)’
and if I put 5432 in it’s place then i get the fault code 6 error :Fault: Code: 6 Reason ‘No data received from server.’
i’m confused on what params go in the config.php. I’m thinking that’s the params to connect to the sql -ledger… that’s why i put 5432 for the port
I saw his error a lot when I was debugging my SQL-Ledger installation.
Fault: Code: 5 Reason ‘Didn’t receive 200 OK from remote server. (HTTP/1.1 500 Internal Server Error)’
It went away after I fully configured the OpenEMR, FreeB, and SQL-Ledger. In my mind the appearance of this error message means your on the right track.
I will be glad to show my current config files.
I would think the second message:
Fault: Code: 6 Reason ‘No data received from server.’
is not a good thing. I never got this during my configuration.
ok… now I’m not getting any error messages… YEAH!! I modified line 7 of ws_server.pl to correctly point to the sql-ledger directory. Now when I go to billing and I put a date range in and hit export OFX, i can see all the charges. Now i select all to queue in HCFA or X12 (i tried both). Then i go and click start batch processing. It says it is started… I am not sure if I am doing this correctly… where should I look for a file? and I this working right?
Yes!! it works now… One question I have is when you go to EOB and you do a search for a patient that you put charges in for, shouldn’t you be able to see the information of that patient??? Nothing comes up when I do a search. Not sure if OpenEMR should be able to talk to postgres or sql-ledger in that respect. Or is there something else that I need to do. I was able to process a claim and produce a .pdf file ok.
We seem to be covering all the gotchas with SQL-Ledger here. This thread should become a HOWTO.
Billing results will not get into SQL-Ledger if the patient does not already exist there. This will be a problem if you have set up any patients in OpenEMR before you have set up the SQL-Ledger interface. To resolve it, go into the patient demographics and then save it, which causes the patient to be also saved into SL.