CDEFGHIJKLMNOPQRSTUVWXYZAAAB
1
Flow 1: Primero --> OSCaR
2
NOTE! If any of these mappings should be updated, then the OpenFn Flow 1 jobs must be updated accordingly.
3
Source Field ID
(PRIMERO)
Source Field Name
(PRIMERO)
Destination Field ID
(OSCaR)
Destination Field Name (OSCaR)Allowed in OpenFn logs? Transformation or
Cleaning Rule?
Source Data Example (PRIMERO)Transformed Data Example (OSCAR)Comments
4
OpenFn Transformations Note: If any Primero field sends a null/ undefined value, OpenFn will send an empty string to Oscar (e.g., '') per Oscar API requirements.
5
case_idCase IDexternal_idExternal ID-18de3e64-437e-4987-aeb8-f0ce8e22fad7-This field is not editable in Primero, and not visible for user. We will map this to an array of external integrations and internally set the system name to Pimero. That way we can have any number of external_ids for any number of different systems.
6
case_id_displayCase IDexternal_id_displayExternal ID Display -e22fad7Same as above but for the display id. Use this field for search - this field should be not editable, but is visible for user.
7
oscar_numberChild Code (OSCaR)global_idClient ID --01EC35X4SVRKAKE3WT55KPFTXQPrimero will send the oscar Id (ULID format) if saved in the record to look-up existing Oscar cases and upsert in next sync.
8
mosvy_numberChild Code (MoSVY)mosvy_numberMOSVY Number--Primero will send the mosvy_number saved in the record, if available.
9
name_firstFirst namegiven_nameGiven name---
10
name_lastSurnamefamily_nameFamily name---
11
sexSexgenderGenderPrimero only uses lowercasemale / femaleMale / Female
12
date_of_birthDate of birthdate_of_birthDate of birthPrimero format: YYYY/MM/DD
OSCaR format: YYYY-MM-DD
2005/06/132005-06-13
13
location_currentCurrent location location_current_village_codeLocation of Concern Add 1 leading "0" if code length is 7 characters.12110417-Primero will send the location code for village code. In OSCaR we will translate this to the village_id in our database which maps to the gov village code.
Add 1 leading "0" if code length is 7 characters.

Note: Primero users are instructed to select a village-level location, but if they selects a location of a different administrative level (e.g., province), Oscar should still accept this location–no transformation applied in OpenFn as this is handled on the Oscar side.
14
location_currentCurrent location address_current_village_codeAddress
15
owned_by(Primero case worker)external_case_worker_namebackend field-"primero_cp"-
16
owned_by_id(Primero case worker id)external_case_worker_idName Of Referee
17
owned_by_phoneOSCaR case worker phone numberexternal_case_worker_mobileReferee Phone Number If Primero number is null, send "000000000" to Oscar84993934551000000000
18
services_section[][implementing_agency]Implementing agencyorganization_nameReferred to External Organisation Oscar is expecting Primero to share the name of the agency identified as the referral recipient, not the agency of the Primero user (not owned_by_agency). Now that we're not tracking agencies on the user-level, we need to look to the agency defined on the service-level for each referral.
19
owned_by_agencybackend fieldorganization_namebackend fieldRemove "agency-", only map organization name to OSCaR"agency-cif""cif"Assumes all Primero organization users will be setup in the system using the naming convention "agency-OrgName-user" (e.g., "agency-cif-user")

If a new Agency User is registered that does not follow the 'agency-orgName-user' naming convention, then the jobs must be updated.
20
owned_by_agency_idSee agency id mappingsorganization_idbackend field
21
--is_referredbackend fieldsend "TRUE" if sending a referral, send "FALSE" if sending decision (api/v1/organizations/clients/update_links/ PUT)
22
services_section[][unique_id]backend fieldservices[][uuid]backend field-"55df5374-d660-4e5c-accf-5ae9fe78be3e"-Uuid for each service
23
services_section[][service_type]Type of service services[][name]Service type-"social_work_case_work"-Refers to Oscar parent service category; do not map in this flow. Primero service type is used in combination with service subtype to match to the correct Oscar service type.
(Note that Oscar only has services types, not types and subtypes like in Primero.)
24
services_section[][service_subtype]Service subtypeservices[][name]Service typeMap according to 'Service Map' sheet,
1 subtype --> 1 service
"social_work_case_work_generalist""Generalist social work / case work"Map Primero service subtypes to Oscar service names (see 'Service Map' sheet). If multiple subtypes, create 1 Oscar service for every Primero subtype.

If Service is added/ modified, this Service Map and OpenFn jobs must be updated.
25
services_section[][service_response_type]Type of response ---"referral_to_oscar"-Will indicate on services to refer to Oscar; do not need to map to Oscar.
26
services_section[][note]Notes-----Reason for referrals/notes text field. Services notes updates transitions[][note].
27
transitions[][note]Notereason_for_referralReason for Referral"notes..."-Other referral notes to populate text field in Oscar to provide case worker additional context.
28
risk_levelRisk Levellevel_of_riskRisk levelconvert Primero option "no_action" to "no action"low
medium
high
no_action
29
referral_status_5fe9c1aReferral statusstatusReferral Statusif services_section[*].referral_status_5fe9c1a = 'accepted_270501', status = 'Accepted'

if services_section[*].referral_status_5fe9c1a = 'rejected_412652', status = 'Rejected'
referral_status_5fe9c1a
referral_status_5fe9c1a
Accepted
Rejected
When Primero caseworkers update the status on referral rom Oscar with decisions, we need to send these decisions back to Oscar.
30
created_atCreated Atdate_of_referralDate of ReferralPrimero format: YYYY/MM/DD
OSCaR format: YYYY-MM-DD
2005/06/132005-06-13Note: the source data is on the referral response from Primero
31
--resource backend field"Primero"Field we send to Oscar to indicate when the referrral original from Primero
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100