Closed roll closed 9 years ago
@roll @danfowler are interventions always kind of free text/snippets like that? In that case, I'd be inclined to have them as arrays on trial object. If they were more structured (like a "tag" or a "category"), then yeah, an m2m would be useful as it can be used to query by intervention in meaningful ways.
@pwalsh Intervention
and Outcome
are free text. It looks like an array on Trial
.
And Design
/Method
are more like tags. So m2m makes sense.
I think i've got what your want from the app side. Also we can index arrays anyway if app will be in need of some free text search on those array fields.
Related to #6 #8 #9
@roll yes. We'd want to do some search on those fields, and yes, I'm interested in "flattening objects" where reasonable with array and jsonb fields because:
@pwalsh, @danfowler
So we're going to start with intervention as array of free texts on Trial
entiry?
If it's correct we can close this issue.
For you and @danfowler to decide.
@danfowler Application doesn't need to have a tag-like search on free text fields (Cochrane has 3000+ different interventions). So it looks like as an array not m2m as we've discussed with Paul yesterday. Please take a look.
@roll @pwalsh yes, let's go with an array of free text for Intervention on Trial.
Background As a part of the #2 issue we have to discuss with @danfowler and the team some parts of the ideal data model. It's a subtask named "Analyze the data we have, in comparison to the ideal model".
Topic
Cochrane Database have an entity
Intervention
with m2m relation withTrial
entity. For example in oneTrial
can be usedHealth care team + care as usual
andAnshen-jianpi-syrup (TCM)
.Proposed solutions
Intervention
with m2m relation withTrial
(as in Cochrane database)Trial.intervention
implemented as an array of stringsSee also - https://github.com/okfn/opentrials-cochrane-schizophrenia-data/wiki