records.json


Records format

A record consists of key-value pairs containing information about individual patients, groups of patients, or other units of data. You have flexibility to define key-value pairs based on the contents of your raw data. Record keys are used to specify the data shown on charts.

records.json Field Description Value
date required The date attributed to the record.

Note: Lookout is best suited for datasets with complete date information and expects fully specified dates. For datasets with alternate date types, you must format your dates correctly in your connector script (YYYY-MM-DD) for them to be recognized by Lookout.
YYYY-MM-DD
disease-a or disease-b, etc. required Test result for pathogen disease-a or disease-b, etc.

Note: The specified pathogen field must match one of the diseases specified in the "pathogens" field in config.json.
Any string (e.g. "positive", "negative", or "suspected")
count optional Number of cases the record accounts for. Defaults to 1. integer
Custom fields optional Additional information about the record, such as patient ID, demographic information, geographic data, symptoms, etc. string, boolean, integer,float, or array

Example

This is an example of how a single record may appear in records.json:

 {
    // INDIVIDUAL PATIENT RECORD
    "date": "2022-01-01",
    "patient_id": "ID021",
    "age": 24,
    "ethnicity": "MENDE",
    "gender": "male",
    "occupation_code": 4,
    "symptoms": [
      "fever",
      "headache"
    ],
    "district": "Kailahun",
    "hiv": "negative",  // pathogen test result
    "malaria": "positive"  // another pathogen test result
  }

Count

When working with aggregated data, the count field can be used to quantify the number of patients associated with the record. For example, this record describes four male, 10-year-old patients who tested positive for malaria on the specified date. This count will be reflected in charts in the Lookout view.

{
  // AGGREGATED DATA RECORD
  "date":"2022-01-01",
  "count": 4, // number of cases this record represents
  "gender": "male",
  "age": 10,
  "malaria": "positive",
}

When absent, count is 1 by default.

Multiple Tests for a Pathogen

If you are reporting results from multiple test types for a single pathogen, use the following format instead of a simple string:

"malaria": {
   // TEST_NAME: RESULT
  "microscopy": "+",
  "rdt": "-"
}

When specifying test types, results can only be "+" or "-". You can include one or multiple test type-result pairs.