1 of 51

Primero Interoperability & Workflow Automation | System Administrator Training

UNICEF Thailand �December 2022

Confidential Open Function Group Thailand Primero Interoperability

2 of 51

  1. Introduction to OpenFn
  2. Thailand Primero Interoperability Solution
    1. Workflow 1: Sync Primero cases to Child Shield for daily reporting
    2. Workflow 2: On-demand sync of HIS & Child Shield data to inform case plans
  3. Monitoring the Solution
  4. Troubleshooting Basics & Support
  5. Credentials and Change Management

Agenda

Confidential Open Function Group Thailand Primero Interoperability

3 of 51

Intro to OpenFn & the Primero Interoperability Solution

Confidential Open Function Group Thailand Primero Interoperability

4 of 51

OpenFn is the Digital Public Good for workflow automation

With 8M transactions per year

and approximately 40M records across 40+ countries�we enable secure data integration and interoperability forgovernments and NGOs worldwide.

5 of 51

Pandemic preparedness interventions require�multiple technologies and organizations

OpenFn automates workflows and data exchange processes�to enable secure, stable, and scalable interoperability.

6 of 51

Connect anything with open-source OpenFn adaptors.

Choose from 60+ existing adaptors or build your own. Integrate applications, databases, and file sources (e.g., CSV, XML, JSON). �If there is a REST API, OpenFn will work out of box.

7 of 51

Automating case information sync with OpenFn...

OpenFn automates the on-demand data syncs between the Thailand MOPH Systems (HIS and Child Shield) and Primero CPIMS, securely sharing children’s medical history & risk profile with caseworkers .

Confidential Open Function Group Thailand Primero Interoperability

8 of 51

(Administrators’ user experience)

Now let’s monitor the flow end-to-end...

Confidential Open Function Group Thailand Primero Interoperability

9 of 51

OpenFn Platform: Key Concepts

Projects

Who can access your OpenFn integration setup?

Jobs

What should OpenFn do with the message data?

Triggers

When should OpenFn perform the job?

Credentials

How does OpenFn access your secure systems?

Messages

What data was should OpenFn process?

Runs

How does OpenFn record and report on everything it does?

1

3

4

5

2

6

Confidential Open Function Group Thailand Primero Interoperability

10 of 51

Thailand Primero Jobs View

11 of 51

Workflow 1:

Primero ⇒ ChildShield

Creating & Updating Interventions, Syncing closed cases.

*NEW Workflow*

12 of 51

Workflow 1: Primero-to-Childshield Data Flow

Business workflow name: “Sync Primero cases to Child Shield for daily reporting”�Add simplified diagram to capture high-level steps from a business POV…�1. Get all cases from Primero

2. Check case status & check case assessment date & close status (this should be 1 step in the diagram)

  • Add business, simplified summary of this^ criteria (<- so that Primero user can quickly look at their case and know if it will be synced to CS)

3. Sync cases that match criteria to Child Shield

  • If intervention exists, OpenFn updates the intervention
  • If intervention does not exist, OpenFn creates new intervention
  • If person not found, throw error for admin�

13 of 51

Workflow 1: Sync Primero cases to Child Shield for daily reporting

14 of 51

Workflow 1: Primero-to-Childshield Data Flow

15 of 51

“Flow 1-1” job fetches case records from Primero on a timer basis

OpenFn Workflow 1 Jobs: Primero ⇒ ChildShield

Cron job

(we can adjust this timer as you wish)

“Flow 1-2” job looks up actual values (translations) for externally Defined Option Sets

“Flow 1-3” job maps, transforms and syncs data to ChildShield

16 of 51

Single-select questions

NOTE: OpenFn maps option value codes and Thai translated labels

Option values fields (single-select questions)

  • Primero sends to OpenFn:
    • "occupation_1": "pre_school"
  • OpenFn sends to Child Shield:
    • "occupation_1": {“pre_school”: “ก่อนวันเรียน”}

FORMAT: �question_key: {“value_key”: “value_label”}

17 of 51

Multi select fields

