OpenFn / openfn-lime-pilot

MSF LIME Project - OpenFn Workflows for Iraq Pilot
1 stars 1 forks source link

collections mappings updates for `Place of living` and patient `sex` #70

Open aleksa-krolls opened 3 days ago

aleksa-krolls commented 3 days ago

Background, context, and business value

This builds on #56 and #53

The specific request, in as few words as possible

(1) First, can you please update wf2 to dynamically get genderOptions from the OptionSets sheet where

state.genderOptions = state.optsMap
    .filter(o => o['OptionSet name'] === 'state.genderOptions')

The current implementation hard codes these mappings: https://github.com/OpenFn/openfn-lime-pilot/blob/next-staging/workflows/wf2/2-mappings.js#L54-L59

(2) Then, the client wants to maintain a separate sheet for Place of living options because there are so many and it's making the OptionSets sheet too long/hard to manage. Therefore can you please:

  1. Update wf3 to save placeOfLivingMap as a separate object in the metadata/collection.json
  2. Update wf2 so that state.placeOflivingMap = state.placeOfLivingMap (instead of state.optsMap)

See current implementation: https://github.com/OpenFn/openfn-lime-pilot/blob/next-staging/workflows/wf2/2-mappings.js#L61-L66

Please branch off of next-staging before making edits.

Toggl

MSF 2024

mtuchi commented 3 days ago

EOD Update

Hiya @aleksa-krolls i have implemented the changes for this issue, See #71