Sql error after entering allergies


Can any one point to the file where this can be sorted pl.
I can give it a try with a little heads up.

OpenEMR Version
I’m using OpenEMR version 7.02 with latest patch_1

I’m using: edge, chrome

Operating System
I’m using: win11

Did you search the forum for similar questions?

Did you check the logs?

Medical Record Dashboard -

SQL Statement failed on preparation: SELECT term as code_text,term as code_text_short FROM sct2_description WHERE sct2_description.conceptId=? AND active=1 LIMIT 1’

Query Error

ERROR: query failed: SELECT term as code_text,term as code_text_short FROM sct2_description WHERE sct2_description.conceptId=? AND active=1 LIMIT 1

Error: Table ‘open73.sct2_description’ doesn’t exist

C:\wamp\www\open72\custom\code_types.inc.php at 803:sqlQuery
C:\wamp\www\open72\src\Services\CodeTypesService.php at 109:lookup_code_descriptions(SNOMED-CT:247472004,code_text)
C:\wamp\www\open72\src\Services\BaseService.php at 561:lookup_code_description(SNOMED-CT:247472004)
C:\wamp\www\open72\src\Services\AllergyIntoleranceService.php at 128:addCoding(Array)
C:\wamp\www\open72\src\Services\AllergyIntoleranceService.php at 222:search(Array,1)
C:\wamp\www\open72\interface\patient_file\summary\demographics.php at 1085:getAll(Array)

Ok fixed it… commented out the likes in custom\code_types.inc.php

SNOMED is not installed in my openemr, so this must be causing a conflict.

post commenting out the lines

Now its working fine.

If your openemr database name is open73 then it looks like SNOMEDS aren’t installed. Search forum on how to install
if not get on correct database or check you sqlconfig.php

1 Like

The problem is i cannot get it to download - SNOMED. the download startes then gets terminated. Maybe some permission issue to india.

Oh Robert,
Don’t modify code unless fixing a bug you know will be included in official patch or release. You’ll cause yourself much grief later on.

I believe SNOMEDS have to be licensed international!

1 Like

Yes @sjpadgett I know. I shall revert back the code commenting and see a way to get the allergies entered visible.
Is there no way to run the allergies feature without having the need of SNOMED installed?
Can is there a setting to disable snomed?

Since you already started using them, turning off snomeds in Forms > Lists > Code Types will probably still error but worst because of any render lookups. You can try.
Delete existing codes if you can.

Check into snomeds if license is needed or ask some of your fellow countrymen using openemr. I’ve never seen what you’re getting.
Use ICD10 instead if reporting and billing isn’t an issue for you.

ICD 10 is installed, and SNOMED i dont have access to downloads, so never used snomed.

The error is back after using the original default code.

Here you have a copy of SNOMED on TeraBox 524M


1 Like