-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6d5b2ed
commit bbbf215
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# DHIS2sync script | ||
|
||
The script can be run with these options: | ||
|
||
Usage: node loadDHIS2Metadata.js [--help] [--config <FILE>] [--reset-time] [--full] | ||
--help Display this message and exit. | ||
--config <FILE> Load from given configuration file. | ||
--reset-time Reset last exported time and exit. | ||
--full Ignore the last exported time. | ||
|
||
A sample configuration file is in loadDHIS2MetadataConfig.json: | ||
|
||
```json | ||
{ | ||
"ilr": { | ||
"url": "http://localhost:3447/fhir", | ||
"user": "", | ||
"pass": "", | ||
"doc": "" | ||
}, | ||
"dhis2": { | ||
"url": "https://play.dhis2.org/2.30", | ||
"user": "admin", | ||
"pass": "district", | ||
"dousers": false, | ||
"doservices": true | ||
} | ||
} | ||
``` | ||
|
||
The script can be invoked with: | ||
```sh | ||
node loadDHIS2Metadata.js | ||
``` | ||
|
||
This will get all locations in the DHIS2 demo system for version 2.30, and put them into the FHIR server. To confirm: | ||
``` | ||
curl http://localhost:3447/fhir/Location | ||
``` | ||
|
||
The ilr:doc is the name used for the datastore in DHIS2 to manage the timestamp. |