NOTE: OpenFn maps option value codes and Thai translated labels

  • Primero sends to OpenFn: � "physical_issue_1f182e4": [

"chronic_illness",

"disability"

],

  • OpenFn sends to Child Shield: � "physical_issue_1f182e4": [

{“chronic_illness”: "ความเจ็บป่วยเรื้อรัง"},

{“disability”: "ความพิการ"}

],

FORMAT: �question_key: [{“value1_key”: “value1_label_thai”}, {“value2_key”: “value2_label_thai”}]

18 of 51

WORKFLOW 2:

HIS/ChildShield ⇒ Primero

Updating Primero Cases with Risk Model, PLH, and other HIS data

*Updated Workflow implemented in Phase 1*

19 of 51

Workflow 2: ChildShield-to-Primero Data Flow

Add Business workflow name: “On-demand sync of HIS and Child Shield risk data to inform case plans”�Add simplified diagram to capture high-level steps from a business POV… �1. Case worker enters national id no

2. Case worker saves to create new case or clicks “Sync” button on-demand

3. OpenFn checks HIS for patient history and Child Shield risk profile data

4. If data found, synced back to Primero. Case “Sync Status” = “Success”

5. If data not found or if error, case “Sync Status” = “Failure”, admin notified

20 of 51

Workflow 2: On-demand sync of HIS and Child Shield risk data to inform case plans

21 of 51

Workflow 2: ChildShield-to-Primero Data Flow

22 of 51

“Workflow 2-1” job sends a Sync request (triggered from Primero button in UI) to HIS API

“Workflow 1-2” job fetches, maps and loads the data retrieved to Primero (PLH, RiskModel, and other HIS Data)

OpenFn Workflow 2 Jobs: ChildShield ⇒ Primero (1/2)

23 of 51

“Workflow 2-3” job runs only if Job 2-1 fails. It sends a Sync failure message to the OpenFn Inbox, indicating the list of affected cases.

“Workflow 2-4” job runs only if Job 2-2 fails. It sets a “Sync failed” status in Primero, if the sync request fails

OpenFn Workflow 2 Jobs: ChildShield ⇒ Primero (2/2)

24 of 51

Sample question label

NOTE: Changes to Child Shield Question Labels affects the sync

  • If the Question Label changes, the data for that question would not be synced.�
  • Child Shield data mapped based on Question Labels, instead of unique question names.�
  • Answers are determined based on which object in answersList contains“checked”: true. ��We then return the “score”value for that question

25 of 51

OpenFn Platform Administration

Confidential Open Function Group Thailand Primero Interoperability

26 of 51

Let’s log in...

www.openfn.org/login��To register your OpenFn account:

www.openfn.org/signup

Confidential Open Function Group Thailand Primero Interoperability

27 of 51

Managing jobs...

Confidential Open Function Group Thailand Primero Interoperability

28 of 51

Snapshot of OpenFn jobs for both Workflow 1 and Workflow 2.

29 of 51

Managing Jobs

  1. Jobs run automatically (admins do not need to edit, only monitor)
  2. Reasons to edit jobs…
    1. Update field mappings
    2. If the Primero dropdown list options change (for example, Nationality)�

If you need to edit a job or update field mappings → contact support@openfn.org for support

Confidential Open Function Group Thailand Primero Interoperability

30 of 51

How to not break the Jobs…�

  • Do not make Major changes until you understand what exactly the job scripts mean. If needed, OpenFn may conduct additional trainings for specific areas of interest.
  • Do not change or delete Credentials, Triggers, as well as field names and variables… these are referenced in the jobs.
  • Do not make changes to Child Shield question labels or Primero Value ID (EN DB name). If required, contact OpenFn.

If you need to edit a job or update field mappings → contact support@openfn.org for support

Confidential Open Function Group Thailand Primero Interoperability

31 of 51

Monitoring Job Runs &�Activity History...

Confidential Open Function Group Thailand Primero Interoperability

32 of 51

OpenFn logs every transaction in Activity History...

33 of 51

