Add service_response_type mapping
aleksa-krolls opened this issue · 2 comments
Request
In Primero, update the service_response_type
to 'service_being_provided_by_oscar_partner_47618'
if Oscar provides a service enrollment date. Otherwise return 'referral_from_oscar'
for any services where enrollment_date
is not specified.
service_response_type: s.enrollment_date ? 'service_being_provided_by_oscar_partner_47618 ' : 'referral_from_oscar'
state
See LP for UNICEF Primero Alpha API
.
See sample_data/oscarNewReferral.json
.
unicef-cambodia/sample_data/oscarNewReferral.json
Lines 31 to 51 in acf18b1
expression
This should be mapped to the service-level in Primero... every service has 1 service_response_type
unicef-cambodia/jobs/f2-j2-upsertCasesToPrimero.js
Lines 500 to 504 in 7dd6aae
output
The last service in this sample state has no enrollment_date
(see L45 --> therefore this service should return service_response_type: 'referral_from_oscar'
.
The other 3 services should return service_response_type: 'service_being_provided_by_oscar_partner_47618'
.
Tested with empty services array, and with no services key at all.
@taylordowns2000 so far working great, thank you! keep you posted with final round of testing next week.