Claim.class.php and SQL-Ledger

markleeds wrote on Sunday, February 03, 2008:

Rod,

I am playing with Claim.class.php, trying to generate data to print to a HCFA 1500 form.  I don’t have SQL-Ledger installed, so I get an error when creating the $claim object.  I was wondering if the following was ok to use and commit or if it should be handled differently.  I added a third argument to the constructor:

function Claim($pid, $encounter_id, $SL = TRUE) {
   $this->pid = $pid;
   $this->encounter_id = $encounter_id;
   $this->procs = array();
   $this->SL = $SL;

And an if around the small block of code using SL,

if ($this->SL == TRUE) {
  SLConnect();
  $arres = SLQuery("select id from ar where invnumber = " .
    “’{$this->pid}.{$this->encounter_id}’”);
  if ($sl_err) die($sl_err);
  $arrow = SLGetRow($arres, 0);
  if ($arrow) {
    $this->invoice = get_invoice_summary($arrow[‘id’], true);
  }
  SLClose();
}

Thanks,

Mark

sunsetsystems wrote on Sunday, February 03, 2008:

Instead of adding an argument, I’d suggest testing $GLOBALS[‘oer_config’][‘ws_accounting’][‘enabled’].  This comes from includes/config.php and indicates whether SQL-Ledger is being used.  Otherwise your change looks fine.

It’s great to hear that you are working on this!

Rod
www.sunsetsystems.com

markleeds wrote on Sunday, February 03, 2008:

Thank you.  That worked, so I did it that way and committed it.

I wrote a little script to extract all of the ‘get’ function names from Claim.class.php so I can start working with it.  I just want to generate a page with css that will put the right data in the right boxes on the form.  I have cut way back on taking insurance to the point that $99/month for Zirmed may not be worth it anymore.  If this works out, I can just print out the occasional paper claim when I need it.

I’ll let you know if anything else comes up.

Thanks again,

Mark

sunsetsystems wrote on Monday, February 04, 2008:

You probably already know this, but just in case: with css you can specify sizes, widths, heights, etc. in points – this gives you really nice control over placement of things on the printed page.  By the way are you generating the whole form, or using preprinted forms?

And I guess you have also looked at gen_x12_837.inc.php to see how it uses Claim.class.php to generate claim data, right?

Rod
www.sunsetsystems.com

markleeds wrote on Monday, February 04, 2008:

I am not going to attempt to generate the whole form.  The goal is to generate output similar to freeb but without freeb.  To start, I am only concerned with generating one claim at a time, but I suspect it may be possible to print multiple pages this way.

I was motivated by the success of the recent four panel prescriptions I added to CAMOS.  I used absolute positioning in inches to divide the 8.5" x 11" page into four equal parts and print a different prescription in each.  The browser and printer apparently honor these measurements and the prescriptions are printing exactly as hoped.

I will look at gen_x12_837.inc.php.  Tomorrow, I will bring some forms home and start measuring.