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.
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'.
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 whereenrollment_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
. Seesample_data/oscarNewReferral.json
. https://github.com/OpenFn/unicef-cambodia/blob/acf18b13c041a42af24c90066aad9ca7f7603f07/sample_data/oscarNewReferral.json#L31-L51expression
This should be mapped to the service-level in Primero... every service has 1
service_response_type
https://github.com/OpenFn/unicef-cambodia/blob/7dd6aae7c5cdd5d0b54e2492c42739ddb4e5098b/jobs/f2-j2-upsertCasesToPrimero.js#L500-L504output
The last service in this sample state has no
enrollment_date
(see L45 --> therefore this service should returnservice_response_type: 'referral_from_oscar'
.The other 3 services should return
service_response_type: 'service_being_provided_by_oscar_partner_47618'
.