help with creating a script to input ICD codes to database from CSV

classic Classic list List threaded Threaded
6 messages Options
Jonathan Galingan Jonathan Galingan
Reply | Threaded
Open this post in threaded view
|

help with creating a script to input ICD codes to database from CSV

Hi, I'm creating a python script to insert ICD codes directly into the database of OpenMRS from a CSV file.

I created an ICD-10 source from the user interface and mapped everything to its concept_source_id.

I filled up the concept, concept_name and concept_map with the appropriate values.

I got everything right and I could search for the concept using its id in the user interface. 

The problem is that when I try to search for the concept using its name, I get nothing. When I clicked "edit" to edit the concept, I did nothing since everything seemed ok so I just saved it. After that, the concept could now be searched via concept name. 

Is there a missing table that I need to fill in?





[hidden email] from OpenMRS Implementers' mailing list
Darius Jazayeri-3 Darius Jazayeri-3
Reply | Threaded
Open this post in threaded view
|

Re: help with creating a script to input ICD codes to database from CSV

There's a concept_word table that is used when searching for concepts. You can either populate this, or else you can use the "Update Concept Index" link on the admin page.

-Darius

On Sun, Apr 15, 2012 at 11:58 AM, Jonathan Galingan <[hidden email]> wrote:
Hi, I'm creating a python script to insert ICD codes directly into the database of OpenMRS from a CSV file.

I created an ICD-10 source from the user interface and mapped everything to its concept_source_id.

I filled up the concept, concept_name and concept_map with the appropriate values.

I got everything right and I could search for the concept using its id in the user interface. 

The problem is that when I try to search for the concept using its name, I get nothing. When I clicked "edit" to edit the concept, I did nothing since everything seemed ok so I just saved it. After that, the concept could now be searched via concept name. 

Is there a missing table that I need to fill in?





[hidden email] from OpenMRS Implementers' mailing list


[hidden email] from OpenMRS Implementers' mailing list
Jonathan Galingan Jonathan Galingan
Reply | Threaded
Open this post in threaded view
|

Re: help with creating a script to input ICD codes to database from CSV

In reply to this post by Jonathan Galingan
oh sorry, nevermind. I got it.

If anybody else encounters this problem, just click 'Update Concept Index' in the Administrator page

On Mon, Apr 16, 2012 at 2:58 AM, Jonathan Galingan <[hidden email]> wrote:
Hi, I'm creating a python script to insert ICD codes directly into the database of OpenMRS from a CSV file.

I created an ICD-10 source from the user interface and mapped everything to its concept_source_id.

I filled up the concept, concept_name and concept_map with the appropriate values.

I got everything right and I could search for the concept using its id in the user interface. 

The problem is that when I try to search for the concept using its name, I get nothing. When I clicked "edit" to edit the concept, I did nothing since everything seemed ok so I just saved it. After that, the concept could now be searched via concept name. 

Is there a missing table that I need to fill in?







--
Jonathan D. Galingan, MD
Project Manager for Computerization
Philippine General Hospital


[hidden email] from OpenMRS Implementers' mailing list
Burke Mamlin Burke Mamlin
Reply | Threaded
Open this post in threaded view
|

Re: help with creating a script to input ICD codes to database from CSV

In reply to this post by Jonathan Galingan
OpenMRS builds an index of concept names within the concept_word table.  While you could try to manually fill that table, it would be easier to simply update the index through the admin page (e.g., see this page on demo site, username/password is admin/test).

Cheers,

-Burke

On Sun, Apr 15, 2012 at 2:58 PM, Jonathan Galingan <[hidden email]> wrote:
Hi, I'm creating a python script to insert ICD codes directly into the database of OpenMRS from a CSV file.

I created an ICD-10 source from the user interface and mapped everything to its concept_source_id.

I filled up the concept, concept_name and concept_map with the appropriate values.

I got everything right and I could search for the concept using its id in the user interface. 

The problem is that when I try to search for the concept using its name, I get nothing. When I clicked "edit" to edit the concept, I did nothing since everything seemed ok so I just saved it. After that, the concept could now be searched via concept name. 

Is there a missing table that I need to fill in?





