Life after leaving hospital: when does a duty of care end?

I live in Denmark. When I’m in the hospital, they set up a network meeting before they discharge me, where they coordinate who will help care for me in what way.
I always feel well taken care of. They also make sure I have enough meds for the first few days.