class documentation

class PatientForm(FormLoggerMixin, forms.ModelForm):

View In Hierarchy

Form to create and edit patients, based on their model definition. Most notably, it includes custom cleaning methods like _compute_age that take - possibly sensitive - inputs and convert them into the - less sensitive - information we actually care about and want to store.

Note

Click the "Show Private API" button in the top-right corner to reveal the private methods of this class.

Class Meta Indicate which model this acts on.
Method __init__ Extract user to only allow adding patients to datasets from same institution as user.
Method clean_dataset Make sure that the user is allowed to add patients to the dataset.
Class Variable dataset Undocumented
Instance Variable user Undocumented
def __init__(self, *args, **kwargs):

Extract user to only allow adding patients to datasets from same institution as user.

def clean_dataset(self):

Make sure that the user is allowed to add patients to the dataset.

Returns
Optional[Dict[str, Any]]Undocumented
dataset =

Undocumented

user =

Undocumented