From Excel to Single Event Program

Hi all,

Some time ago I was looking for a way to introduce a large bulk of patient
data registers into DHIS2. I didn't want to do that manually, so I wrote a
java program to introduce the values right into the database.

Now, I have modified the program in order to make it reusable. The program
reads a excel file which contains all the information required to perform
the import: database parameters, program parameters and person data values.
The program and the data elements are identified by their names, so there
is no need to provide their id's. The same for organisation units.

There is a file called "instructions" which explains the right way to use
the excel file and how the data values are treated. If you are ok with
that, it is not necessary to do any modification in the code. Anyway, if
someone wants to take a look at the code, it is in the "code" folder.

The program is in a jar file, so a way to run it would be:
$ java -jar adapter.jar path_to_the_excel_file
The excel file must match the template provided.

I hope it could be useful for someone.

Regards,

Víctor

Hi Victor,

This is great and sounds very useful. I love to see extras (read hacks) for DHIS2. I would suggest we maybe start some sort of repository on launch pad for this type of stuff. There is increasingly a lot of these types of “utilities” which are ending up in the trunk code, but there is probably a better place for them in a branch of their own. Not exactly sure where this might should be, but I think we should find a place for this type of stuff, as well as the increasing number of scripts which are popping up as well.

Regards,

Jason

···

On Mon, Jan 21, 2013 at 7:01 PM, Victor Garcia vgarciabnz@gmail.com wrote:

Hi all,

Some time ago I was looking for a way to introduce a large bulk of patient

data registers into DHIS2. I didn’t want to do that manually, so I wrote a

java program to introduce the values right into the database.

Now, I have modified the program in order to make it reusable. The program

reads a excel file which contains all the information required to perform

the import: database parameters, program parameters and person data values.

The program and the data elements are identified by their names, so there

is no need to provide their id’s. The same for organisation units.

There is a file called “instructions” which explains the right way to use

the excel file and how the data values are treated. If you are ok with

that, it is not necessary to do any modification in the code. Anyway, if

someone wants to take a look at the code, it is in the “code” folder.

The program is in a jar file, so a way to run it would be:

$ java -jar adapter.jar path_to_the_excel_file

The excel file must match the template provided.

I hope it could be useful for someone.

Regards,

Víctor


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Dear Victor,

This is for creating users of dhis2? Or for creating patients under orgunits?

···

Sent from my BB Curve 9320

-----Original Message-----
From: Victor Garcia <vgarciabnz@gmail.com>
Sender: dhis2-users-bounces+alvin.marcelo=gmail.com@lists.launchpad.net
Date: Mon, 21 Jan 2013 13:01:54
To: dhis2-users<dhis2-users@lists.launchpad.net>
Subject: [Dhis2-users] From Excel to Single Event Program

_______________________________________________
Mailing list: DHIS 2 Users in Launchpad
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : DHIS 2 Users in Launchpad
More help : ListHelp - Launchpad Help

Hi Alvin,

not, it is not for creating users of dhis2. The program does the same thing that you can do when you go to “Single event with registration” function and you push the “add new” button. It fills all that information.

The program performs these steps:

1- Add a patient under a orgunit.

2- Enroll the patient in the “single event” program and program stage. Here, the service orgunit is the same that the registration orgunit.

3- Read the patient data values and write them into the database.

···

On 21 January 2013 19:54, Alvin B. Marcelo alvin.marcelo@gmail.com wrote:

Dear Victor,

This is for creating users of dhis2? Or for creating patients under orgunits?

Sent from my BB Curve 9320

-----Original Message-----

From: Victor Garcia vgarciabnz@gmail.com

Sender: dhis2-users-bounces+alvin.marcelo=gmail.com@lists.launchpad.net

Date: Mon, 21 Jan 2013 13:01:54

To: dhis2-usersdhis2-users@lists.launchpad.net

Subject: [Dhis2-users] From Excel to Single Event Program


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp