def __init__(self, *args, **kwargs): super(TransplantForm, self).__init__(*args, **kwargs) self.transplant_type_id.choices = add_empty_object_choice(TransplantType.choices(db.session)) for x in self.foos: x.baz.choices = [('1', 'One'), ('2', 'Two')]
def __init__(self, obj=None, **kwargs): super(MedicationForm, self).__init__(obj=obj, **kwargs) self.dose_unit_id.choices = add_empty_object_choice(MedicationDoseUnit.choices(db.session)) self.frequency_id.choices = add_empty_object_choice(MedicationFrequency.choices(db.session)) self.route_id.choices = add_empty_object_choice(MedicationRoute.choices(db.session)) self.updated = ( obj is not None and ( obj.dose_quantity != self.dose_quantity.data or obj.frequency_id != self.frequency_id.data or obj.route_id != self.route_id.data ) ) self.show_update_warning = False
def __init__(self, *args, **kwargs): super(PlasmapheresisForm, self).__init__(*args, **kwargs) self.response_id.choices = add_empty_object_choice(PlasmapheresisResponse.choices(db.session))
def __init__(self, *args, **kwargs): super(DialysisForm, self).__init__(*args, **kwargs) self.dialysis_type_id.choices = add_empty_object_choice(DialysisType.choices(db.session))
def __init__(self, *args, **kwargs): super(PatientDemographicsForm, self).__init__(*args, **kwargs) self.ethnicity_code_id.choices = add_empty_object_choice(EthnicityCode.choices(db.session))