Quantification of the resilience of primary care networks by stress testing the health care system