Calculate transferred patients

Hello @lehuyen! Thanks for this great question, which relates to some new features upcoming for tracker analytics.

A patient’s “transfer” is represented in DHIS2 as a change in the “ownership” of the TEI for a given program. There can be a temporary transfer of ownership (one-time referral) or a permanent transfer.

These changes in ownership are recorded in the database in the following tables

Temporary Permanent
Current programtempowner trackedentityprogramowner
History programtempownershipaudit programownershiphistory

Unfortunately, these data are not yet exposed through the API or the core DHIS2 analytics apps.

There are some features currently being developed that would help analysis of transfers

These features are being targeted for a v2.38 release in 2022

In the meantime, you could use SQL views to make some joins of the ownership tables above, and extract the information you need.

One last thing to note is that ownership is recorded at the TEI-program level, not by enrollment. This means a patient’s record can be “owned” by a different orgUnit per program, but a repeatable program, such as a pregnancy tracker or malaria register, there is only one owner for all the patient’s enrollments.

I hope this information is useful!

2 Likes