smithery.ai

dhis2-data-values

Extract raw data values from DHIS2 using the dataValueSets API. Use for actual submitted data values, not aggregated analytics. ALWAYS use with dhis2-query-optimization skill. Routed via dhis2 skill for general DHIS2 requests.

First seen Apr 7, 2026

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 2,928 B
  • docs SUMMARY.md 203 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1 installs

SKILL.md

DHIS2 Data Values

Prerequisites: Client setup from dhis2 skill + dhis2-query-optimization for large queries

Dataframe API

from datetime import datetime
from openhexa.toolbox.dhis2 import dataframe

extract_dataset

Parameter Type Required Notes
dhis2 DHIS2 Yes
dataset str Yes Dataset UID
start_date datetime \ None No Use with end_date OR use periods
end_date datetime \ None No Use with start_date OR use periods
periods list[str] \ None No e.g., ["202101", "202102"]
org_units list[str] \ None No Use orgunits OR orgunit_groups
orgunitgroups list[str] \ None No Use orgunits OR orgunit_groups
include_children bool No Default: False
last_updated datetime \ None No Filter by last updated

extractdataelement_groups

Parameter Type Required
dhis2 DHIS2 Yes
dataelementgroups list[str] Yes
(other params same as extract_dataset)

extractdataelements

Parameter Type Required
dhis2 DHIS2 Yes
data_elements list[str] Yes
(other params same as extract_dataset)

All extract functions return pl.DataFrame:

Column Type
dataelementid str
period str
organisationunitid str
categoryoptioncombo_id str
attributeoptioncombo_id str
value str
created datetime[ms, UTC]
last_updated datetime[ms, UTC]

importdatavalues

Parameter Type Required Notes
dhis2 DHIS2 Yes
data pl.DataFrame Yes See required columns below
orgunitsmapping dict \ None No {olduid: newuid}
dataelementsmapping dict \ None No {olduid: newuid}
categoryoptioncombos_mapping dict \ None No {olduid: newuid}
attributeoptioncombos_mapping dict \ None No {olduid: newuid}
import_strategy Literal["CREATE", "UPDATE", "CREATEANDUPDATE", "DELETE"] No Default: "CREATE"
dry_run bool No Default: True

Required input DataFrame columns (all str):

  • dataelementid
  • period
  • organisationunitid
  • categoryoptioncombo_id
  • attributeoptioncombo_id
  • value

Returns dict: {"imported": N, "updated": N, "ignored": N, "deleted": N}

JSON API

data = dhis.data_value_sets.get(
    datasets=["uid"],
    org_units=["uid"],
    start_date="2024-01-01",
    end_date="2024-03-31"
)  # Returns list[dict]