Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Required Fields In Investigation XML Config #540

Open
ptth222 opened this issue Feb 23, 2024 · 0 comments
Open

Required Fields In Investigation XML Config #540

ptth222 opened this issue Feb 23, 2024 · 0 comments

Comments

@ptth222
Copy link

ptth222 commented Feb 23, 2024

This can be considered an inconsistency, but I decided not to add more to Issue #534. It might be better to keep things smaller and easier to close.

The XML config for investigation has the following fields as required:

'Investigation Identifier',
'Investigation Title',
'Investigation Description',
'Investigation PubMed ID',
'Investigation Publication DOI',
'Investigation Publication Author List',
'Investigation Publication Title',
'Investigation Publication Status',
'Investigation Person Last Name',
'Investigation Person First Name',
'Investigation Person Mid Initials',
'Study Identifier',
'Study Title',
'Study Description',
'Study PubMed ID',
'Study Publication DOI',
'Study Publication Author List',
'Study Publication Title',
'Study Publication Status',
'Study Person Last Name',
'Study Person First Name',
'Study Person Mid Initials'

The first issue is that these are not also required in the corresponding JSON Schema.

The second issue is that I think some of these are needlessly required. Specifically, I think the following are unnecessary:

'Investigation Publication Status',
'Investigation Person Mid Initials',
'Study Publication Status',
'Study Person Mid Initials

I do have a pending PR #532 that makes the initials no longer required.

Some of the others I think could be conditionally required. For instance, the person attributes could require 1 of either first name or last name. The publication attributes could be more complicated. You could require just DOI, or just PubMed ID, or Title and Author List. The config files don't currently have these kinds of capabilities, but JSON Schema does.

I should also note that the definition of "required" between the XML configs and JSON Schema are slightly different. In the XML configs "is-required" will make sure that the value isn't an empty string, but for JSON Schema the "required" keyword requires the attributes in the "required" list to be present. To reproduce what the XML configs do in JSON Schema you need to do something like setting the "minLength" to 1 for the property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant