← Back to team overview

dhis2-users team mailing list archive

Re: Manual data import failure

 

Hi Antonio

I can not give you a definitive answer as it depends on your data analysis
needs and your raw data in your hands, but you could create a data element
with value type "organisation unit, or "coordinates" (the difference is
that coordinates are not bound to an organisation unit they are just
Latitude/Longitude values, but when you have a data element with value type
"organisation unit", this org unit needs to exist). If you have coordinates
ready of your organisation units (hospitals, districts, regions, ...), you
can import it in the GML format (see docs for that).

Also look into the possibility of creating a program instead of an
aggregate dataset.
https://docs.dhis2.org/2.26/en/user/html/dhis2_user_manual_
en_full.html#program_about

Best,
David


On Thu, Jun 29, 2017 at 5:06 PM, Jesus Solano-Roman <
asolano@xxxxxxxxxxxxxxxxxx> wrote:

> Hey David.
>
> Thanks for your reply. This has been very helpful! I'm creating all the
> orgunits and data elements. I have a best practice question though. All the
> patients in my dataset were treated at one hospital, so I will use a single
> orgunit code for all rows. However, it's also important to know where the
> patients came from, (district, chiefdom, village), eg:
>
> period, orgunit, district, ...
> 2014-05-26, OU_222716, Kambia, ...
>
> Most of these places are already orgunit medatada. Is it possible to map
> "Kambia" to an orgunit to obtain coordinates, or should I have another
> column with a coordinate data element and manually get the coordinates for
> every patient? I don't want to create more data than necessary.
>
> Thanks again for all the help!
>
> Antonio.
>
> *Antonio Solano-Roman*
>
> Data Visualization & User Experience Design
> Sabeti Lab - Broad Institute
>
> On Jun 28 2017, at 4:44 pm, David Huser <dhuser@xxxxxxxxxxxxxx> wrote:
>
>> Hi Antonio
>>
>> You need to set up DHIS2 *meta*data so that it can parse your data
>> values first, so that you can match your data values to data elements in
>> the system - if there are no data elements, you can not match them and
>> import them, so starting point would be setting up data elements.
>> To actually import values, you need to register them it against an
>> Organisation Unit which you also need to set up as well as probably a
>> dataset ("input form").
>>
>> Only then you can import your data values. I would suggest also to start
>> with reading on documentation about DHIS2 principles and core data
>> dimensions here:
>>
>> https://docs.dhis2.org/master/en/implementer/html/dhis2_
>> implementation_guide_full.html#d0e174
>> <https://docs.dhis2.org/master/en/implementer/html/dhis2_implementation_guide_full.html?recipient=dhuser%40baosystems.com#d0e174>
>> https://docs.dhis2.org/master/en/implementer/html/dhis2_
>> implementation_guide_full.html#d0e250
>> <https://docs.dhis2.org/master/en/implementer/html/dhis2_implementation_guide_full.html?recipient=dhuser%40baosystems.com#d0e250>
>> https://docs.dhis2.org/master/en/user/html/dhis2_user_
>> manual_en_full.html#data_dimensions
>> <https://docs.dhis2.org/master/en/user/html/dhis2_user_manual_en_full.html?recipient=dhuser%40baosystems.com#data_dimensions>
>> (this one is a bit hidden down in the user guide)
>>
>> Best regards,
>> David
>>
>>
>>
>>
>> On Wed, Jun 28, 2017 at 5:52 PM, Jesus Solano-Roman <
>> asolano@xxxxxxxxxxxxxxxxxx> wrote:
>>
>> Hello Timothy.
>>
>> Thank you for your quick reply. I just saw the video and I've read the
>> documentation regarding data import. It's not clear to my how custom IDs
>> are converted to Data Element IDs. Do I need to create the dataelement
>> codes before uploading the data? In the video they use the API but it's
>> clear that those conversions have already been made. For instance, on my
>> dataset the "OriginalGnum" column specifies an ID. If I query:
>>
>> http://localhost:8080/dhis/api/dataElements/query/EM-095-1
>> <http://localhost:8080/dhis/api/dataElements/query/EM-095-1?recipient=dhuser%40baosystems.com>
>>
>> I get the response: {"httpStatus":"Not Found","httpStatusCode":404,"s
>> tatus":"ERROR","message":"DataElement with id query could not be found."}
>>
>> Moreover, this would imply that I have to convert every unique ID into a
>> Data Element ID, which for large datasets would be very hard. I'm sure I am
>> missing something or getting something wrong.
>>
>>
>> Thanks again for the help,
>>
>>
>>
>> On Wed, Jun 28, 2017 at 11:04 AM, Timothy Kiyemba <tkiyemba@xxxxxxxxx>
>> wrote:
>>
>> Dear Antonio,
>>
>> Check out this video on importing data into DHIS2 using CSV. Its very
>> easy. However, you will need to ensure you have your data in the format
>> that DHIS2 accepts.
>>
>> https://youtu.be/CGSDuA-gOWk
>> <https://youtu.be/CGSDuA-gOWk?recipient=dhuser%40baosystems.com>.
>>
>> Also check out the developers mannual on the recommended formats to
>> import data into DHIS2. Check out the chapter on importing.
>>
>> Kind regards
>>
>> Timothy
>>
>> On Wed, Jun 28, 2017 at 5:41 PM, Jesus Solano-Roman <
>> asolano@xxxxxxxxxxxxxxxxxx> wrote:
>>
>> Hello all.
>>
>> I am very new to DHIS2 and I've been reading tutorials and the user
>> manual, but I can't seem to manually import a dataset (all my rows are
>> ignored). I searched through the mailing list and couldn't find answers, so
>> I hope this question hasn't been asked before.
>>
>> I am working with part of the Ebola Kenema dataset: https://dataverse.har
>> vard.edu/dataverse/ebola?q=&types=files&sort=dateSort&order=desc&page=1
>> <https://dataverse.harvard.edu/dataverse/ebola?q=&amp%3Btypes=files&amp%3Bsort=dateSort&amp%3Border=desc&amp%3Bpage=1&recipient=dhuser%40baosystems.com>
>>
>> The file called: MasterDataListandEBOVResults.csv has the following
>> structure:
>>
>> OriginalGnum,GID,AKA,Series,EBOVPCRResults,EbolaRunDate,IDFr
>> omMetadata,SAMPLEID,EBOVCopies_mL_plasma,EbolaResult,Group
>> EM-095-1,EM-095,,1,Positive,2014-05-27,EM095,EM-095,149693.0
>> 57143,Positive,Epos
>> EM-95B,EM-95B,,1,,,,EM-095B,1332008.74286,Positive,Epos
>> ...
>>
>> When I import it, all my rows are ignored and I get the following message
>> after the dry run: *Data element not found or not accessible.*
>>
>> I am aware that the file structure does not comply to the structure
>> expected by DHIS, but I am very confused as to how to fix it. Am I supposed
>> to create Orgunits and parent groups-before importing-?, or do I need to
>> change the headers of my csv to comply with some predefined structure? I
>> think I just need guidance on the steps to make a manual import successful,
>> as I haven't been able to find any online.
>>
>>
>> Thanks in advance,
>>
>>
>> *Antonio Solano-Roman*
>>
>> Data Visualization & User Experience Design
>> Sabeti Lab - Broad Institute
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-users
>> <https://launchpad.net/~dhis2-users?recipient=dhuser%40baosystems.com>
>> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-users
>> <https://launchpad.net/~dhis2-users?recipient=dhuser%40baosystems.com>
>> More help   : https://help.launchpad.net/ListHelp
>> <https://help.launchpad.net/ListHelp?recipient=dhuser%40baosystems.com>
>>
>>
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-users
>> <https://launchpad.net/~dhis2-users?recipient=dhuser%40baosystems.com>
>> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-users
>> <https://launchpad.net/~dhis2-users?recipient=dhuser%40baosystems.com>
>> More help   : https://help.launchpad.net/ListHelp
>> <https://help.launchpad.net/ListHelp?recipient=dhuser%40baosystems.com>
>>
>>
>>
>>
>> --
>>
>>
>> *David Huser*
>> DHIS2 Support Specialist
>> dhuser@xxxxxxxxxxxxxx | https://baosystems.com
>> <https://baosystems.com/?recipient=dhuser%40baosystems.com> | Skype:
>> dafhus | 2900 K Street, Suite 406, Washington D.C. 20007
>>
>


-- 


*David Huser*
DHIS2 Support Specialist
dhuser@xxxxxxxxxxxxxx | https://baosystems.com | Skype: dafhus | 2900 K
Street, Suite 406, Washington D.C. 20007

Follow ups

References