Skip to content

Instantly share code, notes, and snippets.

@swhume
Created September 25, 2021 01:39
Show Gist options
  • Save swhume/bb1801d171e922922145a708000fbbd2 to your computer and use it in GitHub Desktop.
Save swhume/bb1801d171e922922145a708000fbbd2 to your computer and use it in GitHub Desktop.
from fhirclient import client
import fhirclient.models.patient as p
settings = {
'app_id': 'rof_adapter',
'api_base': 'https://api-v5-stu3.hspconsortium.org/rofphir/open'
}
smart = client.FHIRClient(settings=settings)
patient = p.Patient.read('SMART-1288992', smart.server)
print(patient.name[0].given[0], patient.name[0].given[1], patient.name[0].family)
print(patient.birthDate.isostring)
print(patient.gender)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment