ideaman911 wrote on Friday, January 30, 2009:
I have gotten a bunch of requests for this and it hasn’t been here four hours yet! So I wonder that it was never done before. Anyway, I have put the code changes below.
I want to note that I cannot be certain this works with any other version than 2.9.1 dev which is available for distribution now as a "beta". But I would certainly think it should be similar for other versions.
First step is to simply open the Admin - Database and look at the openemr_postcalendar_categories data using BROWSE. You should see a series which includes Office Visit, Vacation, No Show, etc. with an associated pc_catid code which need not be in order. The Encounter listing will display only some of these. Most critical is that the highest pc-catid value be known. In mine it was 11 for "Reserved", but it could be anything. When you add another, its pc_catid will be the next higher value, which you will need to know for the association below.
When you want to add the other POS "services", you must use Admin - Calendar - Categories and create a New Category for each you intend to use (you can also edit any of the others for duration, etc as you wish). Then return to the database listing and make note of the pc_catid for each.
For example, to add House Call and other service locations to calendar and to encounter drop-down to allow substitution of POS in claims, I add them as New Categories in Admin - Calendar as House Call color #FFFF99 duration 1 Hr (3600) and change Office Visit to 1 Hr if desired (3600), and add TC Conference color Red IN THAT ORDER and verify with BROWSE in openemr_postcalendar_categories database in Admin to verify House Call has pc_catid = 12 also - these will display in Encounter view/new as drop-down selections. Then add conditionals in …/library/claim.class.php at Function for POS near line 527, and do same for SNF, or other service locations as appropriate to enter correct code override. Logic shown allows select substitution for claim of whatever form_encounter[‘pc_catid’] is in table with whatever POS code is required for proper claim submission, to replace POS code defined for facility as default. Codes listing can be found in …/library/classes/POSRef.class.php and details are available at CMS website.
Code changes in …/library/claim.class.php are per the following near 526:
function facilityPOS() {
// All JCH by Joe Holzer (C) 1/8/09 <im@holzerent.com> JCH
// For providers with multiple facilities, need multiple POS, especially for medicare & Medicaid JCH
// We need the pos_code for this encounter if it is a 12 (or other select) to override the facility[pos_code] JCH
// Codes as shown are House, TC Conf, Non-Skilled Nurse Facility and Fayetteville (converts to Office) JCH
// After entry as added categories for Admin - Calendar and verify pc_catid values to make $enc_catid JCH
// Values for $pos_code are available from CMS and are in …/classes/POSRef.class.php JCH
// This replaces function facilityPOS() as originally by Rod Roark JCH
$enc_catid = x12clean(trim($this->encounter[‘pc_catid’])); // Needed value for POS overwrite JCH
$pos_code = ‘’; // Set $pos_code blank by default JCH
if ($enc_catid==‘12’) {
$pos_code = ‘12’; } // If House Call then code is 12 JCH
else if ($enc_catid==‘13’) {
$pos_code = ‘99’; } // If TC Conf then code is 99 JCH
else if ($enc_catid==‘14’) {
$pos_code = ‘32’; } // If Non SNF then code is 32 JCH
else if ($enc_catid==‘15’) {
$pos_code = ‘11’; } // If Fayetteville then code is 11 - could have been omitted JCH
if ($pos_code != ‘’) { // Only replace if there is a valid code per tests JCH
return $pos_code; }
else return x12clean(trim($this->facility[‘pos_code’]));
}
which replaces the original function facilityPOS()
I advise keeping your original and ONLY edit its copy as needed to fix the specifics per my edits in the POS Function, in case other functions are different between versions.
Good Luck.
Joe Holzer