Closed siirtola closed 3 years ago
@siirtola so the request to post a concept set defintion and get are different. This is because the id and name aren't set as part of the expression (the id will be different because
If you, instead, posted the expression it should work, e.g:
ROhdsiWebApi::postConceptSetDefinition(name = "asthma_test",
baseUrl = "http://localhost/WebAPI",
conceptSetDefinition = conceptSetDefinition$expression)
You would post a new definition and get a new id.
Hi @azimov, thank you for looking into this! I tried posting just the expression, but the outcome was the same, "HTTP 400".
Do you have any suggestions how to debug this?
Looking from the Atlas end, the new concept set is created, but the adding of concepts to it fails.
Hi @azimov, I am still puzzled with this. Would it possible to test this on atlas-demo.ohdsi.org? Are the credentials available somewhere?
@siirtola I'm sorry I didn't get back to you, I can confirm the issue but I'm trying to determine the circumstances and what else it might be impacting.
@azimov thanks for the confirmation! This was driving me crazy.
Facing the same issue in Atlas/WebAPI 2.8.1.
Looks like the issue is here: https://github.com/OHDSI/ROhdsiWebApi/blob/master/R/PostDefinition.R#L109
This payload is nested one level too deep for the PUT endpoint of "{id}/items" (handled by function saveConceptSetItems). I tried changing the call to use itemsTranspose[[1]] instead, and it worked. Making a PR.
@alondhe thanks for the fix! Looks like it works following the more recent patch. We should try and make a PR next time, even its small its good to have extra eyes review the changes.
I might have misunderstood something, but shouldn't the
getConceptSetDefinition
andpostConceptSetDefinition
be symmetric? Below, I get a concept set from Atlas ("asthma", just the standard asthma definition) and try to post it under a new name. Atlas responds "Bad Request (HTTP 400)".