Skip to content

Commit

Permalink
add readme for dhis2sync
Browse files Browse the repository at this point in the history
  • Loading branch information
citizenrich committed Oct 15, 2018
1 parent 6d5b2ed commit bbbf215
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions dhis2sync/README.md
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.

0 comments on commit bbbf215

Please sign in to comment.