hubverse-org / schemas

JSON schemas for modeling hubs
Creative Commons Zero v1.0 Universal
4 stars 2 forks source link

Add `target_variable` and `target_outcome` to task ids as potential task ids #29

Closed annakrystalli closed 1 year ago

annakrystalli commented 1 year ago

This reflects the fact we include target as a potential task_id and target_variable and target_outcome are an option that has been discussed.

One question I had is that while using a single target task id, optional and required arrays of multiple unique targets are explicit, what happens when you have multiple targets but spread across target_variable and target_outcome. How do you ensure they specify unique and correct combinations? Does the order they are specified in the array become important?

e.g. if two valid targets where inc hosp & inc case, how would they be specified?

"target_variable": {
  "required": null,
  "optional": ["hosp", "case"]
},
"target_outcome": {
  "required": null,
  "optional": ["inc", "inc"]
},

@elray1 your thoughts would be appreciated!

annakrystalli commented 1 year ago

@elray1 @nickreich , should I go ahead and add these two standard tasks IDs (as part of a two column target hub) to version 2.0.0?

annakrystalli commented 1 year ago

For completeness, the answer to the above question is:

"target_variable": {
  "required": null,
  "optional": ["hosp", "case"]
},
"target_outcome": {
  "required":["inc"],
  "optional": null
},
elray1 commented 1 year ago

I don't have a strong opinion about whether or not we include this in v2.0.0. on one hand, kind of seems like we might as well? on the other hand, this is not a high priority and i think adding it in later would not be a breaking change and so would not require a new major version if we put it off?