Purging all diagnoses in openMRS does not work. How to do it?


I do have an installation of Bahmni/OpenMRS X and in there while setting up, I’ve set up all ICD10 Diagnosis version 2020. (so now the diagnosis set of sets contains all these icd10 diagnoses).

The system was never used (it’s clean). So, now I want to update that installation with the new ICD10 Diagnosis (version 2022).

Can someone suggest to me how can I delete all diagnoses (concept sets) e.g. Certain conditions originating in the perinatal period?

And all diagnoses that are part of that concept set, e.g. Newborn affected …

All in all, I would like to have a clean system (clean in the sense of no diagnosis) and then run my script to create version 2022 from the scratch.

@dkayiwa @eudson @darius @gsluthra

Hi @aidjali I have couple questions before suggesting options

  1. How did you setup ICD10 diagnosis concepts of version 2020. Did you directly add it to dictionary from UI or used any sql/migrations ?
  2. What is the difference between version 2020 concepts to 2022 ?

Options to add diagnosis concepts

  1. You can export the existing “diagnosis set of sets” concept from Bahmni CSV export module, make the necessary changes to the concept and concept-set CSV fils and import it again using Bahmni CSV import module. Documentation for the same https://bahmni.atlassian.net/wiki/spaces/BAH/pages/18415806/Configure+CSV+Import
  2. You can follow the above approach for sql queries. You can get the SQL queries from the database for the existing diagnosis concepts, make the necessary changes and run it on the clean database.
  3. You can use OCL to create and manage concepts. Concepts that want to add to the Openmrs dictionary can be created in the OCL dictionary and can be imported to OpenMRS using OCL subscription module.

Hope this answers few of your questions. Please let us know if you any further questions. cc /@gsluthra

1 Like

I would like to note that this is exactly the reason why I do not recommend using ICD-10 directly as diagnoses concepts. The need to keep updating them with each change is not relevant to clinical care. It is better to have clinical diagnoses that you use (such as the CIEL dictionary) that provides maps to ICD-10 for workflows that require ICD-10. CIEL updates the maps when needed. There haven’t been many updates that I am aware, except for a few related to COVID-19. Individual countries have their own versions of ICD-10-WHO and those might change, however.

Hi @binduak

Thank you for commenting and suggestions and sorry for the late reply but blame #vacations LOL

The thing is that I’ve set up using a python script and I managed to fix the issue via fetching all concepts with “Diagnosis” as a concept class, removing members from the concept sets (within the Diagnosis set of sets), and then re-creating the concepts as per ICD10 v2022.

Thanks again for contributing.

I guess at a certain level you are right because they keep changing. The main reason I had to update were COVID related diagnosis but then anyways, saw that there are more than 100 changes :confused: