Skip to content

Commit

Permalink
user [email protected] initiated a sync from Lightning
Browse files Browse the repository at this point in the history
  • Loading branch information
openfn[bot] authored and github-actions[bot] committed Nov 7, 2024
1 parent 7d5c7bf commit ef77d4d
Show file tree
Hide file tree
Showing 2 changed files with 186 additions and 189 deletions.
54 changes: 29 additions & 25 deletions openfn-69066751-5f2c-459c-b42e-feba1c802383-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ credentials:
[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]
Expand Down Expand Up @@ -256,7 +259,7 @@ workflows:
adaptor: '@openfn/language-googlesheets@latest'
credential: null
body: |
getValues('1OuR7laA7Oc2QnoiT8S3Thhf-HNh7uFY8ILLEu-idXuk',
'optionsets_oct1')
Expand Down Expand Up @@ -324,27 +327,28 @@ workflows:
adaptor: '@openfn/language-http@latest'
credential: null
body:
path: 'workflows/wf1/1-fetch-metadata.js'
path: workflows/wf1/1-fetch-metadata.js

Get-Teis-and-Locations:
name: Get Teis and Locations
adaptor: '@openfn/language-dhis2@latest'
credential: null
body:
path: 'workflows/wf1/2-get-teis-and-locations.js'
path: workflows/wf1/2-get-teis-and-locations.js

Create-Patients:
name: Create Patients
adaptor: '@openfn/language-openmrs@latest'
credential: null
body:
path: 'workflows/wf1/3-create-patients.js'
path: workflows/wf1/3-create-patients.js

Update-Teis:
name: Update Teis
adaptor: '@openfn/[email protected]'
credential: null
body:
path: 'workflows/wf1/4-update-teis.js'
path: workflows/wf1/4-update-teis.js

triggers:
cron:
Expand All @@ -356,6 +360,15 @@ workflows:
source_trigger: cron
target_job: Fetch-Metadata
condition_type: always
enabled: true
Get-Teis-and-Locations->Create-Patients:
source_job: Get-Teis-and-Locations
target_job: Create-Patients
condition_type: js_expression
condition_label: has-teis
condition_expression: |
state.teis.length > 0 && !state.errors
enabled: true
Fetch-Metadata->Get-Teis-and-Locations:
source_job: Fetch-Metadata
Expand All @@ -366,15 +379,6 @@ workflows:
source_job: Create-Patients
target_job: Update-Teis
condition_type: on_job_success
enabled: true
Get-Teis-and-Locations->Create-Patients:
source_job: Get-Teis-and-Locations
target_job: Create-Patients
condition_type: js_expression
condition_label: has-teis
condition_expression: |
state.teis.length > 0 && !state.errors
enabled: true
wf2-omrs-dhis2:
name: wf2-omrs-dhis2
Expand All @@ -395,8 +399,8 @@ workflows:

Get-Encounters:
name: Get Encounters
adaptor: '@openfn/language-[email protected]'
credential: [email protected]
adaptor: '@openfn/language-http@latest'
credential: '[email protected]-(HTTP)'
body:
path: workflows/wf2/3-get-encounters.js

Expand Down Expand Up @@ -461,15 +465,6 @@ workflows:
condition_expression: |
state.patients.length > 0 && !state.errors
enabled: true
Create-Events->Update-TEIs:
source_job: Create-Events
target_job: Update-TEIs
condition_type: js_expression
condition_label: has-gender-updated
condition_expression: |
state?.genderUpdated?.length > 0 && !state.errors
enabled: true
Get-TEIs->Create-Events:
source_job: Get-TEIs
Expand All @@ -479,6 +474,15 @@ workflows:
condition_expression: |
state.TEIs && !state.errors
enabled: true
Create-Events->Update-TEIs:
source_job: Create-Events
target_job: Update-TEIs
condition_type: js_expression
condition_label: has-gender-updated
condition_expression: |
state?.genderUpdated?.length > 0 && !state.errors
enabled: true
Get-Encounters->Get-TEIs:
source_job: Get-Encounters
Expand Down
Loading

0 comments on commit ef77d4d

Please sign in to comment.