forked from smart-classic/smart_client_python
-
Notifications
You must be signed in to change notification settings - Fork 0
herilantono/smart_client_python
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
SMART Python Client Library
===========================
To generate this README:
$ python generate_readme.py > README
---
class SMARTClient(oauth2.Client)
Establishes OAuth communication with an SMART Container, and provides access to the API.
Method resolution order:
SMARTClient
oauth2.Client
oauth2.httplib2.Http
__builtin__.object
Methods defined here:
__init__(self, api_base, consumer_params, **state_vars)
absolute_uri(self, uri)
delete(self, uri, headers={}, **uri_params)
Make an OAuth-signed DELETE request to SMART Server.
delete_scratchpad_data = c(self, *args, **kwargs)
DELETE /records/{record_id}/apps/{smart_app_id}/scratchpad
Delete scratchpad data for an app
Returns RDF Graph containing: http://smartplatforms.org/terms#ScratchpadData
delete_user_preferences = c(self, *args, **kwargs)
DELETE /users/{user_id}/apps/{smart_app_id}/preferences
Delete user preferences for an app
Returns RDF Graph containing: http://smartplatforms.org/terms#UserPreferences
exchange_token(self, verifier)
Exchange the client's current token (should be a request token) for an access token.
fetch_request_token(self, params={})
Get a request token from the server.
get(self, uri, body={}, headers={'Authorization': u'OAuth realm="http://localhost:7000", oauth_bod...h_signature="JmzMOjnMGu9hXJ0%2FWYi%2FSPTvXzA%3D"'}, **uri_params)
Make an OAuth-signed GET request to SMART Server.
get_allergies = c(self, *args, **kwargs)
GET /records/{record_id}/allergies/
Get all Allergies and Allergy Exclusions for a patient
Returns RDF Graph containing: http://smartplatforms.org/terms#Allergy
get_allergy = c(self, *args, **kwargs)
GET /records/{record_id}/allergies/{allergy_id}
Get one Allergy for a patient
Returns RDF Graph containing: http://smartplatforms.org/terms#Allergy
get_app_manifest = c(self, *args, **kwargs)
GET /apps/{descriptor}/manifest
Returns a JSON SMART UI app manifest for the app matching {descriptor}, or 404. Note that {descriptor} can be an app ID like "got-statins
Returns RDF Graph containing: http://smartplatforms.org/terms#AppManifest
get_app_manifests = c(self, *args, **kwargs)
GET /apps/manifests/
Returns a JSON list of all SMART UI app manifests installed on the container.
Returns RDF Graph containing: http://smartplatforms.org/terms#AppManifest
get_clinical_note = c(self, *args, **kwargs)
GET /records/{record_id}/clinical_notes/{clinical_note_id}
Get one Clinical Note for a patient
Returns RDF Graph containing: http://smartplatforms.org/terms#ClinicalNote
get_clinical_notes = c(self, *args, **kwargs)
GET /records/{record_id}/clinical_notes/
Get all Clinical Notes for a patient
Returns RDF Graph containing: http://smartplatforms.org/terms#ClinicalNote
get_container_manifest = c(self, *args, **kwargs)
GET /manifest
Get manifest for a container
Returns RDF Graph containing: http://smartplatforms.org/terms#ContainerManifest
get_demographics = c(self, *args, **kwargs)
GET /records/{record_id}/demographics
Get Demographics for a patient
Returns RDF Graph containing: http://smartplatforms.org/terms#Demographics
get_encounter = c(self, *args, **kwargs)
GET /records/{record_id}/encounters/{encounter_id}
Get one Encounter for a patient
Returns RDF Graph containing: http://smartplatforms.org/terms#Encounter
get_encounters = c(self, *args, **kwargs)
GET /records/{record_id}/encounters/
Get all Encounters for a patient
Returns RDF Graph containing: http://smartplatforms.org/terms#Encounter
get_fulfillment = c(self, *args, **kwargs)
GET /records/{record_id}/fulfillments/{fulfillment_id}
Get one Fulfillment for a patient
Returns RDF Graph containing: http://smartplatforms.org/terms#Fulfillment
get_fulfillments = c(self, *args, **kwargs)
GET /records/{record_id}/fulfillments/
Get all Fulfillments for a patient
Returns RDF Graph containing: http://smartplatforms.org/terms#Fulfillment
get_immunization = c(self, *args, **kwargs)
GET /records/{record_id}/immunizations/{immunization_id}
Get one Immunization for a patient
Returns RDF Graph containing: http://smartplatforms.org/terms#Immunization
get_immunizations = c(self, *args, **kwargs)
GET /records/{record_id}/immunizations/
Get all Immunizations for a patient
Returns RDF Graph containing: http://smartplatforms.org/terms#Immunization
get_lab_panel = c(self, *args, **kwargs)
GET /records/{record_id}/lab_panels/
Get one Lab Panel for a patient
Returns RDF Graph containing: http://smartplatforms.org/terms#LabPanel
get_lab_panels = c(self, *args, **kwargs)
GET /records/{record_id}/lab_panels/
Get all Lab Panels for a patient
Returns RDF Graph containing: http://smartplatforms.org/terms#LabPanel
get_lab_result = c(self, *args, **kwargs)
GET /records/{record_id}/lab_results/{lab_result_id}
Get one Lab Result for a patient
Returns RDF Graph containing: http://smartplatforms.org/terms#LabResult
get_lab_results = c(self, *args, **kwargs)
GET /records/{record_id}/lab_results/
Get all Lab Results for a patient
Returns RDF Graph containing: http://smartplatforms.org/terms#LabResult
get_medication = c(self, *args, **kwargs)
GET /records/{record_id}/medications/{medication_id}
Get one Medication for a patient
Returns RDF Graph containing: http://smartplatforms.org/terms#Medication
get_medications = c(self, *args, **kwargs)
GET /records/{record_id}/medications/
Get all Medications for a patient
Returns RDF Graph containing: http://smartplatforms.org/terms#Medication
get_ontology = c(self, *args, **kwargs)
GET /ontology
Get the ontology used by a SMART container
Returns RDF Graph containing: http://smartplatforms.org/terms#Ontology
get_problem = c(self, *args, **kwargs)
GET /records/{record_id}/problems/{problem_id}
Get one Problem for a patient
Returns RDF Graph containing: http://smartplatforms.org/terms#Problem
get_problems = c(self, *args, **kwargs)
GET /records/{record_id}/problems/
Get all Problems for a patient
Returns RDF Graph containing: http://smartplatforms.org/terms#Problem
get_procedure = c(self, *args, **kwargs)
GET /records/{record_id}/procedures/{procedure_id}
Get one Procedure for a patient
Returns RDF Graph containing: http://smartplatforms.org/terms#Procedure
get_procedures = c(self, *args, **kwargs)
GET /records/{record_id}/procedures/
Get all Procedures for a patient
Returns RDF Graph containing: http://smartplatforms.org/terms#Procedure
get_scratchpad_data = c(self, *args, **kwargs)
GET /records/{record_id}/apps/{smart_app_id}/scratchpad
Get scratchpad data for an app
Returns RDF Graph containing: http://smartplatforms.org/terms#ScratchpadData
get_social_history = c(self, *args, **kwargs)
GET /records/{record_id}/social_history
Get Social History for a patient
Returns RDF Graph containing: http://smartplatforms.org/terms#SocialHistory
get_surl_credentials(self)
Produces a token and secret for signing URLs.
get_user = c(self, *args, **kwargs)
GET /users/{user_id}
Get a single user by ID
Returns RDF Graph containing: http://smartplatforms.org/terms#User
get_user_preferences = c(self, *args, **kwargs)
GET /users/{user_id}/apps/{smart_app_id}/preferences
Get user preferences for an app
Returns RDF Graph containing: http://smartplatforms.org/terms#UserPreferences
get_vital_sign_set = c(self, *args, **kwargs)
GET /records/{record_id}/vital_sign_sets/{vital_sign_set_id}
Get one Vital Sign Set for a patient
Returns RDF Graph containing: http://smartplatforms.org/terms#VitalSignSet
get_vital_sign_sets = c(self, *args, **kwargs)
GET /records/{record_id}/vital_sign_sets/
Get all Vital Sign Sets for a patient
Returns RDF Graph containing: http://smartplatforms.org/terms#VitalSignSet
post(self, uri, body='', headers={}, content_type=None, **uri_params)
Make an OAuth-signed POST request to SMART Server.
post_clinical_note = c(self, *args, **kwargs)
POST /records/{record_id}/clinical_notes/
Post a Clinical Note for a patient
Returns RDF Graph containing: http://smartplatforms.org/terms#ClinicalNote
put(self, uri, body='', headers={}, content_type=None, **uri_params)
Make an OAuth-signed PUT request to SMART Server.
put_scratchpad_data = c(self, *args, **kwargs)
PUT /records/{record_id}/apps/{smart_app_id}/scratchpad
Set new scratchpad data for an app
Returns RDF Graph containing: http://smartplatforms.org/terms#ScratchpadData
put_user_preferences = c(self, *args, **kwargs)
PUT /users/{user_id}/apps/{smart_app_id}/preferences
Set new user preferences for an app
Returns RDF Graph containing: http://smartplatforms.org/terms#UserPreferences
request(self, uri, uri_params, *args, **kwargs)
search_records = c(self, *args, **kwargs)
GET /records/search
Get an RDF graph of sp:Demographics elements for all patients that match the query. Matching treats family_name and given_name as the *beginning* of a name. For instance given_name='J' matches /^J/i and thus matchs 'Josh'. Date of birth is an ISO8601 string like "2008-03-21"; gender is "male" or "female". Gender, date_of_birth, zipcode, and medical_record_number must match exactly.
Returns RDF Graph containing: http://smartplatforms.org/terms#Demographics
search_users = c(self, *args, **kwargs)
GET /users/search
Get users by name (or all users if blank)
Returns RDF Graph containing: http://smartplatforms.org/terms#User
update_token(self, resource_token)
Update the resource token used by the client to sign requests.
----------------------------------------------------------------------
Data descriptors defined here:
auth_redirect_url
record_id
----------------------------------------------------------------------
Methods inherited from oauth2.Client:
set_signature_method(self, method)
----------------------------------------------------------------------
Methods inherited from oauth2.httplib2.Http:
add_certificate(self, key, cert, domain)
Add a key and cert that will be used
any time a request requires authentication.
add_credentials(self, name, password, domain='')
Add a name and password that will be used
any time a request requires authentication.
clear_credentials(self)
Remove all the names and passwords
that are used for authentication
----------------------------------------------------------------------
Data descriptors inherited from oauth2.httplib2.Http:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)
About
SMArt application API: client library for python
Resources
Stars
Watchers
Forks
Packages 0
No packages published