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

Predictive EID submitted without drug #1608

Open
kkrysiak opened this issue Mar 29, 2021 · 2 comments
Open

Predictive EID submitted without drug #1608

kkrysiak opened this issue Mar 29, 2021 · 2 comments
Labels

Comments

@kkrysiak
Copy link
Contributor

I didn't think this was possible so I just want to suss out if this is an implementation mistake or something happened at the time of submission. In the admin interface the drug field is also empty.

https://civicdb.org/events/genes/4/summary/variants/2660/summary/evidence/9150/summary#evidence

@kkrysiak kkrysiak added the bug label Mar 29, 2021
@kkrysiak kkrysiak added this to Open in v1 Enhancements via automation Mar 29, 2021
@acoffman
Copy link
Member

It appears that the form (and underlying API) do in fact allow submission of a Predictive EID without a drug. It is also not marked as required (with a *) in the form help text.

Seems like an implementation mistake - we should be able to make at least one drug required going forward for predictive EIDs!

@acoffman
Copy link
Member

@jmcmichael I added

expressionProperties: {
  'templateOptions.required': function ($viewValue, $modelValue, scope) {
    return scope.model.evidence_type === 'Predictive';
}

To the drugs form field which "works" in the sense that it now puts the * required annotation, but it doesn't seem to actually enforce the behavior. You can still submit without specifying a drug (even if you manually delete the empty row). AM I missing somewhere else this needs to be set? Or is it an issue with array types that I need to deal with in the controller or something?

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

No branches or pull requests

2 participants