Software architecture for pervasive critical health monitoring system using fog computing