I not sure how it works for the combined adult/child psych, but if I were to guess I think that it's like any other 5 year residency. Which means you owe 5 years of payback post-residency.
Fellowships accumulate 1 year commitment (Active Duty Service Obligation (ADSO)) for 6 months of sponsored fellowship. Therefore a 1 year fellowship adds 2 years of commitment.
Assuming you have a 4 year HPSP scholarship and based on a 4 year psych residency at the end of residency you will owe 4 more years of ADSO. If you are selected for a one year fellowship directly out of residency your ADSO will be fulfilled 7 years from the time you graduate residency (4 years of commitment + 1 year of fellowship + 2 years of additional payback for the fellowship). If you do the 5 year combined adult/child psych then tack an extra year on the payback.
This is not quite correct. Fellowship payback is 6 months per 6 months, with a minimum two-year obligation after completion of training.
For the OP, you would owe four years payback after completion of residency, assuming you did a 4-year HPSP and a one-year internship followed by 3 years of residency. If you did a 3+2 child psych straight through (if that's even offered), you would still owe just four years after finishing training.
While in residency training you are simultaneously paying back HPSP obligations at the same time you are adding additional commitment. So, after medical school you owe 4 years (again assuming 4-year HPSP). Internship (PGY-1) is 'dead time', thus you still owe four years. During a 3-year residency (PGY 2-4) you pay back three, but incur an additional three, so therefore you still owe 4 years [4-3+3=4]. During a 4-year residency (PGY 2-5) you pay back the 4 years from school, but still incur an additional four years obligation [4-4+4=4].
For fellowship, again it is a 6-month per 6-month obligation, with a minimum of two years owed after completion of fellowship. If you go into fellowship owing just one year (assuming you have done some payback first and haven't gone straight from internship to residency to fellowship), then a 1-year fellowship will leave you with two years of obligated payback [1+1=2]. If you go into fellowship without owing any time, then a 1-year fellowship will still leave you with two years obligated service.
For the OP, if you do a psych internship followed by 3 years of residency, followed by a 1-year fellowship all in succession, you would owe 5 years after completion of fellowship.