Money has been made available from the NHS to support patients leaving hospital through its partnership with local charities.