papin0 wrote on Thursday, August 21, 2014:
I have been trying to get the Provider NPI list to show up in alphabetical order by the First Name.
we found this code on the forum but it does not show the file that needs to be change.
We are using OpenEMR 4.1.2 (7)
Here is the code:
// provider list, including address book entries with an NPI number
else if ($data_type == 11) {
$ures = sqlStatement("SELECT id, fname, lname, specialty FROM users " .
"WHERE active = 1 AND ( info IS NULL OR info NOT LIKE ‘%Inactive%’ ) " .
“AND ( authorized = 1 OR ( username = ‘’ AND npi != ‘’ ) ) " .
“ORDER BY lname ASC”);
echo “”;
echo “” . htmlspecialchars( xl(‘Unassigned’), ENT_NOQUOTES) . “”;
while ($urow = sqlFetchArray($ures)) {
$uname = htmlspecialchars( $urow . ’ ’ . $urow, ENT_NOQUOTES);
$optionId = htmlspecialchars( $urow, ENT_QUOTES);
echo “<option value=’$optionId’”;
if ($urow == $currvalue) echo " selected”;
echo “>$uname”;
}
echo “”;
TIA