Closed daissatou2 closed 2 years ago
@daissatou2 Overall looking good... but quick feedback:
Re: your point 1...
referral_status
--> services_section[*].referral_status
to be specific that we expect this field to be in the services subform. Accepted
/Exited
decision. Is there a field called Status
or something like that? Then, once we get updates from UNICEF and OSCaR, let's try to extract & then link to sample JSON responses to help Mamadou out.
@daissatou2 as discussed, the new fields are adding in the mapping for nonreferrals
array.
Feature Request
Background, context, and business value
The Primero and Oscar teams have agreed to include a decision flow in the solution. So we will now be syncing referral decisions back and forth between the two systems.
The specific request, in as few words as possible
Make updates in the f1-j2-casesToOscar job to sync the decisions received from the parent job.
For all cases in the nonreferrals array,
use the status in the
services_section[*].referral_status_5fe9c1a
field in the Primero response to update thereferral_status
field in Oscar:accepted_270501
from Primero, sendAccepted
to Oscarrejected_412652
from Primero, sendExited
to Oscarsend "is_referred: false"
See the data flow diagram here.
state.json
Primero (to generate state):
Oscar:
adaptor
language-http
expression.js
f1-j2-casesToOscar