Confidential Open Function Group Thailand Primero Interoperability

Review run failures to troubleshoot integration errors...

⚠️ Job run failed…?

34 of 51

Confidential Open Function Group Thailand Primero Interoperability

Click into the run to review the logs...

Exit codes...0. Success1. Error (Sync error)2-5. above (contact OpenFn support)

35 of 51

Confidential Open Function Group Thailand Primero Interoperability

Read the logs to understand the error...

HTTP Status Code: 400s → client errors

The request contains bad syntax and cannot be fulfilled, record conflict, authentication error, etc.

HTTP Status Code

36 of 51

Confidential Open Function Group Thailand Primero Interoperability

Read the logs to understand the error...

HTTP Status Code: 500s → server errors

The server failed to fill OpenFn’s request. Need to contact destination system administrator (Primero) to determine the reason.

37 of 51

Confidential Open Function Group Thailand Primero Interoperability

Turn on notifications to receive email alerts...

38 of 51

Managing Credentials

If the system login details change, you may need to update or create a new “Credential” in OpenFn.

Confidential Open Function Group Thailand Primero Interoperability

39 of 51

Confidential Open Function Group Thailand Primero Interoperability

View all available Credentials

Note that every Credential has an “Owner”.

  • Only Owners can view/ edit credential details
  • Owners are responsible for updating credentials
  • After updating Credentials, link to the relevant job

40 of 51

Confidential Open Function Group Thailand Primero Interoperability

Link jobs to Credentials to define the systems synced ...

Every Job is linked to 1 credential

Note: You will have different credentials for different environments (production, staging, etc.)

41 of 51

If authentication details change...

  • Credential Owner* will need to update the login details in the OpenFn credential record

*We recommend you determine which administrator(s) will be the credential owners.

Confidential Open Function Group Thailand Primero Interoperability

42 of 51

Managing Users

Administrators can add/remove users to the OpenFn project to support with integration monitoring.

Only designated IT administrators should have access. This is not an end-user application.

Confidential Open Function Group Thailand Primero Interoperability

43 of 51

Admin users can add/remove other OpenFn users….

Monitor Activity History to view the status of job runs...

44 of 51

Troubleshooting Basics & �Support

Confidential Open Function Group Thailand Primero Interoperability

45 of 51

Confidential Open Function Group Thailand Primero Interoperability

Monitor Activity History to view the status of job runs...

46 of 51

When you receive an error email

  1. Open the email…
  2. Read the error message
  3. Inspect & Take Action

Confidential Open Function Group Thailand Primero Interoperability

47 of 51

3. Run this job now

Run the job again to re-try the sync...

Click “play” next to �job `1. Get Patient Data from HIS`�to re-try the sync…��This will re-try jobs the set of flow jobs.

48 of 51

Does the run fail again in ‘Activity History’?

  1. Review the error message to troubleshoot
  2. Email support@openfn.org for help
  3. Copy the system administrators

Confidential Open Function Group Thailand Primero Interoperability

49 of 51

Support Contacts

UNICEF: Tippawan Yaiya�(tyaiya@unicef.org)��MOPH: �K. King�king.nkp@gmail.com

Confidential Open Function Group Thailand Primero Interoperability

50 of 51

Questions? Forget something? �

Github: github.com/OpenFn/primero-thailand

  • Technical documentation
  • Videos
  • Admin Guide
  • Data Sharing Protocols
  • Mappings
  • Support contacts

Confidential Open Function Group Thailand Primero Interoperability

51 of 51

Next Steps, odds & ends

  • Go-live next steps
    1. Any questions on outstanding data sync issues?
    2. Confirm we can use the same openfn api users
    3. When will Tipp deploy Primero demo changes to prod?
    4. Other milestones to consider before we can go-live?
  • Documentation will be finalized by December 22nd
  • When ready for go-live, OpenFn team will share update Security Configuration Checklist

Confidential Open Function Group Thailand Primero Interoperability

Note; OFG consultants offline from Dec 24-Jan 1st. �Email support@openfn.org for anything urgent.