Giter VIP home page Giter VIP logo

django-adx's Introduction

openimis-be-dhis2_etl_py

openIMIS Module to push data into DHIS2

there is 2 methods available, both require to push for the metadata first:

  • ADX : pushd agregated data
  • PROGAM : push trackend entity program

seting up the module

please update the django module configuration to with DHIS2 url and credentials

    "dhis2" : {
        "host":"https://play.dhis2.org/2.39/",
        "username":"admin",
        "password":"district"
    }

the full default configuration can be found in the app.py file where DE and program id could be updated

Pushing metadata

can be done in one command

python manage.py pushmetadata 2000-01-01 all

2000-01-01 is the reference date, it is use to push only newer data, usefull when updating the metadata

or can be done step by step are described below

#. create or configure a  root orgunit

`python manage.py pushmetadata 2000-01-01 createRoot`

(python manage.py pushmetadata startdate enddate createRoot)

```
    "location":{
        "rootOrgUnit":"E0FtAX5eNc3",
        "rootOrgUnitName":"DemOpenIMIS",
        "rootOrgUnitCode":"Root",
        "attributes":{
            "locationId":"gMNNTAdZbW1",
            "locationType":"ffZOxd5V2UK"
        }
    },
```

#. create openIMIS orgunit structure

for the ADX, a function can be specified to do the mapping between the openIMIS orgunit and existing DHIS2 orgunit but this is not supported yet for the program

`python manage.py pushmetadata 2000-01-01 orgunit`

#. push the optionset

this is only usefull for pogram


`python manage.py pushmetadata 2000-01-01 optionset`

This  will push optionset
    - gender 
    - profession 
    - groupType 
    - education 
    - product 
    - diagnosis 
    - item
    - service

they all can be pushed manualy ex :  `python manage.py pushmetadata 2000-01-01 product`

pushing program

`python manage.py pushprogram 2000-01-01 all`

will update the enrolment then the policy, then the claim, then the funding

each step can be done independently: 

- `python manage.py pushprogram 2000-01-01 enroll`
- `python manage.py pushprogram 2000-01-01 insureepolicies`
- `python manage.py pushprogram 2000-01-01 insureepoliciesclaims`
- `python manage.py pushprogram 2000-01-01 funding`


it is also possible to send population data (in village) to DHIS2 witht he command `python manage.py pushprogram 2000-01-01 population`



This will push data in 3 programs (TBC)
- Family-insuree [enrollment] Policy [program registration / event]
- Claims (claim details[program registration / event], Claims Services[event], Claim Items[event])
- Funding (claim details[program registration / event], Claims Services[event], Claim Items[event])

pushing ADX

adx requires specific metadata definition that can be created automatically with 

`python manage.py pushadx 2000-01-01 pushMetadata`


then each month the datasets can be pushed via 


`python manage.py pushadx 2023-02-01 pushMetadata`

this code will push data for Jan 23

django-adx's People

Contributors

delcroip avatar malinowskikam avatar dborowiecki avatar dragos-dobre avatar hirensoni913 avatar edarchis avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.