Data Dictionary

Complete schema documentation for CrisisComms data models

Persons Collection
Tracks individuals affected by disasters including missing persons, status updates, and aid requests

Core Fields

_id
ObjectId (auto-generated)
MongoDB unique identifier
displayId
String (auto-generated)
Human-readable ID (e.g., P0001R)
type
Enum (required)
inquiry | update | aid
firstName
String (required)
Person's first name (can be empty if alias provided)
lastName
String (required)
Person's last name (can be empty if alias provided)
alias
String (optional)
Nickname or alternative name
age
Number (optional)
Person's age in years
personStatus
Enum (optional)
missing | found | safe | injured | deceased | needs_aid

Location Fields

parish
String (required)
One of Jamaica's 14 parishes - validated against official list
community
String (required)
Community name within parish - must exist in database
additionalLocationDetails
String (optional)
Free text for roads, landmarks, or specific location details (e.g., "Cornwall Mount" or "Near the market")
coordinates
Object | null (optional)
{ latitude: Number, longitude: Number }

Description & Photo

description
String (optional)
Detailed description or additional information
photoBase64
String | null (optional)
Base64 encoded photo of the person

Contact Information

contactName
String (required)
Name of person reporting/submitting
contactPhone
String (required)
Contact phone number
contactEmail
String (optional)
Contact email address
contactType
Enum (optional)
phone | email | x | facebook | instagram | other
allowContactSharing
Boolean (default: false)
If true, contact info is publicly visible

Status & Metadata

status
Enum (required)
pending | approved - moderation status
relatedUpdateId
ObjectId (optional)
Links to aid request update if created
isTest
Boolean (optional)
Marks record as test data
createdAt
Date (auto-generated)
Timestamp of creation
updatedAt
Date (auto-generated)
Timestamp of last update
deletedAt
Date | null (optional)
Soft delete timestamp

History Tracking

history
Array<Object> (optional)
Tracks status updates and changes over time. Each entry contains:
personStatus: Status at time of update
description: Update description
lastKnownLocation: Location mentioned in update (optional)
parish: Parish at time of update (optional)
community: Community at time of update (optional)
updatedBy: User who made the update
updatedByRole: Role of the user
timestamp: When the update was made

Example Response

{
  "_id": "507f1f77bcf86cd799439011",
  "displayId": "P0001R",
  "type": "inquiry",
  "firstName": "John",
  "lastName": "Smith",
  "alias": "Johnny",
  "age": 45,
  "personStatus": "missing",
  "parish": "Westmoreland",
  "community": "Savanna-la-Mar",
  "additionalLocationDetails": "Cornwall Mount, near the market",
  "coordinates": {
    "latitude": 18.2197,
    "longitude": -78.1333
  },
  "description": "Last seen wearing blue shirt and jeans",
  "photoBase64": null,
  "contactName": "Jane Smith",
  "contactPhone": "876-555-1234",
  "contactEmail": "jane@example.com",
  "contactType": "phone",
  "allowContactSharing": false,
  "status": "approved",
  "relatedUpdateId": null,
  "isTest": false,
  "createdAt": "2025-05-11T10:30:00Z",
  "updatedAt": "2025-05-11T10:30:00Z",
  "deletedAt": null,
  "history": []
}

Important Notes

  • parish and community are REQUIRED and must be validated
  • additionalLocationDetails is the free-text field for roads, landmarks, and specific location info
  • • At least one of firstName, lastName, or alias must be provided
  • • Contact information (contactName and contactPhone) is required for all submissions
  • • The history array tracks updates and may reference lastKnownLocation in update entries