OpenFn / OpenFn/apollo

Build a simple input structure from commcare mappings

Open
#113 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
5
Forks
10
Avg merge
2d 20h
Merged PRs (30d)
17

Description

As part of the snomed mapping problem #110 we need to find a good way to formalize the commcare inputs.

Basically commcare defines forms which capture a bunch of values. We need to capture all the potential values as an input, so that we can provide a mapping to them.

I think the input structure should look like this, so that it can be sent straight to #111

zero how many units do you drink per week?
one-to-three how many units do you drink per week?

the model would return a fhir mapping like

{ 
    'zero': { system, value, display }
}

Where each line is an input to be mapped, and the first word is the mapping key, and the rest is a dump of context to help the AI make decisions. We can formalise the context later, as we learn more.

This gist contains the commcare form definitions, which should contain the full range of values: https://gist.github.com/AishaHassen/1c0fc03a850b28232b2dbbaf1bb29859

Try searching for how_many_alcoholic_drinks_per_week - around line 842 you can see the form definition with the value specified.

I think we need some sort of script which reads in this XML and extracts all the possible inputs.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the CommCare form definitions in the linked gist, searching for how_many_alcoholic_drinks_per_week around line 842 to inspect the XML structure and possible values. Build the input structure described in the issue, preserving each mapping key and its context, and confirm that all possible inputs are extracted.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook
Domain
data-engineering, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.