A scaling approach to the derivation of hydrodynamic boundary conditions