OpenFn / unicef-cambodia

UNICEF Cambodia - Primero Interoperability
https://openfn.github.io/unicef-cambodia/
1 stars 2 forks source link

Map new Oscar "referral_status" field to Primero "referral_status_edf41f2" #118

Closed daissatou2 closed 1 year ago

daissatou2 commented 2 years ago

Feature Request

Background, context, and business value

We currently map the Oscar decision from the status field on the case-level to the Primeroreferral_status_edf41f2 field on the service-level.

The specific request, in as few words as possible

Instead, this job should map the referral_status field in the Oscar response to the the Primeroreferral_status_edf41f2 field.

See sample Oscar response for several cases in this run log.

state.json

f2-j1

{
  "configuration": ["SEE LAST PASS: 'Oscar Staging (api only user)'"],
  "data": "Data generated from F1-J1 job run",
}

j2-j2

{
  "configuration": ["SEE LAST PASS: 'Primero V2 Cambodia Demo (openfn_cp_user)'"],
}

expression.js

f2-j2-upsertCasesToPrimero

aleksa-krolls commented 2 years ago

@daissatou2 I think the commit linked to above solves this. I've tried now mapping Oscar.service.referral_status to Primero.service.referral_status_edf41f2. Can you pls test?