The technology to do your data collection pretty much exists today. Once you strip away a smart phone battery, touch screen, and case, there is not much left. Your main power consumption, however, would be in the on-line real-time tracking. This, I presume, would require some form of electromagnetic transmission, which is very power intensive.
The identity stuff could be done by RFID tags, which require no internal power at all. The power comes from the external reader. If you want just a local data readout from a monitor, power for the data dump could come from the reader itself, using RF charging at the time of read-out.
The shocking part could be handled by a high-capacity Li-Ion battery that discharges all at once. The battery could be used for ONLY this purpose, thus it would not discharge until needed. 284
Require a citizens to do an annual 'physical' which would also ensure this battery is kept charged. Tampering with it, of course, would be like tampering with ANY li-ion battery - immediate short and very high temperature fire.
So your main concerns are wireless communication for tracking, and power for data collection. For this, you would need more than just a localized power source. I would suggest either artificial photosynthesis biologically implanted in every person, solar cells implanted on the head (no head covering allowed), or some form of thermal generator.
The best bet for thermal energy would be nano-thermo-generators that line the nasal cavity, and use the temperature differential between internal body temperature (37 degrees Celsius) and ambient temperature of the air entering the nose (depending on the local of your country, average 25 degrees Celsius) for a temperature differential of 12 degrees Celsius. Since the body is doing its best to HEAT the incoming air up, here is perhaps the best bet for the body to keep UP the temperature gradient. However, I think you would be hard-pressed to get enough energy to power a cellular signal Energy Consumption in Android Phones when using Wireless Communication Technologies
In [6] <PERSON> et al. showed that data transfer of 50 KB when using 3G needs 12.5 J, while when using WiFi the same data transfer consumes 7.6 J of energy
Page 4 790