CSV Upload, creating concepts with the given UUID

Description

Context: The form json when exported refers concept with their uuids. However there is no way to ensure that the concepts in the other environment will be with the same uuids.

The concept csv upload in Admin tool doesn't allow creating concepts with a pre-specified uuid. Either the concept csv upload needs to be fixed or form json export/import need to refer concepts with their names or some alternate better solution.

A larger ideal solution would be to use concept mappings from a concept library like snomed.

Raised a pull request to create concepts with given uuids in the CSV
https://github.com/Bahmni/bahmni-core/pull/25

Attachments

1

Gliffy Diagrams

Activity

Suman Maity June 21, 2018 at 6:31 AM

Tried with following CSV, it works fine

Angshuman Sarkar May 2, 2018 at 10:10 AM

Which also makes me wonder if our documentation is right. Check "Migrate Concept and Concept Sets", it says UUID for both concept and conceptSet as mandatory! As of now, mentioning the UUID has no effect, if you want a new concept to be created with the given UUID. The UUID is only used as of now to update existing concepts if any by the same UUID.

Angshuman Sarkar May 2, 2018 at 9:53 AM

regarding the UUID being different, I think thats what the PR is trying to address. As of now (0.90), no matter whether the UUID is specified, it gets overwritten if it is deemed a new concept. This is determined here which is called from ReferenceDataConceptService.saveConcept() .

Regarding why it appears in the "concept_set.csv", need to check that - if thats supposed to export only the concepts that are defined as "set".

Ivo May 1, 2018 at 4:03 PM

I reviewd the PR and left my comments. Waiting for or

Ivo May 1, 2018 at 3:51 PM

I tried to replicate the issue in order to review it and I dont quite understand it yet.

When I create a concepts.csv (based on a concepts.csv exported from bahmni itself)

"uuid","name","description","class","shortname","datatype","units","High Normal","Low Normal","Allow Decimal","locale","synonym.1","answer.1","reference-term-source","reference-term-code","reference-term-relationship"
"6f6e6661-e074-453a-b7ba-4c7397ae561e","friend",,"Misc",,,,,,,,"","",,,

and import it into my local instance, and export it again it ends up in the concepts_set.csv like so

"uuid","name","description","class","shortname","child.1","reference-term-source","reference-term-code","reference-term-relationship"
"586538ec-5dff-4ee0-9159-f56f5b6b9b3b","friend",,"Misc",,"",,,

I can see that the uuid's are different but why is it exported in concept_sets.csv after importing it as file type concept?

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Labels

UAT Assignee

Reviewer

Sprint

Fix versions

Priority

Created December 15, 2017 at 12:08 PM
Updated August 2, 2018 at 7:24 AM
Resolved June 21, 2018 at 6:30 AM