Hi,
I am trying to create concepts using a csv file. I was able to create concepts with all other datatypes apart numeric concepts.
Sample CSV file:
“concept”,“Concept Name”,“Concept Description”,“Concept Type”,“Concept Class”,“Coded Options”,“Concept UUID”,“Is a Set”,“Set Members”,“shouldUpdate”
“987654”,“Pain Level”,"",“Numeric”,“Symptom”,"",“970a017c-195b-4fc0-9608-9a4679987654”,“false”,"",“false”
So what i am trying to do is create a concept numeric using the following logic:
if (dataType.isNumeric()) {
concept = new ConceptNumericBuilder(uuid).name(conceptName).datatype(dataType).precise(true)
.description(uuid, description, Locale.ENGLISH).conceptClass(dataClass).build();
}
So this works and I am able to create a concept numeric with entries in concept and conceptnumeric table… But I want to edit the concept id with the id provided in the file.
I normally do it using service.saveConcept(id);
but in this case since the id is present as a foreign key in concept_numeric table. It doesnt let me update the id with foreign key constraint error.
I would like to know if there is a way to create a concept first so that i can update the concept id from csv and use that concept to create numeric?