Closed aleksa-krolls closed 3 years ago
@aleksa-krolls I made the changes for this one.
@lakhassane Feedback from client testing...
jobs/2.b.uploadReferrals.js
: They now want protection_concerns
to output in the format of an array instead of a comma-separated string (e.g., ["SC-UC"]
vs. "SC-UC"
). See example in L63 of run: https://www.openfn.org/projects/p5am6e/runs/rn57b9ddjobs/2.c.uploadDecisions.js
: Encountering a TypeError
while testing Flow 2: https://www.openfn.org/projects/p5am6e/runs/r44m895n@aleksa-krolls changes done for 1. For 2 I made the correction: https://www.openfn.org/projects/p5am6e/runs/rrkzdz4n
However no decisions is sent. maybe a problem with the case_id
used?
Background
See issue #5 for original specs for this Flow 2 where we are uploading referrals to DRP.
Request
Implement the following mapping logic for 3 fields. Note that I've already added the mapping values to the joob.
service_type
mapping state provide 1 value https://github.com/OpenFn/primero-progres/blob/0552beb59855c0cb55b3accfc255d92dde233284/sampleData/primero_outboundReferral_e7a9d84.json#L55 desired output: map to progres value (see L30 in job) --> e.g.,Documentation
protection_concerns
mapping state provides an array of values https://github.com/OpenFn/primero-progres/blob/0552beb59855c0cb55b3accfc255d92dde233284/sampleData/primero_outboundReferral_e7a9d84.json#L84-L87 desired output: map each value in array to progres value (see L58 in job); return as comma-separated string (e.g., 'SC-UC, SM-AD')language
mapping state provides an array of values https://github.com/OpenFn/primero-progres/blob/bf5c9a1dd0ddfd9c4a3bda56ac5c03e349f48b8b/sampleData/primero_outboundReferral_e7a9d84.json#L74-L77 desired output: map each value in array to progres value (see L65 in job); return as comma-separated string (e.g., 'English, Somali')state
Use this: https://github.com/OpenFn/primero-progres/blob/master/sampleData/primero_outboundReferral_e7a9d84.json
expression
https://github.com/OpenFn/primero-progres/blob/master/jobs/2.b.uploadReferrals.js
adaptor
language-http (sending to DTP)
To test
Please re-run this on production: https://www.openfn.org/projects/p5am6e/runs/rn57gw53 If there are mapping issues, DTP will describe the
mapping
issues that in the error log. Otherwise I expect the error to fail with500
and message:Error calling v4
.