[hidden email] from OpenMRS Implementers' mailing list


[hidden email] from OpenMRS Implementers' mailing list
Andrew Kanter Andrew Kanter
Reply | Threaded
Open this post in threaded view
|

Re: help with creating a script to input ICD codes to database from CSV

Sorry for cross posting... but thought my comment also is relevant on this thread:

Folks, I strongly advise not putting ICD-10 in your dictionaries for clinical use. ICD-10 is a classification, administrative terminology and is not designed for front-line clinical use. We (CIEL/MVP) include ICD-10 as mapped terminology but use separate concepts for actual data collection. For example, a patient does not present with "Other disease of blood and blood-forming organs". That can be a classification after the fact, but we should record what the patient actually has. You also have a problem if the text of the code or the code itself changes... that is why it is best to separate this from the actual concepts used in the record. Happy to discuss this more.... but quick and easy is not always best for long term sustainability and interoperability...

Best,
Andy
 
--------------------
Andrew S. Kanter, MD MPH

- Director of Health Information Systems/Medical Informatics
Millennium Villages Project, Earth Institute, Columbia University
- Asst. Prof. of Clinical Biomedical Informatics and Clinical Epidemiology
Columbia University

Email: [hidden email]
Mobile: +1 (646) 469-2421
Office: +1 (212) 305-4842
Skype: akanter-ippnw
Yahoo: andy_kanter


From: Burke Mamlin <[hidden email]>
To: [hidden email]
Sent: Sunday, April 15, 2012 3:29 PM
Subject: Re: [OPENMRS-IMPLEMENTERS] help with creating a script to input ICD codes to database from CSV

OpenMRS builds an index of concept names within the concept_word table.  While you could try to manually fill that table, it would be easier to simply update the index through the admin page (e.g., see this page on demo site, username/password is admin/test).

Cheers,

-Burke

On Sun, Apr 15, 2012 at 2:58 PM, Jonathan Galingan <[hidden email]> wrote:
Hi, I'm creating a python script to insert ICD codes directly into the database of OpenMRS from a CSV file.

I created an ICD-10 source from the user interface and mapped everything to its concept_source_id.

I filled up the concept, concept_name and concept_map with the appropriate values.

I got everything right and I could search for the concept using its id in the user interface. 

The problem is that when I try to search for the concept using its name, I get nothing. When I clicked "edit" to edit the concept, I did nothing since everything seemed ok so I just saved it. After that, the concept could now be searched via concept name. 

Is there a missing table that I need to fill in?





[hidden email] from OpenMRS Implementers' mailing list


[hidden email] from OpenMRS Implementers' mailing list



[hidden email] from OpenMRS Implementers' mailing list
Andrew Kanter Andrew Kanter
Reply | Threaded
Open this post in threaded view
|

Re: help with creating a script to input ICD codes to database from CSV

In reply to this post by Jonathan Galingan
The best way for this to work would be to allow searching by mapped code like maternalconceptlab.com does. These codes change and so should not be the primary code. It is possible to add the code as a non-unique synonym but it becomes a maintenance nightmare to keep track of these terms when things change. 

At CIEL I would like to understand better the use case people are using icd for. Perhaps we should build out a common set of admin codes with links to clinical concepts that would fall under them. 

Andrew S. Kanter, MD MPH
+1.646.469.2421
Sent from my iPhone 4G

On Apr 15, 2012, at 2:58 PM, Jonathan Galingan <[hidden email]> wrote:

Hi, I'm creating a python script to insert ICD codes directly into the database of OpenMRS from a CSV file.

I created an ICD-10 source from the user interface and mapped everything to its concept_source_id.

I filled up the concept, concept_name and concept_map with the appropriate values.

I got everything right and I could search for the concept using its id in the user interface. 

The problem is that when I try to search for the concept using its name, I get nothing. When I clicked "edit" to edit the concept, I did nothing since everything seemed ok so I just saved it. After that, the concept could now be searched via concept name. 

Is there a missing table that I need to fill in?





[hidden email] from OpenMRS Implementers' mailing list

[hidden email] from OpenMRS Implementers' mailing list