Open kkrysiak opened 3 years ago
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!
@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?
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