Is there a way to drop only drug concept but keep other concept?

Hi I just wonder is there a way to drop only drug concepts and keep other existing concepts?

Not sure what you are trying to do here. Are you trying to remove the drug table rows but keep the concept table rows? Are you trying to delete drugs from the concept table? If so, Why?

You could do something like this (using direct SQL queries on the OpenMRS database):

select distinct concept_id from drug;
-- you'll need these in a later step, reformatted like (comma, separated, values)

delete from drug;

delete from concept where concept_id in (1, 2, 3)
-- replace (1, 2, 3) with the actual concept ids from above

(Though, I’m not sure if this will cause problems with Bahmni ERP. Andy’s question about what you’re trying to do would be helpful to answer.)

Hi @akanter @darius

what i’m trying to do is to use existing concepts in Bahmni. (I don’t want to create a concept of instruction like twice a day, thrice a day blah blah blah.) and I want using our real drugs in our hospital so we could test how it’s going for the real situation. because I have an error when I import drug concept (likely due to it’s using same existing generic name in Bahmni but slightly different in words like Amoxicillin&Clavuronic acid(existing one) and Amoxycillin+Clavuronic acid(the new one I created))

so that it what I’m trying to do

Thanks