teryhill wrote on Friday, July 11, 2014:
Does any one know how to link a code type in the codetype list with another file so when you select a code it pull another code kind of like a group standing order.
teryhill wrote on Friday, July 11, 2014:
Does any one know how to link a code type in the codetype list with another file so when you select a code it pull another code kind of like a group standing order.
blankev wrote on Friday, July 11, 2014:
Look at the examples in any Demo version and go to:
Administration => List => Code types
Administration => List => Fee sheet
With these tow list types you might be able to discover how connecting different code with each other. There is somewhere also a WIKI page on this subject, but could not find it.
bradymiller wrote on Friday, July 11, 2014:
Hi Terry,
Can you provide a specific example?
thanks,
-brady
teryhill wrote on Friday, July 11, 2014:
I am trying to add the revenue codes to the hcpcs file with out addeding a field to the codes table (and all the other tables) to hold the revenue codes which are needed to do UB-04 billing.
fsgl wrote on Friday, July 11, 2014:
Terry,
Unlike modifiers in CPT which will vary, it seems that revenue codes are fixed for specific HCPCS codes. Please correct if perception is wrong.
If related_code is not used for anything else, then it should be a simple matter of populating the entire column rather going through the contortion of linkage.
El Hefe,
Terry wants to add institutional billing to the Project. Is that not glorious?
sunsetsystems wrote on Friday, July 11, 2014:
You can go to the Code Types list and turn on the “Relations” checkbox for HCPCS. Then when you edit a HCPCS code you will be able to link one or more other codes of any type to it. Those are stored in the related_code column of the codes table. Search for “related_code” in the source for various examples of parsing that.
teryhill wrote on Friday, July 11, 2014:
Thanks I will work in that areana for a while.
teryhill wrote on Friday, July 11, 2014:
Ok I am getting this
ERROR: query failed: SELECT * FROM codes WHERE code = A0130
Error: Unknown column ‘A0130NULL’ in ‘where clause’
With this Code
$sql = “SELECT * FROM codes WHERE code = $getrevcd”;
blankev wrote on Friday, July 11, 2014:
Now where are you? This could mean many things. But the SQL is looking for something that is not there.
Better wait for ROD to get a better answer. Keep him interested, this is one of his many fields of expertise!
blankev wrote on Friday, July 11, 2014:
If this fsgl assumption is correct, why not make the HCPCS Codes into something with a FEE.
It would be great if this enhancement of Code could be traced to the source and be imported directly as something similar as ICD9 and ICD10 codes. But now for the whole UB04 Codes and declaration possibilities…
Please keep us updated with the progress!
sunsetsystems wrote on Friday, July 11, 2014:
Is that your code? $getrevcd needs to be in single quotes. Or better, use binding like this:
$res = sqlStatement(“SELECT * FROM codes WHERE code = ?”, array($getrevcd));
I’m sure that’s in the wiki somewhere but not sure where offhand.
Oh and by the way, select on code type too, not just code.
teryhill wrote on Friday, July 11, 2014:
I am working on the printout right now . Once it is done the reformating into the 837I will be the next task. See attached for progress
teryhill wrote on Friday, July 11, 2014:
Ok I have this section and I am missing something I get no output for my echo statment. I am seeing the code in the sql statement but $row is empty. It ain’t much but here is the code I am trying to use. (still learning)
$sql = "SELECT * FROM codes WHERE code = ?";
$res = sqlStatement($sql, array($getrevcd) );
while ($row = sqlFetchArray($res)) {
$code = $row['code'];
$code_text = $row['code_text'];
$code_type = $row['code_type'];
$modifier = $row['modifier'];
// $units = $row['units'];
$superbill = $row['superbill'];
$related_code = $row['related_code'];
$cyp_factor = $row['cyp_factor'];
$taxrates = $row['taxrates'];
$active = 0 + $row['active'];
$reportable = 0 + $row['reportable'];
$financial_reporting = 0 + $row['financial_reporting'];
}
echo($row['related_code']);
sunsetsystems wrote on Friday, July 11, 2014:
Suggest trying a similar query with phpmyadmin. Offhand it sounds like there’s no match on the code you’re searching for.
teryhill wrote on Friday, July 11, 2014:
I had a duplicate code in the table. Now I am getting some where again. Thanks Rod ET all
sunsetsystems wrote on Friday, July 11, 2014:
Oh and $row is not usable outside of your loop. Perhaps you want
echo $related_code;
?
If you’re expecting just one row, use sqlQuery() instead of sqlStatement(). See existing code for examples.
teryhill wrote on Friday, July 11, 2014:
Thanks Will Do
teryhill wrote on Friday, July 11, 2014:
current code in hopes that this is better
$sql = "SELECT * FROM codes WHERE code = ?";
$res = sqlQuery($sql, array($getrevcd) );
put_hcfa($lino, 1, 4, substr($res['related_code'],14,4));
Thanks for the Help Rod
sunsetsystems wrote on Friday, July 11, 2014:
Looks promising but too fragile. You need to:
Include a test for code_type in the WHERE clause. You don’t know if some other code type has the same code in it.
Parse out the related code. Don’t assume it’s there, or that it’s the first or only one. Again refer to other code that does this.
teryhill wrote on Friday, July 11, 2014:
Does this help
$num = ($hcfa_proc_index);
$tmp = $claim->procs[$num][code_text];
if ($claim->procs[$num][code_type] == 'HCPCS') {
$tmpcode = '3';
}
else
{
$tmpcode = '0';
}
$getrevcd = $claim->cptCode($num);
$sql = "SELECT * FROM codes WHERE code_type = ? and code = ?";
$res = sqlQuery($sql, array($tmpcode,$getrevcd) );
put_hcfa($lino, 1, 4, substr($res['related_code'],14,4));