A Framework for Resource Allocation in Time Critical Dynamic Environments Based on Social Welfare and Local Search and its Application to Healthcare