SPECITS-58 Add support for /example sub-resource of template-definition#122
Conversation
|
|
||
| The generated example can be either an `input` type (ready for submission to the repository) or an `output` type (as it would appear when retrieved from the repository), controlled by the `type` parameter. | ||
|
|
||
| The level of detail in the generated example can be customized using the `detail_level` parameter, which affects: |
There was a problem hiding this comment.
I may be missing some background for the detail_level parameter, but to me, it looks like this parameter would give unpredictable results. I think we either have to define what to expect with each detail level, or we rename the levels to be more explanatory.
I would be in favor of renaming them and having only 2 (not sure what a medium could be):
- required - fills in only the required fields
- complete - fills in any possible field defined in the template
Of course, when using the complete header, the CDR should ensure to fill in all data points that it can, at least with one example. In the case of ITEM_LIST, for example, it should not create 10 ELEMENTS per list, as it's only an example in the end.
There was a problem hiding this comment.
@vidi42 - the idea of the three levels was as follows, and actually pretty close to what you suggest
- required - an absolutely minimal composition including only mandatory data points, really only for training purposes, but which should commit without any adjustment
- mediium- a fairly realistic set of data points, including some optional RM attributes and elements but which should be commitable e.g should not contain more than one choice element, even if the template allows for that.
- Complete- a full representation of all the possible datapoints but not expected to be commitable or realistic - acts as reference guidance for how parts of the RM should be represented.
Right now the Better and Ehrbase examples sit between 2 and 3 - pretty realistic and very helpfful but sometimes confusing because they do not necessarily commit e.g if they have multi-choice elements.
BTW I proposed a future POST where much more detailed ad-hoc configuration could br provided to accuratly and consistentlyshape the example returned.
2d7155b to
8d5273a
Compare
8d5273a to
ecfb829
Compare
Signed-off-by: Sebastian Iancu <sebastian-iancu@users.noreply.github.com>
Signed-off-by: Sebastian Iancu <sebastian-iancu@users.noreply.github.com>
ecfb829 to
a4fdecf
Compare
Add support for /example sub-resource of template-definition