def model(self):

        T = current.T
        db = current.db

        crud_strings = current.response.s3.crud_strings
        define_table = self.define_table

        # =====================================================================
        # Basic Disease Information
        #
        tablename = "disease_disease"
        define_table(tablename,
                     self.super_link("doc_id", "doc_entity"),
                     # @ToDo: Labels for i18n
                     Field("name",
                           requires = IS_NOT_EMPTY()
                           ),
                     Field("short_name"),
                     Field("acronym"),
                     Field("code",
                           label = T("ICD-10-CM Code"),
                           ),
                     Field("description", "text"),
                     Field("trace_period", "integer",
                           label = T("Trace Period before Symptom Debut (days)"),
                           ),
                     Field("watch_period", "integer",
                           label = T("Watch Period after Exposure (days)"),
                           ),
                     s3_comments(),
                     *s3_meta_fields())

        represent = S3Represent(lookup=tablename)
        disease_id = S3ReusableField("disease_id", tablename % "reference %s",
                                     label = T("Disease"),
                                     represent = represent,
                                     requires = IS_ONE_OF(db, "disease_disease.id",
                                                          represent,
                                                          ),
                                     sortby = "name",
                                     comment = S3PopupLink(f = "disease",
                                                           tooltip = T("Add a new disease to the catalog"),
                                                           ),
                                     )

        self.add_components(tablename,
                            disease_symptom = "disease_id",
                            )

        self.configure(tablename,
                       deduplicate = self.disease_duplicate,
                       super_entity = "doc_entity",
                       )

        # CRUD strings
        crud_strings[tablename] = Storage(
            label_create = T("Create Disease"),
            title_display = T("Disease Information"),
            title_list = T("Diseases"),
            title_update = T("Edit Disease Information"),
            title_upload = T("Import Disease Information"),
            label_list_button = T("List Diseases"),
            label_delete_button = T("Delete Disease Information"),
            msg_record_created = T("Disease Information added"),
            msg_record_modified = T("Disease Information updated"),
            msg_record_deleted = T("Disease Information deleted"),
            msg_list_empty = T("No Diseases currently registered"))

        # =====================================================================
        # Symptom Information
        #
        tablename = "disease_symptom"
        define_table(tablename,
                     disease_id(),
                     Field("name"),
                     Field("description",
                           label = T("Short Description"),
                           ),
                     Field("assessment",
                           label = T("Assessment method"),
                           ),
                     *s3_meta_fields())

        # @todo: refine to include disease name?
        represent = S3Represent(lookup=tablename)
        symptom_id = S3ReusableField("symptom_id", "reference %s" % tablename,
                                     label = T("Symptom"),
                                     represent = represent,
                                     requires = IS_ONE_OF(db, "disease_symptom.id",
                                                          represent,
                                                          ),
                                     sortby = "name",
                                     )

        # CRUD strings
        crud_strings[tablename] = Storage(
            label_create = T("Add Symptom"),
            title_display = T("Symptom Information"),
            title_list = T("Symptoms"),
            title_update = T("Edit Symptom Information"),
            title_upload = T("Import Symptom Information"),
            label_list_button = T("List Symptoms"),
            label_delete_button = T("Delete Symptom Information"),
            msg_record_created = T("Symptom Information added"),
            msg_record_modified = T("Symptom Information updated"),
            msg_record_deleted = T("Symptom Information deleted"),
            msg_list_empty = T("No Symptom Information currently available"))

        # Pass names back to global scope (s3.*)
        return dict(disease_disease_id = disease_id,
                    disease_symptom_id = symptom_id,
                    )

    # -------------------------------------------------------------------------
dataset/ETHPy150Open sahana/eden/modules/s3db/disease.py/DiseaseDataModel.model/swapped operands of `%`