Just to give some insight at my POC so far. First I was hoping to use Jackson CSV data formatting tool, however there are limitations with the CSV serializer that do not exist with the core JSON one. It’s being addressed but in the meantime I’m attempting the following approach:
Fetch from API
→ serialize as
→ add + transform + remove entries and end up with a
→ make a CSV out of the map
Clearly the middle step is the key and complicated one. That’s for instance where any value in the map that extends
BaseOpenmrsMetadata is flattened into something like its UUID or its name ; or where a collection of such metadata is flattened into a
";"-separated list of UUIDs or names.
That’s also where concept names have to be handled, that’s quite a special case within Iniz.
Anyway that’s the rough plan.