Skip to content

Commit df971ba

Browse files
Adding Copy-Metadata step
1 parent c699aa6 commit df971ba

File tree

5 files changed

+16
-13
lines changed

5 files changed

+16
-13
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ DHIS2 basic app to allow interoperability between DHIS2 and Go.Data instances
2929
<img src="./images/base-config.png" width="600">
3030
</p>
3131

32-
+ **Export data and metadata**: There are two possible import sequences. Both ways are equivalent, the only difference is that the *Full transfer* sequence groups *Create outbreaks*, *Copy cases* and *Copy contacts* all in one step.
32+
+ **Export data and metadata**: There are two possible import sequences. Both ways are equivalent, the only difference is that the *Full transfer* sequence groups *Copy Metadata*, *Create outbreaks*, *Copy cases* and *Copy contacts* all in one step.
3333
+ Copy Organisation Units: At the end of this step, a pop-up window will appear to download the orgUnits `.json`. This file needs to be saved on the computer and imported on the Go.Data instance following the path: <br />
3434
`Go.Data → Locations → Quick Actions → Import hierarchical locations → Choose file (organisation-units.json) → Import`
3535

images/step-by-step.png

2.04 KB
Loading

src/api/Actions.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,17 @@ const Actions = () => {
7272
await copyOrganisationUnits(dhis2, godata, config, { logAction, logDone })()
7373
break
7474
case 1:
75-
await createOutbreaks(dhis2, godata, config, { logAction, logDone })()
75+
await copyMetadata(dhis2, godata, config, { logAction, logDone })()
7676
break
7777
case 2:
7878
await godata.login()
79-
await copyCases(dhis2, godata, config, { logAction, logDone })()
79+
await createOutbreaks(dhis2, godata, config, { logAction, logDone })()
8080
break
8181
case 3:
82+
await godata.login()
83+
await copyCases(dhis2, godata, config, { logAction, logDone })()
84+
break
85+
case 4:
8286
await godata.login()
8387
await copyContacts(dhis2, godata, config, { logAction, logDone })()
8488
setDone(true)
@@ -179,7 +183,8 @@ const Actions = () => {
179183

180184
{ done &&
181185
<Card className="log">
182-
<p className="p">All steps completed - you're finished</p>
186+
<p className="p">
187+
<span>All steps completed - you're finished</span></p>
183188
</Card>
184189
}
185190
</div>

src/styles/Actions.css

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,15 @@
1414
}
1515

1616
.logAction {
17-
display: flex;
18-
align-content: center;
19-
margin-left: 10px;
2017
margin-right: 15px;
2118
font-weight: 500;
2219
font-size: 14px;
2320
}
24-
.logAction svg {
25-
margin-left: 5px;
26-
}
2721

2822
.log {
2923
height: 50px !important;
24+
display: flex !important;
25+
align-items: center;
3026
}
3127

3228
.MuiStepLabel-label.MuiStepLabel-active {

src/utils/labels.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,20 @@ function getFullStepContent(step) {
1414
}
1515

1616
function getSteps() {
17-
return ['Copy Organisation Units', 'Create outbreaks', 'Copy cases', 'Copy contacts']
17+
return ['Copy Organisation Units', 'Copy Metadata', 'Create outbreaks', 'Copy cases', 'Copy contacts']
1818
}
1919

2020
function getStepContent(step) {
2121
switch (step) {
2222
case 0:
2323
return "Get all organisation units from DHIS2, transforms them to fit Go.Data's schema and saves them hierarchally in a json file that needs to be downloaded."
2424
case 1:
25-
return "Create Go.Data outbreaks based on the organisation units and tracked entities of the DHIS2 instance."
25+
return "Copy DHIS2 metadata into Go.Data."
2626
case 2:
27-
return "Transfer tracked entities from DHIS2 to Go.Data, transforming the data to fit Go.Data's schema and assigning an outbreak automatically."
27+
return "Create Go.Data outbreaks based on the organisation units and tracked entities of the DHIS2 instance."
2828
case 3:
29+
return "Transfer tracked entities from DHIS2 to Go.Data, transforming the data to fit Go.Data's schema and assigning an outbreak automatically."
30+
case 4:
2931
return "Transfer contacts from DHIS2 to Go.Data, adding aditional persons and the relationships among them."
3032
default:
3133
return "Unknown step"

0 commit comments

Comments
 (0)