← Back to team overview

dhis2-devs team mailing list archive

Re: ProgramInstance + wish we had more code comments

 

Hi Ime

You are right, basically:

a) ProgramInstance = enrollment
b) ProgramStageInstance = event

I know it can be confusing as we are exposing the internals with different
names, but its a bigger task of renaming it internally (sql tables etc)
then externally.

For sure everyone on the team know we are not the best at code
documentation, but we will try and improve.

-- 
Morten Olav Hansen
Senior Engineer, DHIS 2
University of Oslo
http://www.dhis2.org

On Wed, Mar 15, 2017 at 3:25 PM, Ime Asangansi <imeasangansi@xxxxxxxxx>
wrote:

> Hi Devs,
>
> Please can anyone kindly clarify what a ProgramInstance is? I see that it
> is different from instances of Program or TEI which are quite well
> described.
> I've missed where ProgramInstance is described in the manual.
> For example, a new test database we've been using has 333 ProgramInstance
> instances and 233 TrackedEntityInstances.
> Since TEIs have a set of ProgramInstances, I am guessing that it is the
> number of enrollments by a TEI to a program or programstageinstance?
>
> Also, I've tried to look at the javadoc and the code, but I noticed
> there's less comments these days for base domain/POJOs like these.
>
> You can compare code comments from https://github.com/dhis2/dhis2
> -core/blob/master/dhis-2/dhis-api/src/main/java/org/hisp/
> dhis/dataelement/DataElement.java to what we have for
> https://github.com/dhis2/dhis2-core/blob/master/dhis-2/dhis-
> api/src/main/java/org/hisp/dhis/program/ProgramInstance.java
> In the old part of the core, the entities have top level comments that one
> can really use to understand what is happening.
>
> This can help a lot, since there's no dhis2 database schema document
> developed.
>
> Would be so grateful.
> Thanks so much.
>
> Ime
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>

References