Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This demo shows how to use the IBM FHIR Server Docker image along with the IBM FHIR Server examples and `near` search parameter.
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Using the IBM FHIR Server Location Search in Jupyter\n",
"\n",
"**Author**: [Paul Bastide](mailto:pbastide@us.ibm.com)\n",
"\n",
"The IBM FHIR Server supports FHIR Search with the SearchParameter `near` on the Location API. \n",
"\n",
"This notebook shows how to use the IBM FHIR Server examples with Location Search and use folium to render their plots.\n",
"\n",
"More advanced demonstrations can be generated from this location data which reference these Locations, and are retrieved using [FHIR Search - Reference](https://www.hl7.org/fhir/search.html#reference)."
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"All imports complete\n"
]
}
],
"source": [
"# The following imports are used in the analysis of the location data:\n",
"\n",
"# imported to retrieve any secondary data\n",
"import requests\n",
"\n",
"# import pandas to process the data (and json_normalize to use the geojson as a plain dataframe)\n",
"import pandas as pd\n",
"import numpy as np\n",
"\n",
"# Import to control the output of the choropleth map\n",
"import matplotlib.cm as cm\n",
"import matplotlib.colors as colors\n",
"\n",
"# standard matplot lib \n",
"import matplotlib\n",
"import matplotlib.pyplot as plt\n",
"from matplotlib.pyplot import figure\n",
"import matplotlib.dates as mdates\n",
"\n",
"# Import Folium to visualize the map\n",
"import folium\n",
"from folium import plugins\n",
"from folium.plugins import HeatMap\n",
"from folium.plugins import MarkerCluster\n",
"\n",
"# figures out the neighborhoods for each coordinate. \n",
"from shapely.geometry import Point \n",
"#(switched to geojson point to more precisely identify location)\n",
"#from geojson import Point\n",
"\n",
"# Imports the Clustering Utilities\n",
"from sklearn.cluster import DBSCAN\n",
"from sklearn import metrics\n",
"from sklearn.datasets.samples_generator import make_blobs\n",
"from sklearn.preprocessing import StandardScaler\n",
"from sklearn.cluster import KMeans\n",
"\n",
"import json\n",
"from pandas.io.json import json_normalize\n",
"\n",
"# used to process fhir-examples\n",
"import zipfile, io\n",
"import urllib3\n",
"\n",
"print(\"All imports complete\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Download the fhir-examples\n",
"The following downloads the fhir-examples module."
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"# The URl for the most recent fhir-examples module.\n",
"fhir_examples_jar_url='https://dl.bintray.com/ibm-watson-health/ibm-fhir-server-releases/com/ibm/fhir/fhir-examples/4.5.0/fhir-examples-4.5.0.jar'\n",
"\n",
"r = requests.get(fhir_examples_jar_url)\n",
"z = zipfile.ZipFile(io.BytesIO(r.content))"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
"# Authenticate\n",
"from requests.auth import HTTPBasicAuth\n",
"httpAuth = HTTPBasicAuth('fhiruser', 'change-password')\n",
"\n",
"# Get the Location using Requests\n",
"headers = {\n",
" 'Content-Type': 'application/json'\n",
"}\n",
"\n",
"# We choose to disable warnings, in production, please don't\n",
"urllib3.disable_warnings()"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Done uploading - json/ibm/bulk-data/location/\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-103.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-104.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-31.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-37.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-43.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-44.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-8.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-118.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-95.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-99.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-85.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-63.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-113.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-34.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-97.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-11.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-32.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-1.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-101.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-53.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-93.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-98.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-119.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-114.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-23.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-115.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-128.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-15.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-72.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-38.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-91.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-5.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-88.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-4.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-124.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-52.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-9.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-83.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-57.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-127.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-6.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-47.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-14.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-2.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-55.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-16.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-100.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-106.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-108.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-86.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-120.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-109.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-90.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-12.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-24.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-54.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-46.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-70.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-22.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-10.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-17.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-78.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-110.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-116.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-40.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-19.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-20.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-45.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-58.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-69.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-42.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-48.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-81.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-60.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-51.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-68.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-123.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-64.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-92.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-36.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-33.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-107.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-29.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-80.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-71.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-76.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-65.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-49.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-7.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-74.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-82.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-94.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-84.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-121.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-26.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-96.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-126.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-122.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-61.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-125.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-66.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-112.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-77.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-117.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-13.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-35.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-56.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-18.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-79.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-30.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-87.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-50.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-39.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-111.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-102.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-21.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-25.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-3.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-105.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-73.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-28.json\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-59.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-27.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-75.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-41.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-67.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-62.json\n",
"Done uploading - json/ibm/bulk-data/location/synthetic-mass-89.json\n"
]
}
],
"source": [
"# At this point we have z as a zip file and we can selectively process the zip file. \n",
"# this is kind of cool as we can go ahead and send these files right to the IBM FHIR Server. \n",
"entries = z.namelist()\n",
"for entry in entries: \n",
" if entry.startswith('json/ibm/bulk-data/location/'):\n",
" f = z.open(entry);\n",
" content = f.read()\n",
" r = requests.post('https://localhost:9443/fhir-server/api/v4/Location', \n",
" data=content,\n",
" headers=headers, \n",
" auth=httpAuth,\n",
" verify=False)\n",
" print('Done uploading - ' + entry)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Query the IBM FHIR Server with near"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"# Authenticate\n",
"from requests.auth import HTTPBasicAuth\n",
"httpAuth = HTTPBasicAuth('fhiruser', 'change-password')"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
"# Get the Location using Requests\n",
"headers = {\n",
" 'Content-Type': 'application/json'\n",
"}\n",
"\n",
"# Search within 10Km of Cambridge Massachusetts\n",
"queryParams = {\n",
" 'near': '42.373611|-71.110558|10|km',\n",
" \"_count\" : 200\n",
"}\n",
"\n",
"# Search Parameter = near=\n",
"resp_loc = requests.get('https://localhost:9443/fhir-server/api/v4/Location', \n",
" headers=headers, \n",
" params=queryParams,\n",
" auth=httpAuth,\n",
" verify=False)"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"# Convert to a list\n",
"response_loc_json = json.loads(resp_loc.text)\n",
"\n",
"location_rows = []\n",
"for location in response_loc_json['entry']:\n",
" row = pd.json_normalize(location)\n",
" lat_inc = float(row['resource.position.latitude'])\n",
" location_rows.append(row)\n",
" \n",
"# If you are debugging... print(rows_list)"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Found this number of Locations: 44\n"
]
}
],
"source": [
"print('Found this number of Locations: ' + str(len(location_rows)))"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/html": [
"<div style=\"width:100%;\"><div style=\"position:relative;width:100%;height:0;padding-bottom:60%;\"><iframe src=\"data:text/html;charset=utf-8;base64,PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgPHNjcmlwdD5MX1BSRUZFUl9DQU5WQVM9ZmFsc2U7IExfTk9fVE9VQ0g9ZmFsc2U7IExfRElTQUJMRV8zRD1mYWxzZTs8L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2xlYWZsZXRAMS4yLjAvZGlzdC9sZWFmbGV0LmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2FqYXguZ29vZ2xlYXBpcy5jb20vYWpheC9saWJzL2pxdWVyeS8xLjExLjEvanF1ZXJ5Lm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9tYXhjZG4uYm9vdHN0cmFwY2RuLmNvbS9ib290c3RyYXAvMy4yLjAvanMvYm9vdHN0cmFwLm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9jZG5qcy5jbG91ZGZsYXJlLmNvbS9hamF4L2xpYnMvTGVhZmxldC5hd2Vzb21lLW1hcmtlcnMvMi4wLjIvbGVhZmxldC5hd2Vzb21lLW1hcmtlcnMuanMiPjwvc2Nya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CA9IEwucG9wdXAoe21heFdpZHRoOiAnMzAwJwogICAgICAgICAgICAKICAgICAgICAgICAgfSk7CgogICAgICAgICAgICAKICAgICAgICAgICAgICAgIHZhciBodG1sXzUxZGI2NWMzOTVjMTRiNmRhM2VlMTcxODFhNWZkMWU4ID0gJCgnPGRpdiBpZD0iaHRtbF81MWRiNjVjMzk1YzE0YjZkYTNlZTE3MTgxYTVmZDFlOCIgc3R5bGU9IndpZHRoOiAxMDAuMCU7IGhlaWdodDogMTAwLjAlOyI+MCAgICBTeW50aGV0aWMgTWFzcyAtIExvY2F0aW9uIC0gNDQgTmFtZTogcmVzb3VyY2UubmFtZSwgZHR5cGU6IG9iamVjdDwvZGl2PicpWzBdOwogICAgICAgICAgICAgICAgcG9wdXBfZjMzMmE2NjRhZjI5NDAwNGFhMjkwNjVlMDYyOWEzOTguc2V0Q29udGVudChodG1sXzUxZGI2NWMzOTVjMTRiNmRhM2VlMTcxODFhNWZkMWU4KTsKICAgICAgICAgICAgCgogICAgICAgICAgICBjaXJjbGVfbWFya2VyXzYzODM1NDZiNGY2YTQxODNhNGFhZmU0MDcwMzIyNzhkLmJpbmRQb3B1cChwb3B1cF9mMzMyYTY2NGFmMjk0MDA0YWEyOTA2NWUwNjI5YTM5OCkKICAgICAgICAgICAgOwoKICAgICAgICAgICAgCiAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIGNpcmNsZV9tYXJrZXJfMWQ4MGM5ZDcwMjFiNDA0OTg4NDcwYzIzMjhiNjllY2MgPSBMLmNpcmNsZU1hcmtlcigKICAgICAgICAgICAgICAgIFs0Mi40MjYyOSwgLTcxLjExMTFdLAogICAgICAgICAgICAgICAgewogICJidWJibGluZ01vdXNlRXZlbnRzIjogdHJ1ZSwKICAiY29sb3IiOiAiIzMzODhmZiIsCiAgImRhc2hBcnJheSI6IG51bGwsCiAgImRhc2hPZmZzZXQiOiBudWxsLAogICJmaWxsIjogdHJ1ZSwKICAiZmlsbENvbG9yIjogInJlZCIsCiA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RDb250ZW50KGh0bWxfZjYxMWFmZTAzMTZmNGJhZjhhYjAwYWNlNDYxZDYzZjEpOwogICAgICAgICAgICAKCiAgICAgICAgICAgIGNpcmNsZV9tYXJrZXJfNmE3NzJhYjQxNDY1NGVmMDg4YjcyNzY0ZTFmYTM2YWIuYmluZFBvcHVwKHBvcHVwXzcwNDZlNjBjNWVjNTRiNDU5YjI3NzQ5YWQ2MTBhY2E0KQogICAgICAgICAgICA7CgogICAgICAgICAgICAKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgY2lyY2xlX21hcmtlcl84ZjkxYzRlYTlmNDI0M2I0YjQ4MDVkMWVlNjc4NDczNSA9IEwuY2lyY2xlTWFya2VyKAogICAgICAgICAgICAgICAgWzQyLjM1MDU0LCAtNzEuMDc2NzVdLAogICAgICAgICAgICAgICAgewogICJidWJibGluZ01vdXNlRXZlbnRzIjogdHJ1ZSwKICAiY29sb3IiOiAiIzMzODhmZiIsCiAgImRhc2hBcnJheSI6IG51bGwsCiAgImRhc2hPZmZzZXQiOiBudWxsLAogICJmaWxsIjogdHJ1ZSwKICAiZmlsbENvbG9yIjogInJlZCIsCiAgImZpbGxPcGFjaXR5IjogMC43LAogICJmaWxsUnVsZSI6ICJldmVub2RkIiwKICAibGluZUNhcCI6ICJyb3VuZCIsCiAgImxpbmVKb2luIjogInJvdW5kIiwKICAib3BhY2l0eSI6IDEuMCwKICAicmFkaXVzIjogNSwKICAic3Ryb2tlIjogdHJ1ZSwKICAid2VpZ2h0IjogMwp9CiAgICAgICAgICAgICAgICApCiAgICAgICAgICAgICAgICAuYWRkVG8obWFwXzYzMDcwNmFkMGMyNTQ0MjViMmJkNTc3ZTJmZmU0Mzk0KTsKICAgICAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIHBvcHVwXzFjNmEzNDE5NjRjZDRkMDRhMWIxZjZiYTFjODU1MjIwID0gTC5wb3B1cCh7bWF4V2lkdGg6ICczMDAnCiAgICAgICAgICAgIAogICAgICAgICAgICB9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mNsZV9tYXJrZXJfMzFlZDI2OThjZTFlNGE5ZTg1MWZhNjk3ZmE1ODQzMTEuYmluZFBvcHVwKHBvcHVwXzdkMDVlYWZmODYzZDQ3ZjBhYzVkNDBhMmU1Nzk4MWNhKQogICAgICAgICAgICA7CgogICAgICAgICAgICAKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgY2lyY2xlX21hcmtlcl9mMmU5MTZjMTI2ZmI0ZDFjODIxZDY4YTE1Y2I3NjUzYiA9IEwuY2lyY2xlTWFya2VyKAogICAgICAgICAgICAgICAgWzQyLjMzNDc5LCAtNzEuMDczMjldLAogICAgICAgICAgICAgICAgewogICJidWJibGluZ01vdXNlRXZlbnRzIjogdHJ1ZSwKICAiY29sb3IiOiAiIzMzODhmZiIsCiAgImRhc2hBcnJheSI6IG51bGwsCiAgImRhc2hPZmZzZXQiOiBudWxsLAogICJmaWxsIjogdHJ1ZSwKICAiZmlsbENvbG9yIjogInJlZCIsCiAgImZpbGxPcGFjaXR5IjogMC43LAogICJmaWxsUnVsZSI6ICJldmVub2RkIiwKICAibGluZUNhcCI6ICJyb3VuZCIsCiAgImxpbmVKb2luIjogInJvdW5kIiwKICAib3BhY2l0eSI6IDEuMCwKICAicmFkaXVzIjogNSwKICAic3Ryb2tlIjogdHJ1ZSwKICAid2VpZ2h0IjogMwp9CiAgICAgICAgICAgICAgICApCiAgICAgICAgICAgICAgICAuYWRkVG8obWFwXzYzMDcwNmFkMGMyNTQ0MjViMmJkNTc3ZTJmZmU0Mzk0KTsKICAgICAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIHBvcHVwX2RlNWU1OTllMjNiNjQyNzI4ZGUzNjU2ZmMwNjE3YmM5ID0gTC5wb3B1cCh7bWF4V2lkdGg6ICczMDAnCiAgICAgICAgICAgIAogICAgICAgICAgICB9KTsKCiAgICAgICAgICAgIAogICAgICAgICAgICAgICAgdmFyIGh0bWxfYjFhYzQxN2ZjMzFlNDc0YmI0ZjZkNjYzYWZmYzIyN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TJjOTQyZTQxZTMuYmluZFBvcHVwKHBvcHVwX2M3ZTQ2OWFjZDIxNzQ5NjViYTc0NWY5NzhkZjMzM2ZhKQogICAgICAgICAgICA7CgogICAgICAgICAgICAKICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgY2lyY2xlX21hcmtlcl9jYjdhNmNhMjgyZjU0OWZkYTM5Nzg5NWMxNzNmMDBlZSA9IEwuY2lyY2xlTWFya2VyKAogICAgICAgICAgICAgICAgWzQyLjM2MzAyLCAtNzEuMDY2NThdLAogICAgICAgICAgICAgICAgewogICJidWJibGluZ01vdXNlRXZlbnRzIjogdHJ1ZSwKICAiY29sb3IiOiAiIzMzODhmZiIsCiAgImRhc2hBcnJheSI6IG51bGwsCiAgImRhc2hPZmZzZXQiOiBudWxsLAogICJmaWxsIjogdHJ1ZSwKICAiZmlsbENvbG9yIjogInJlZCIsCiAgImZpbGxPcGFjaXR5IjogMC43LAogICJmaWxsUnVsZSI6ICJldmVub2RkIiwKICAibGluZUNhcCI6ICJyb3VuZCIsCiAgImxpbmVKb2luIjogInJvdW5kIiwKICAib3BhY2l0eSI6IDEuMCwKICAicmFkaXVzIjogNSwKICAic3Ryb2tlIjogdHJ1ZSwKICAid2VpZ2h0IjogMwp9CiAgICAgICAgICAgICAgICApCiAgICAgICAgICAgICAgICAuYWRkVG8obWFwXzYzMDcwNmFkMGMyNTQ0MjViMmJkNTc3ZTJmZmU0Mzk0KTsKICAgICAgICAgICAgCiAgICAKICAgICAgICAgICAgdmFyIHBvcHVwXzVkODUxZDZkYWVmZjQyNjE5NmFkYTBkMWVkYTBiMWIwID0gTC5wb3B1cCh7bWF4V2lkdGg6ICczMDAnCiAgICAgICAgICAgIAogICAgICAgICAgICB9KTsKCiAgICAgICAgICAgIAogICAgICAgICAgICAgICAgdmFyIGh0bWxfMGM2YTBiMDNmOTE3NDNjYWExMzNlMmUxZmVkY2JmNDIgPSAkKCc8ZGl2IGlkPSJodG1sXzBjNmEwYjAzZjkxNzQzY2F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CiAgICAgICAgICAgIAoKICAgICAgICAgICAgY2lyY2xlX21hcmtlcl9kYTQyYmQwNTVhM2U0ZmQxOWI4YTg5ZWE2NTRmZmFmNS5iaW5kUG9wdXAocG9wdXBfYjhhMDU3ZGExNGQ3NDYzYjhiN2E1MDE4ZGUzODY0YmMpCiAgICAgICAgICAgIDsKCiAgICAgICAgICAgIAogICAgICAgIAogICAgCiAgICAgICAgICAgIHZhciBjaXJjbGVfbWFya2VyXzRiOTVhY2EzMDY3MDQ0NTlhNjRlMjAwZTU1NDVjYzMzID0gTC5jaXJjbGVNYXJrZXIoCiAgICAgICAgICAgICAgICBbNDIuMzAxNjQsIC03MS4xMjg3OF0sCiAgICAgICAgICAgICAgICB7CiAgImJ1YmJsaW5nTW91c2VFdmVudHMiOiB0cnVlLAogICJjb2xvciI6ICIjMzM4OGZmIiwKICAiZGFzaEFycmF5IjogbnVsbCwKICAiZGFzaE9mZnNldCI6IG51bGwsCiAgImZpbGwiOiB0cnVlLAogICJmaWxsQ29sb3IiOiAicmVkIiwKICAiZmlsbE9wYWNpdHkiOiAwLjcsCiAgImZpbGxSdWxlIjogImV2ZW5vZGQiLAogICJsaW5lQ2FwIjogInJvdW5kIiwKICAibGluZUpvaW4iOiAicm91bmQiLAogICJvcGFjaXR5IjogMS4wLAogICJyYWRpdXMiOiA1LAogICJzdHJva2UiOiB0cnVlLAogICJ3ZWlnaHQiOiAzCn0KICAgICAgICAgICAgICAgICkKICAgICAgICAgICAgICAgIC5hZGRUbyhtYXBfNjMwNzA2YWQwYzI1NDQyNWIyYmQ1NzdlMmZmZTQzOTQpOwogICAgICAgICAgICAKICAgIAogICAgICAgICAgICB2YXIgcG9wdXBfYzBjNjg0ODYxOWMzNGE4YzkxMTNlZjNlMTczOTFlNTMgPSBMLnBvcHVwKHttYXhXaWR0aDogJzMwMCcKICAgICAgICAgICAgCiAgICAgICAgICAgIH0pOwoKICAgICAgICAgICAgCiAgICAgICAgICAgICAgICB2YXIgaHRtbF84OWJi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aDogMTAwLjAlOyBoZWlnaHQ6IDEwMC4wJTsiPjAgICAgU3ludGhldGljIE1hc3MgLSBMb2NhdGlvbiAtIDI3IE5hbWU6IHJlc291cmNlLm5hbWUsIGR0eXBlOiBvYmplY3Q8L2Rpdj4nKVswXTsKICAgICAgICAgICAgICAgIHBvcHVwXzZhOWIwYzQyZDlmMzRjMTdhODIxNGRiMTdiOTAyNmFlLnNldENvbnRlbnQoaHRtbF9lMzk2MzJhYWRlMGY0OTIwYTkzYWI2ZDM4MWQ5MTU0Mik7CiAgICAgICAgICAgIAoKICAgICAgICAgICAgY2lyY2xlX21hcmtlcl8wMDVhYmU0Y2FmMjA0NmViOGFhMDIyZmNmMjkxZWE3Yy5iaW5kUG9wdXAocG9wdXBfNmE5YjBjNDJkOWYzNGMxN2E4MjE0ZGIxN2I5MDI2YWUpCiAgICAgICAgICAgIDsKCiAgICAgICAgICAgIAogICAgICAgIAo8L3NjcmlwdD4=\" style=\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>"
],
"text/plain": [
"<folium.folium.Map at 0x12f1e9ad0>"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# zoom 15 is used to show the groupings\n",
"cambridge = [ 42.373611, -71.11000]\n",
"map_cambridge_locs_from_server = folium.Map(location=cambridge, zoom_start=10)\n",
"\n",
"# Iterate through the Rows\n",
"for location_row in location_rows :\n",
" # print(location_row)\n",
" \n",
" # Cast the values into the appropriate types as FOLIUM will die weirdly without it. \n",
" lat_inc = float(location_row['resource.position.latitude'])\n",
" long_inc = float(location_row['resource.position.longitude'])\n",
" name_inc = str(location_row['resource.name'])\n",
" \n",
" #print(lat_inc)\n",
" #print(long_inc)\n",
" #print(name_inc)\n",
" \n",
" label = folium.Popup(name_inc, parse_html=True)\n",
" folium.CircleMarker(\n",
" [lat_inc, long_inc],\n",
" radius=5,\n",
" popup=label,\n",
" fill=True,\n",
" fill_color='red',\n",
" fill_opacity=0.7).add_to(map_cambridge_locs_from_server)\n",
" \n",
"map_cambridge_locs_from_server"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"(C) Copyright IBM Corp. 2020\n",
"\n",
"SPDX-License-Identifier: Apache-2.0"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.7"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
@prb112
Copy link
Author

prb112 commented Nov 23, 2020

In order to visualize the response, the notebook generates output like the following:
image

The above gist requires Jupyter, Docker and the IBM FHIR Server. However, the near search should be supported on most implementations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment