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 Name | Data Type | Constraints | Description |
|---|---|---|---|
| childId | int(11) | NOT NULL, AUTO_INCREMENT | Unique identifier for each child |
| birthdate | datetime | NULL | Child’s date of birth |
| zmId | varchar(255) | NULL | Unique ZM identifier for the child |
| gender | varchar(15) | NULL | Child’s gender |
| name | varchar(30) | NULL | Child’s name |
| estimatedBirthdate | tinyint(1) | NULL | Flag indicating if the birthdate is estimated (1 = yes, 0 = no) |
| fatherName | varchar(30) | NULL | Name of the child’s father |
| nic | varchar(30) | NULL | National identity card number, if available |
| dateRegistered | datetime | NULL | Date when the child was registered in the system |
| createdByUserId | int(11) | NULL | User who created the record |
| createdDate | datetime | NULL | Timestamp when the record was created |
| lastEditedByUserId | int(11) | NULL | User who last modified the record |
| lastEditedDate | datetime | NULL | Timestamp of last modification |
| zeroDose | tinyint(1) | NULL | Indicates if the child received the zero dose vaccine (1 = yes, 0 = no) |
Indexes
- PRIMARY - Primary key on
childId - campaignchild_createdByUserId_user_mappedId_FK - Index on
createdByUserId - campaignchild_lastEditedByUserId_user_mappedId_FK - Index on
lastEditedByUserId
Foreign Key Relations
-
campaignchild_ibfk_1
- Links
createdByUserIdtouser.mappedId - Tracks which user created the child record
- Links
-
campaignchild_ibfk_2
- Links
lastEditedByUserIdtouser.mappedId - Tracks which user last edited the child record
- Links
Usage Notes
estimatedBirthdateis used when the exact birthdate is not known.zeroDosetracks whether the child received the initial vaccine.- Audit trail is maintained via
createdByUserId,lastEditedByUserId,createdDate, andlastEditedDate. - The
zmIdfield provides a unique identifier to link with other systems. - Avoid deleting records to preserve historical child registration data.