dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #28441
Fwd: TrackedEntityType - api/persons
>
>
> We are using the 2.15-SNAPSHOT build - I’m adding, enrolling and adding program stages for our National Pregnancy Register project.However I am not able to set the trackedentitytype field in the tracked entity table through the api.
>
> Do you now if this is exposed somehow? Or will there need to be some dev work done to expose this for POST requests? The json that works for registration is pasted below - but not sure where I could specify the tracked entity type (or how) . The attribute values are junk for now but they do successfully register a person. Notice the identifier element is not valid anymore.
>
>
> Many thanks,
>
> Pierre
>
> {
> "orgUnit": "IBErTOKhirW",
> "programid": "YBM3wffX4Xd",
> "attributes": [ {
> "attribute": "Y225iXMjPhd",
> "type": "string",
> "value": "asasas"
> },
> {
> "attribute": "ra7WkHYCb8P",
> "type": "string",
> "value": "asas"
> },
> {
> "attribute": "yd8abJiRMAK",
> "type": "number",
> "value": 123456789
> },
> {
> "attribute": "opKUx9Qxth6",
> "type": "number",
> "value": 1234
> },
> {
> "attribute": "ljIAt8ZNDNm",
> "type": "number",
> "value": 1
> },
> {
> "attribute": "MnXIgtSLeTK",
> "type": "number",
> "value": 12345678
> },
> {
> "attribute": "AnJxSXFMHVH",
> "type": "date",
> "value": 20140101
> },
> {
> "attribute": "WuDAhgHsgHJ",
> "type": "string",
> "value": "pierretest"
> },
> {
> "attribute": "uGhxe9rGxxI",
> "type": "number",
> "value": 1234
> },
> {
> "attribute": "V5yVvawhkHC",
> "type": "string",
> "value": "pierretest"
> },
> {
> "attribute": "yWAtzzmSNf9",
> "type": "string",
> "value": "S"
> }
> ]
> }
> On 12 Mar 2014, at 11:22 AM, Pierre Dane <pierre@xxxxxxxxx> wrote:
>
>> Hello Busoye,
>>
>> Thanks for looking into this.
>> I’ll register against 2 orgunits - lets make the other one gp Leeuwkop Correctional Centre (just for fun). I’ll be pushing registrations through during the day.
>>
>> If I manually add lat/long data to the org units, one heat map type report would also be amazing!
>>
>> Thanks
>>
>> Pierre
>>
>> My cell number is 0836808274 in case you need to chat. Call anytime.
>>
>>
>>
>> On 12 Mar 2014, at 10:56 AM, Adebusoye Anifalaje <busoye@xxxxxxxx> wrote:
>>
>>> Hi Pierre,
>>>
>>> I’ll put something together for you.
>>>
>>> Obviously, the more real to life the dummy data the better the visualisation. I see that (as of yesterday) you had 2 clients registered in Algoa Park Clinic (see screen shot below). Did you generally register clients in one or multiple org units? It’s easier if I know where the data is rather than having to go through postgres to find it.
>>>
>>> Cheers.
>>>
>>> Busoye
>>>
>>> <Tracked Entity Management.tiff>
>>>
>>>
>>> On 12 Mar 2014, at 10:39, Pierre Dane <pierre@xxxxxxxxx> wrote:
>>>
>>>> Hi Elmarie,
>>>> Thanks for your reply. Thats no problem I’m sure we can work through this remotely and I’ll liaise with Carl and Chris and to see if it makes sense to come through again the following week.
>>>>
>>>> In therms of reporting - I’ve enrolled a couple of people and added the Pregnancy Registration event. It’s just dummy data, all this year - enrolment in february.
>>>>
>>>> What we would like as a first very high level report is a graph showing enrolments by day. Chris has a demo tomorrow and it would be amazing if we could have this ready for then but it’s very short notice! We’d like to be able to show the end to end process - a person registers using the USSD app and we show an extra enrolment on the DHIS front end. We’d need a way to manually kick of the aggregation and report population. Do you think this would be possible?
>>>>
>>>>
>>>> Many thanks!
>>>>
>>>> Pierre
>>>>
>>>> On 12 Mar 2014, at 8:02 AM, Elmarie Claasen <elmarie@xxxxxxxx> wrote:
>>>>
>>>>> Hi Pierre,
>>>>>
>>>>> Unfortunately the HISP team has a prior engagement for work we need to finish for NDOH next week and will not be able to accommodate you for one day either on Mon/Wed next week. We will however be able to accommodate you on either Tue/Wed the week thereafter during the hack-a-thon week if that is suitable to you. In the meantime please provide us with detailed requirements for reporting as requested in the email and we will set those reports up for you and make them available in the frontend.
>>>>>
>>>>> I hope that this arrangement will be to your satisfaction as an alternative to your request.
>>>>>
>>>>> Regards,
>>>>>
>>>>> Elmarie Claasen
>>>>> <image001.png>
>>>>> Project Manager
>>>>> Health Information Systems Programme
>>>>> Tel: 041-364 0757
>>>>> Cell: 082 374 2209
>>>>> E-mail: elmarie@xxxxxxxx
>>>>> Skype: elmarie.claasen52
>>>>>
>>>>> From: Pierre Dane [mailto:pierre@xxxxxxxxx]
>>>>> Sent: 11 March 2014 01:25 PM
>>>>> To: Elmarie Claasen
>>>>> Cc: Crizelle Nel; Busoye Anifalaje; Pooben Dass; Jason Phillips; Greg Rowles; Ferdie Botha; Mahlatse Mokoena; Farai Mutero; Carl Fourie; Hannes Venter
>>>>> Subject: Re: NPR Database with Facility Codes
>>>>>
>>>>> Thanks Elmarie,
>>>>>
>>>>> I’ll reply in detail shortly, but just wanted to let you all know that I have the opportunity to be in Pretoria this Monday (16th March) and was hoping I could come into the HISP office for the day and work on reporting for the MHR project. I could also stay and come in on Wednesday. I think it’ll be very valuable for me spend a few hours getting to grips with the reporting layer. Would there be someone in the Pretoria office who would have some time to work with me on Monday, and would it be worthwhile to stay for the wednesday as well. Please let me know asap!
>>>>>
>>>>> Many thanks,
>>>>>
>>>>> Pierre
>>>>>
>>>>> On 11 Mar 2014, at 1:05 PM, Elmarie Claasen <elmarie@xxxxxxxx> wrote:
>>>>>
>>>>>
>>>>> Hi Pierre,
>>>>>
>>>>> Please see my comments below.
>>>>>
>>>>> Mahlatse and Busoye will respond to you once we have completed these tasks and with more detail.
>>>>>
>>>>> Regards,
>>>>>
>>>>> Elmarie Claasen
>>>>> <image001.png>
>>>>> Project Manager
>>>>> Health Information Systems Programme
>>>>> Tel: 041-364 0757
>>>>> Cell: 082 374 2209
>>>>> E-mail: elmarie@xxxxxxxx
>>>>> Skype: elmarie.claasen52
>>>>>
>>>>> From: Pierre Dane [mailto:pierre@xxxxxxxxx]
>>>>> Sent: 11 March 2014 11:11 AM
>>>>> To: Crizelle Nel; Elmarie Claasen; Busoye Anifalaje
>>>>> Cc: Pooben Dass; Jason Phillips; Greg Rowles; Ferdie Botha; Mahlatse Mokoena; Farai Mutero; Carl Fourie; Hannes Venter
>>>>> Subject: Re: NPR Database with Facility Codes
>>>>>
>>>>> Hi everyone,
>>>>>
>>>>> I have access to the NPR DHIS instance. Have successfully added and enrolled a patient via the API (albeit missing a couple of fields). I have a few questions:
>>>>>
>>>>> 1) The code in the organisationunit has not been populated. Is HISP going to take care of this? We have elected to use an OrgunitAttribute field which should be in the attribute table because the OrgunitCodes we are using has not been formalised so we want to keep that field open in the OrgunitTable for if it is formally done in future.
>>>>> 2) Geo co-ordinates for these have not been added - are there plans to populate these fields? - would be great for regional reporting/heatmaps etc – yes we do plan to populate these via the Data Dictionary in future.
>>>>> 3) I’ve seen that the person I’ve enrolled has had an event/stage auto-added (Pregnancy Registration) . Is this all I need to do for phase 1 as far as you guys see it? The client is auto-enrolled in the Programme (Pregnancy Registration) but you have to add the client information into the Registration stage by adding the date and other details under the Registration stage. The identification stage is not intended to be used now (until the woman starts self-registering) but we have made provision for it already.
>>>>> 4) How does the export of tracker info to the reporting layer work? Is it automated or realtime? 1) Through the analytics table info from Tracker goes into the Tabular report within the tracker module and in order to run that you have to run the analytics (either manually but usually scheduled for midnight). 2) From Tracker to Aggregated reporting layer is transferred is an aggregate query, a manual aggregation and/or scheduled automated aggregation.
>>>>> 5) It would be great to have one report showing registrations - can someone help set this up please? I can’t access and data elements through the front-end to build a report. Can you please identify what data you added for what period and we will create this for you.
>>>>>
>>>>> Many thanks!
>>>>>
>>>>> Pierre
>>>>>
>>>>>
>>>>> On 10 Mar 2014, at 10:36 AM, Crizelle Nel <crizellenel@xxxxxxxxx> wrote:
>>>>>
>>>>>
>>>>>
>>>>> Hi Pierre,
>>>>>
>>>>> Sorry, you were dropped off the email conversation :0)
>>>>>
>>>>> Please see below.
>>>>>
>>>>> --
>>>>> Regards,
>>>>> Crizelle Nel
>>>>>
>>>>> <image002.png>
>>>>>
>>>>> Software Development and Information Systems
>>>>> Health Information Systems Program (HISP) - SA
>>>>> ------------------------------------------------------------------------------
>>>>> Email: crizellenel@xxxxxxxxx
>>>>> Cell: +27 84 580 3342
>>>>> Fax: 0866 509 502
>>>>> Skype: crizelle_nel
>>>>> Website: http://hispsa.org
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Mar 10, 2014 at 10:19 AM, Crizelle Nel <crizellenel@xxxxxxxxx> wrote:
>>>>> Thanks Farai!
>>>>>
>>>>> Pierre, the OU attribute you'll need to access is called "FacCode".
>>>>>
>>>>> Jason, can you give us an update on progress with the NPR instance please? Sounds like Pierre will also need remote PGAdmin access.
>>>>>
>>>>> --
>>>>> Regards,
>>>>> Crizelle Nel
>>>>>
>>>>> <image002.png>
>>>>>
>>>>> Software Development and Information Systems
>>>>> Health Information Systems Program (HISP) - SA
>>>>> ------------------------------------------------------------------------------
>>>>> Email: crizellenel@xxxxxxxxx
>>>>> Cell: +27 84 580 3342
>>>>> Fax: 0866 509 502
>>>>> Skype: crizelle_nel
>>>>> Website: http://hispsa.org
>>>>>
>>>>>
>>>>> On Mon, Mar 10, 2014 at 10:13 AM, Farai Mutero <farai@xxxxxxxx> wrote:
>>>>> Hi Crizelle
>>>>>
>>>>> I can confirm that yes OU attributes are exposed in the Web API. We are making use of such a facility in the Data Dictionary. Pierre you can have a look at the screenshot below to get an idea of what the Web API exposes.
>>>>>
>>>>>
>>>>> <image001.png>
>>>>>
>>>>> From: Crizelle Nel [mailto:crizellenel@xxxxxxxxx]
>>>>> Sent: Monday, March 10, 2014 9:53 AM
>>>>> To: Busoye Anifalaje
>>>>> Cc: Elmarie Claasen; Pooben Dass; Farai Mutero; Jason Phillips; Greg Rowles; Ferdie Botha
>>>>> Subject: Re: NPR Database with Facility Codes
>>>>>
>>>>> Hi Busoye,
>>>>>
>>>>> Do you know off-hand if the OU attributes are exposed on the web-API?
>>>>>
>>>>> Will you please check this and respond to Pierre?
>>>>>
>>>>> You can liaise with Pooben and/or Farai if you think they might have answers to some questions. If it needs to be exposed, please liaise with Pooben to see if he'll be able to do it asap.
>>>>>
>>>>> The NPR database work is extremely urgent.
>>>>>
>>>>> --
>>>>> Regards,
>>>>> Crizelle Nel
>>>>>
>>>>> <image002.png>
>>>>>
>>>>> Software Development and Information Systems
>>>>> Health Information Systems Program (HISP) - SA
>>>>> ------------------------------------------------------------------------------
>>>>> Email: crizellenel@xxxxxxxxx
>>>>> Cell: +27 84 580 3342
>>>>> Fax: 0866 509 502
>>>>> Skype: crizelle_nel
>>>>> Website: http://hispsa.org
>>>>>
>>>>> On Mon, Mar 10, 2014 at 8:42 AM, Pierre Dane <pierre@xxxxxxxxx> wrote:
>>>>> Hi Crizelle, Elmarie, Jason, Adebusoye and all,
>>>>>
>>>>> Thanks for all the work and input into this installation. Once the VM is up and running could you please give me a url that I can start making calls against. If I could log into that box to inspect database schema and inserted data that would be awesome.
>>>>>
>>>>> In terms of the facility code lookup, is there an existing API call for this or does some dev work need doing?
>>>>>
>>>>> Thanks again,
>>>>>
>>>>> Pierre
>>>>>
>>>>>
>>>>> On 08 Mar 2014, at 8:05 AM, Crizelle Nel <crizellenel@xxxxxxxxx> wrote:
>>>>>
>>>>> Thanks Busoye.
>>>>>
>>>>> I forgot to mention that the dot in the ERD indicates the many side of the relationship. I'm using a FOSS tool drawing tool called Pencil which is not really suited well to draw ERDs so I had to improvise.
>>>>>
>>>>> Does anyone know of any other FOSS drawing tools we can try out?
>>>>>
>>>>> --
>>>>> Regards,
>>>>> Crizelle Nel
>>>>>
>>>>> <image002.png>
>>>>>
>>>>> Software Development and Information Systems
>>>>> Health Information Systems Program (HISP) - SA
>>>>> ------------------------------------------------------------------------------
>>>>> Email: crizellenel@xxxxxxxxx
>>>>> Cell: +27 84 580 3342
>>>>> Fax: 0866 509 502
>>>>> Skype: crizelle_nel
>>>>> Website: http://hispsa.org
>>>>>
>>>>> On Fri, Mar 7, 2014 at 10:52 PM, Adebusoye Anifalaje <busoye@xxxxxxxx> wrote:
>>>>> Hi Crizelle,
>>>>>
>>>>> Excellent work.
>>>>>
>>>>> I particularly appreciate the tracked_entity relationship table. The database management team will do well to keep a print out on their desk!
>>>>>
>>>>> Well done.
>>>>>
>>>>> Regards,
>>>>>
>>>>> Busoye
>>>>>
>>>>>
>>>>> On 7 Mar 2014, at 20:43, Crizelle Nel <crizellenel@xxxxxxxxx> wrote:
>>>>>
>>>>> Hi all,
>>>>>
>>>>> Attached is the dump for the empty NPR database (no data) containing the facility codes.
>>>>>
>>>>> Jason, please restore this onto the 2.15 NPR Staging VM and send us all the URL. Since it's a staging instance I left the admin/district user in place.
>>>>>
>>>>> Note the following:
>>>>>
>>>>> * an OrgUnit attribute called "FacCode" was added (so that we leave the OU Code field open for future use) [table attribute]
>>>>>
>>>>> * each FacCode is 5 characters long with the 1st character of each code identifying the province which that facility belongs to:
>>>>> EC = 1
>>>>> FS = 2
>>>>> etc.
>>>>>
>>>>> * the FacCodes within a province were assigned in order of the OU ID [table organisationunitattributevalues]
>>>>> Elmarie, I know we discussed assigning these code sequentially on a sub-district/district basis (then Afsondering Clinic would have been 11111), but this will require quite a bit more work and I do not have the time now. Since new facilities will be assigned provincial codes at random in any case, I reckoned the order is not a priority. Let me know if it is and needs to be changed please.
>>>>>
>>>>> I've shared the SQL and process for adding the FacCodes with the SWD team and Elmarie on OwnCloud (Crizelle_SWD >> DHIS2 SQL Queries >> Generate FacCode for NPR) for those that are interested or need to know for future reference.
>>>>>
>>>>> I've also shared the SQL for deleting Tracker data from a DHIS2 database (Pierre, this might be useful to you as it lists the tables into which you will be pushing data from the HIM):
>>>>>
>>>>> http://197.221.49.146/owncloud/public.php?service=files&t=1c0bec042b08ee0bda356ce0b9d12324
>>>>>
>>>>> I've also attached a ERD showing how these tables link together for your reference.
>>>>>
>>>>> --
>>>>> Regards,
>>>>> Crizelle Nel
>>>>>
>>>>> <image002.png>
>>>>>
>>>>> Software Development and Information Systems
>>>>> Health Information Systems Program (HISP) - SA
>>>>> ------------------------------------------------------------------------------
>>>>> Email: crizellenel@xxxxxxxxx
>>>>> Cell: +27 84 580 3342
>>>>> Fax: 0866 509 502
>>>>> Skype: crizelle_nel
>>>>> Website: http://hispsa.org
>>>>>
>>>>> <ERD - DHIS Tracker Module (07 Mar 2014).pdf><pt_NPR_140307v8.7z>
>>>>
>>>
>>
>
>
Follow ups