Hello Group:
I am a newb at python (v2.7/Mac OSX) and I just trying to get the simplest client to retrieve some data. I assume that I have some type of setup error:
So far I had to use easy_install to bring in “requests” and “isodate”. Then I found the offending line and the calling line in models/extension.py and models/element.py.
Now I am stuck on the source code and error below.
Thanks in advance for any pointer(s) or answers.
Regards..
—————————————————————————
Traceback (most recent call last):
File "t0.py", line 8, in <module>
import fhirclient.models.patient as p
File "<mydir>/client-py-master/fhirclient/models/patient.py", line 8, in <module>
from . import domainresource
File "<mydir>/client-py-master/fhirclient/models/domainresource.py", line 8, in <module>
from . import resource
File "<mydir>/client-py-master/fhirclient/models/resource.py", line 8, in <module>
from . import fhirabstractresource
File "<mydir>/client-py-master/fhirclient/models/fhirabstractresource.py", line 186, in <module>
from . import fhirelementfactory
File "<mydir>/client-py-master/fhirclient/models/fhirelementfactory.py", line 7, in <module>
from . import element
File "<mydir>/client-py-master/fhirclient/models/element.py", line 41, in <module>
from . import extension
File "<mydir>/client-py-master/fhirclient/models/extension.py", line 8, in <module>
from . import element
ImportError: cannot import name element
————————————————
from fhirclient import client
settings = {
'app_id': 'my_web_app',
}
smart = client.FHIRClient(settings=settings)
import fhirclient.models.patient as p
patient = p.Patient.read('hca-pat-1', smart.server)
patient.birthDate.isostring
# '1963-06-12'
# Christy Ebert