Skip to main content

campaignchild

Table: campaignchild

The campaignchild table stores information about children registered for campaigns, including personal details, birth information, and audit data.
It is used to track child eligibility, registration, and vaccination status within campaigns.


Columns

Column NameData TypeConstraintsDescription
childIdint(11)NOT NULL, AUTO_INCREMENTUnique identifier for each child
birthdatedatetimeNULLChild’s date of birth
zmIdvarchar(255)NULLUnique ZM identifier for the child
gendervarchar(15)NULLChild’s gender
namevarchar(30)NULLChild’s name
estimatedBirthdatetinyint(1)NULLFlag indicating if the birthdate is estimated (1 = yes, 0 = no)
fatherNamevarchar(30)NULLName of the child’s father
nicvarchar(30)NULLNational identity card number, if available
dateRegistereddatetimeNULLDate when the child was registered in the system
createdByUserIdint(11)NULLUser who created the record
createdDatedatetimeNULLTimestamp when the record was created
lastEditedByUserIdint(11)NULLUser who last modified the record
lastEditedDatedatetimeNULLTimestamp of last modification
zeroDosetinyint(1)NULLIndicates if the child received the zero dose vaccine (1 = yes, 0 = no)

Indexes

  1. PRIMARY - Primary key on childId
  2. campaignchild_createdByUserId_user_mappedId_FK - Index on createdByUserId
  3. campaignchild_lastEditedByUserId_user_mappedId_FK - Index on lastEditedByUserId

Foreign Key Relations

  1. campaignchild_ibfk_1

    • Links createdByUserId to user.mappedId
    • Tracks which user created the child record
  2. campaignchild_ibfk_2

    • Links lastEditedByUserId to user.mappedId
    • Tracks which user last edited the child record

Usage Notes

  • estimatedBirthdate is used when the exact birthdate is not known.
  • zeroDose tracks whether the child received the initial vaccine.
  • Audit trail is maintained via createdByUserId, lastEditedByUserId, createdDate, and lastEditedDate.
  • The zmId field provides a unique identifier to link with other systems.
  • Avoid deleting records to preserve historical child registration data.