Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use auto-generate metadata in wf2 mappings and improve wf3 #60

Merged
merged 15 commits into from
Nov 6, 2024
865 changes: 15 additions & 850 deletions openfn-69066751-5f2c-459c-b42e-feba1c802383-spec.yaml

Large diffs are not rendered by default.

44 changes: 26 additions & 18 deletions openfn-cd92dd57-9a3c-4318-bdcb-f57a386cf811-spec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
name: msf-lime-test
description: null
credentials:
[email protected]:
name: AK Sharepoint
owner: [email protected]
[email protected]:
name: MSF DHIS2 UAT
owner: [email protected]
[email protected]:
name: OpenFnSharepoint
owner: [email protected]
[email protected]:
name: OpenMRS Demo
owner: [email protected]
'[email protected](HTTP)':
name: 'OpenMRS Demo (HTTP)'
owner: [email protected]
'[email protected]([email protected])-2':
name: 'googlesheets ([email protected])-2'
owner: [email protected]
[email protected]:
name: mtuchi-github-token
owner: [email protected]
workflows:
fetch-metadata-and-generate-opts-json:
name: fetch-metadata-and-generate-opts-json
Expand Down Expand Up @@ -98,7 +119,7 @@ workflows:
adaptor: '@openfn/language-msgraph@latest'
credential: [email protected]
body: |

// Check out the Job Writing Guide for help getting started:
// https://docs.openfn.org/documentation/jobs/job-writing-guide
get('sites/root/lists')
Expand All @@ -121,7 +142,7 @@ workflows:
adaptor: '@openfn/language-googlesheets@latest'
credential: '[email protected]([email protected])-2'
body: |

getValues('1OuR7laA7Oc2QnoiT8S3Thhf-HNh7uFY8ILLEu-idXuk',
'optionsets_oct1')

Expand Down Expand Up @@ -266,13 +287,6 @@ workflows:
body:
path: workflows/wf2/3-get-encounters.js

Get-Options-Map:
name: Get Options Map
adaptor: '@openfn/language-http@latest'
credential: null
body:
path: workflows/wf2/4-get-options-map.js

Get-TEIs:
name: Get TEIs
adaptor: '@openfn/[email protected]'
Expand Down Expand Up @@ -319,22 +333,16 @@ workflows:
condition_label: has-patient-uuids
condition_expression: |
state.patientUuids.length > 0 && !state.errors

enabled: true
Get-Encounters->Get-Options-Map:
Get-Encounters->Get-TEIs:
source_job: Get-Encounters
target_job: Get-Options-Map
target_job: Get-TEIs
condition_type: js_expression
condition_label: has-encounters
condition_expression: |
state.encounters.length > 0

enabled: true
Get-Options-Map->Get-TEIs:
source_job: Get-Options-Map
target_job: Get-TEIs
condition_type: on_job_success
enabled: true

Get-TEIs->Create-Events:
source_job: Get-TEIs
target_job: Create-Events
Expand Down
Loading