I certainly don't see any need for a variable to hold the '0' string.... It looks like you're producing 012-34-56-7, which certainly isn't what you've said you want, especially since 7 will be missing. Try
<xsl:value-of select="concat(
'0', substring($modPatientID, 1, 1), '-',
substring($modPatientID, 2, 2), '-',
substring($modPatientID, 4, 2), '-',
substring($modPatientID, 6)
)"/>
Or, to use the formatting you'd already come up with, add the zero prefix BEFORE formatting:
<xsl:variable name="paddedToSeven" select="concat('0',$modPatientID)"/>
<xsl:value-of select="concat(
substring($paddedToSeven, 1, 2), '-',
substring($paddedToSeven, 3, 2), '-',
substring($paddedToSeven, 5, 2), '-',
substring($paddedToSeven, 7)
)"/>