Hello Daniel,
So remember when we say when your write jobs locally you actually manage what goes in and out of state manually?
Well whatever the final state of the first job that you have in your project, you need to copy the data you need to your second job
So for example
If you have an array of patients data return to the final state of your first job ( const patientsInfomation= […some data])
Go to your output.json and find the patientsInfomation data then on your dhis2 state.json file add patientsInfomation
So at the beginning of your dhi2 job, you can pluck that data from the state and do whatever manipulation you need to do
Eg:
fn(state=> {
const {patientsInfomation} = state
// then perform any transformation you need to do to produce the desired output
})
I hope this helps, let me know if you need some assistance. Haftamu have completed the assignment
You could get some insights on how he approached the mapping spec and produce the desired output
Best,
Mtuchi