Skip to content

Instantly share code, notes, and snippets.

@lordjabez
Last active May 5, 2023 04:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lordjabez/78758db3342df0fec7029801ce3d1531 to your computer and use it in GitHub Desktop.
Save lordjabez/78758db3342df0fec7029801ce3d1531 to your computer and use it in GitHub Desktop.
Query the Scripps physician API to find available doctors
import json
import requests
url = 'https://www.scripps.org/physicians.json'
params = {
'api': 'provider_search',
'location': 'location-61-scripps-clinic-rancho-bernardo',
'skill': 'synonym-1-primary-care',
'age_group': 'adults',
'gender': 'male',
'new_patient': 'true',
}
def lambda_handler(event, context):
response = requests.get(url, params=params)
doctors = response.json()['results']
print(json.dumps({'count': len(doctors)}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment