I am trying to find out whether there is something I need to fix in the 
CIEL/MVP dictionary, too... Can someone reduce this discussion to what SQL I 
should run and what I need to fix?

Thx,
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: [email protected] 
Mobile: +1 (646) 469-2421
Office: +1 (212) 305-4842
Skype: akanter-ippnw
Yahoo: andy_kanter


>________________________________
>From: Darius Jazayeri <[email protected]>
>To: [email protected]
>Sent: Wednesday, September 21, 2011 5:33 PM
>Subject: Re: [OPENMRS-DEV] Duplicate concept name errors in Metadata Sharing 
>Module
>
>
>We're supposed to *allow* duplicate synonyms (e.g. HSM) but not allow 
>duplicate preferred-in-locale or fully-specified names.
>
>
>IIRC MDS doesn't do anything besides call ConceptValidator.validate()... and 
>peeking at the code for that validator, it seems like it ignores retired 
>concepts...
>
>
>Is it possible that the import contains concepts that duplicate the name?
>
>
>-Darius
>
>
>On Wed, Sep 21, 2011 at 7:52 PM, Jeremy Keiper <[email protected]> wrote:
>
>This is better!  I now only see six in our production environment.  We have 
>narrowed that to three in our development server.  I still have an issue with 
>Metadata Sharing Module seeing a duplicate name for one concept that has 
>another retired concept with the same name.  I cannot unretire that concept or 
>change its name through the UI.  I'm afraid I will have to alter it in SQL, 
>and therefore bypass API methods and Sync will not recognize the change.
>>
>>
>>Jeremy Keiper
>>OpenMRS Core Developer
>>AMPATH / IU-Kenya Support
>>
>>
>>
>>On Wed, Sep 21, 2011 at 3:09 PM, Wyclif Luyima <[email protected]> wrote:
>>
>>That query is still missing out one bit, checking the possible duplicates are 
>>either marked as preferred or fully specified names in the same locale 
>>because, below is the edited query
>>>
>>>
>>>select count(cn.concept_id) as total, cn.name, cn.locale from concept_name 
>>>cn inner join concept c on c.concept_id=cn.concept_id where c.retired=0 and 
>>>(cn.concept_name_type ='fully_specified' or cn.locale_preferred = 1) and 
>>>cn.voided=0 group by name, locale having total > 1 order by total desc;
>>>
>>>
>>>The logic  that determines a duplicate gets a little more complex to write 
>>>in a single query because there is a scenario where both names belong to the 
>>>same concept and more, this is why i would like to know what happens if you 
>>>try saving any of those concepts in the web app, if not, we will end up 
>>>masking a bug in the module.
>>>
>>>Wyclif
>>>
>>>
>>>On Wed, Sep 21, 2011 at 2:31 PM, Jeremy Keiper <[email protected]> wrote:
>>>
>>>Also, in the resulting list of duplicate names, I found three of the above.  
>>>However, I did not find HEPATOSPLENOMEGALY.  I did, however, find duplicates 
>>>of one of the synonyms of it: HSM.
>>>>
>>>>
>>>>Jeremy Keiper
>>>>OpenMRS Core Developer
>>>>AMPATH / IU-Kenya Support
>>>>
>>>>
>>>>
>>>>On Wed, Sep 21, 2011 at 2:26 PM, Jeremy Keiper <[email protected]> wrote:
>>>>
>>>>I just ran the following query and found 37 duplicated unique names (that 
>>>>have not been voided) for concepts that have not been retired:
>>>>>
>>>>>
>>>>>select count(cn.concept_id) as total, cn.name, cn.locale from concept_name 
>>>>>cn inner join concept c on c.concept_id=cn.concept_id where c.retired=0 
>>>>>and cn.voided=0 group by name, locale having total > 1 order by total desc;
>>>>>
>>>>>
>>>>>Is this possibly what is causing my problems with Metadata Sharing Module, 
>>>>>and therefore the API?  By the way, I'm running 1.8.2.
>>>>>
>>>>>Jeremy Keiper
>>>>>OpenMRS Core Developer
>>>>>AMPATH / IU-Kenya Support
>>>>>
>>>>>
>>>>>
>>>>>On Wed, Sep 21, 2011 at 1:52 PM, Jeremy Keiper <[email protected]> wrote:
>>>>>
>>>>>When creating an export package in Metadata Sharing Module from a 
>>>>>selection of eight forms, I get the following error:
>>>>>>Concept [a898a552-1350-11df-a1f1-0026b9348838] 'DERMATOPHYTOSIS' is a 
>>>>>>duplicate name in locale 'en'
>>>>>>Concept [a89565ea-1350-11df-a1f1-0026b9348838] 'DECREASED SENSATION' is a 
>>>>>>duplicate name in locale 'en'
>>>>>>Concept [a8a37202-1350-11df-a1f1-0026b9348838] 'HEPATOSPLENOMEGALY' is a 
>>>>>>duplicate name in locale 'en'
>>>>>>Concept [a890c21a-1350-11df-a1f1-0026b9348838] 'SULFADOXINE AND 
>>>>>>PYRIMETHAMINE' is a duplicate name in locale 'en'
>>>>>>
>>>>>>
>>>>>>When we first saw this error, we investigated the forms and determined 
>>>>>>that three of the related concepts were incorrectly referenced in forms 
>>>>>>and that two concepts referencing HSM did not have preferred names.  We 
>>>>>>made these changes, but are still getting these errors.  Is there an API 
>>>>>>restriction that is causing this validation problem?  Is there something 
>>>>>>I can do in SQL to test conditions that will cause this problem, so I can 
>>>>>>rectify them?
>>>>>>Jeremy Keiper
>>>>>>OpenMRS Core Developer
>>>>>>AMPATH / IU-Kenya Support
>>>>>>
>>>>>
>>>>
>>>>
>>>>________________________________
>>>> Click here to unsubscribe from OpenMRS Developers' mailing list 
>>>
>>>
>>>________________________________
>>> Click here to unsubscribe from OpenMRS Developers' mailing list 
>>
>>>>________________________________
>> Click here to unsubscribe from OpenMRS Developers' mailing list 
>
>________________________________
> Click here to unsubscribe from OpenMRS Developers' mailing list 
>
>

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to 
[email protected] with "SIGNOFF openmrs-devel-l" in the  body (not 
the subject) of your e-mail.

[mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]

Reply via email to