Skip to content

Patient

Contains patient-level data along with dental health information for each tooth.

This dataclass encapsulates patient demographic and health information, along with detailed data about each tooth and its associated sides. It serves as a structured container for organizing patient records in dental health applications.

Attributes:

Name Type Description
age int

The age of the patient in years.

gender int

Gender code for the patient (e.g., 0 for female, 1 for male).

bodymassindex float

Body Mass Index (BMI) of the patient.

periofamilyhistory int

Indicator of family history with periodontal disease.

diabetes int

Diabetes status, where 0 indicates no diabetes and 1 indicates diabetes.

smokingtype int

Type of smoking habit (e.g., 0 for non-smoker, 1 for occasional, 2 for frequent).

cigarettenumber int

Number of cigarettes smoked per day.

antibiotictreatment int

Indicator of antibiotic treatment history, where 0 means no treatment and 1 indicates treatment.

stresslvl int

Stress level rating on a scale (e.g., 0 to 3).

teeth List[Tooth]

A list of Tooth instances containing specific tooth data, where each tooth may have up to 6 sides with separate health metrics.

Example
patient = Patient(
    age=45,
    gender=1,
    bodymassindex=23.5,
    periofamilyhistory=1,
    diabetes=0,
    smokingtype=2,
    cigarettenumber=10,
    antibiotictreatment=0,
    stresslvl=2,
    teeth=[
        Tooth(
            tooth=11,
            toothtype=1,
            rootnumber=1,
            mobility=1,
            restoration=0,
            percussion=0,
            sensitivity=1,
            sides=[
                Side(
                    furcationbaseline=1,
                    side=1,
                    pdbaseline=2,
                    recbaseline=2,
                    plaque=1,
                    bop=1
                    ),
                Side(
                    furcationbaseline=2,
                    side=2,
                    pdbaseline=3,
                    recbaseline=3,
                    plaque=1,
                    bop=1
                    ),
                # Additional sides can be added similarly
            ]
        ),
        Tooth(
            tooth=18,
            toothtype=3,
            rootnumber=2,
            mobility=0,
            restoration=1,
            percussion=1,
            sensitivity=0,
            sides=[
                Side(
                    furcationbaseline=3,
                    side=1,
                    pdbaseline=4,
                    recbaseline=5,
                    plaque=2,
                    bop=0
                    ),
                # Additional sides can be added similarly
            ]
        )
    ]
)
Source code in periomod/base.py
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
@dataclass
class Patient:
    """Contains patient-level data along with dental health information for each tooth.

    This dataclass encapsulates patient demographic and health information, along with
    detailed data about each tooth and its associated sides. It serves as a structured
    container for organizing patient records in dental health applications.

    Attributes:
        age (int): The age of the patient in years.
        gender (int): Gender code for the patient (e.g., 0 for female, 1 for male).
        bodymassindex (float): Body Mass Index (BMI) of the patient.
        periofamilyhistory (int): Indicator of family history with periodontal disease.
        diabetes (int): Diabetes status, where 0 indicates no diabetes and 1 indicates
            diabetes.
        smokingtype (int): Type of smoking habit (e.g., 0 for non-smoker, 1 for
            occasional, 2 for frequent).
        cigarettenumber (int): Number of cigarettes smoked per day.
        antibiotictreatment (int): Indicator of antibiotic treatment history, where 0
            means no treatment and 1 indicates treatment.
        stresslvl (int): Stress level rating on a scale (e.g., 0 to 3).
        teeth (List[Tooth]): A list of `Tooth` instances containing specific tooth
            data, where each tooth may have up to 6 sides with separate health metrics.

    Example:
        ```
        patient = Patient(
            age=45,
            gender=1,
            bodymassindex=23.5,
            periofamilyhistory=1,
            diabetes=0,
            smokingtype=2,
            cigarettenumber=10,
            antibiotictreatment=0,
            stresslvl=2,
            teeth=[
                Tooth(
                    tooth=11,
                    toothtype=1,
                    rootnumber=1,
                    mobility=1,
                    restoration=0,
                    percussion=0,
                    sensitivity=1,
                    sides=[
                        Side(
                            furcationbaseline=1,
                            side=1,
                            pdbaseline=2,
                            recbaseline=2,
                            plaque=1,
                            bop=1
                            ),
                        Side(
                            furcationbaseline=2,
                            side=2,
                            pdbaseline=3,
                            recbaseline=3,
                            plaque=1,
                            bop=1
                            ),
                        # Additional sides can be added similarly
                    ]
                ),
                Tooth(
                    tooth=18,
                    toothtype=3,
                    rootnumber=2,
                    mobility=0,
                    restoration=1,
                    percussion=1,
                    sensitivity=0,
                    sides=[
                        Side(
                            furcationbaseline=3,
                            side=1,
                            pdbaseline=4,
                            recbaseline=5,
                            plaque=2,
                            bop=0
                            ),
                        # Additional sides can be added similarly
                    ]
                )
            ]
        )
        ```
    """

    age: int
    gender: int
    bodymassindex: float
    periofamilyhistory: int
    diabetes: int
    smokingtype: int
    cigarettenumber: int
    antibiotictreatment: int
    stresslvl: int
    teeth: List[Tooth] = field(default_factory=list)