Following is a response from DHS Research and Data Analysis Director, Tom Pullum:
I think there is a way to do this in Stata with one of the "egen" commands, but the following is very fast. You will have to change the paths. Let us know if this doesn't work!
* Open and save PR file
use "C:\Users\26216\ICF\Analysis - Shared Resources\Data\DHSdata\TZPR7AFL.DTA" , clear
save e:\DHS\DHS_data\scratch\TZPR_temp1.dta, replace
* Construct and save a file reduced to the household head
keep if hv101==1
keep hhid hv106
rename hv106 hv106_head
sort hhid
save e:\DHS\DHS_data\scratch\TZPR_temp2.dta, replace
* Re-open the PR file and merge with the head's information
use e:\DHS\DHS_data\scratch\TZPR_temp1.dta, clear
sort hhid hvidx
merge hhid using e:\DHS\DHS_data\scratch\TZPR_temp2.dta
drop _merge
* Check
list hhid hvidx hv106 hv106_head if _n<=50, table clean