How to count the number of registered tracking entities?

I have created a trackered program with some entity type, with no program periods data, just the entity registered.
How to count the number of registered tracking entities?

Hi @linxd

It’s sort of similar to this exercise (Learner's Guide to Program Indicators - DHIS2 Documentation) but instead of event_count it would be enrollment_count:slight_smile:

I have done like this, but can’t got the result, I have create entitie by post to /api/tracker? with payload:
{“trackedEntities”:

[{“orgUnit”:“MJiad6HeAuA”,“trackedEntityType”:“hLJq6b6YiUZ”,“attributes”:

[
{“attribute”:“s3NGfGfk77v”,“value”:null},{“attribute”:“PrimaryOrg0”,“value”:“xxxxx医院”},{“attribute”:“QRCode00000”,“value”:null},{“attribute”:“JobQual0000”,“value”:“232”},{“attribute”:“BirthDate00”,“value”:“1973-09-20”},{“attribute”:“CertDate000”,“value”:“2017-02-10”},{“attribute”:“CertOrgName”,“value”:“xxxx”},{“attribute”:“PracOrgID00”,“value”:“AC5D1BB1-E0D2-445A-AECB-7E0F31C1DFB9”},{“attribute”:“CertOrgCode”,“value”:“xxxxxx”},{“attribute”:“MultiOrgReg”,“value”:null},{“attribute”:“Name0000000”,“value”:“x春x”},{“attribute”:“sex00000000”,“value”:“2”},{“attribute”:“PracLoc0000”,“value”:“xx区”},{“attribute”:“PracLevel00”,“value”:“执业医师”},{“attribute”:“PracType000”,“value”:“临床”},{“attribute”:“PracScope00”,“value”:“重症医学科专业”},{“attribute”:“CertCode000”,“value”:“xxxxxxxx”},{“attribute”:“National000”,“value”:“01”},{“attribute”:“CivSciSysID”,“value”:“1158EE63-7178-4FEB-A510-EE3A7305D334”},{“attribute”:“AdmBizCode0”,“value”:“510105”},{“attribute”:“CertNo00000”,“value”:“xxxxxx”},{“attribute”:“IDNumber000”,“value”:“xxxxxx”},{“attribute”:“Note0000000”,“value”:null},{“attribute”:“Specialty00”,“value”:null},{“attribute”:“OrgCode0000”,“value”:“0CB2E80E-5250- 47EA-BF37-E58B87C767EA”}],
“trackedEntity”:“KJiUXAiDdf8”}]
}
response like:
{
“status” : “OK”,
“validationReport” : {
“errorReports” : ,
“warningReports” :
},
“stats” : {
“created” : 0,
“updated” : 1,
“deleted” : 0,
“ignored” : 0,
“total” : 1
},
“bundleReport” : {
“typeReportMap” : {
“ENROLLMENT” : {
“trackerType” : “ENROLLMENT”,
“stats” : {
“created” : 0,
“updated” : 0,
“deleted” : 0,
“ignored” : 0,
“total” : 0
},
“objectReports” :
},
“EVENT” : {
“trackerType” : “EVENT”,
“stats” : {
“created” : 0,
“updated” : 0,
“deleted” : 0,
“ignored” : 0,
“total” : 0
},
“objectReports” :
},
“TRACKED_ENTITY” : {
“trackerType” : “TRACKED_ENTITY”,
“stats” : {
“created” : 0,
“updated” : 1,
“deleted” : 0,
“ignored” : 0,
“total” : 1
},
“objectReports” : [
{
“trackerType” : “TRACKED_ENTITY”,
“uid” : “KJiUXAiDdf8”,
“index” : 0,
“errorReports” :
}
]
},
“RELATIONSHIP” : {
“trackerType” : “RELATIONSHIP”,
“stats” : {
“created” : 0,
“updated” : 0,
“deleted” : 0,
“ignored” : 0,
“total” : 0
},
“objectReports” :
}
}
}
}
so ,just create entity, but haven’t enrollment, how can I do statis on created entities but no enrolled?

the data management app reported more than 1,000,000 . but enrolledcount has no value. and the analysis table has been not created.

I think , there are some cases , which create entities first , and then register to some program as need later, is ok ?

Existing indicator calculation variables: enrollment_count, event_count, no Number of entities created.
All analysis and statistics in DHIS2 are centered around programs or events. There is currently no analysis and statistics centered around entities. Therefore, it is need to expand by establishing entity management, such as
entity verification, entity master index, and so on.