Skip to main content

hpv_vaccination

Table: hpv_vaccination

The hpv_vaccination table records individual HPV vaccination events for children.
It tracks vaccination status, location, vaccinator, and campaign context for reporting and monitoring purposes.


Columns

Column NameData TypeConstraintsDescription
vaccinationRecordNumint(11)NOT NULL, AUTO_INCREMENT, PRIMARY KEYUnique identifier for each vaccination record
created_atdatetimeDEFAULT CURRENT_TIMESTAMPTimestamp when the record was created
modified_atdatetimeDEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMPTimestamp when the record was last modified
child_idint(11)NOT NULLID of the vaccinated child (references hpv_child.mappedId)
vaccinator_idint(11)NOT NULLID of the vaccinator (references vaccinator.mappedId)
vaccinationDatedateNOT NULLDate of the vaccination event
statusenum('VACCINATED','PENDING','REFUSED','UNAVAILABLE')NOT NULLStatus of the vaccination
ucIdint(11)NOT NULLUnion council ID (references location.locationId)
locationIdint(11)NULLLocation ID where vaccination occurred (references location.locationId)
school_idint(11)NULLSchool ID if vaccination occurred at a school (references hpv_schools.school_id)
latitudedecimal(9,6)NULLLatitude of vaccination location
longitudedecimal(9,6)NULLLongitude of vaccination location
event_typeenum('OUTREACH','FIXED','MOBILE','SCHOOL','COMMUNITY','CENTER','VAN')NULLType of vaccination event
sub_event_typeenum('OUTREACH','FIXED','MOBILE','SCHOOL','COMMUNITY','CENTER','VAN')NULLSub-type of vaccination event
remarkstextNULLAdditional remarks or notes
vaccinationTimetimeNOT NULL, DEFAULT '00:00:00'Time when the vaccination was administered

Indexes

  1. PRIMARY - Primary key on vaccinationRecordNum
  2. location_idx - Index on locationId
  3. vaccinator_idx - Index on vaccinator_id
  4. child_idx - Index on child_id
  5. idx_vaccination_date - Index on vaccinationDate
  6. uc_idx - Index on ucId
  7. vaccination_school_fk_idx - Index on school_id
  8. filters_date_location - Composite index on (ucId, vaccinationDate) using BTREE

Foreign Key Relations

  1. childhpv_child.mappedId
    • Ensures the child exists in the HPV child table
  2. vaccinatorvaccinator.mappedId
    • Ensures the vaccinator exists in the system
  3. locationlocation.locationId
    • References the vaccination location
  4. uclocation.locationId
    • References the union council location
  5. vaccination_school_fkhpv_schools.school_id
    • References the school where the vaccination occurred

Usage Notes

  • Tracks all HPV vaccination events for reporting, monitoring, and auditing purposes.
  • status indicates whether the child was vaccinated, refused, unavailable, or pending.
  • Location fields (locationId, ucId, school_id) support geographical analysis and reporting.
  • event_type and sub_event_type differentiate between fixed, outreach, school, and community campaigns.
  • Composite index (ucId, vaccinationDate) is used for efficient date-location filtering in reports.