Importing Excel data




Note: dates get parsed incorrectly sometimes while converting from CSV to XLSX in Google Sheets (Eg. 12-01-2018 (dd-mm-yyyy) gets parsed as 01/12/2018) which may not be easy to spot. One solution is to download the CSV file and convert to XLSX in LibreOffice.

Template of an ideal migration file:

Archived for now, read the Introduction:

  1. Records are rejected when:

    • any of the mandatory fields are missing (see 3 & 4)
    • address doesn't match with address levels in DB
    • Dates are in invalid format
    • Gender is not exactly "Male"/"Female"
  2. Changes to be made to the input files:

    • Add Individual UUID (always)
    • Add Enrolment UUID
    • Sometimes headers have to be modified to merge multiple columns into one field
  3. Mandatory fields for Individual registration:

    • Name of person
    • Gender (strictly as "Male"/"Female")
    • Village name / Address (that matches address levels in DB/ catchments.json)
    • Date of Birth
    • If Date of Birth not available, Age of person in months or years (eg. "3 years", "6 months", "30 Years" etc.)
    • Registration Date
  4. Mandatory fields for ProgramEnrolment-related data:

    • Unique identifier of person as per old records (or something to map this data to an Individual)
    • Program Name (which program should person be enrolled in?)
    • Date of Enrolment into the program
  5. Mandatory for Encounter/ProgramEncounter data

    • Date of visit
    • Observations made during visit