Add prescription fails when searching RxNorm

I am a new user but i just got the docker images setup and running locally.

I have imported RxNorm list from jan 2025 and when you search for a drug from the add prescription modal there is a sql error in the console.

The table name is case sensitive while the query in library/ajax/prescription_drugname_lookup.php has a lowercase table name the application has been installed with uppercase RxNorm table names.

I am using “version”: “7.0.2”,

I fixed this by changing the table name in the query to be uppercase.

 $sql = "SELECT `str` as name, `RXCUI` as `rxnorm` FROM RXNCONSO WHERE `SAB` = 'RXNORM' AND `str` LIKE ? GROUP BY `RXCUI` ORDER BY `str` LIMIT 100";```

Hi Chris, I ran into this problem as well, have a fix that will be going into the next release coming out hopefully in a few weeks.

1 Like

I still seem to have this issue. Tried importing it with the September 2nd release.
The fix is to change to upper case in : library/ajax/prescription_drugname_lookup.php

$sql = “SELECT str as name, RXCUI as rxnorm FROM RXNCONSO WHERE SAB = ‘RXNORM’ AND str LIKE ? GROUP BY RXCUI ORDER BY str LIMIT 100”;

Just had to make FROM rxnconso to RXNCONSO

2 Likes